{"data":[{"meta":{"title":"pkgs.agdaPackages.callPackage","path":["pkgs","agdaPackages","callPackage"],"aliases":[["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":627,"column":9},"attr_expr":"callPackage = self.newScope { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.agdaPackages.mkDerivation","path":["pkgs","agdaPackages","mkDerivation"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/agda-packages.nix","line":26,"column":29},"attr_expr":"mkDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/agda/default.nix","line":161,"column":18},"lambda_expr":"args: stdenv.mkDerivation (args // defaults args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/agda/default.nix","line":161,"column":18},"path":["pkgs","agdaPackages","mkDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/agda/default.nix","line":161,"column":18},"path":["pkgs","agdaPackages","mkDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.agdaPackages.mkLibraryFile","path":["pkgs","agdaPackages","mkLibraryFile"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/agda-packages.nix","line":26,"column":15},"attr_expr":"mkLibraryFile","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/agda/default.nix","line":33,"column":5},"lambda_expr":"pkgs:\n    let\n      pkgs' = if isList pkgs then pkgs else pkgs self;\n    in\n    writeText \"libraries\" ''\n      ${(concatMapStringsSep \"\\n\" (p: \"${p}/${p.libraryFile}\") pkgs')}\n    ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/agda/default.nix","line":33,"column":5},"path":["pkgs","agdaPackages","mkLibraryFile"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/agda/default.nix","line":33,"column":5},"path":["pkgs","agdaPackages","mkLibraryFile"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.agdaPackages.newScope","path":["pkgs","agdaPackages","newScope"],"aliases":[["pkgs","elmPackages","newScope"],["pkgs","emacsPackages","newScope"],["pkgs","rustPackages","newScope"],["pkgs","rustPackages","buildRustPackages","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":9},"attr_expr":"newScope = scope: newScope (self // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"lambda_expr":"scope: newScope (self // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","agdaPackages","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","agdaPackages","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.agdaPackages.override","path":["pkgs","agdaPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.agdaPackages.overrideDerivation","path":["pkgs","agdaPackages","overrideDerivation"],"aliases":[["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","agdaPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","agdaPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.agdaPackages.overrideScope","path":["pkgs","agdaPackages","overrideScope"],"aliases":[["pkgs","elmPackages","overrideScope"],["pkgs","emacsPackages","overrideScope"],["pkgs","rustPackages","overrideScope"],["pkgs","rustPackages","buildRustPackages","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":9},"attr_expr":"overrideScope = g: makeScope newScope (extends g f);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"lambda_expr":"g: makeScope newScope (extends g f)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","agdaPackages","overrideScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","agdaPackages","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.agdaPackages.packages","path":["pkgs","agdaPackages","packages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":633,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/agda-packages.nix","line":12,"column":11},"lambda_expr":"self:\n    let\n      inherit (self) callPackage;\n      inherit\n        (callPackage ../build-support/agda {\n          inherit Agda self;\n          inherit (pkgs.haskellPackages) ghcWithPackages;\n        })\n        withPackages\n        mkLibraryFile\n        mkDerivation\n        ;\n    in\n    {\n      inherit mkLibraryFile mkDerivation;\n\n      lib = lib.extend (final: prev: import ../build-support/agda/lib.nix { lib = prev; });\n\n      agda = withPackages [ ];\n\n      standard-library = callPackage ../development/libraries/agda/standard-library { };\n\n      iowa-stdlib = callPackage ../development/libraries/agda/iowa-stdlib { };\n\n      agda-prelude = callPackage ../development/libraries/agda/agda-prelude { };\n\n      agda-categories = callPackage ../development/libraries/agda/agda-categories { };\n\n      agda2hs-base = callPackage ../development/libraries/agda/agda2hs-base { };\n\n      cubical = callPackage ../development/libraries/agda/cubical { };\n\n      cubical-mini = callPackage ../development/libraries/agda/cubical-mini { };\n\n      functional-linear-algebra = callPackage ../development/libraries/agda/functional-linear-algebra { };\n\n      agdarsec = callPackage ../development/libraries/agda/agdarsec { };\n\n      _1lab = callPackage ../development/libraries/agda/1lab { };\n\n      generics = callPackage ../development/libraries/agda/generics { };\n    }\n    // lib.optionalAttrs config.allowAliases {\n      generic = throw \"agdaPackages.generic has been removed because it is unmaintained upstream and has been marked as broken since 2021. Consider using agdaPackages.generics instead.\"; # Added 2025-10-11\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.appimageTools.extract","path":["pkgs","appimageTools","extract"],"aliases":[["pkgs","appimageTools","extractType1"],["pkgs","appimageTools","extractType2"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":33,"column":3},"attr_expr":"extract =\n    args@{\n      pname,\n      version,\n      name ? null,\n      postExtract ? \"\",\n      src,\n      ...\n    }:\n    assert lib.assertMsg (\n      name == null\n    ) \"The `name` argument is deprecated. Use `pname` and `version` instead to construct the name.\";\n    pkgs.runCommand \"${pname}-${version}-extracted\"\n      {\n        nativeBuildInputs = [ appimage-exec ];\n        strictDeps = true;\n      }\n      ''\n        appimage-exec.sh -x $out ${src}\n        ${postExtract}\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"lambda_expr":"args@{\n      pname,\n      version,\n      name ? null,\n      postExtract ? \"\",\n      src,\n      ...\n    }:\n    assert lib.assertMsg (\n      name == null\n    ) \"The `name` argument is deprecated. Use `pname` and `version` instead to construct the name.\";\n    pkgs.runCommand \"${pname}-${version}-extracted\"\n      {\n        nativeBuildInputs = [ appimage-exec ];\n        strictDeps = true;\n      }\n      ''\n        appimage-exec.sh -x $out ${src}\n        ${postExtract}\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"path":["pkgs","appimageTools","extract"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"path":["pkgs","appimageTools","extract"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.extractType1","path":["pkgs","appimageTools","extractType1"],"aliases":[["pkgs","appimageTools","extract"],["pkgs","appimageTools","extractType2"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":56,"column":3},"attr_expr":"extractType1 = extract;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"lambda_expr":"args@{\n      pname,\n      version,\n      name ? null,\n      postExtract ? \"\",\n      src,\n      ...\n    }:\n    assert lib.assertMsg (\n      name == null\n    ) \"The `name` argument is deprecated. Use `pname` and `version` instead to construct the name.\";\n    pkgs.runCommand \"${pname}-${version}-extracted\"\n      {\n        nativeBuildInputs = [ appimage-exec ];\n        strictDeps = true;\n      }\n      ''\n        appimage-exec.sh -x $out ${src}\n        ${postExtract}\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"path":["pkgs","appimageTools","extractType1"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"path":["pkgs","appimageTools","extractType1"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.extractType2","path":["pkgs","appimageTools","extractType2"],"aliases":[["pkgs","appimageTools","extract"],["pkgs","appimageTools","extractType1"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":57,"column":3},"attr_expr":"extractType2 = extract;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"lambda_expr":"args@{\n      pname,\n      version,\n      name ? null,\n      postExtract ? \"\",\n      src,\n      ...\n    }:\n    assert lib.assertMsg (\n      name == null\n    ) \"The `name` argument is deprecated. Use `pname` and `version` instead to construct the name.\";\n    pkgs.runCommand \"${pname}-${version}-extracted\"\n      {\n        nativeBuildInputs = [ appimage-exec ];\n        strictDeps = true;\n      }\n      ''\n        appimage-exec.sh -x $out ${src}\n        ${postExtract}\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"path":["pkgs","appimageTools","extractType2"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":34,"column":5},"path":["pkgs","appimageTools","extractType2"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.override","path":["pkgs","appimageTools","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.appimageTools.overrideDerivation","path":["pkgs","appimageTools","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","appimageTools","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","appimageTools","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.wrapAppImage","path":["pkgs","appimageTools","wrapAppImage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":60,"column":3},"attr_expr":"wrapAppImage =\n    args@{\n      src,\n      extraPkgs ? pkgs: [ ],\n      meta ? { },\n      ...\n    }:\n    buildFHSEnv (\n      defaultFhsEnvArgs\n      // {\n        targetPkgs = pkgs: [ appimage-exec ] ++ defaultFhsEnvArgs.targetPkgs pkgs ++ extraPkgs pkgs;\n\n        runScript = \"appimage-exec.sh -w ${src} --\";\n\n        meta = {\n          sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];\n        }\n        // meta;\n      }\n      // (removeAttrs args (builtins.attrNames (builtins.functionArgs wrapAppImage)))\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":61,"column":5},"lambda_expr":"args@{\n      src,\n      extraPkgs ? pkgs: [ ],\n      meta ? { },\n      ...\n    }:\n    buildFHSEnv (\n      defaultFhsEnvArgs\n      // {\n        targetPkgs = pkgs: [ appimage-exec ] ++ defaultFhsEnvArgs.targetPkgs pkgs ++ extraPkgs pkgs;\n\n        runScript = \"appimage-exec.sh -w ${src} --\";\n\n        meta = {\n          sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];\n        }\n        // meta;\n      }\n      // (removeAttrs args (builtins.attrNames (builtins.functionArgs wrapAppImage)))\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":61,"column":5},"path":["pkgs","appimageTools","wrapAppImage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":61,"column":5},"path":["pkgs","appimageTools","wrapAppImage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.wrapType1","path":["pkgs","appimageTools","wrapType1"],"aliases":[["pkgs","appimageTools","wrapType2"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":58,"column":3},"attr_expr":"wrapType1 = wrapType2;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":83,"column":5},"lambda_expr":"args@{\n      src,\n      extraPkgs ? pkgs: [ ],\n      ...\n    }:\n    wrapAppImage (\n      args\n      // {\n        inherit extraPkgs;\n        src = extract (\n          lib.filterAttrs (\n            key: value:\n            builtins.elem key [\n              \"pname\"\n              \"version\"\n              \"src\"\n            ]\n          ) args\n        );\n\n        # passthru src to make nix-update work\n        # hack to keep the origin position (unsafeGetAttrPos)\n        passthru =\n          lib.pipe args [\n            lib.attrNames\n            (lib.remove \"src\")\n            (removeAttrs args)\n          ]\n          // args.passthru or { };\n      }\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":83,"column":5},"path":["pkgs","appimageTools","wrapType1"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":83,"column":5},"path":["pkgs","appimageTools","wrapType1"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.wrapType2","path":["pkgs","appimageTools","wrapType2"],"aliases":[["pkgs","appimageTools","wrapType1"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":82,"column":3},"attr_expr":"wrapType2 =\n    args@{\n      src,\n      extraPkgs ? pkgs: [ ],\n      ...\n    }:\n    wrapAppImage (\n      args\n      // {\n        inherit extraPkgs;\n        src = extract (\n          lib.filterAttrs (\n            key: value:\n            builtins.elem key [\n              \"pname\"\n              \"version\"\n              \"src\"\n            ]\n          ) args\n        );\n\n        # passthru src to make nix-update work\n        # hack to keep the origin position (unsafeGetAttrPos)\n        passthru =\n          lib.pipe args [\n            lib.attrNames\n            (lib.remove \"src\")\n            (removeAttrs args)\n          ]\n          // args.passthru or { };\n      }\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":83,"column":5},"lambda_expr":"args@{\n      src,\n      extraPkgs ? pkgs: [ ],\n      ...\n    }:\n    wrapAppImage (\n      args\n      // {\n        inherit extraPkgs;\n        src = extract (\n          lib.filterAttrs (\n            key: value:\n            builtins.elem key [\n              \"pname\"\n              \"version\"\n              \"src\"\n            ]\n          ) args\n        );\n\n        # passthru src to make nix-update work\n        # hack to keep the origin position (unsafeGetAttrPos)\n        passthru =\n          lib.pipe args [\n            lib.attrNames\n            (lib.remove \"src\")\n            (removeAttrs args)\n          ]\n          // args.passthru or { };\n      }\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":83,"column":5},"path":["pkgs","appimageTools","wrapType2"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":83,"column":5},"path":["pkgs","appimageTools","wrapType2"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.defaultFhsEnvArgs.multiPkgs","path":["pkgs","appimageTools","defaultFhsEnvArgs","multiPkgs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":139,"column":5},"attr_expr":"multiPkgs =\n      pkgs: with pkgs; [\n        desktop-file-utils\n        libxcomposite\n        libxtst\n        libxrandr\n        libxext\n        libx11\n        libxfixes\n        libGL\n\n        gst_all_1.gstreamer\n        gst_all_1.gst-plugins-ugly\n        gst_all_1.gst-plugins-base\n        libdrm\n        xkeyboard-config\n        libpciaccess\n\n        glib\n        bzip2\n        zlib\n        gdk-pixbuf\n\n        libxinerama\n        libxdamage\n        libxcursor\n        libxrender\n        libxscrnsaver\n        libxxf86vm\n        libxi\n        libsm\n        libice\n        freetype\n        curlWithGnuTls\n        nspr\n        nss\n        fontconfig\n        cairo\n        pango\n        expat\n        dbus\n        cups\n        libcap\n        SDL2\n        libusb1\n        udev\n        dbus-glib\n        atk\n        at-spi2-atk\n        libudev0-shim\n\n        libxt\n        libxmu\n        libxcb\n        libxcb-util\n        libxcb-wm\n        libxcb-image\n        libxcb-keysyms\n        libxcb-render-util\n        libGLU\n        libuuid\n        libogg\n        libvorbis\n        SDL2_image\n        glew_1_10\n        openssl\n        libidn\n        onetbb\n        wayland\n        libgbm\n        libxkbcommon\n        vulkan-loader\n\n        flac\n        libglut\n        libjpeg\n        libpng12\n        libpulseaudio\n        libsamplerate\n        libmikmod\n        libthai\n        libtheora\n        libtiff\n        pixman\n        speex\n        SDL2_ttf\n        SDL2_mixer\n        libcaca\n        libcanberra\n        libgcrypt\n        libvpx\n        librsvg\n        libxft\n        libvdpau\n        alsa-lib\n\n        harfbuzz\n        e2fsprogs\n        libgpg-error\n        keyutils.lib\n        libjack2\n        fribidi\n        p11-kit\n\n        gmp\n\n        # libraries not on the upstream include list, but nevertheless expected\n        # by at least one appimage\n        libtool.lib # for Synfigstudio\n        at-spi2-core\n        pciutils # for FreeCAD\n        pipewire # immersed-vr wayland support\n        libmpg123 # Slippi launcher\n        brotli # TwitchDropsMiner\n      ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":140,"column":7},"lambda_expr":"multiPkgs =\n      pkgs: with pkgs; [\n        desktop-file-utils\n        libxcomposite\n        libxtst\n        libxrandr\n        libxext\n        libx11\n        libxfixes\n        libGL\n\n        gst_all_1.gstreamer\n        gst_all_1.gst-plugins-ugly\n        gst_all_1.gst-plugins-base\n        libdrm\n        xkeyboard-config\n        libpciaccess\n\n        glib\n        bzip2\n        zlib\n        gdk-pixbuf\n\n        libxinerama\n        libxdamage\n        libxcursor\n        libxrender\n        libxscrnsaver\n        libxxf86vm\n        libxi\n        libsm\n        libice\n        freetype\n        curlWithGnuTls\n        nspr\n        nss\n        fontconfig\n        cairo\n        pango\n        expat\n        dbus\n        cups\n        libcap\n        SDL2\n        libusb1\n        udev\n        dbus-glib\n        atk\n        at-spi2-atk\n        libudev0-shim\n\n        libxt\n        libxmu\n        libxcb\n        libxcb-util\n        libxcb-wm\n        libxcb-image\n        libxcb-keysyms\n        libxcb-render-util\n        libGLU\n        libuuid\n        libogg\n        libvorbis\n        SDL2_image\n        glew_1_10\n        openssl\n        libidn\n        onetbb\n        wayland\n        libgbm\n        libxkbcommon\n        vulkan-loader\n\n        flac\n        libglut\n        libjpeg\n        libpng12\n        libpulseaudio\n        libsamplerate\n        libmikmod\n        libthai\n        libtheora\n        libtiff\n        pixman\n        speex\n        SDL2_ttf\n        SDL2_mixer\n        libcaca\n        libcanberra\n        libgcrypt\n        libvpx\n        librsvg\n        libxft\n        libvdpau\n        alsa-lib\n\n        harfbuzz\n        e2fsprogs\n        libgpg-error\n        keyutils.lib\n        libjack2\n        fribidi\n        p11-kit\n\n        gmp\n\n        # libraries not on the upstream include list, but nevertheless expected\n        # by at least one appimage\n        libtool.lib # for Synfigstudio\n        at-spi2-core\n        pciutils # for FreeCAD\n        pipewire # immersed-vr wayland support\n        libmpg123 # Slippi launcher\n        brotli # TwitchDropsMiner\n      ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":140,"column":7},"path":["pkgs","appimageTools","defaultFhsEnvArgs","multiPkgs"],"pos_type":"Lambda"}},"content":{"content":"https://github.com/AppImage/pkg2appimage/blob/master/excludelist","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":140,"column":7},"path":["pkgs","appimageTools","defaultFhsEnvArgs","multiPkgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appimageTools.defaultFhsEnvArgs.targetPkgs","path":["pkgs","appimageTools","defaultFhsEnvArgs","targetPkgs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":117,"column":5},"attr_expr":"targetPkgs =\n      pkgs: with pkgs; [\n        gtk3\n        bashInteractive\n        zenity\n        xrandr\n        which\n        perl\n        xdg-user-dirs # flutter desktop apps\n        xdg-utils\n        iana-etc\n        krb5\n        gsettings-desktop-schemas\n        hicolor-icon-theme # dont show a gtk warning about hicolor not being installed\n\n        # libraries not on the upstream include list, but nevertheless expected\n        # by at least one appimage\n        libsecret # For bitwarden, appimage is x86_64 only\n      ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":118,"column":7},"lambda_expr":"targetPkgs =\n      pkgs: with pkgs; [\n        gtk3\n        bashInteractive\n        zenity\n        xrandr\n        which\n        perl\n        xdg-user-dirs # flutter desktop apps\n        xdg-utils\n        iana-etc\n        krb5\n        gsettings-desktop-schemas\n        hicolor-icon-theme # dont show a gtk warning about hicolor not being installed\n\n        # libraries not on the upstream include list, but nevertheless expected\n        # by at least one appimage\n        libsecret # For bitwarden, appimage is x86_64 only\n      ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":118,"column":7},"path":["pkgs","appimageTools","defaultFhsEnvArgs","targetPkgs"],"pos_type":"Lambda"}},"content":{"content":"Most of the packages were taken from the Steam chroot","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/appimage/default.nix","line":118,"column":7},"path":["pkgs","appimageTools","defaultFhsEnvArgs","targetPkgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.__unfix__","path":["pkgs","beamPackages","__unfix__"],"aliases":[["pkgs","beamPackages","beamPackages","__unfix__"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":122,"column":9},"attr_expr":"__unfix__ = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":453,"column":7},"lambda_expr":"self:\n      (rattrs self)\n      // {\n        ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":453,"column":7},"path":["pkgs","beamPackages","__unfix__"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":453,"column":7},"path":["pkgs","beamPackages","__unfix__"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildErlangMk","path":["pkgs","beamPackages","buildErlangMk"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":43,"column":7},"attr_expr":"buildErlangMk = callPackage ./build-erlang-mk.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-erlang-mk.nix","line":12,"column":1},"lambda_expr":"{\n  name,\n  version,\n  src,\n  setupHook ? null,\n  buildInputs ? [ ],\n  beamDeps ? [ ],\n  postPatch ? \"\",\n  compilePorts ? false,\n  installPhase ? null,\n  buildPhase ? null,\n  configurePhase ? null,\n  meta ? { },\n  enableDebugInfo ? false,\n  buildFlags ? [ ],\n  ...\n}@attrs:\n\nlet\n  debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) \"+debug_info\";\n\n  shell =\n    drv:\n    stdenv.mkDerivation {\n      name = \"interactive-shell-${drv.name}\";\n      buildInputs = [ drv ];\n    };\n\n  pkg =\n    self:\n    stdenv.mkDerivation (\n      attrs\n      // {\n        app_name = name;\n        name = \"${name}-${version}\";\n        inherit version;\n\n        dontStrip = true;\n\n        inherit src;\n\n        setupHook =\n          if setupHook == null then\n            writeText \"setupHook.sh\" ''\n              addToSearchPath ERL_LIBS \"$1/lib/erlang/lib\"\n            ''\n          else\n            setupHook;\n\n        buildInputs = buildInputs ++ [\n          erlang\n          perl\n          which\n          gitMinimal\n          wget\n        ];\n        propagatedBuildInputs = beamDeps;\n\n        buildFlags = [\n          \"SKIP_DEPS=1\"\n        ]\n        ++ lib.optional (enableDebugInfo || erlang.debugInfo) ''ERL_OPTS=\"$ERL_OPTS +debug_info\"''\n        ++ buildFlags;\n\n        configurePhase =\n          if configurePhase == null then\n            ''\n              runHook preConfigure\n\n              # We shouldnt need to do this, but it seems at times there is a *.app in\n              # the repo/package. This ensures we start from a clean slate\n              make SKIP_DEPS=1 clean\n\n              runHook postConfigure\n            ''\n          else\n            configurePhase;\n\n        buildPhase =\n          if buildPhase == null then\n            ''\n              runHook preBuild\n\n              make $buildFlags \"''${buildFlagsArray[@]}\"\n\n              runHook postBuild\n            ''\n          else\n            buildPhase;\n\n        installPhase =\n          if installPhase == null then\n            ''\n              runHook preInstall\n\n              mkdir -p $out/lib/erlang/lib/${name}\n              cp -r ebin $out/lib/erlang/lib/${name}/\n              cp -r src $out/lib/erlang/lib/${name}/\n\n              if [ -d include ]; then\n                cp -r include $out/lib/erlang/lib/${name}/\n              fi\n\n              if [ -d priv ]; then\n                cp -r priv $out/lib/erlang/lib/${name}/\n              fi\n\n              if [ -d doc ]; then\n                cp -r doc $out/lib/erlang/lib/${name}/\n              fi\n\n              runHook postInstall\n            ''\n          else\n            installPhase;\n\n        passthru = {\n          packageName = name;\n          env = shell self;\n          inherit beamDeps;\n        };\n      }\n    );\nin\nlib.fix pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-erlang-mk.nix","line":12,"column":1},"path":["pkgs","beamPackages","buildErlangMk"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-erlang-mk.nix","line":12,"column":1},"path":["pkgs","beamPackages","buildErlangMk"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildMix","path":["pkgs","beamPackages","buildMix"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":44,"column":7},"attr_expr":"buildMix = callPackage ./build-mix.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","buildMix"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","buildMix"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildRebar3","path":["pkgs","beamPackages","buildRebar3"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":42,"column":7},"attr_expr":"buildRebar3 = callPackage ./build-rebar3.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","buildRebar3"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","buildRebar3"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.callPackage","path":["pkgs","beamPackages","callPackage"],"aliases":[["pkgs","beamPackages","beamPackages","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":27,"column":15},"attr_expr":"callPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":23,"column":21},"lambda_expr":"drv: args: callPackageWithScope defaultScope drv args","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":23,"column":21},"path":["pkgs","beamPackages","callPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":23,"column":21},"path":["pkgs","beamPackages","callPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.extend","path":["pkgs","beamPackages","extend"],"aliases":[["pkgs","beamPackages","beamPackages","extend"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":9},"attr_expr":"${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":27},"lambda_expr":"f: makeExtensibleWithCustomName extenderName (extends f rattrs)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":27},"path":["pkgs","beamPackages","extend"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":27},"path":["pkgs","beamPackages","extend"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.fetchHex","path":["pkgs","beamPackages","fetchHex"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":37,"column":7},"attr_expr":"fetchHex = callPackage ./fetch-hex.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"lambda_expr":"{\n  pkg,\n  version,\n  sha256,\n  meta ? { },\n}:\n\nstdenv.mkDerivation {\n  pname = pkg;\n  inherit version;\n  dontBuild = true;\n  dontConfigure = true;\n  dontFixup = true;\n\n  src = fetchurl {\n    url = \"https://repo.hex.pm/tarballs/${pkg}-${version}.tar\";\n    inherit sha256;\n  };\n\n  unpackCmd = ''\n    tar -xf $curSrc contents.tar.gz CHECKSUM metadata.config\n    mkdir contents\n    tar -C contents -xzf contents.tar.gz\n    mv metadata.config contents/hex_metadata.config\n\n    # To make the extracted hex tarballs appear legitimate to mix, we need to\n    # make sure they contain not just the contents of contents.tar.gz but also\n    # a .hex file with some lock metadata.\n    # We use an old version of .hex file per hex's mix_task_test.exs since it\n    # is just plain-text instead of an encoded format.\n    # See: https://github.com/hexpm/hex/blob/main/test/hex/mix_task_test.exs#L410\n    echo -n \"${pkg},${version},$(cat CHECKSUM | tr '[:upper:]' '[:lower:]'),hexpm\" > contents/.hex\n  '';\n\n  installPhase = ''\n    runHook preInstall\n    mkdir \"$out\"\n    cp -Hrt \"$out\" .\n    success=1\n    runHook postInstall\n  '';\n\n  inherit meta;\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"path":["pkgs","beamPackages","fetchHex"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"path":["pkgs","beamPackages","fetchHex"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.fetchMixDeps","path":["pkgs","beamPackages","fetchMixDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":45,"column":7},"attr_expr":"fetchMixDeps = callPackage ./fetch-mix-deps.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-mix-deps.nix","line":12,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  hash ? \"\",\n  sha256 ? \"\",\n  src,\n  mixEnv ? \"prod\",\n  mixTarget ? \"host\",\n  debug ? false,\n  meta ? { },\n  patches ? [ ],\n  elixir ? inputs.elixir,\n  hex ? inputs.hex.override { inherit elixir; },\n  ...\n}@attrs:\n\nlet\n  hash_ =\n    if hash != \"\" then\n      {\n        outputHashAlgo = null;\n        outputHash = hash;\n      }\n    else if sha256 != \"\" then\n      {\n        outputHashAlgo = \"sha256\";\n        outputHash = sha256;\n      }\n    else\n      {\n        outputHashAlgo = \"sha256\";\n        outputHash = lib.fakeSha256;\n      };\nin\nstdenvNoCC.mkDerivation (\n  attrs\n  // {\n    nativeBuildInputs = [\n      elixir\n      hex\n      cacert\n      git\n    ];\n\n    env = {\n      MIX_ENV = mixEnv;\n      MIX_TARGET = mixTarget;\n      MIX_DEBUG = if debug then 1 else 0;\n      DEBUG = if debug then 1 else 0; # for rebar3\n      # the api with `mix local.rebar rebar path` makes a copy of the binary\n      MIX_REBAR = \"${rebar}/bin/rebar\";\n      MIX_REBAR3 = \"${rebar3}/bin/rebar3\";\n      # there is a persistent download failure with absinthe 1.6.3\n      # those defaults reduce the failure rate\n      HEX_HTTP_CONCURRENCY = 1;\n      HEX_HTTP_TIMEOUT = 120;\n    }\n    // (attrs.env or { });\n\n    configurePhase =\n      attrs.configurePhase or ''\n        runHook preConfigure\n        export HEX_HOME=\"$TEMPDIR/.hex\";\n        export MIX_HOME=\"$TEMPDIR/.mix\";\n        export MIX_DEPS_PATH=\"$TEMPDIR/deps\";\n\n        # Rebar\n        export REBAR_GLOBAL_CONFIG_DIR=\"$TMPDIR/rebar3\"\n        export REBAR_CACHE_DIR=\"$TMPDIR/rebar3.cache\"\n        runHook postConfigure\n      '';\n\n    inherit patches;\n\n    dontBuild = true;\n\n    installPhase =\n      attrs.installPhase or ''\n        runHook preInstall\n        mix deps.get ''${MIX_ENV:+--only $MIX_ENV}\n        find \"$TEMPDIR/deps\" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} +\n        cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out\n        runHook postInstall\n      '';\n\n    outputHashMode = \"recursive\";\n\n    impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n    inherit meta;\n  }\n  // hash_\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-mix-deps.nix","line":12,"column":1},"path":["pkgs","beamPackages","fetchMixDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-mix-deps.nix","line":12,"column":1},"path":["pkgs","beamPackages","fetchMixDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.fetchRebar3Deps","path":["pkgs","beamPackages","fetchRebar3Deps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":39,"column":7},"attr_expr":"fetchRebar3Deps = callPackage ./fetch-rebar-deps.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-rebar-deps.nix","line":7,"column":1},"lambda_expr":"{\n  name,\n  version,\n  sha256,\n  src,\n  meta ? { },\n}:\n\nstdenv.mkDerivation {\n  pname = \"rebar-deps-${name}\";\n  inherit version;\n\n  dontUnpack = true;\n  dontConfigure = true;\n  dontFixup = true;\n\n  buildPhase = ''\n    cp -r ${src} src\n    chmod -R u+w src\n    cd src\n    HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps\n  '';\n\n  installPhase = ''\n    runHook preInstall\n    mkdir -p \"$out/_checkouts\"\n    for i in ./_build/default/lib/* ; do\n       echo \"$i\"\n       cp -R \"$i\" \"$out/_checkouts\"\n    done\n    runHook postInstall\n  '';\n\n  outputHashAlgo = \"sha256\";\n  outputHashMode = \"recursive\";\n  outputHash = sha256;\n\n  impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n  inherit meta;\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-rebar-deps.nix","line":7,"column":1},"path":["pkgs","beamPackages","fetchRebar3Deps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-rebar-deps.nix","line":7,"column":1},"path":["pkgs","beamPackages","fetchRebar3Deps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.mixRelease","path":["pkgs","beamPackages","mixRelease"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":46,"column":7},"attr_expr":"mixRelease = callPackage ./mix-release.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/mix-release.nix","line":22,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  src,\n  nativeBuildInputs ? [ ],\n  buildInputs ? [ ],\n  meta ? { },\n  enableDebugInfo ? false,\n  mixEnv ? \"prod\",\n  mixTarget ? \"host\",\n  compileFlags ? [ ],\n  # Build a particular named release.\n  # see https://hexdocs.pm/mix/1.12/Mix.Tasks.Release.html#content\n  mixReleaseName ? \"\",\n  # If set, the given escript binary will be copied to the output\n  # instead of the release\n  escriptBinName ? null,\n\n  # Options to be passed to the Erlang compiler. As documented in the reference\n  # manual, these must be valid Erlang terms. They will be turned into an\n  # erlang list and set as the ERL_COMPILER_OPTIONS environment variable.\n  # See https://www.erlang.org/doc/man/compile\n  erlangCompilerOptions ? [ ],\n\n  # Deterministic Erlang builds remove full system paths from debug information\n  # among other things to keep builds more reproducible. See their docs for more:\n  # https://www.erlang.org/doc/man/compile\n  erlangDeterministicBuilds ? true,\n\n  # Mix dependencies provided as a fixed output derivation\n  mixFodDeps ? null,\n\n  # Mix dependencies generated by mix2nix\n  #\n  # This assumes each dependency is built by buildMix or buildRebar3. Each\n  # dependency needs to have a setup hook to add the lib path to $ERL_LIBS.\n  # This is how Mix finds dependencies.\n  mixNixDeps ? { },\n\n  elixir ? inputs.elixir,\n  erlang ? inputs.erlang,\n  hex ? inputs.hex.override { inherit elixir; },\n\n  # Remove releases/COOKIE\n  #\n  # People have different views on the nature of cookies. Some believe that they are\n  # secrets, while others believe they are just ids for clustering nodes instead of\n  # secrets.\n  #\n  # If you think cookie is secret, you can set this attr to true, then it will be\n  # removed from nix store. If not, you can set it to false.\n  #\n  # For backward compatibility, it is set to true by default.\n  #\n  # You can always specify a custom cookie by using RELEASE_COOKIE environment\n  # variable, regardless of the value of this attr.\n  removeCookie ? true,\n\n  # This reduces closure size, but can lead to some hard to understand runtime\n  # errors, so use with caution. See e.g.\n  # https://github.com/whitfin/cachex/issues/205\n  # https://framagit.org/framasoft/mobilizon/-/issues/1169\n  stripDebug ? false,\n\n  ...\n}@attrs:\nlet\n  # Remove non standard attributes that cannot be coerced to strings\n  overridable = removeAttrs attrs [\n    \"compileFlags\"\n    \"erlangCompilerOptions\"\n    \"mixNixDeps\"\n  ];\nin\nassert mixNixDeps != { } -> mixFodDeps == null;\nassert stripDebug -> !enableDebugInfo;\nassert escriptBinName != null -> mixReleaseName == \"\";\n\nstdenv.mkDerivation (\n  overridable\n  // {\n    nativeBuildInputs =\n      nativeBuildInputs\n      ++\n        # Erlang/Elixir deps\n        [\n          erlang\n          elixir\n          hex\n          git\n          mixBuildDirHook\n        ]\n      ++\n        # Mix deps\n        (builtins.attrValues mixNixDeps)\n      ++\n        # other compile-time deps\n        [\n          findutils\n          ripgrep\n          bbe\n          makeWrapper\n        ];\n\n    buildInputs = buildInputs ++ lib.optionals (escriptBinName != null) [ erlang ];\n\n    __darwinAllowLocalNetworking = true;\n\n    env = {\n      MIX_ENV = mixEnv;\n      MIX_TARGET = mixTarget;\n      MIX_BUILD_PREFIX = (if mixTarget == \"host\" then \"\" else \"${mixTarget}_\") + \"${mixEnv}\";\n      MIX_DEBUG = if enableDebugInfo then 1 else 0;\n      HEX_OFFLINE = 1;\n\n      DEBUG = if enableDebugInfo then 1 else 0; # for Rebar3 compilation\n      # The API with `mix local.rebar rebar path` makes a copy of the binary\n      # some older dependencies still use rebar.\n      MIX_REBAR = \"${rebar}/bin/rebar\";\n      MIX_REBAR3 = \"${rebar3}/bin/rebar3\";\n\n      ERL_COMPILER_OPTIONS =\n        let\n          options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ \"deterministic\" ];\n        in\n        \"[${lib.concatStringsSep \",\" options}]\";\n\n      LANG = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"C\";\n      LC_CTYPE = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"UTF-8\";\n    }\n    // (attrs.env or { });\n\n    postUnpack = ''\n      # Mix and Hex\n      export MIX_HOME=\"$TEMPDIR/mix\"\n      export HEX_HOME=\"$TEMPDIR/hex\"\n\n      # Rebar\n      export REBAR_GLOBAL_CONFIG_DIR=\"$TEMPDIR/rebar3\"\n      export REBAR_CACHE_DIR=\"$TEMPDIR/rebar3.cache\"\n\n      ${lib.optionalString (mixFodDeps != null) ''\n        # Compilation of the dependencies will require that the dependency path is\n        # writable, thus a copy to the $TEMPDIR is inevitable here.\n        export MIX_DEPS_PATH=\"$TEMPDIR/deps\"\n        cp --no-preserve=mode -R \"${mixFodDeps}\" \"$MIX_DEPS_PATH\"\n      ''}\n    ''\n    + (attrs.postUnpack or \"\");\n\n    configurePhase =\n      attrs.configurePhase or ''\n        runHook preConfigure\n\n        # This is needed for projects that have a specific compile step\n        # the dependency needs to be compiled in order for the task\n        # to be available.\n        #\n        # Phoenix projects for example will need compile.phoenix.\n        mix deps.compile --no-deps-check --skip-umbrella-children\n\n        # Symlink dependency sources. This is needed for projects that require\n        # access to the source of their dependencies. For example, Phoenix\n        # projects need javascript assets to build asset bundles.\n        ${lib.optionalString (mixNixDeps != { }) ''\n          mkdir -p deps\n\n          ${lib.concatMapAttrsStringSep \"\\n\" (name: dep: ''\n            dep_path=\"deps/${name}\"\n            if [ -d \"${dep}/src\" ]; then\n              ln -sv ${dep}/src $dep_path\n            fi\n          '') mixNixDeps}\n        ''}\n\n        # Symlink deps to build root. Similar to above, but allows for mixFodDeps\n        # Phoenix projects to find javascript assets.\n        ${lib.optionalString (mixFodDeps != null) ''\n          ln -s \"$MIX_DEPS_PATH\" ./deps\n        ''}\n\n        runHook postConfigure\n      '';\n\n    buildPhase =\n      attrs.buildPhase or ''\n        runHook preBuild\n\n        mix compile --no-deps-check ${lib.concatStringsSep \" \" compileFlags}\n\n        ${lib.optionalString (escriptBinName != null) ''\n          mix escript.build --no-deps-check\n        ''}\n\n        runHook postBuild\n      '';\n\n    installPhase =\n      attrs.installPhase or ''\n        runHook preInstall\n\n        ${\n          if (escriptBinName != null) then\n            ''\n              mkdir -p $out/bin\n              cp ${escriptBinName} $out/bin\n            ''\n          else\n            ''\n              mix release ${mixReleaseName} --no-deps-check --path \"$out\"\n            ''\n        }\n\n        runHook postInstall\n      '';\n\n    postFixup = ''\n      echo \"removing files for Microsoft Windows\"\n      rm -f \"$out\"/bin/*.bat\n\n      echo \"wrapping programs in $out/bin with their runtime deps\"\n      for f in $(find $out/bin/ -type f -executable); do\n        wrapProgram \"$f\" \\\n          --prefix PATH : ${\n            lib.makeBinPath [\n              coreutils\n              gnused\n              gnugrep\n              gawk\n            ]\n          }\n      done\n    ''\n    + lib.optionalString removeCookie ''\n      if [ -e $out/releases/COOKIE ]; then\n        echo \"removing $out/releases/COOKIE\"\n        rm $out/releases/COOKIE\n      fi\n    ''\n    + ''\n      if [ -e $out/erts-* ]; then\n        # ERTS is included in the release, then erlang is not required as a runtime dependency.\n        # But, erlang is still referenced in some places. To removed references to erlang,\n        # following steps are required.\n\n        # 1. remove references to erlang from plain text files\n        for file in $(rg \"${erlang}/lib/erlang\" \"$out\" --files-with-matches); do\n          echo \"removing references to erlang in $file\"\n          substituteInPlace \"$file\" --replace \"${erlang}/lib/erlang\" \"$out\"\n        done\n\n        # 2. remove references to erlang from .beam files\n        #\n        # No need to do anything, because it has been handled by \"deterministic\" option specified\n        # by ERL_COMPILER_OPTIONS.\n\n        # 3. remove references to erlang from normal binary files\n        for file in $(rg \"${erlang}/lib/erlang\" \"$out\" --files-with-matches --binary --iglob '!*.beam'); do\n          echo \"removing references to erlang in $file\"\n          # use bbe to substitute strings in binary files, because using substituteInPlace\n          # on binaries will raise errors\n          bbe -e \"s|${erlang}/lib/erlang|$out|\" -o \"$file\".tmp \"$file\"\n          rm -f \"$file\"\n          mv \"$file\".tmp \"$file\"\n        done\n\n        # References to erlang should be removed from output after above processing.\n      fi\n    ''\n    + lib.optionalString stripDebug ''\n      # Strip debug symbols to avoid hardreferences to \"foreign\" closures actually\n      # not needed at runtime, while at the same time reduce size of BEAM files.\n      erl -noinput -eval 'lists:foreach(fun(F) -> io:format(\"Stripping ~p.~n\", [F]), beam_lib:strip(F) end, filelib:wildcard(\"'\"$out\"'/**/*.beam\"))' -s init stop\n    '';\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/mix-release.nix","line":22,"column":1},"path":["pkgs","beamPackages","mixRelease"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/mix-release.nix","line":22,"column":1},"path":["pkgs","beamPackages","mixRelease"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.rebar3Relx","path":["pkgs","beamPackages","rebar3Relx"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":40,"column":7},"attr_expr":"rebar3Relx = callPackage ./rebar3-release.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/rebar3-release.nix","line":9,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  src,\n  beamDeps ? [ ],\n  buildPlugins ? [ ],\n  checkouts ? null,\n  releaseType,\n  buildInputs ? [ ],\n  setupHook ? null,\n  profile ? \"default\",\n  installPhase ? null,\n  buildPhase ? null,\n  configurePhase ? null,\n  meta ? { },\n  ...\n}@attrs:\n\nlet\n  shell =\n    drv:\n    stdenv.mkDerivation {\n      name = \"interactive-shell-${drv.pname}\";\n      buildInputs = [ drv ];\n    };\n\n  customPhases = lib.filterAttrs (_: v: v != null) {\n    inherit\n      setupHook\n      configurePhase\n      buildPhase\n      installPhase\n      ;\n  };\n\n  # When using the `beamDeps` argument, it is important that we use\n  # `rebar3WithPlugins` here even when there are no plugins. The vanilla\n  # `rebar3` package is an escript archive with bundled dependencies which can\n  # interfere with those in the app we are trying to build. `rebar3WithPlugins`\n  # doesn't have this issue since it puts its own deps last on the code path.\n  rebar3 = rebar3WithPlugins {\n    plugins = buildPlugins;\n  };\n\n  pkg =\n    assert beamDeps != [ ] -> checkouts == null;\n    self:\n    stdenv.mkDerivation (\n      attrs\n      // {\n\n        inherit version pname;\n\n        buildInputs =\n          buildInputs\n          ++ [\n            erlang\n            rebar3\n            openssl\n          ]\n          ++ beamDeps;\n\n        # ensure we strip any native binaries (eg. NIFs, ports)\n        stripDebugList = lib.optional (releaseType == \"release\") \"rel\";\n\n        inherit src;\n\n        env = (attrs.env or { }) // {\n          REBAR_IGNORE_DEPS = beamDeps != [ ];\n        };\n\n        configurePhase = ''\n          runHook preConfigure\n          ${lib.optionalString (checkouts != null) \"cp --no-preserve=all -R ${checkouts}/_checkouts .\"}\n          runHook postConfigure\n        '';\n\n        buildPhase = ''\n          runHook preBuild\n          HOME=. DEBUG=1 rebar3 as ${profile} ${if releaseType == \"escript\" then \"escriptize\" else \"release\"}\n          runHook postBuild\n        '';\n\n        installPhase = ''\n          runHook preInstall\n          dir=${if releaseType == \"escript\" then \"bin\" else \"rel\"}\n          mkdir -p \"$out/$dir\" \"$out/bin\"\n          cp -R --preserve=mode \"_build/${profile}/$dir\" \"$out\"\n          ${lib.optionalString (\n            releaseType == \"release\"\n          ) \"find $out/rel/*/bin -type f -executable -exec ln -s -t $out/bin {} \\\\;\"}\n          runHook postInstall\n        '';\n\n        # Release will generate a binary which will cause a read null byte failure, see #261354\n        postInstall = lib.optionalString (releaseType == \"escript\") ''\n          for dir in $out/rel/*/erts-*; do\n            echo \"ERTS found in $dir - removing references to erlang to reduce closure size\"\n            for f in $dir/bin/{erl,start}; do\n              substituteInPlace \"$f\" --replace \"${erlang}/lib/erlang\" \"''${dir/\\/erts-*/}\"\n            done\n          done\n        '';\n\n        meta = {\n          inherit (erlang.meta) platforms;\n        }\n        // meta;\n\n        passthru = (\n          {\n            packageName = pname;\n            env = shell self;\n          }\n          // (if attrs ? passthru then attrs.passthru else { })\n        );\n      }\n      // customPhases\n    );\nin\nlib.fix pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/rebar3-release.nix","line":9,"column":1},"path":["pkgs","beamPackages","rebar3Relx"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/rebar3-release.nix","line":9,"column":1},"path":["pkgs","beamPackages","rebar3Relx"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.rebar3WithPlugins","path":["pkgs","beamPackages","rebar3WithPlugins"],"aliases":[["pkgs","beamPackages","beamPackages","rebar3WithPlugins"],["pkgs","rebar3WithPlugins"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":30,"column":71},"attr_expr":"rebar3WithPlugins","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"lambda_expr":"{\n      plugins ? [ ],\n      globalPlugins ? [ ],\n      rebar3 ? _rebar3,\n    }:\n    let\n      pluginLibDirs = map (p: \"${p}/lib/erlang/lib\") (lib.unique (plugins ++ globalPlugins));\n      globalPluginNames = lib.unique (map (p: p.pname) globalPlugins);\n      rebar3Patched = (\n        rebar3.overrideAttrs (old: {\n\n          # skip-plugins.patch is necessary because otherwise rebar3 will always\n          # try to fetch plugins if they are not already present in _build.\n          #\n          # global-deps.patch makes it possible to use REBAR_GLOBAL_PLUGINS to\n          # instruct rebar3 to always load a certain plugin. It is necessary since\n          # REBAR_GLOBAL_CONFIG_DIR doesn't seem to work for this.\n          patches = [\n            ./skip-plugins.patch\n            ./global-plugins.patch\n          ];\n\n          # our patches cause the tests to fail\n          doCheck = false;\n        })\n      );\n    in\n    stdenv.mkDerivation {\n      pname = \"rebar3-with-plugins\";\n      inherit (rebar3) version;\n      nativeBuildInputs = [\n        erlang\n        makeWrapper\n      ];\n      unpackPhase = \"true\";\n\n      # Here we extract the rebar3 escript (like `rebar3_prv_local_install.erl`) and\n      # add plugins to the code path.\n\n      installPhase = ''\n        erl -noshell -eval '\n          {ok, Escript} = escript:extract(\"${rebar3Patched}/bin/rebar3\", []),\n          {archive, Archive} = lists:keyfind(archive, 1, Escript),\n          {ok, _} = zip:extract(Archive, [{cwd, \"'$out/lib'\"}]),\n          init:stop(0)\n        '\n        cp ${./rebar_ignore_deps.erl} rebar_ignore_deps.erl\n        erlc -o $out/lib/rebar/ebin rebar_ignore_deps.erl\n        mkdir -p $out/bin\n        makeWrapper ${erlang}/bin/erl $out/bin/rebar3 \\\n          --set REBAR_GLOBAL_PLUGINS \"${toString globalPluginNames} rebar_ignore_deps\" \\\n          --suffix-each ERL_LIBS \":\" \"$out/lib ${toString pluginLibDirs}\" \\\n          --add-flags \"+sbtu +A1 -noshell -boot start_clean -s rebar3 main -extra\"\n      '';\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"path":["pkgs","beamPackages","rebar3WithPlugins"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"path":["pkgs","beamPackages","rebar3WithPlugins"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.__unfix__","path":["pkgs","beamPackages","beamPackages","__unfix__"],"aliases":[["pkgs","beamPackages","__unfix__"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":122,"column":9},"attr_expr":"__unfix__ = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":453,"column":7},"lambda_expr":"self:\n      (rattrs self)\n      // {\n        ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":453,"column":7},"path":["pkgs","beamPackages","beamPackages","__unfix__"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":453,"column":7},"path":["pkgs","beamPackages","beamPackages","__unfix__"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildErlangMk","path":["pkgs","beamPackages","beamPackages","buildErlangMk"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":43,"column":7},"attr_expr":"buildErlangMk = callPackage ./build-erlang-mk.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-erlang-mk.nix","line":12,"column":1},"lambda_expr":"{\n  name,\n  version,\n  src,\n  setupHook ? null,\n  buildInputs ? [ ],\n  beamDeps ? [ ],\n  postPatch ? \"\",\n  compilePorts ? false,\n  installPhase ? null,\n  buildPhase ? null,\n  configurePhase ? null,\n  meta ? { },\n  enableDebugInfo ? false,\n  buildFlags ? [ ],\n  ...\n}@attrs:\n\nlet\n  debugInfoFlag = lib.optionalString (enableDebugInfo || erlang.debugInfo) \"+debug_info\";\n\n  shell =\n    drv:\n    stdenv.mkDerivation {\n      name = \"interactive-shell-${drv.name}\";\n      buildInputs = [ drv ];\n    };\n\n  pkg =\n    self:\n    stdenv.mkDerivation (\n      attrs\n      // {\n        app_name = name;\n        name = \"${name}-${version}\";\n        inherit version;\n\n        dontStrip = true;\n\n        inherit src;\n\n        setupHook =\n          if setupHook == null then\n            writeText \"setupHook.sh\" ''\n              addToSearchPath ERL_LIBS \"$1/lib/erlang/lib\"\n            ''\n          else\n            setupHook;\n\n        buildInputs = buildInputs ++ [\n          erlang\n          perl\n          which\n          gitMinimal\n          wget\n        ];\n        propagatedBuildInputs = beamDeps;\n\n        buildFlags = [\n          \"SKIP_DEPS=1\"\n        ]\n        ++ lib.optional (enableDebugInfo || erlang.debugInfo) ''ERL_OPTS=\"$ERL_OPTS +debug_info\"''\n        ++ buildFlags;\n\n        configurePhase =\n          if configurePhase == null then\n            ''\n              runHook preConfigure\n\n              # We shouldnt need to do this, but it seems at times there is a *.app in\n              # the repo/package. This ensures we start from a clean slate\n              make SKIP_DEPS=1 clean\n\n              runHook postConfigure\n            ''\n          else\n            configurePhase;\n\n        buildPhase =\n          if buildPhase == null then\n            ''\n              runHook preBuild\n\n              make $buildFlags \"''${buildFlagsArray[@]}\"\n\n              runHook postBuild\n            ''\n          else\n            buildPhase;\n\n        installPhase =\n          if installPhase == null then\n            ''\n              runHook preInstall\n\n              mkdir -p $out/lib/erlang/lib/${name}\n              cp -r ebin $out/lib/erlang/lib/${name}/\n              cp -r src $out/lib/erlang/lib/${name}/\n\n              if [ -d include ]; then\n                cp -r include $out/lib/erlang/lib/${name}/\n              fi\n\n              if [ -d priv ]; then\n                cp -r priv $out/lib/erlang/lib/${name}/\n              fi\n\n              if [ -d doc ]; then\n                cp -r doc $out/lib/erlang/lib/${name}/\n              fi\n\n              runHook postInstall\n            ''\n          else\n            installPhase;\n\n        passthru = {\n          packageName = name;\n          env = shell self;\n          inherit beamDeps;\n        };\n      }\n    );\nin\nlib.fix pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-erlang-mk.nix","line":12,"column":1},"path":["pkgs","beamPackages","beamPackages","buildErlangMk"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-erlang-mk.nix","line":12,"column":1},"path":["pkgs","beamPackages","beamPackages","buildErlangMk"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildMix","path":["pkgs","beamPackages","beamPackages","buildMix"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":44,"column":7},"attr_expr":"buildMix = callPackage ./build-mix.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","beamPackages","buildMix"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","beamPackages","buildMix"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildRebar3","path":["pkgs","beamPackages","beamPackages","buildRebar3"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":42,"column":7},"attr_expr":"buildRebar3 = callPackage ./build-rebar3.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","beamPackages","buildRebar3"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","beamPackages","beamPackages","buildRebar3"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.callPackage","path":["pkgs","beamPackages","beamPackages","callPackage"],"aliases":[["pkgs","beamPackages","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":27,"column":15},"attr_expr":"callPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":23,"column":21},"lambda_expr":"drv: args: callPackageWithScope defaultScope drv args","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":23,"column":21},"path":["pkgs","beamPackages","beamPackages","callPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":23,"column":21},"path":["pkgs","beamPackages","beamPackages","callPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.extend","path":["pkgs","beamPackages","beamPackages","extend"],"aliases":[["pkgs","beamPackages","extend"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":9},"attr_expr":"${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":27},"lambda_expr":"f: makeExtensibleWithCustomName extenderName (extends f rattrs)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":27},"path":["pkgs","beamPackages","beamPackages","extend"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":456,"column":27},"path":["pkgs","beamPackages","beamPackages","extend"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.fetchHex","path":["pkgs","beamPackages","beamPackages","fetchHex"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":37,"column":7},"attr_expr":"fetchHex = callPackage ./fetch-hex.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"lambda_expr":"{\n  pkg,\n  version,\n  sha256,\n  meta ? { },\n}:\n\nstdenv.mkDerivation {\n  pname = pkg;\n  inherit version;\n  dontBuild = true;\n  dontConfigure = true;\n  dontFixup = true;\n\n  src = fetchurl {\n    url = \"https://repo.hex.pm/tarballs/${pkg}-${version}.tar\";\n    inherit sha256;\n  };\n\n  unpackCmd = ''\n    tar -xf $curSrc contents.tar.gz CHECKSUM metadata.config\n    mkdir contents\n    tar -C contents -xzf contents.tar.gz\n    mv metadata.config contents/hex_metadata.config\n\n    # To make the extracted hex tarballs appear legitimate to mix, we need to\n    # make sure they contain not just the contents of contents.tar.gz but also\n    # a .hex file with some lock metadata.\n    # We use an old version of .hex file per hex's mix_task_test.exs since it\n    # is just plain-text instead of an encoded format.\n    # See: https://github.com/hexpm/hex/blob/main/test/hex/mix_task_test.exs#L410\n    echo -n \"${pkg},${version},$(cat CHECKSUM | tr '[:upper:]' '[:lower:]'),hexpm\" > contents/.hex\n  '';\n\n  installPhase = ''\n    runHook preInstall\n    mkdir \"$out\"\n    cp -Hrt \"$out\" .\n    success=1\n    runHook postInstall\n  '';\n\n  inherit meta;\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"path":["pkgs","beamPackages","beamPackages","fetchHex"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"path":["pkgs","beamPackages","beamPackages","fetchHex"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.fetchMixDeps","path":["pkgs","beamPackages","beamPackages","fetchMixDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":45,"column":7},"attr_expr":"fetchMixDeps = callPackage ./fetch-mix-deps.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-mix-deps.nix","line":12,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  hash ? \"\",\n  sha256 ? \"\",\n  src,\n  mixEnv ? \"prod\",\n  mixTarget ? \"host\",\n  debug ? false,\n  meta ? { },\n  patches ? [ ],\n  elixir ? inputs.elixir,\n  hex ? inputs.hex.override { inherit elixir; },\n  ...\n}@attrs:\n\nlet\n  hash_ =\n    if hash != \"\" then\n      {\n        outputHashAlgo = null;\n        outputHash = hash;\n      }\n    else if sha256 != \"\" then\n      {\n        outputHashAlgo = \"sha256\";\n        outputHash = sha256;\n      }\n    else\n      {\n        outputHashAlgo = \"sha256\";\n        outputHash = lib.fakeSha256;\n      };\nin\nstdenvNoCC.mkDerivation (\n  attrs\n  // {\n    nativeBuildInputs = [\n      elixir\n      hex\n      cacert\n      git\n    ];\n\n    env = {\n      MIX_ENV = mixEnv;\n      MIX_TARGET = mixTarget;\n      MIX_DEBUG = if debug then 1 else 0;\n      DEBUG = if debug then 1 else 0; # for rebar3\n      # the api with `mix local.rebar rebar path` makes a copy of the binary\n      MIX_REBAR = \"${rebar}/bin/rebar\";\n      MIX_REBAR3 = \"${rebar3}/bin/rebar3\";\n      # there is a persistent download failure with absinthe 1.6.3\n      # those defaults reduce the failure rate\n      HEX_HTTP_CONCURRENCY = 1;\n      HEX_HTTP_TIMEOUT = 120;\n    }\n    // (attrs.env or { });\n\n    configurePhase =\n      attrs.configurePhase or ''\n        runHook preConfigure\n        export HEX_HOME=\"$TEMPDIR/.hex\";\n        export MIX_HOME=\"$TEMPDIR/.mix\";\n        export MIX_DEPS_PATH=\"$TEMPDIR/deps\";\n\n        # Rebar\n        export REBAR_GLOBAL_CONFIG_DIR=\"$TMPDIR/rebar3\"\n        export REBAR_CACHE_DIR=\"$TMPDIR/rebar3.cache\"\n        runHook postConfigure\n      '';\n\n    inherit patches;\n\n    dontBuild = true;\n\n    installPhase =\n      attrs.installPhase or ''\n        runHook preInstall\n        mix deps.get ''${MIX_ENV:+--only $MIX_ENV}\n        find \"$TEMPDIR/deps\" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} +\n        cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out\n        runHook postInstall\n      '';\n\n    outputHashMode = \"recursive\";\n\n    impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n    inherit meta;\n  }\n  // hash_\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-mix-deps.nix","line":12,"column":1},"path":["pkgs","beamPackages","beamPackages","fetchMixDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-mix-deps.nix","line":12,"column":1},"path":["pkgs","beamPackages","beamPackages","fetchMixDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.fetchRebar3Deps","path":["pkgs","beamPackages","beamPackages","fetchRebar3Deps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":39,"column":7},"attr_expr":"fetchRebar3Deps = callPackage ./fetch-rebar-deps.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-rebar-deps.nix","line":7,"column":1},"lambda_expr":"{\n  name,\n  version,\n  sha256,\n  src,\n  meta ? { },\n}:\n\nstdenv.mkDerivation {\n  pname = \"rebar-deps-${name}\";\n  inherit version;\n\n  dontUnpack = true;\n  dontConfigure = true;\n  dontFixup = true;\n\n  buildPhase = ''\n    cp -r ${src} src\n    chmod -R u+w src\n    cd src\n    HOME='.' DEBUG=1 ${rebar3}/bin/rebar3 get-deps\n  '';\n\n  installPhase = ''\n    runHook preInstall\n    mkdir -p \"$out/_checkouts\"\n    for i in ./_build/default/lib/* ; do\n       echo \"$i\"\n       cp -R \"$i\" \"$out/_checkouts\"\n    done\n    runHook postInstall\n  '';\n\n  outputHashAlgo = \"sha256\";\n  outputHashMode = \"recursive\";\n  outputHash = sha256;\n\n  impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n  inherit meta;\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-rebar-deps.nix","line":7,"column":1},"path":["pkgs","beamPackages","beamPackages","fetchRebar3Deps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-rebar-deps.nix","line":7,"column":1},"path":["pkgs","beamPackages","beamPackages","fetchRebar3Deps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.mixRelease","path":["pkgs","beamPackages","beamPackages","mixRelease"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":46,"column":7},"attr_expr":"mixRelease = callPackage ./mix-release.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/mix-release.nix","line":22,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  src,\n  nativeBuildInputs ? [ ],\n  buildInputs ? [ ],\n  meta ? { },\n  enableDebugInfo ? false,\n  mixEnv ? \"prod\",\n  mixTarget ? \"host\",\n  compileFlags ? [ ],\n  # Build a particular named release.\n  # see https://hexdocs.pm/mix/1.12/Mix.Tasks.Release.html#content\n  mixReleaseName ? \"\",\n  # If set, the given escript binary will be copied to the output\n  # instead of the release\n  escriptBinName ? null,\n\n  # Options to be passed to the Erlang compiler. As documented in the reference\n  # manual, these must be valid Erlang terms. They will be turned into an\n  # erlang list and set as the ERL_COMPILER_OPTIONS environment variable.\n  # See https://www.erlang.org/doc/man/compile\n  erlangCompilerOptions ? [ ],\n\n  # Deterministic Erlang builds remove full system paths from debug information\n  # among other things to keep builds more reproducible. See their docs for more:\n  # https://www.erlang.org/doc/man/compile\n  erlangDeterministicBuilds ? true,\n\n  # Mix dependencies provided as a fixed output derivation\n  mixFodDeps ? null,\n\n  # Mix dependencies generated by mix2nix\n  #\n  # This assumes each dependency is built by buildMix or buildRebar3. Each\n  # dependency needs to have a setup hook to add the lib path to $ERL_LIBS.\n  # This is how Mix finds dependencies.\n  mixNixDeps ? { },\n\n  elixir ? inputs.elixir,\n  erlang ? inputs.erlang,\n  hex ? inputs.hex.override { inherit elixir; },\n\n  # Remove releases/COOKIE\n  #\n  # People have different views on the nature of cookies. Some believe that they are\n  # secrets, while others believe they are just ids for clustering nodes instead of\n  # secrets.\n  #\n  # If you think cookie is secret, you can set this attr to true, then it will be\n  # removed from nix store. If not, you can set it to false.\n  #\n  # For backward compatibility, it is set to true by default.\n  #\n  # You can always specify a custom cookie by using RELEASE_COOKIE environment\n  # variable, regardless of the value of this attr.\n  removeCookie ? true,\n\n  # This reduces closure size, but can lead to some hard to understand runtime\n  # errors, so use with caution. See e.g.\n  # https://github.com/whitfin/cachex/issues/205\n  # https://framagit.org/framasoft/mobilizon/-/issues/1169\n  stripDebug ? false,\n\n  ...\n}@attrs:\nlet\n  # Remove non standard attributes that cannot be coerced to strings\n  overridable = removeAttrs attrs [\n    \"compileFlags\"\n    \"erlangCompilerOptions\"\n    \"mixNixDeps\"\n  ];\nin\nassert mixNixDeps != { } -> mixFodDeps == null;\nassert stripDebug -> !enableDebugInfo;\nassert escriptBinName != null -> mixReleaseName == \"\";\n\nstdenv.mkDerivation (\n  overridable\n  // {\n    nativeBuildInputs =\n      nativeBuildInputs\n      ++\n        # Erlang/Elixir deps\n        [\n          erlang\n          elixir\n          hex\n          git\n          mixBuildDirHook\n        ]\n      ++\n        # Mix deps\n        (builtins.attrValues mixNixDeps)\n      ++\n        # other compile-time deps\n        [\n          findutils\n          ripgrep\n          bbe\n          makeWrapper\n        ];\n\n    buildInputs = buildInputs ++ lib.optionals (escriptBinName != null) [ erlang ];\n\n    __darwinAllowLocalNetworking = true;\n\n    env = {\n      MIX_ENV = mixEnv;\n      MIX_TARGET = mixTarget;\n      MIX_BUILD_PREFIX = (if mixTarget == \"host\" then \"\" else \"${mixTarget}_\") + \"${mixEnv}\";\n      MIX_DEBUG = if enableDebugInfo then 1 else 0;\n      HEX_OFFLINE = 1;\n\n      DEBUG = if enableDebugInfo then 1 else 0; # for Rebar3 compilation\n      # The API with `mix local.rebar rebar path` makes a copy of the binary\n      # some older dependencies still use rebar.\n      MIX_REBAR = \"${rebar}/bin/rebar\";\n      MIX_REBAR3 = \"${rebar3}/bin/rebar3\";\n\n      ERL_COMPILER_OPTIONS =\n        let\n          options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ \"deterministic\" ];\n        in\n        \"[${lib.concatStringsSep \",\" options}]\";\n\n      LANG = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"C\";\n      LC_CTYPE = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"UTF-8\";\n    }\n    // (attrs.env or { });\n\n    postUnpack = ''\n      # Mix and Hex\n      export MIX_HOME=\"$TEMPDIR/mix\"\n      export HEX_HOME=\"$TEMPDIR/hex\"\n\n      # Rebar\n      export REBAR_GLOBAL_CONFIG_DIR=\"$TEMPDIR/rebar3\"\n      export REBAR_CACHE_DIR=\"$TEMPDIR/rebar3.cache\"\n\n      ${lib.optionalString (mixFodDeps != null) ''\n        # Compilation of the dependencies will require that the dependency path is\n        # writable, thus a copy to the $TEMPDIR is inevitable here.\n        export MIX_DEPS_PATH=\"$TEMPDIR/deps\"\n        cp --no-preserve=mode -R \"${mixFodDeps}\" \"$MIX_DEPS_PATH\"\n      ''}\n    ''\n    + (attrs.postUnpack or \"\");\n\n    configurePhase =\n      attrs.configurePhase or ''\n        runHook preConfigure\n\n        # This is needed for projects that have a specific compile step\n        # the dependency needs to be compiled in order for the task\n        # to be available.\n        #\n        # Phoenix projects for example will need compile.phoenix.\n        mix deps.compile --no-deps-check --skip-umbrella-children\n\n        # Symlink dependency sources. This is needed for projects that require\n        # access to the source of their dependencies. For example, Phoenix\n        # projects need javascript assets to build asset bundles.\n        ${lib.optionalString (mixNixDeps != { }) ''\n          mkdir -p deps\n\n          ${lib.concatMapAttrsStringSep \"\\n\" (name: dep: ''\n            dep_path=\"deps/${name}\"\n            if [ -d \"${dep}/src\" ]; then\n              ln -sv ${dep}/src $dep_path\n            fi\n          '') mixNixDeps}\n        ''}\n\n        # Symlink deps to build root. Similar to above, but allows for mixFodDeps\n        # Phoenix projects to find javascript assets.\n        ${lib.optionalString (mixFodDeps != null) ''\n          ln -s \"$MIX_DEPS_PATH\" ./deps\n        ''}\n\n        runHook postConfigure\n      '';\n\n    buildPhase =\n      attrs.buildPhase or ''\n        runHook preBuild\n\n        mix compile --no-deps-check ${lib.concatStringsSep \" \" compileFlags}\n\n        ${lib.optionalString (escriptBinName != null) ''\n          mix escript.build --no-deps-check\n        ''}\n\n        runHook postBuild\n      '';\n\n    installPhase =\n      attrs.installPhase or ''\n        runHook preInstall\n\n        ${\n          if (escriptBinName != null) then\n            ''\n              mkdir -p $out/bin\n              cp ${escriptBinName} $out/bin\n            ''\n          else\n            ''\n              mix release ${mixReleaseName} --no-deps-check --path \"$out\"\n            ''\n        }\n\n        runHook postInstall\n      '';\n\n    postFixup = ''\n      echo \"removing files for Microsoft Windows\"\n      rm -f \"$out\"/bin/*.bat\n\n      echo \"wrapping programs in $out/bin with their runtime deps\"\n      for f in $(find $out/bin/ -type f -executable); do\n        wrapProgram \"$f\" \\\n          --prefix PATH : ${\n            lib.makeBinPath [\n              coreutils\n              gnused\n              gnugrep\n              gawk\n            ]\n          }\n      done\n    ''\n    + lib.optionalString removeCookie ''\n      if [ -e $out/releases/COOKIE ]; then\n        echo \"removing $out/releases/COOKIE\"\n        rm $out/releases/COOKIE\n      fi\n    ''\n    + ''\n      if [ -e $out/erts-* ]; then\n        # ERTS is included in the release, then erlang is not required as a runtime dependency.\n        # But, erlang is still referenced in some places. To removed references to erlang,\n        # following steps are required.\n\n        # 1. remove references to erlang from plain text files\n        for file in $(rg \"${erlang}/lib/erlang\" \"$out\" --files-with-matches); do\n          echo \"removing references to erlang in $file\"\n          substituteInPlace \"$file\" --replace \"${erlang}/lib/erlang\" \"$out\"\n        done\n\n        # 2. remove references to erlang from .beam files\n        #\n        # No need to do anything, because it has been handled by \"deterministic\" option specified\n        # by ERL_COMPILER_OPTIONS.\n\n        # 3. remove references to erlang from normal binary files\n        for file in $(rg \"${erlang}/lib/erlang\" \"$out\" --files-with-matches --binary --iglob '!*.beam'); do\n          echo \"removing references to erlang in $file\"\n          # use bbe to substitute strings in binary files, because using substituteInPlace\n          # on binaries will raise errors\n          bbe -e \"s|${erlang}/lib/erlang|$out|\" -o \"$file\".tmp \"$file\"\n          rm -f \"$file\"\n          mv \"$file\".tmp \"$file\"\n        done\n\n        # References to erlang should be removed from output after above processing.\n      fi\n    ''\n    + lib.optionalString stripDebug ''\n      # Strip debug symbols to avoid hardreferences to \"foreign\" closures actually\n      # not needed at runtime, while at the same time reduce size of BEAM files.\n      erl -noinput -eval 'lists:foreach(fun(F) -> io:format(\"Stripping ~p.~n\", [F]), beam_lib:strip(F) end, filelib:wildcard(\"'\"$out\"'/**/*.beam\"))' -s init stop\n    '';\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/mix-release.nix","line":22,"column":1},"path":["pkgs","beamPackages","beamPackages","mixRelease"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/mix-release.nix","line":22,"column":1},"path":["pkgs","beamPackages","beamPackages","mixRelease"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.rebar3Relx","path":["pkgs","beamPackages","beamPackages","rebar3Relx"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":40,"column":7},"attr_expr":"rebar3Relx = callPackage ./rebar3-release.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/rebar3-release.nix","line":9,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  src,\n  beamDeps ? [ ],\n  buildPlugins ? [ ],\n  checkouts ? null,\n  releaseType,\n  buildInputs ? [ ],\n  setupHook ? null,\n  profile ? \"default\",\n  installPhase ? null,\n  buildPhase ? null,\n  configurePhase ? null,\n  meta ? { },\n  ...\n}@attrs:\n\nlet\n  shell =\n    drv:\n    stdenv.mkDerivation {\n      name = \"interactive-shell-${drv.pname}\";\n      buildInputs = [ drv ];\n    };\n\n  customPhases = lib.filterAttrs (_: v: v != null) {\n    inherit\n      setupHook\n      configurePhase\n      buildPhase\n      installPhase\n      ;\n  };\n\n  # When using the `beamDeps` argument, it is important that we use\n  # `rebar3WithPlugins` here even when there are no plugins. The vanilla\n  # `rebar3` package is an escript archive with bundled dependencies which can\n  # interfere with those in the app we are trying to build. `rebar3WithPlugins`\n  # doesn't have this issue since it puts its own deps last on the code path.\n  rebar3 = rebar3WithPlugins {\n    plugins = buildPlugins;\n  };\n\n  pkg =\n    assert beamDeps != [ ] -> checkouts == null;\n    self:\n    stdenv.mkDerivation (\n      attrs\n      // {\n\n        inherit version pname;\n\n        buildInputs =\n          buildInputs\n          ++ [\n            erlang\n            rebar3\n            openssl\n          ]\n          ++ beamDeps;\n\n        # ensure we strip any native binaries (eg. NIFs, ports)\n        stripDebugList = lib.optional (releaseType == \"release\") \"rel\";\n\n        inherit src;\n\n        env = (attrs.env or { }) // {\n          REBAR_IGNORE_DEPS = beamDeps != [ ];\n        };\n\n        configurePhase = ''\n          runHook preConfigure\n          ${lib.optionalString (checkouts != null) \"cp --no-preserve=all -R ${checkouts}/_checkouts .\"}\n          runHook postConfigure\n        '';\n\n        buildPhase = ''\n          runHook preBuild\n          HOME=. DEBUG=1 rebar3 as ${profile} ${if releaseType == \"escript\" then \"escriptize\" else \"release\"}\n          runHook postBuild\n        '';\n\n        installPhase = ''\n          runHook preInstall\n          dir=${if releaseType == \"escript\" then \"bin\" else \"rel\"}\n          mkdir -p \"$out/$dir\" \"$out/bin\"\n          cp -R --preserve=mode \"_build/${profile}/$dir\" \"$out\"\n          ${lib.optionalString (\n            releaseType == \"release\"\n          ) \"find $out/rel/*/bin -type f -executable -exec ln -s -t $out/bin {} \\\\;\"}\n          runHook postInstall\n        '';\n\n        # Release will generate a binary which will cause a read null byte failure, see #261354\n        postInstall = lib.optionalString (releaseType == \"escript\") ''\n          for dir in $out/rel/*/erts-*; do\n            echo \"ERTS found in $dir - removing references to erlang to reduce closure size\"\n            for f in $dir/bin/{erl,start}; do\n              substituteInPlace \"$f\" --replace \"${erlang}/lib/erlang\" \"''${dir/\\/erts-*/}\"\n            done\n          done\n        '';\n\n        meta = {\n          inherit (erlang.meta) platforms;\n        }\n        // meta;\n\n        passthru = (\n          {\n            packageName = pname;\n            env = shell self;\n          }\n          // (if attrs ? passthru then attrs.passthru else { })\n        );\n      }\n      // customPhases\n    );\nin\nlib.fix pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/rebar3-release.nix","line":9,"column":1},"path":["pkgs","beamPackages","beamPackages","rebar3Relx"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/rebar3-release.nix","line":9,"column":1},"path":["pkgs","beamPackages","beamPackages","rebar3Relx"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.rebar3WithPlugins","path":["pkgs","beamPackages","beamPackages","rebar3WithPlugins"],"aliases":[["pkgs","beamPackages","rebar3WithPlugins"],["pkgs","rebar3WithPlugins"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/default.nix","line":30,"column":71},"attr_expr":"rebar3WithPlugins","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"lambda_expr":"{\n      plugins ? [ ],\n      globalPlugins ? [ ],\n      rebar3 ? _rebar3,\n    }:\n    let\n      pluginLibDirs = map (p: \"${p}/lib/erlang/lib\") (lib.unique (plugins ++ globalPlugins));\n      globalPluginNames = lib.unique (map (p: p.pname) globalPlugins);\n      rebar3Patched = (\n        rebar3.overrideAttrs (old: {\n\n          # skip-plugins.patch is necessary because otherwise rebar3 will always\n          # try to fetch plugins if they are not already present in _build.\n          #\n          # global-deps.patch makes it possible to use REBAR_GLOBAL_PLUGINS to\n          # instruct rebar3 to always load a certain plugin. It is necessary since\n          # REBAR_GLOBAL_CONFIG_DIR doesn't seem to work for this.\n          patches = [\n            ./skip-plugins.patch\n            ./global-plugins.patch\n          ];\n\n          # our patches cause the tests to fail\n          doCheck = false;\n        })\n      );\n    in\n    stdenv.mkDerivation {\n      pname = \"rebar3-with-plugins\";\n      inherit (rebar3) version;\n      nativeBuildInputs = [\n        erlang\n        makeWrapper\n      ];\n      unpackPhase = \"true\";\n\n      # Here we extract the rebar3 escript (like `rebar3_prv_local_install.erl`) and\n      # add plugins to the code path.\n\n      installPhase = ''\n        erl -noshell -eval '\n          {ok, Escript} = escript:extract(\"${rebar3Patched}/bin/rebar3\", []),\n          {archive, Archive} = lists:keyfind(archive, 1, Escript),\n          {ok, _} = zip:extract(Archive, [{cwd, \"'$out/lib'\"}]),\n          init:stop(0)\n        '\n        cp ${./rebar_ignore_deps.erl} rebar_ignore_deps.erl\n        erlc -o $out/lib/rebar/ebin rebar_ignore_deps.erl\n        mkdir -p $out/bin\n        makeWrapper ${erlang}/bin/erl $out/bin/rebar3 \\\n          --set REBAR_GLOBAL_PLUGINS \"${toString globalPluginNames} rebar_ignore_deps\" \\\n          --suffix-each ERL_LIBS \":\" \"$out/lib ${toString pluginLibDirs}\" \\\n          --add-flags \"+sbtu +A1 -noshell -boot start_clean -s rebar3 main -extra\"\n      '';\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"path":["pkgs","beamPackages","beamPackages","rebar3WithPlugins"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"path":["pkgs","beamPackages","beamPackages","rebar3WithPlugins"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildErlangMk.override","path":["pkgs","beamPackages","buildErlangMk","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.buildMix.constructDrv","path":["pkgs","beamPackages","buildMix","constructDrv"],"aliases":[["pkgs","beamPackages","buildRebar3","constructDrv"],["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","stdenv","mkDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"lambda_expr":"mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","buildMix","constructDrv"],"pos_type":"Lambda"}},"content":{"content":"\nThis function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)\nthat refers to the derivation's outputs.\n\n`mkDerivation` takes many argument attributes, most of which affect the derivation environment,\nbut [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.\n\nThe `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.\nSee [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).\n\nReference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv\n\n:::{.note}\nThis is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.\n\nMost arguments are also passed through to the underlying call of [`derivation`](https://nixos.org/manual/nix/stable/language/derivations).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","buildMix","constructDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildMix.extendDrvArgs","path":["pkgs","beamPackages","buildMix","extendDrvArgs"],"aliases":[["pkgs","beamPackages","beamPackages","buildMix","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-mix.nix","line":22,"column":5},"lambda_expr":"finalAttrs:\n    {\n      beamDeps ? [ ],\n      mixEnv ? \"prod\",\n      mixTarget ? \"host\",\n\n      # Allow passing compile time config instead of an empty config\n      appConfigPath ? null,\n\n      enableDebugInfo ? false,\n      erlangCompilerOptions ? [ ],\n      # Deterministic Erlang builds remove full system paths from debug information\n      # among other things to keep builds more reproducible. See their docs for more:\n      # https://www.erlang.org/doc/man/compile\n      erlangDeterministicBuilds ? true,\n      ...\n    }@args:\n    {\n      name = \"erlang${erlang.version}-${args.name}-${finalAttrs.version}\";\n\n      env = {\n        ERL_COMPILER_OPTIONS =\n          let\n            options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ \"deterministic\" ];\n          in\n          \"[${lib.concatStringsSep \",\" options}]\";\n\n        MIX_ENV = mixEnv;\n        MIX_TARGET = mixTarget;\n        MIX_BUILD_PREFIX = (if mixTarget == \"host\" then \"\" else \"${mixTarget}_\") + \"${mixEnv}\";\n        MIX_DEBUG = if enableDebugInfo then 1 else 0;\n        HEX_OFFLINE = 1;\n\n        LANG = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"C\";\n        LC_CTYPE = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"UTF-8\";\n\n        # some hooks need name-version, but we've overridden name above for the nix package\n        beamModuleName = args.name;\n      }\n      // (args.env or { });\n\n      __darwinAllowLocalNetworking = true;\n\n      # add to ERL_LIBS so other modules can find at runtime.\n      # http://erlang.org/doc/man/code.html#code-path\n      # Mix also searches the code path when compiling with the --no-deps-check flag\n      # This is used by package builders such as mixRelease\n      setupHook = writeText \"setupHook.sh\" ''\n        addToSearchPath ERL_LIBS \"$1/lib/erlang/lib\"\n      '';\n\n      nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [\n        elixir\n        hex\n\n        beamCopySourceHook\n        beamModuleInstallHook\n        mixBuildDirHook\n        mixCompileHook\n        mixAppConfigPatchHook\n      ];\n\n      propagatedBuildInputs = (args.propagatedBuildInputs or [ ]) ++ beamDeps;\n\n      passthru = (args.passthru or { }) // {\n        inherit beamDeps;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-mix.nix","line":22,"column":5},"path":["pkgs","beamPackages","buildMix","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-mix.nix","line":22,"column":5},"path":["pkgs","beamPackages","buildMix","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildMix.override","path":["pkgs","beamPackages","buildMix","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.buildMix.overrideDerivation","path":["pkgs","beamPackages","buildMix","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","buildMix","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","buildMix","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildMix.transformDrv","path":["pkgs","beamPackages","buildMix","transformDrv"],"aliases":[["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.beamPackages.buildRebar3.constructDrv","path":["pkgs","beamPackages","buildRebar3","constructDrv"],"aliases":[["pkgs","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","stdenv","mkDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"lambda_expr":"mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","buildRebar3","constructDrv"],"pos_type":"Lambda"}},"content":{"content":"\nThis function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)\nthat refers to the derivation's outputs.\n\n`mkDerivation` takes many argument attributes, most of which affect the derivation environment,\nbut [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.\n\nThe `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.\nSee [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).\n\nReference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv\n\n:::{.note}\nThis is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.\n\nMost arguments are also passed through to the underlying call of [`derivation`](https://nixos.org/manual/nix/stable/language/derivations).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","buildRebar3","constructDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildRebar3.extendDrvArgs","path":["pkgs","beamPackages","buildRebar3","extendDrvArgs"],"aliases":[["pkgs","beamPackages","beamPackages","buildRebar3","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-rebar3.nix","line":24,"column":5},"lambda_expr":"finalAttrs:\n    {\n      beamDeps ? [ ],\n      buildPlugins ? [ ],\n\n      enableDebugInfo ? false,\n      erlangCompilerOptions ? [ ],\n      # Deterministic Erlang builds remove full system paths from debug information\n      # among other things to keep builds more reproducible. See their docs for more:\n      # https://www.erlang.org/doc/man/compile\n      erlangDeterministicBuilds ? true,\n      ...\n    }@args:\n    let\n      rebar3Custom = rebar3WithPlugins {\n        plugins = buildPlugins;\n      };\n    in\n    {\n      pname = args.name;\n      name = \"erlang${erlang.version}-${args.name}-${finalAttrs.version}\";\n\n      nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [\n        rebarDevendorPatchHook\n        beamCopySourceHook\n        beamModuleInstallHook\n        rebar3CompileHook\n      ];\n\n      buildInputs = (args.buildInputs or [ ]) ++ [\n        erlang\n        rebar3Custom\n        openssl\n        libyaml\n      ];\n\n      propagatedBuildInputs = lib.unique beamDeps;\n\n      env = {\n        ERL_COMPILER_OPTIONS =\n          let\n            options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ \"deterministic\" ];\n          in\n          \"[${lib.concatStringsSep \",\" options}]\";\n\n        beamModuleName = args.name;\n      }\n      // (args.env or { });\n\n      setupHook = writeText \"setupHook.sh\" ''\n        addToSearchPath ERL_LIBS \"$1/lib/erlang/lib/\"\n      '';\n\n      meta = {\n        inherit (erlang.meta) platforms;\n      }\n      // (args.meta or { });\n\n      passthru = {\n        inherit beamDeps;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-rebar3.nix","line":24,"column":5},"path":["pkgs","beamPackages","buildRebar3","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-rebar3.nix","line":24,"column":5},"path":["pkgs","beamPackages","buildRebar3","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildRebar3.override","path":["pkgs","beamPackages","buildRebar3","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.buildRebar3.overrideDerivation","path":["pkgs","beamPackages","buildRebar3","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","buildRebar3","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","buildRebar3","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.buildRebar3.transformDrv","path":["pkgs","beamPackages","buildRebar3","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.beamPackages.fetchHex.override","path":["pkgs","beamPackages","fetchHex","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.fetchMixDeps.override","path":["pkgs","beamPackages","fetchMixDeps","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.fetchRebar3Deps.override","path":["pkgs","beamPackages","fetchRebar3Deps","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.mixRelease.override","path":["pkgs","beamPackages","mixRelease","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.rebar3Relx.override","path":["pkgs","beamPackages","rebar3Relx","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildErlangMk.override","path":["pkgs","beamPackages","beamPackages","buildErlangMk","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildMix.constructDrv","path":["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],"aliases":[["pkgs","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","buildRebar3","constructDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","stdenv","mkDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"lambda_expr":"mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],"pos_type":"Lambda"}},"content":{"content":"\nThis function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)\nthat refers to the derivation's outputs.\n\n`mkDerivation` takes many argument attributes, most of which affect the derivation environment,\nbut [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.\n\nThe `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.\nSee [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).\n\nReference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv\n\n:::{.note}\nThis is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.\n\nMost arguments are also passed through to the underlying call of [`derivation`](https://nixos.org/manual/nix/stable/language/derivations).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildMix.extendDrvArgs","path":["pkgs","beamPackages","beamPackages","buildMix","extendDrvArgs"],"aliases":[["pkgs","beamPackages","buildMix","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-mix.nix","line":22,"column":5},"lambda_expr":"finalAttrs:\n    {\n      beamDeps ? [ ],\n      mixEnv ? \"prod\",\n      mixTarget ? \"host\",\n\n      # Allow passing compile time config instead of an empty config\n      appConfigPath ? null,\n\n      enableDebugInfo ? false,\n      erlangCompilerOptions ? [ ],\n      # Deterministic Erlang builds remove full system paths from debug information\n      # among other things to keep builds more reproducible. See their docs for more:\n      # https://www.erlang.org/doc/man/compile\n      erlangDeterministicBuilds ? true,\n      ...\n    }@args:\n    {\n      name = \"erlang${erlang.version}-${args.name}-${finalAttrs.version}\";\n\n      env = {\n        ERL_COMPILER_OPTIONS =\n          let\n            options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ \"deterministic\" ];\n          in\n          \"[${lib.concatStringsSep \",\" options}]\";\n\n        MIX_ENV = mixEnv;\n        MIX_TARGET = mixTarget;\n        MIX_BUILD_PREFIX = (if mixTarget == \"host\" then \"\" else \"${mixTarget}_\") + \"${mixEnv}\";\n        MIX_DEBUG = if enableDebugInfo then 1 else 0;\n        HEX_OFFLINE = 1;\n\n        LANG = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"C\";\n        LC_CTYPE = if stdenv.hostPlatform.isLinux then \"C.UTF-8\" else \"UTF-8\";\n\n        # some hooks need name-version, but we've overridden name above for the nix package\n        beamModuleName = args.name;\n      }\n      // (args.env or { });\n\n      __darwinAllowLocalNetworking = true;\n\n      # add to ERL_LIBS so other modules can find at runtime.\n      # http://erlang.org/doc/man/code.html#code-path\n      # Mix also searches the code path when compiling with the --no-deps-check flag\n      # This is used by package builders such as mixRelease\n      setupHook = writeText \"setupHook.sh\" ''\n        addToSearchPath ERL_LIBS \"$1/lib/erlang/lib\"\n      '';\n\n      nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [\n        elixir\n        hex\n\n        beamCopySourceHook\n        beamModuleInstallHook\n        mixBuildDirHook\n        mixCompileHook\n        mixAppConfigPatchHook\n      ];\n\n      propagatedBuildInputs = (args.propagatedBuildInputs or [ ]) ++ beamDeps;\n\n      passthru = (args.passthru or { }) // {\n        inherit beamDeps;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-mix.nix","line":22,"column":5},"path":["pkgs","beamPackages","beamPackages","buildMix","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-mix.nix","line":22,"column":5},"path":["pkgs","beamPackages","beamPackages","buildMix","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildMix.override","path":["pkgs","beamPackages","beamPackages","buildMix","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildMix.overrideDerivation","path":["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildMix.transformDrv","path":["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildRebar3.constructDrv","path":["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],"aliases":[["pkgs","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","buildRebar3","constructDrv"],["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","stdenv","mkDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"lambda_expr":"mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],"pos_type":"Lambda"}},"content":{"content":"\nThis function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)\nthat refers to the derivation's outputs.\n\n`mkDerivation` takes many argument attributes, most of which affect the derivation environment,\nbut [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.\n\nThe `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.\nSee [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).\n\nReference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv\n\n:::{.note}\nThis is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.\n\nMost arguments are also passed through to the underlying call of [`derivation`](https://nixos.org/manual/nix/stable/language/derivations).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildRebar3.extendDrvArgs","path":["pkgs","beamPackages","beamPackages","buildRebar3","extendDrvArgs"],"aliases":[["pkgs","beamPackages","buildRebar3","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-rebar3.nix","line":24,"column":5},"lambda_expr":"finalAttrs:\n    {\n      beamDeps ? [ ],\n      buildPlugins ? [ ],\n\n      enableDebugInfo ? false,\n      erlangCompilerOptions ? [ ],\n      # Deterministic Erlang builds remove full system paths from debug information\n      # among other things to keep builds more reproducible. See their docs for more:\n      # https://www.erlang.org/doc/man/compile\n      erlangDeterministicBuilds ? true,\n      ...\n    }@args:\n    let\n      rebar3Custom = rebar3WithPlugins {\n        plugins = buildPlugins;\n      };\n    in\n    {\n      pname = args.name;\n      name = \"erlang${erlang.version}-${args.name}-${finalAttrs.version}\";\n\n      nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [\n        rebarDevendorPatchHook\n        beamCopySourceHook\n        beamModuleInstallHook\n        rebar3CompileHook\n      ];\n\n      buildInputs = (args.buildInputs or [ ]) ++ [\n        erlang\n        rebar3Custom\n        openssl\n        libyaml\n      ];\n\n      propagatedBuildInputs = lib.unique beamDeps;\n\n      env = {\n        ERL_COMPILER_OPTIONS =\n          let\n            options = erlangCompilerOptions ++ lib.optionals erlangDeterministicBuilds [ \"deterministic\" ];\n          in\n          \"[${lib.concatStringsSep \",\" options}]\";\n\n        beamModuleName = args.name;\n      }\n      // (args.env or { });\n\n      setupHook = writeText \"setupHook.sh\" ''\n        addToSearchPath ERL_LIBS \"$1/lib/erlang/lib/\"\n      '';\n\n      meta = {\n        inherit (erlang.meta) platforms;\n      }\n      // (args.meta or { });\n\n      passthru = {\n        inherit beamDeps;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-rebar3.nix","line":24,"column":5},"path":["pkgs","beamPackages","beamPackages","buildRebar3","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/build-rebar3.nix","line":24,"column":5},"path":["pkgs","beamPackages","beamPackages","buildRebar3","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildRebar3.override","path":["pkgs","beamPackages","beamPackages","buildRebar3","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildRebar3.overrideDerivation","path":["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.buildRebar3.transformDrv","path":["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.beamPackages.beamPackages.fetchHex.override","path":["pkgs","beamPackages","beamPackages","fetchHex","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.fetchMixDeps.override","path":["pkgs","beamPackages","beamPackages","fetchMixDeps","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.fetchRebar3Deps.override","path":["pkgs","beamPackages","beamPackages","fetchRebar3Deps","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.mixRelease.override","path":["pkgs","beamPackages","beamPackages","mixRelease","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.beamPackages.beamPackages.rebar3Relx.override","path":["pkgs","beamPackages","beamPackages","rebar3Relx","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"builtins.abort","path":["builtins","abort"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"abort","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","abort"],"pos_type":"Lambda"}},"content":{"content":"Abort Nix expression evaluation and print the error message *s*.","source":{"position":null,"path":["builtins","abort"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.add","path":["builtins","add"],"aliases":[["lib","add"],["lib","trivial","add"]],"signature":null,"is_primop":true,"primop_meta":{"name":"add","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","add"],"pos_type":"Lambda"}},"content":{"content":"Return the sum of the numbers *e1* and *e2*.","source":{"position":null,"path":["builtins","add"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.addDrvOutputDependencies","path":["builtins","addDrvOutputDependencies"],"aliases":[["lib","addDrvOutputDependencies"],["lib","derivations","addDrvOutputDependencies"]],"signature":null,"is_primop":true,"primop_meta":{"name":"addDrvOutputDependencies","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","addDrvOutputDependencies"],"pos_type":"Lambda"}},"content":{"content":"Create a copy of the given string where a single\n[constant](@docroot@/language/string-context.md#string-context-constant)\nstring context element is turned into a\n[derivation deep](@docroot@/language/string-context.md#string-context-element-derivation-deep)\nstring context element.\n\nThe store path that is the constant string context element should point to a valid derivation, and end in `.drv`.\n\nThe original string context element must not be empty or have multiple elements, and it must not have any other type of element other than a constant or derivation deep element.\nThe latter is supported so this function is idempotent.\n\nThis is the opposite of [`builtins.unsafeDiscardOutputDependency`](#builtins-unsafeDiscardOutputDependency).","source":{"position":null,"path":["builtins","addDrvOutputDependencies"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.addErrorContext","path":["builtins","addErrorContext"],"aliases":[["lib","addErrorContext"],["lib","debug","addErrorContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"addErrorContext","args":[],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","addErrorContext"],"pos_type":"Lambda"}},"content":{"content":"Evaluate *context*, which can be coerced to a string,\nand append it to any error or stack traces displayed while evaluating *value*.\nThen return *value*.\n\nThis function is useful for providing helpful context in complex Nix expressions\nwhen the evaluation of *value* fails.\nThe additional context is applied when evaluating *value* itself fails,\nnot when attributes or elements of *value* are evaluated.\n\nFor example, the module system from nixpkgs uses this to show\nthe relevant information about the options that were evaluating\nwhen an error occurs.\n\n```nix-repl\nnix-repl> addErrorContext \"while evaluating foo\" (throw \"bar\")\nerror:\n       … while evaluating foo\n\n       … while calling the 'throw' builtin\n         at «string»:1:56:\n            1| with builtins; addErrorContext \"while evaluating foo\" (throw \"bar\")\n             |                                                        ^\n\n       error: bar\n```","source":{"position":null,"path":["builtins","addErrorContext"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.all","path":["builtins","all"],"aliases":[["lib","all"],["lib","lists","all"]],"signature":"all :: (a -> Bool) -> [a] -> Bool\n","is_primop":true,"primop_meta":{"name":"all","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":720,"column":3},"path":["lib","lists","all"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if function `pred` returns true for all elements of\n`list`.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\nall :: (a -> Bool) -> [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.all` usage example\n\n```nix\nall (x: x < 3) [ 1 2 ]\n=> true\nall (x: x < 3) [ 1 2 3 ]\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":720,"column":3},"path":["lib","lists","all"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.any","path":["builtins","any"],"aliases":[["lib","any"],["lib","lists","any"]],"signature":"any :: (a -> Bool) -> [a] -> Bool\n","is_primop":true,"primop_meta":{"name":"any","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":685,"column":3},"path":["lib","lists","any"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if function `pred` returns true for at least one\nelement of `list`.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\nany :: (a -> Bool) -> [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.any` usage example\n\n```nix\nany isString [ 1 \"a\" { } ]\n=> true\nany isString [ 1 { } ]\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":685,"column":3},"path":["lib","lists","any"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.appendContext","path":["builtins","appendContext"],"aliases":[["lib","appendContext"],["lib","strings","appendContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"appendContext","args":[],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","appendContext"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":null,"path":["builtins","appendContext"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.attrNames","path":["builtins","attrNames"],"aliases":[["lib","attrNames"],["lib","attrsets","attrNames"]],"signature":null,"is_primop":true,"primop_meta":{"name":"attrNames","args":["set"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","attrNames"],"pos_type":"Lambda"}},"content":{"content":"Return the names of the attributes in the set *set* in an\nalphabetically sorted list. For instance, `builtins.attrNames { y\n= 1; x = \"foo\"; }` evaluates to `[ \"x\" \"y\" ]`.\n\n# Time Complexity\n\n- O(n log n), where:\n\nn = number of attributes in the set","source":{"position":null,"path":["builtins","attrNames"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.attrValues","path":["builtins","attrValues"],"aliases":[["lib","attrValues"],["lib","attrsets","attrValues"]],"signature":"attrValues :: { [String] :: a } -> [a]\n","is_primop":true,"primop_meta":{"name":"attrValues","args":["set"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":553,"column":3},"path":["lib","attrsets","attrValues"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the values of all attributes in the given set, sorted by\nattribute name.\n\n# Type\n\n```\nattrValues :: { [String] :: a } -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrValues` usage example\n\n```nix\nattrValues {c = 3; a = 1; b = 2;}\n=> [1 2 3]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":553,"column":3},"path":["lib","attrsets","attrValues"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.baseNameOf","path":["builtins","baseNameOf"],"aliases":[["lib","baseNameOf"],["lib","filesystem","baseNameOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"baseNameOf","args":["x"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","baseNameOf"],"pos_type":"Lambda"}},"content":{"content":"Return the *base name* of either a [path value](@docroot@/language/types.md#type-path) *x* or a string *x*, depending on which type is passed, and according to the following rules.\n\nFor a path value, the *base name* is considered to be the part of the path after the last directory separator, including any file extensions.\nThis is the simple case, as path values don't have trailing slashes.\n\nWhen the argument is a string, a more involved logic applies. If the string ends with a `/`, only this one final slash is removed.\n\nAfter this, the *base name* is returned as previously described, assuming `/` as the directory separator. (Note that evaluation must be platform independent.)\n\nThis is somewhat similar to the [GNU `basename`](https://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html) command, but GNU `basename` strips any number of trailing slashes.","source":{"position":null,"path":["builtins","baseNameOf"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.bitAnd","path":["builtins","bitAnd"],"aliases":[["lib","bitAnd"],["lib","trivial","bitAnd"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitAnd","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","bitAnd"],"pos_type":"Lambda"}},"content":{"content":"Return the bitwise AND of the integers *e1* and *e2*.","source":{"position":null,"path":["builtins","bitAnd"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.bitOr","path":["builtins","bitOr"],"aliases":[["lib","bitOr"],["lib","trivial","bitOr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitOr","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","bitOr"],"pos_type":"Lambda"}},"content":{"content":"Return the bitwise OR of the integers *e1* and *e2*.","source":{"position":null,"path":["builtins","bitOr"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.bitXor","path":["builtins","bitXor"],"aliases":[["lib","bitXor"],["lib","trivial","bitXor"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitXor","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","bitXor"],"pos_type":"Lambda"}},"content":{"content":"Return the bitwise XOR of the integers *e1* and *e2*.","source":{"position":null,"path":["builtins","bitXor"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.break","path":["builtins","break"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"break","args":["v"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","break"],"pos_type":"Lambda"}},"content":{"content":"In debug mode (enabled using `--debugger`), pause Nix expression evaluation and enter the REPL.\nOtherwise, return the argument `v`.","source":{"position":null,"path":["builtins","break"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.catAttrs","path":["builtins","catAttrs"],"aliases":[["lib","catAttrs"],["lib","attrsets","catAttrs"]],"signature":"catAttrs :: String -> [{ [String] :: a }] -> [a]\n","is_primop":true,"primop_meta":{"name":"catAttrs","args":["attr","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":619,"column":3},"path":["lib","attrsets","catAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nCollect each attribute named `attr` from a list of attribute\nsets.  Sets that don't contain the named attribute are ignored.\n\n# Inputs\n\n`attr`\n\n: The attribute name to get out of the sets.\n\n`list`\n\n: The list of attribute sets to go through\n\n# Type\n\n```\ncatAttrs :: String -> [{ [String] :: a }] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.catAttrs` usage example\n\n```nix\ncatAttrs \"a\" [{a = 1;} {b = 0;} {a = 2;}]\n=> [1 2]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":619,"column":3},"path":["lib","attrsets","catAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.ceil","path":["builtins","ceil"],"aliases":[["lib","ceil"],["lib","trivial","ceil"]],"signature":null,"is_primop":true,"primop_meta":{"name":"ceil","args":["number"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","ceil"],"pos_type":"Lambda"}},"content":{"content":"Rounds and converts *number* to the next higher NixInt value if possible, i.e. `ceil *number* >= *number*` and\n`ceil *number* - *number* < 1`.\n\nAn evaluation error is thrown, if there exists no such NixInt value `ceil *number*`.\nDue to bugs in previous Nix versions an evaluation error might be thrown, if the datatype of *number* is\na NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.\n\nIf the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat\n(IEEE-754 double-precision floating-point number), an evaluation error is thrown.","source":{"position":null,"path":["builtins","ceil"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.compareVersions","path":["builtins","compareVersions"],"aliases":[["lib","compareVersions"],["lib","strings","compareVersions"],["lib","versions","compareVersions"]],"signature":null,"is_primop":true,"primop_meta":{"name":"compareVersions","args":["s1","s2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","compareVersions"],"pos_type":"Lambda"}},"content":{"content":"Compare two strings representing versions and return `-1` if\nversion *s1* is older than version *s2*, `0` if they are the same,\nand `1` if *s1* is newer than *s2*. The version comparison\nalgorithm is the same as the one used by [`nix-env\n-u`](../command-ref/nix-env/upgrade.md).","source":{"position":null,"path":["builtins","compareVersions"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.concatLists","path":["builtins","concatLists"],"aliases":[["lib","concatLists"],["lib","lists","concatLists"]],"signature":null,"is_primop":true,"primop_meta":{"name":"concatLists","args":["lists"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","concatLists"],"pos_type":"Lambda"}},"content":{"content":"Concatenate a list of lists into a single list.\n\n# Time Complexity\n\nO(N) where:\n\nN = total number of elements across all lists","source":{"position":null,"path":["builtins","concatLists"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.concatMap","path":["builtins","concatMap"],"aliases":[["lib","concatMap"],["lib","lists","concatMap"]],"signature":"concatMap :: (a -> [b]) -> [a] -> [b]\n","is_primop":true,"primop_meta":{"name":"concatMap","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":414,"column":3},"path":["lib","lists","concatMap"],"pos_type":"Attribute"}},"content":{"content":"\nMap and concatenate the result.\n\n# Type\n\n```\nconcatMap :: (a -> [b]) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.concatMap` usage example\n\n```nix\nconcatMap (x: [x] ++ [\"z\"]) [\"a\" \"b\"]\n=> [ \"a\" \"z\" \"b\" \"z\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":414,"column":3},"path":["lib","lists","concatMap"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.concatStringsSep","path":["builtins","concatStringsSep"],"aliases":[["lib","concatStringsSep"],["lib","join"],["lib","strings","concatStringsSep"],["lib","strings","join"]],"signature":"concatStringsSep :: String -> [String] -> String\n","is_primop":true,"primop_meta":{"name":"concatStringsSep","args":["separator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings with a separator between each element\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatStringsSep :: String -> [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatStringsSep` usage example\n\n```nix\nconcatStringsSep \"/\" [\"usr\" \"local\" \"bin\"]\n=> \"usr/local/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.convertHash","path":["builtins","convertHash"],"aliases":[["lib","convertHash"]],"signature":null,"is_primop":true,"primop_meta":{"name":"convertHash","args":["args"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","convertHash"],"pos_type":"Lambda"}},"content":{"content":"Return the specified representation of a hash string, based on the attributes presented in *args*:\n\n- `hash`\n\n  The hash to be converted.\n  The hash format is detected automatically.\n\n- `hashAlgo`\n\n  The algorithm used to create the hash. Must be one of\n  - `\"md5\"`\n  - `\"sha1\"`\n  - `\"sha256\"`\n  - `\"sha512\"`\n\n  The attribute may be omitted when `hash` is an [SRI hash](https://www.w3.org/TR/SRI/#the-integrity-attribute) or when the hash is prefixed with the hash algorithm name followed by a colon.\n  That `<hashAlgo>:<hashBody>` syntax is supported for backwards compatibility with existing tooling.\n\n- `toHashFormat`\n\n  The format of the resulting hash. Must be one of\n  - `\"base16\"`\n  - `\"nix32\"`\n  - `\"base32\"` (deprecated alias for `\"nix32\"`)\n  - `\"base64\"`\n  - `\"sri\"`\n\nThe result hash is the *toHashFormat* representation of the hash *hash*.\n\n> **Example**\n>\n>   Convert a SHA256 hash in Base16 to SRI:\n>\n> ```nix\n> builtins.convertHash {\n>   hash = \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n>   toHashFormat = \"sri\";\n>   hashAlgo = \"sha256\";\n> }\n> ```\n>\n>     \"sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\"\n\n> **Example**\n>\n>   Convert a SHA256 hash in SRI to Base16:\n>\n> ```nix\n> builtins.convertHash {\n>   hash = \"sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\";\n>   toHashFormat = \"base16\";\n> }\n> ```\n>\n>     \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n\n> **Example**\n>\n>   Convert a hash in the form `<hashAlgo>:<hashBody>` in Base16 to SRI:\n>\n> ```nix\n> builtins.convertHash {\n>   hash = \"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n>   toHashFormat = \"sri\";\n> }\n> ```\n>\n>     \"sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\"","source":{"position":null,"path":["builtins","convertHash"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.deepSeq","path":["builtins","deepSeq"],"aliases":[["lib","deepSeq"],["lib","trivial","deepSeq"]],"signature":null,"is_primop":true,"primop_meta":{"name":"deepSeq","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","deepSeq"],"pos_type":"Lambda"}},"content":{"content":"This is like `seq e1 e2`, except that *e1* is evaluated *deeply*:\nif it’s a list or set, its elements or attributes are also\nevaluated recursively.","source":{"position":null,"path":["builtins","deepSeq"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.derivation","path":["builtins","derivation"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/derivation-internal.nix","line":30,"column":1},"lambda_expr":null,"count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"builtins.derivationStrict","path":["builtins","derivationStrict"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"derivationStrict","args":[],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","derivationStrict"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":null,"path":["builtins","derivationStrict"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.dirOf","path":["builtins","dirOf"],"aliases":[["lib","dirOf"],["lib","filesystem","dirOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"dirOf","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","dirOf"],"pos_type":"Lambda"}},"content":{"content":"Return the directory part of the string *s*, that is, everything\nbefore the final slash in the string. This is similar to the GNU\n`dirname` command.","source":{"position":null,"path":["builtins","dirOf"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.div","path":["builtins","div"],"aliases":[["lib","div"],["lib","trivial","div"]],"signature":null,"is_primop":true,"primop_meta":{"name":"div","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","div"],"pos_type":"Lambda"}},"content":{"content":"Return the quotient of the numbers *e1* and *e2*.","source":{"position":null,"path":["builtins","div"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.elem","path":["builtins","elem"],"aliases":[["lib","elem"],["lib","lists","elem"],["lib","strings","elem"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elem","args":["x","xs"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","elem"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if a value equal to *x* occurs in the list *xs*, and\n`false` otherwise.\n\n# Time Complexity\n\nO(n * T) (worst case) where:\n\nn = list length\nT = time to compare two elements\n\nreturns early if the elements is found","source":{"position":null,"path":["builtins","elem"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.elemAt","path":["builtins","elemAt"],"aliases":[["lib","elemAt"],["lib","lists","elemAt"],["lib","strings","elemAt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elemAt","args":["xs","n"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","elemAt"],"pos_type":"Lambda"}},"content":{"content":"Return element *n* from the list *xs*. Elements are counted starting\nfrom 0. A fatal error occurs if the index is out of bounds.","source":{"position":null,"path":["builtins","elemAt"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.fetchGit","path":["builtins","fetchGit"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"fetchGit","args":["args"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","fetchGit"],"pos_type":"Lambda"}},"content":{"content":"Fetch a path from git. *args* can be a URL, in which case the HEAD\nof the repo at that URL is fetched. Otherwise, it can be an\nattribute with the following attributes (all except `url` optional):\n\n- `url`\n\n  The [Git URL] of the repo. SCP-like syntax is supported, but relative\n  paths are rewritten to absolute ones. For example:\n\n  `git@github.com:repo/path` becomes `ssh://git@github.com/repo/path`\n\n  [Git URL]: https://git-scm.com/docs/git-clone#_git_urls\n\n- `name` (default: `source`)\n\n  The name of the directory the repo should be exported to in the store.\n\n- `rev` (default: *the tip of `ref`*)\n\n  The [Git revision] to fetch.\n  This is typically a commit hash.\n\n  [Git revision]: https://git-scm.com/docs/git-rev-parse#_specifying_revisions\n\n- `ref` (default: `HEAD`)\n\n  The [Git reference] under which to look for the requested revision.\n  This is often a branch or tag name.\n\n  [Git reference]: https://git-scm.com/book/en/v2/Git-Internals-Git-References\n\n  This option has no effect once `shallow` cloning is enabled.\n\n  By default, the `ref` value is prefixed with `refs/heads/`.\n  As of 2.3.0, Nix doesn't prefix `refs/heads/` if `ref` starts with `refs/`.\n\n- `submodules` (default: `false`)\n\n  A Boolean parameter that specifies whether submodules should be checked out.\n\n- `exportIgnore` (default: `true`)\n\n  A Boolean parameter that specifies whether `export-ignore` from `.gitattributes` should be applied.\n  This approximates part of the `git archive` behavior.\n\n  Enabling this option is not recommended because it is unknown whether the Git developers commit to the reproducibility of `export-ignore` in newer Git versions.\n\n- `shallow` (default: `false`)\n\n  Make a shallow clone when fetching the Git tree.\n  When this is enabled, the options `ref` and `allRefs` have no effect anymore.\n\n- `lfs` (default: `false`)\n\n  A boolean that when `true` specifies that [Git LFS] files should be fetched.\n\n  [Git LFS]: https://git-lfs.com/\n\n- `allRefs`\n\n  Whether to fetch all references (eg. branches and tags) of the repository.\n  With this argument being true, it's possible to load a `rev` from *any* `ref`.\n  (by default only `rev`s from the specified `ref` are supported).\n\n  This option has no effect once `shallow` cloning is enabled.\n\n- `verifyCommit` (default: `true` if `publicKey` or `publicKeys` are provided, otherwise `false`)\n\n  Whether to check `rev` for a signature matching `publicKey` or `publicKeys`.\n  If `verifyCommit` is enabled, then `fetchGit` cannot use a local repository with uncommitted changes.\n  Requires the [`verified-fetches` experimental feature](@docroot@/development/experimental-features.md#xp-feature-verified-fetches).\n\n- `publicKey`\n\n  The public key against which `rev` is verified if `verifyCommit` is enabled.\n  Requires the [`verified-fetches` experimental feature](@docroot@/development/experimental-features.md#xp-feature-verified-fetches).\n\n- `keytype` (default: `\"ssh-ed25519\"`)\n\n  The key type of `publicKey`.\n  Possible values:\n  - `\"ssh-dsa\"`\n  - `\"ssh-ecdsa\"`\n  - `\"ssh-ecdsa-sk\"`\n  - `\"ssh-ed25519\"`\n  - `\"ssh-ed25519-sk\"`\n  - `\"ssh-rsa\"`\n  Requires the [`verified-fetches` experimental feature](@docroot@/development/experimental-features.md#xp-feature-verified-fetches).\n\n- `publicKeys`\n\n  The public keys against which `rev` is verified if `verifyCommit` is enabled.\n  Must be given as a list of attribute sets with the following form:\n\n  ```nix\n  {\n    key = \"<public key>\";\n    type = \"<key type>\"; # optional, default: \"ssh-ed25519\"\n  }\n  ```\n\n  Requires the [`verified-fetches` experimental feature](@docroot@/development/experimental-features.md#xp-feature-verified-fetches).\n\n\nHere are some examples of how to use `fetchGit`.\n\n  - To fetch a private repository over SSH:\n\n    ```nix\n    builtins.fetchGit {\n      url = \"git@github.com:my-secret/repository.git\";\n      ref = \"master\";\n      rev = \"adab8b916a45068c044658c4158d81878f9ed1c3\";\n    }\n    ```\n\n  - To fetch an arbitrary reference:\n\n    ```nix\n    builtins.fetchGit {\n      url = \"https://github.com/NixOS/nix.git\";\n      ref = \"refs/heads/0.5-release\";\n    }\n    ```\n\n  - If the revision you're looking for is in the default branch of\n    the git repository you don't strictly need to specify the branch\n    name in the `ref` attribute.\n\n    However, if the revision you're looking for is in a future\n    branch for the non-default branch you will need to specify the\n    the `ref` attribute as well.\n\n    ```nix\n    builtins.fetchGit {\n      url = \"https://github.com/nixos/nix.git\";\n      rev = \"841fcbd04755c7a2865c51c1e2d3b045976b7452\";\n      ref = \"1.11-maintenance\";\n    }\n    ```\n\n    > **Note**\n    >\n    > It is nice to always specify the branch which a revision\n    > belongs to. Without the branch being specified, the fetcher\n    > might fail if the default branch changes. Additionally, it can\n    > be confusing to try a commit from a non-default branch and see\n    > the fetch fail. If the branch is specified the fault is much\n    > more obvious.\n\n  - If the revision you're looking for is in the default branch of\n    the git repository you may omit the `ref` attribute.\n\n    ```nix\n    builtins.fetchGit {\n      url = \"https://github.com/nixos/nix.git\";\n      rev = \"841fcbd04755c7a2865c51c1e2d3b045976b7452\";\n    }\n    ```\n\n  - To fetch a specific tag:\n\n    ```nix\n    builtins.fetchGit {\n      url = \"https://github.com/nixos/nix.git\";\n      ref = \"refs/tags/1.9\";\n    }\n    ```\n\n  - To fetch the latest version of a remote branch:\n\n    ```nix\n    builtins.fetchGit {\n      url = \"ssh://git@github.com/nixos/nix.git\";\n      ref = \"master\";\n    }\n    ```\n\n  - To verify the commit signature:\n\n    ```nix\n    builtins.fetchGit {\n      url = \"ssh://git@github.com/nixos/nix.git\";\n      verifyCommit = true;\n      publicKeys = [\n          {\n            type = \"ssh-ed25519\";\n            key = \"AAAAC3NzaC1lZDI1NTE5AAAAIArPKULJOid8eS6XETwUjO48/HKBWl7FTCK0Z//fplDi\";\n          }\n      ];\n    }\n    ```\n\n    Nix refetches the branch according to the [`tarball-ttl`](@docroot@/command-ref/conf-file.md#conf-tarball-ttl) setting.\n\n    This behavior is disabled in [pure evaluation mode](@docroot@/command-ref/conf-file.md#conf-pure-eval).\n\n  - To fetch the content of a checked-out work directory:\n\n    ```nix\n    builtins.fetchGit ./work-dir\n    ```\n\nIf the URL points to a local directory, and no `ref` or `rev` is\ngiven, `fetchGit` uses the current content of the checked-out\nfiles, even if they are not committed or added to Git's index. It\nonly considers files added to the Git repository, as listed by `git ls-files`.","source":{"position":null,"path":["builtins","fetchGit"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.fetchMercurial","path":["builtins","fetchMercurial"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"fetchMercurial","args":[],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","fetchMercurial"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":null,"path":["builtins","fetchMercurial"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.fetchTarball","path":["builtins","fetchTarball"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"fetchTarball","args":["args"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","fetchTarball"],"pos_type":"Lambda"}},"content":{"content":"Download the specified URL, unpack it and return the path of the\nunpacked tree. The file must be a tape archive (`.tar`) compressed\nwith `gzip`, `bzip2` or `xz`. If the tarball consists of a\nsingle directory, then the top-level path component of the files\nin the tarball is removed. The typical use of the function is to\nobtain external Nix expression dependencies, such as a\nparticular version of Nixpkgs, e.g.\n\n```nix\nwith import (fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-14.12.tar.gz) {};\n\nstdenv.mkDerivation { … }\n```\n\nThe fetched tarball is cached for a certain amount of time (1\nhour by default) in `~/.cache/nix/tarballs/`. You can change the\ncache timeout either on the command line with `--tarball-ttl`\n*number-of-seconds* or in the Nix configuration file by adding\nthe line `tarball-ttl = ` *number-of-seconds*.\n\nNote that when obtaining the hash with `nix-prefetch-url` the\noption `--unpack` is required.\n\nThis function can also verify the contents against a hash. In that\ncase, the function takes a set instead of a URL. The set requires\nthe attribute `url` and the attribute `sha256`, e.g.\n\n```nix\nwith import (fetchTarball {\n  url = \"https://github.com/NixOS/nixpkgs/archive/nixos-14.12.tar.gz\";\n  sha256 = \"1jppksrfvbk5ypiqdz4cddxdl8z6zyzdb2srq8fcffr327ld5jj2\";\n}) {};\n\nstdenv.mkDerivation { … }\n```\n\nNot available in [restricted evaluation mode](@docroot@/command-ref/conf-file.md#conf-restrict-eval).","source":{"position":null,"path":["builtins","fetchTarball"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.fetchTree","path":["builtins","fetchTree"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"fetchTree","args":["input"],"experimental":true,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","fetchTree"],"pos_type":"Lambda"}},"content":{"content":"Fetch a file system tree or a plain file using one of the supported backends and return an attribute set with:\n\n- the resulting fixed-output [store path](@docroot@/store/store-path.md)\n- the corresponding [NAR](@docroot@/store/file-system-object/content-address.md#serial-nix-archive) hash\n- backend-specific metadata (currently not documented). <!-- TODO: document output attributes -->\n\n*input* must be an attribute set with the following attributes:\n\n- `type` (String, required)\n\n  One of the [supported source types](#source-types).\n  This determines other required and allowed input attributes.\n\n- `narHash` (String, optional)\n\n  The `narHash` parameter can be used to substitute the source of the tree.\n  It also allows for verification of tree contents that may not be provided by the underlying transfer mechanism.\n  If `narHash` is set, the source is first looked up is the Nix store and [substituters](@docroot@/command-ref/conf-file.md#conf-substituters), and only fetched if not available.\n\nA subset of the output attributes of `fetchTree` can be re-used for subsequent calls to `fetchTree` to produce the same result again.\nThat is, `fetchTree` is idempotent.\n\nDownloads are cached in `$XDG_CACHE_HOME/nix`.\nThe remote source is fetched from the network if both are true:\n- A NAR hash is supplied and the corresponding store path is not [valid](@docroot@/glossary.md#gloss-validity), that is, not available in the store\n\n  > **Note**\n  >\n  > [Substituters](@docroot@/command-ref/conf-file.md#conf-substituters) are not used in fetching.\n\n- There is no cache entry or the cache entry is older than [`tarball-ttl`](@docroot@/command-ref/conf-file.md#conf-tarball-ttl)\n\n## Source types\n\nThe following source types and associated input attributes are supported.\n\n<!-- TODO: It would be soooo much more predictable to work with (and\ndocument) if `fetchTree` was a curried call with the first parameter for\n`type` or an attribute like `builtins.fetchTree.git`! -->\n\n\n- `\"file\"`\n\n  \n  Place a plain file into the Nix store.\n  This is similar to [`builtins.fetchurl`](@docroot@/language/builtins.md#builtins-fetchurl)\n  \n\n  - `lastModified` (String, required)\n\n\n  - `name` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `rev` (String, required)\n\n\n  - `revCount` (String, required)\n\n\n  - `unpack` (String, required)\n\n\n  - `url` (String, required)\n\n    \n    Supported protocols:\n    \n    - `https`\n    \n      > **Example**\n      >\n      > ```nix\n      > fetchTree {\n      >   type = \"file\";\n      >   url = \"https://example.com/index.html\";\n      > }\n      > ```\n    \n    - `http`\n    \n      Insecure HTTP transfer for legacy sources.\n    \n      > **Warning**\n      >\n      > HTTP performs no encryption or authentication.\n      > Use a `narHash` known in advance to ensure the output has expected contents.\n    \n    - `file`\n    \n      A file on the local file system.\n    \n      > **Example**\n      >\n      > ```nix\n      > fetchTree {\n      >   type = \"file\";\n      >   url = \"file:///home/eelco/nix/README.md\";\n      > }\n      > ```\n    \n\n- `\"git\"`\n\n  \n  Fetch a Git tree and copy it to the Nix store.\n  This is similar to [`builtins.fetchGit`](@docroot@/language/builtins.md#builtins-fetchGit).\n  \n\n  - `allRefs` (Bool, optional)\n\n    \n    By default, this has no effect. This becomes relevant only once `shallow` cloning is disabled.\n    \n    Whether to fetch all references (eg. branches and tags) of the repository.\n    With this argument being true, it's possible to load a `rev` from *any* `ref`.\n    (Without setting this option, only `rev`s from the specified `ref` are supported).\n    \n    Default: `false`\n    \n\n  - `dirtyRev` (String, required)\n\n\n  - `dirtyShortRev` (String, required)\n\n\n  - `exportIgnore` (String, required)\n\n\n  - `keytype` (String, required)\n\n\n  - `lastModified` (Integer, optional)\n\n    \n    Unix timestamp of the fetched commit.\n    \n    If set, pass through the value to the output attribute set.\n    Otherwise, generated from the fetched Git tree.\n    \n\n  - `lfs` (Bool, optional)\n\n    \n    Fetch any [Git LFS](https://git-lfs.com/) files.\n    \n    Default: `false`\n    \n\n  - `name` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `publicKey` (String, required)\n\n\n  - `publicKeys` (String, required)\n\n\n  - `ref` (String, optional)\n\n    \n    By default, this has no effect. This becomes relevant only once `shallow` cloning is disabled.\n    \n    A [Git reference](https://git-scm.com/book/en/v2/Git-Internals-Git-References), such as a branch or tag name.\n    \n    Default: `\"HEAD\"`\n    \n\n  - `rev` (String, optional)\n\n    \n    A Git revision; a commit hash.\n    \n    Default: the tip of `ref`\n    \n\n  - `revCount` (Integer, optional)\n\n    \n    Number of revisions in the history of the Git repository before the fetched commit.\n    \n    If set, pass through the value to the output attribute set.\n    Otherwise, generated from the fetched Git tree.\n    \n\n  - `shallow` (Bool, optional)\n\n    \n    Make a shallow clone when fetching the Git tree.\n    When this is enabled, the options `ref` and `allRefs` have no effect anymore.\n    \n    Default: `true`\n    \n\n  - `submodules` (Bool, optional)\n\n    \n    Also fetch submodules if available.\n    \n    Default: `false`\n    \n\n  - `url` (String, required)\n\n    \n    The URL formats supported are the same as for Git itself.\n    \n    > **Example**\n    >\n    > ```nix\n    > fetchTree {\n    >   type = \"git\";\n    >   url = \"git@github.com:NixOS/nixpkgs.git\";\n    > }\n    > ```\n    \n    > **Note**\n    >\n    > If the URL points to a local directory, and no `ref` or `rev` is given, Nix only considers files added to the Git index, as listed by `git ls-files` but uses the *current file contents* of the Git working directory.\n    \n\n  - `verifyCommit` (String, required)\n\n\n- `\"github\"`\n\n\n  - `host` (String, required)\n\n\n  - `lastModified` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `owner` (String, required)\n\n\n  - `ref` (String, required)\n\n\n  - `repo` (String, required)\n\n\n  - `rev` (String, required)\n\n\n  - `treeHash` (String, required)\n\n\n- `\"gitlab\"`\n\n\n  - `host` (String, required)\n\n\n  - `lastModified` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `owner` (String, required)\n\n\n  - `ref` (String, required)\n\n\n  - `repo` (String, required)\n\n\n  - `rev` (String, required)\n\n\n  - `treeHash` (String, required)\n\n\n- `\"hg\"`\n\n\n  - `name` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `ref` (String, required)\n\n\n  - `rev` (String, required)\n\n\n  - `revCount` (String, required)\n\n\n  - `url` (String, required)\n\n\n- `\"indirect\"`\n\n\n  - `id` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `ref` (String, required)\n\n\n  - `rev` (String, required)\n\n\n- `\"path\"`\n\n\n  - `lastModified` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `path` (String, required)\n\n\n  - `rev` (String, required)\n\n\n  - `revCount` (String, required)\n\n\n- `\"sourcehut\"`\n\n\n  - `host` (String, required)\n\n\n  - `lastModified` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `owner` (String, required)\n\n\n  - `ref` (String, required)\n\n\n  - `repo` (String, required)\n\n\n  - `rev` (String, required)\n\n\n  - `treeHash` (String, required)\n\n\n- `\"tarball\"`\n\n  \n  Download a tar archive and extract it into the Nix store.\n  This has the same underlying implementation as [`builtins.fetchTarball`](@docroot@/language/builtins.md#builtins-fetchTarball)\n  \n\n  - `lastModified` (String, required)\n\n\n  - `name` (String, required)\n\n\n  - `narHash` (String, required)\n\n\n  - `rev` (String, required)\n\n\n  - `revCount` (String, required)\n\n\n  - `unpack` (String, required)\n\n\n  - `url` (String, required)\n\n    \n    > **Example**\n    >\n    > ```nix\n    > fetchTree {\n    >   type = \"tarball\";\n    >   url = \"https://github.com/NixOS/nixpkgs/tarball/nixpkgs-23.11\";\n    > }\n    > ```\n    \n\n\n The following input types are still subject to change:\n\n - `\"path\"`\n - `\"github\"`\n - `\"gitlab\"`\n - `\"sourcehut\"`\n - `\"mercurial\"`\n\n*input* can also be a [URL-like reference](@docroot@/command-ref/new-cli/nix3-flake.md#flake-references).\nThe additional input types and the URL-like syntax requires the [`flakes` experimental feature](@docroot@/development/experimental-features.md#xp-feature-flakes) to be enabled.\n\n > **Example**\n >\n > Fetch a GitHub repository using the attribute set representation:\n >\n > ```nix\n > builtins.fetchTree {\n >   type = \"github\";\n >   owner = \"NixOS\";\n >   repo = \"nixpkgs\";\n >   rev = \"ae2e6b3958682513d28f7d633734571fb18285dd\";\n > }\n > ```\n >\n > This evaluates to the following attribute set:\n >\n > ```nix\n > {\n >   lastModified = 1686503798;\n >   lastModifiedDate = \"20230611171638\";\n >   narHash = \"sha256-rA9RqKP9OlBrgGCPvfd5HVAXDOy8k2SmPtB/ijShNXc=\";\n >   outPath = \"/nix/store/l5m6qlvfs9sdw14ja3qbzpglcjlb6j1x-source\";\n >   rev = \"ae2e6b3958682513d28f7d633734571fb18285dd\";\n >   shortRev = \"ae2e6b3\";\n > }\n > ```\n\n > **Example**\n >\n > Fetch the same GitHub repository using the URL-like syntax:\n >\n >   ```nix\n >   builtins.fetchTree \"github:NixOS/nixpkgs/ae2e6b3958682513d28f7d633734571fb18285dd\"\n >   ```","source":{"position":null,"path":["builtins","fetchTree"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.fetchurl","path":["builtins","fetchurl"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"fetchurl","args":["arg"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","fetchurl"],"pos_type":"Lambda"}},"content":{"content":"Download the specified URL and return the path of the downloaded file.\n`arg` can be either a string denoting the URL, or an attribute set with the following attributes:\n\n- `url`\n\n  The URL of the file to download.\n\n- `name` (default: the last path component of the URL)\n\n  A name for the file in the store. This can be useful if the URL has any\n  characters that are invalid for the store.\n\nNot available in [restricted evaluation mode](@docroot@/command-ref/conf-file.md#conf-restrict-eval).","source":{"position":null,"path":["builtins","fetchurl"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.filter","path":["builtins","filter"],"aliases":[["lib","filter"],["lib","lists","filter"],["lib","strings","filter"]],"signature":null,"is_primop":true,"primop_meta":{"name":"filter","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","filter"],"pos_type":"Lambda"}},"content":{"content":"Return a list consisting of the elements of *list* for which the\nfunction *f* returns `true`.\n\n# Time Complexity\n\nO(n * T_f) (eager; predicate is forced) where:\n\nn = list length\nT_f = predicate evaluation time","source":{"position":null,"path":["builtins","filter"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.filterSource","path":["builtins","filterSource"],"aliases":[["lib","filterSource"],["lib","sources","filterSource"]],"signature":null,"is_primop":true,"primop_meta":{"name":"filterSource","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","filterSource"],"pos_type":"Lambda"}},"content":{"content":"> **Warning**\n>\n> `filterSource` should not be used to filter store paths. Since\n> `filterSource` uses the name of the input directory while naming\n> the output directory, doing so produces a directory name in\n> the form of `<hash2>-<hash>-<name>`, where `<hash>-<name>` is\n> the name of the input directory. Since `<hash>` depends on the\n> unfiltered directory, the name of the output directory\n> indirectly depends on files that are filtered out by the\n> function. This triggers a rebuild even when a filtered out\n> file is changed. Use `builtins.path` instead, which allows\n> specifying the name of the output directory.\n\nThis function allows you to copy sources into the Nix store while\nfiltering certain files. For instance, suppose that you want to use\nthe directory `source-dir` as an input to a Nix expression, e.g.\n\n```nix\nstdenv.mkDerivation {\n  ...\n  src = ./source-dir;\n}\n```\n\nHowever, if `source-dir` is a Subversion working copy, then all of\nthose annoying `.svn` subdirectories are also copied to the\nstore. Worse, the contents of those directories may change a lot,\ncausing lots of spurious rebuilds. With `filterSource` you can\nfilter out the `.svn` directories:\n\n```nix\nsrc = builtins.filterSource\n  (path: type: type != \"directory\" || baseNameOf path != \".svn\")\n  ./source-dir;\n```\n\nThus, the first argument *e1* must be a predicate function that is\ncalled for each regular file, directory or symlink in the source\ntree *e2*. If the function returns `true`, the file is copied to the\nNix store, otherwise it is omitted. The function is called with two\narguments. The first is the full path of the file. The second is a\nstring that identifies the type of the file, which is either\n`\"regular\"`, `\"directory\"`, `\"symlink\"` or `\"unknown\"` (for other\nkinds of files such as device nodes or fifos — but note that those\ncannot be copied to the Nix store, so if the predicate returns\n`true` for them, the copy fails). If you exclude a directory,\nthe entire corresponding subtree of *e2* is excluded.","source":{"position":null,"path":["builtins","filterSource"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.findFile","path":["builtins","findFile"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"findFile","args":["search-path","lookup-path"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","findFile"],"pos_type":"Lambda"}},"content":{"content":"Find *lookup-path* in *search-path*.\n\n[Lookup path](@docroot@/language/constructs/lookup-path.md) expressions are [desugared](https://en.wikipedia.org/wiki/Syntactic_sugar) using this and [`builtins.nixPath`](#builtins-nixPath):\n\n```nix\n<nixpkgs>\n```\n\nis equivalent to:\n\n```nix\nbuiltins.findFile builtins.nixPath \"nixpkgs\"\n```\n\nA search path is represented as a list of [attribute sets](./types.md#type-attrs) with two attributes:\n- `prefix` is a relative path.\n- `path` denotes a file system location\n\nExamples of search path attribute sets:\n\n- ```\n  {\n    prefix = \"\";\n    path = \"/nix/var/nix/profiles/per-user/root/channels\";\n  }\n  ```\n- ```\n  {\n    prefix = \"nixos-config\";\n    path = \"/etc/nixos/configuration.nix\";\n  }\n  ```\n- ```\n  {\n    prefix = \"nixpkgs\";\n    path = \"https://github.com/NixOS/nixpkgs/tarballs/master\";\n  }\n  ```\n- ```\n  {\n    prefix = \"nixpkgs\";\n    path = \"channel:nixpkgs-unstable\";\n  }\n  ```\n- ```\n  {\n    prefix = \"flake-compat\";\n    path = \"flake:github:edolstra/flake-compat\";\n  }\n  ```\n\nThe lookup algorithm checks each entry until a match is found, returning a [path value](@docroot@/language/types.md#type-path) of the match:\n\n- If a prefix of `lookup-path` matches `prefix`, then the remainder of *lookup-path* (the \"suffix\") is searched for within the directory denoted by `path`.\n  The contents of `path` may need to be downloaded at this point to look inside.\n\n- If the suffix is found inside that directory, then the entry is a match.\n  The combined absolute path of the directory (now downloaded if need be) and the suffix is returned.\n\n> **Example**\n>\n> A *search-path* value\n>\n> ```\n> [\n>   {\n>     prefix = \"\";\n>     path = \"/home/eelco/Dev\";\n>   }\n>   {\n>     prefix = \"nixos-config\";\n>     path = \"/etc/nixos\";\n>   }\n> ]\n> ```\n>\n> and a *lookup-path* value `\"nixos-config\"` causes Nix to try `/home/eelco/Dev/nixos-config` and `/etc/nixos` in that order and return the first path that exists.\n\nIf `path` starts with `http://` or `https://`, it is interpreted as the URL of a tarball to be downloaded and unpacked to a temporary location.\nThe tarball must consist of a single top-level directory.\n\nThe URLs of the tarballs from the official `nixos.org` channels can be abbreviated as `channel:<channel-name>`.\nSee [documentation on `nix-channel`](@docroot@/command-ref/nix-channel.md) for details about channels.\n\n> **Example**\n>\n> These two search path entries are equivalent:\n>\n> - ```\n>   {\n>     prefix = \"nixpkgs\";\n>     path = \"channel:nixpkgs-unstable\";\n>   }\n>   ```\n> - ```\n>   {\n>     prefix = \"nixpkgs\";\n>     path = \"https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz\";\n>   }\n>   ```\n\nSearch paths can also point to source trees using [flake URLs](@docroot@/command-ref/new-cli/nix3-flake.md#url-like-syntax).\n\n\n> **Example**\n>\n> The search path entry\n>\n> ```\n> {\n>   prefix = \"nixpkgs\";\n>   path = \"flake:nixpkgs\";\n> }\n> ```\n> specifies that the prefix `nixpkgs` shall refer to the source tree downloaded from the `nixpkgs` entry in the flake registry.\n>\n> Similarly\n>\n> ```\n> {\n>   prefix = \"nixpkgs\";\n>   path = \"flake:github:nixos/nixpkgs/nixos-22.05\";\n> }\n> ```\n>\n> makes `<nixpkgs>` refer to a particular branch of the `NixOS/nixpkgs` repository on GitHub.","source":{"position":null,"path":["builtins","findFile"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.flakeRefToString","path":["builtins","flakeRefToString"],"aliases":[["lib","flakeRefToString"],["lib","flakes","flakeRefToString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"flakeRefToString","args":["attrs"],"experimental":true,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","flakeRefToString"],"pos_type":"Lambda"}},"content":{"content":"Convert a flake reference from attribute set format to URL format.\n\nFor example:\n\n```nix\nbuiltins.flakeRefToString {\n  dir = \"lib\"; owner = \"NixOS\"; ref = \"23.05\"; repo = \"nixpkgs\"; type = \"github\";\n}\n```\n\nevaluates to\n\n```nix\n\"github:NixOS/nixpkgs/23.05?dir=lib\"\n```","source":{"position":null,"path":["builtins","flakeRefToString"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.floor","path":["builtins","floor"],"aliases":[["lib","floor"],["lib","trivial","floor"]],"signature":null,"is_primop":true,"primop_meta":{"name":"floor","args":["number"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","floor"],"pos_type":"Lambda"}},"content":{"content":"Rounds and converts *number* to the next lower NixInt value if possible, i.e. `floor *number* <= *number*` and\n`*number* - floor *number* < 1`.\n\nAn evaluation error is thrown, if there exists no such NixInt value `floor *number*`.\nDue to bugs in previous Nix versions an evaluation error might be thrown, if the datatype of *number* is\na NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.\n\nIf the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat\n(IEEE-754 double-precision floating-point number), an evaluation error will be thrown.","source":{"position":null,"path":["builtins","floor"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.foldl' (Prime)","path":["builtins","foldl'"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"foldl'","args":["op","nul","list"],"experimental":false,"arity":3},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","foldl'"],"pos_type":"Lambda"}},"content":{"content":"Reduce a list by applying a binary operator, from left to right,\ne.g. `foldl' op nul [x0 x1 x2 ...] = op (op (op nul x0) x1) x2)\n...`.\n\nFor example, `foldl' (acc: elem: acc + elem) 0 [1 2 3]` evaluates\nto `6` and `foldl' (acc: elem: { \"${elem}\" = elem; } // acc) {}\n[\"a\" \"b\"]` evaluates to `{ a = \"a\"; b = \"b\"; }`.\n\nThe first argument of `op` is the accumulator whereas the second\nargument is the current element being processed. The return value\nof each application of `op` is evaluated immediately, even for\nintermediate values.\n\n# Time Complexity\n\nO(n * T_op) where:\n\nn = list length\nT_op = `op` call evaluation time","source":{"position":null,"path":["builtins","foldl'"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.fromJSON","path":["builtins","fromJSON"],"aliases":[["lib","fromJSON"],["lib","strings","fromJSON"]],"signature":null,"is_primop":true,"primop_meta":{"name":"fromJSON","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","fromJSON"],"pos_type":"Lambda"}},"content":{"content":"Convert a JSON string to a Nix value. For example,\n\n```nix\nbuiltins.fromJSON ''{\"x\": [1, 2, 3], \"y\": null}''\n```\n\nreturns the value `{ x = [ 1 2 3 ]; y = null; }`.","source":{"position":null,"path":["builtins","fromJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.fromTOML","path":["builtins","fromTOML"],"aliases":[["lib","fromTOML"]],"signature":null,"is_primop":true,"primop_meta":{"name":"fromTOML","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","fromTOML"],"pos_type":"Lambda"}},"content":{"content":"Convert a TOML string to a Nix value. For example,\n\n```nix\nbuiltins.fromTOML ''\n  x=1\n  s=\"a\"\n  [table]\n  y=2\n''\n```\n\nreturns the value `{ s = \"a\"; table = { y = 2; }; x = 1; }`.","source":{"position":null,"path":["builtins","fromTOML"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.functionArgs","path":["builtins","functionArgs"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"functionArgs","args":["f"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","functionArgs"],"pos_type":"Lambda"}},"content":{"content":"Return a set containing the names of the formal arguments expected\nby the function *f*. The value of each attribute is a Boolean\ndenoting whether the corresponding argument has a default value. For\ninstance, `functionArgs ({ x, y ? 123}: ...) = { x = false; y =\ntrue; }`.\n\n\"Formal argument\" here refers to the attributes pattern-matched by\nthe function. Plain lambdas are not included, e.g. `functionArgs (x:\n...) = { }`.\n\n# Time Complexity\n\nO(n) where n = number of formal arguments","source":{"position":null,"path":["builtins","functionArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.genList","path":["builtins","genList"],"aliases":[["lib","genList"],["lib","lists","genList"],["lib","strings","genList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"genList","args":["generator","length"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","genList"],"pos_type":"Lambda"}},"content":{"content":"Generate list of size *length*, with each element *i* equal to the\nvalue returned by *generator* `i`. For example,\n\n```nix\nbuiltins.genList (x: x * x) 5\n```\n\nreturns the list `[ 0 1 4 9 16 ]`.\n\n# Time Complexity\n\nComplexity of `genList generator n`: O(n)\n\nComplexity of `deepSeq (genList generator n)`: O(n * T_f)\n\nwhere:\n\nn = requested length\nT_f = `generator` call evaluation time","source":{"position":null,"path":["builtins","genList"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.genericClosure","path":["builtins","genericClosure"],"aliases":[["lib","genericClosure"],["lib","trivial","genericClosure"]],"signature":null,"is_primop":true,"primop_meta":{"name":"genericClosure","args":["attrset"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","genericClosure"],"pos_type":"Lambda"}},"content":{"content":"`builtins.genericClosure` iteratively computes the transitive closure over an arbitrary relation defined by a function.\n\nIt takes *attrset* with two attributes named `startSet` and `operator`, and returns a list of attribute sets:\n\n- `startSet`:\n  The initial list of attribute sets.\n\n- `operator`:\n  A function that takes an attribute set and returns a list of attribute sets.\n  It defines how each item in the current set is processed and expanded into more items.\n\nEach attribute set in the list `startSet` and the list returned by `operator` must have an attribute `key`, which must support equality comparison.\nThe value of `key` can be one of the following types:\n\n- [Int](@docroot@/language/types.md#type-int)\n- [Float](@docroot@/language/types.md#type-float)\n- [Boolean](@docroot@/language/types.md#type-bool)\n- [String](@docroot@/language/types.md#type-string)\n- [Path](@docroot@/language/types.md#type-path)\n- [List](@docroot@/language/types.md#type-list)\n\nThe result is produced by calling the `operator` on each `item` that has not been called yet, including newly added items, until no new items are added.\nItems are compared by their `key` attribute.\n\nCommon usages are:\n\n- Generating unique collections of items, such as dependency graphs.\n- Traversing through structures that may contain cycles or loops.\n- Processing data structures with complex internal relationships.\n\n> **Example**\n>\n> ```nix\n> builtins.genericClosure {\n>   startSet = [ {key = 5;} ];\n>   operator = item: [{\n>     key = if (item.key / 2 ) * 2 == item.key\n>          then item.key / 2\n>          else 3 * item.key + 1;\n>   }];\n> }\n> ```\n>\n> evaluates to\n>\n> ```nix\n> [ { key = 5; } { key = 16; } { key = 8; } { key = 4; } { key = 2; } { key = 1; } ]\n> ```","source":{"position":null,"path":["builtins","genericClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.getAttr","path":["builtins","getAttr"],"aliases":[["lib","getAttr"],["lib","attrsets","getAttr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"getAttr","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","getAttr"],"pos_type":"Lambda"}},"content":{"content":"`getAttr` returns the attribute named *s* from *set*. Evaluation\naborts if the attribute doesn’t exist. This is a dynamic version of\nthe `.` operator, since *s* is an expression rather than an\nidentifier.\n\n# Time Complexity\n\nO(log n) where n = number of attributes in the set","source":{"position":null,"path":["builtins","getAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.getContext","path":["builtins","getContext"],"aliases":[["lib","getContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"getContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","getContext"],"pos_type":"Lambda"}},"content":{"content":"Return the string context of *s*.\n\nThe string context tracks references to derivations within a string.\nIt is represented as an attribute set of [store derivation](@docroot@/glossary.md#gloss-store-derivation) paths mapping to output names.\n\nUsing [string interpolation](@docroot@/language/string-interpolation.md) on a derivation adds that derivation to the string context.\nFor example,\n\n```nix\nbuiltins.getContext \"${derivation { name = \"a\"; builder = \"b\"; system = \"c\"; }}\"\n```\n\nevaluates to\n\n```\n{ \"/nix/store/arhvjaf6zmlyn8vh8fgn55rpwnxq0n7l-a.drv\" = { outputs = [ \"out\" ]; }; }\n```","source":{"position":null,"path":["builtins","getContext"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.getEnv","path":["builtins","getEnv"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"getEnv","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","getEnv"],"pos_type":"Lambda"}},"content":{"content":"`getEnv` returns the value of the environment variable *s*, or an\nempty string if the variable doesn’t exist. This function should be\nused with care, as it can introduce all sorts of nasty environment\ndependencies in your Nix expression.\n\n`getEnv` is used in Nix Packages to locate the file\n`~/.nixpkgs/config.nix`, which contains user-local settings for Nix\nPackages. (That is, it does a `getEnv \"HOME\"` to locate the user’s\nhome directory.)","source":{"position":null,"path":["builtins","getEnv"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.getFlake","path":["builtins","getFlake"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"getFlake","args":["args"],"experimental":true,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","getFlake"],"pos_type":"Lambda"}},"content":{"content":"Fetch a flake from a flake reference or a path, and return its output attributes and some metadata. For example:\n\n```nix\n(builtins.getFlake \"nix/55bc52401966fbffa525c574c14f67b00bc4fb3a\").packages.x86_64-linux.nix\n```\n\nUnless impure evaluation is allowed (`--impure`), the flake reference\nmust be \"locked\", e.g. contain a Git revision or content hash. An\nexample of an unlocked usage is:\n\n```nix\n(builtins.getFlake \"github:edolstra/dwarffs\").rev\n```","source":{"position":null,"path":["builtins","getFlake"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.groupBy","path":["builtins","groupBy"],"aliases":[["lib","groupBy"],["lib","lists","groupBy"]],"signature":null,"is_primop":true,"primop_meta":{"name":"groupBy","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","groupBy"],"pos_type":"Lambda"}},"content":{"content":"Groups elements of *list* together by the string returned from the\nfunction *f* called on each element. It returns an attribute set\nwhere each attribute value contains the elements of *list* that are\nmapped to the same corresponding attribute name returned by *f*.\n\nFor example,\n\n```nix\nbuiltins.groupBy (builtins.substring 0 1) [\"foo\" \"bar\" \"baz\"]\n```\n\nevaluates to\n\n```nix\n{ b = [ \"bar\" \"baz\" ]; f = [ \"foo\" ]; }\n```\n\n# Time Complexity\n\nO(N * T_f + N * log k) where:\n\nN = number of `list` elements\nT_f = `f` call evaluation time\nk = number of unique groups","source":{"position":null,"path":["builtins","groupBy"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.hasAttr","path":["builtins","hasAttr"],"aliases":[["lib","hasAttr"],["lib","attrsets","hasAttr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hasAttr","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","hasAttr"],"pos_type":"Lambda"}},"content":{"content":"`hasAttr` returns `true` if *set* has an attribute named *s*, and\n`false` otherwise. This is a dynamic version of the `?` operator,\nsince *s* is an expression rather than an identifier.\n\n# Time Complexity\n\nO(log n) where n = number of attributes in the set","source":{"position":null,"path":["builtins","hasAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.hasContext","path":["builtins","hasContext"],"aliases":[["lib","hasContext"],["lib","pathHasContext"],["lib","sources","pathHasContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hasContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","hasContext"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if string *s* has a non-empty context.\nThe context can be obtained with\n[`getContext`](#builtins-getContext).\n\n> **Example**\n>\n> Many operations require a string context to be empty because they are intended only to work with \"regular\" strings, and also to help users avoid unintentionally loosing track of string context elements.\n> `builtins.hasContext` can help create better domain-specific errors in those case.\n>\n> ```nix\n> name: meta:\n>\n> if builtins.hasContext name\n> then throw \"package name cannot contain string context\"\n> else { ${name} = meta; }\n> ```","source":{"position":null,"path":["builtins","hasContext"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.hashFile","path":["builtins","hashFile"],"aliases":[["lib","hashFile"],["lib","filesystem","hashFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hashFile","args":["type","p"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","hashFile"],"pos_type":"Lambda"}},"content":{"content":"Return a base-16 representation of the cryptographic hash of the\nfile at path *p*. The hash algorithm specified by *type* must be one\nof `\"md5\"`, `\"sha1\"`, `\"sha256\"` or `\"sha512\"`.","source":{"position":null,"path":["builtins","hashFile"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.hashString","path":["builtins","hashString"],"aliases":[["lib","hashString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hashString","args":["type","s"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","hashString"],"pos_type":"Lambda"}},"content":{"content":"Return a base-16 representation of the cryptographic hash of string\n*s*. The hash algorithm specified by *type* must be one of `\"md5\"`,\n`\"sha1\"`, `\"sha256\"` or `\"sha512\"`.","source":{"position":null,"path":["builtins","hashString"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.head","path":["builtins","head"],"aliases":[["lib","head"],["lib","lists","head"],["lib","strings","head"]],"signature":null,"is_primop":true,"primop_meta":{"name":"head","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","head"],"pos_type":"Lambda"}},"content":{"content":"Return the first element of a list; abort evaluation if the argument\nisn’t a list or is an empty list. You can test whether a list is\nempty by comparing it with `[]`.\n\n# Time Complexity\n\nO(1)","source":{"position":null,"path":["builtins","head"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.import","path":["builtins","import"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"import","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","import"],"pos_type":"Lambda"}},"content":{"content":"Load, parse, and return the Nix expression in the file *path*.\n\n> **Note**\n>\n> Unlike some languages, `import` is a regular function in Nix.\n\nThe *path* argument must meet the same criteria as an [interpolated expression](@docroot@/language/string-interpolation.md#interpolated-expression).\n\nIf *path* is a directory, the file `default.nix` in that directory is used if it exists.\n\n> **Example**\n>\n> ```console\n> $ echo 123 > default.nix\n> ```\n>\n> Import `default.nix` from the current directory.\n>\n> ```nix\n> import ./.\n> ```\n>\n>     123\n\nEvaluation aborts if the file doesn’t exist or contains an invalid Nix expression.\n\nA Nix expression loaded by `import` must not contain any *free variables*, that is, identifiers that are not defined in the Nix expression itself and are not built-in.\nTherefore, it cannot refer to variables that are in scope at the call site.\n\n> **Example**\n>\n> If you have a calling expression\n>\n> ```nix\n> rec {\n>   x = 123;\n>   y = import ./foo.nix;\n> }\n> ```\n>\n>  then the following `foo.nix` throws an error:\n>\n>  ```nix\n>  # foo.nix\n>  x + 456\n>  ```\n>\n>  since `x` is not in scope in `foo.nix`.\n> If you want `x` to be available in `foo.nix`, pass it as a function argument:\n>\n>  ```nix\n>  rec {\n>    x = 123;\n>    y = import ./foo.nix x;\n>  }\n>  ```\n>\n>  and\n>\n>  ```nix\n>  # foo.nix\n>  x: x + 456\n>  ```\n>\n>  The function argument doesn’t have to be called `x` in `foo.nix`; any name would work.","source":{"position":null,"path":["builtins","import"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.intersectAttrs","path":["builtins","intersectAttrs"],"aliases":[["lib","intersectAttrs"],["lib","attrsets","intersectAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"intersectAttrs","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","intersectAttrs"],"pos_type":"Lambda"}},"content":{"content":"Return a set consisting of the attributes in the set *e2* which have the\nsame name as some attribute in *e1*.\n\n# Time Complexity\n\nO(n * log m) where:\n\nn = number of attributes in the smaller set\nm = number of attributes in the larger set","source":{"position":null,"path":["builtins","intersectAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isAttrs","path":["builtins","isAttrs"],"aliases":[["lib","isAttrs"],["lib","attrsets","isAttrs"],["lib","strings","isAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isAttrs","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isAttrs"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to a set, and `false` otherwise.","source":{"position":null,"path":["builtins","isAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isBool","path":["builtins","isBool"],"aliases":[["lib","isBool"],["lib","trivial","isBool"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isBool","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isBool"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to a bool, and `false` otherwise.","source":{"position":null,"path":["builtins","isBool"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isFloat","path":["builtins","isFloat"],"aliases":[["lib","isFloat"],["lib","trivial","isFloat"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isFloat","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isFloat"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to a float, and `false` otherwise.","source":{"position":null,"path":["builtins","isFloat"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isFunction","path":["builtins","isFunction"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"isFunction","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isFunction"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to a function, and `false` otherwise.","source":{"position":null,"path":["builtins","isFunction"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isInt","path":["builtins","isInt"],"aliases":[["lib","isInt"],["lib","strings","isInt"],["lib","trivial","isInt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isInt","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isInt"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to an integer, and `false` otherwise.","source":{"position":null,"path":["builtins","isInt"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isList","path":["builtins","isList"],"aliases":[["lib","isList"],["lib","lists","isList"],["lib","strings","isList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isList","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isList"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to a list, and `false` otherwise.","source":{"position":null,"path":["builtins","isList"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isNull","path":["builtins","isNull"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"isNull","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isNull"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to `null`, and `false` otherwise.\n\nThis is equivalent to `e == null`.","source":{"position":null,"path":["builtins","isNull"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isPath","path":["builtins","isPath"],"aliases":[["lib","isPath"],["lib","filesystem","isPath"],["lib","strings","isPath"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isPath","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isPath"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to a path, and `false` otherwise.","source":{"position":null,"path":["builtins","isPath"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.isString","path":["builtins","isString"],"aliases":[["lib","isString"],["lib","strings","isString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isString","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","isString"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if *e* evaluates to a string, and `false` otherwise.","source":{"position":null,"path":["builtins","isString"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.length","path":["builtins","length"],"aliases":[["lib","length"],["lib","lists","length"]],"signature":null,"is_primop":true,"primop_meta":{"name":"length","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","length"],"pos_type":"Lambda"}},"content":{"content":"Return the length of the list *e*.\n\n# Time Complexity\n\nO(1)","source":{"position":null,"path":["builtins","length"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.lessThan","path":["builtins","lessThan"],"aliases":[["lib","lessThan"],["lib","trivial","lessThan"]],"signature":null,"is_primop":true,"primop_meta":{"name":"lessThan","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","lessThan"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if the value *e1* is less than the value *e2*, and `false` otherwise.\nEvaluation aborts if either *e1* or *e2* does not evaluate to a number, string or path.\nFurthermore, it aborts if *e2* does not match *e1*'s type according to the aforementioned classification of number, string or path.","source":{"position":null,"path":["builtins","lessThan"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.listToAttrs","path":["builtins","listToAttrs"],"aliases":[["lib","listToAttrs"],["lib","attrsets","listToAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"listToAttrs","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","listToAttrs"],"pos_type":"Lambda"}},"content":{"content":"Construct a set from a list specifying the names and values of each\nattribute. Each element of the list should be a set consisting of a\nstring-valued attribute `name` specifying the name of the attribute,\nand an attribute `value` specifying its value.\n\nIn case of duplicate occurrences of the same name, the first\ntakes precedence.\n\nExample:\n\n```nix\nbuiltins.listToAttrs\n  [ { name = \"foo\"; value = 123; }\n    { name = \"bar\"; value = 456; }\n    { name = \"bar\"; value = 420; }\n  ]\n```\n\nevaluates to\n\n```nix\n{ foo = 123; bar = 456; }\n```\n\n# Time Complexity\n\nO(n log n) where n = number of list elements","source":{"position":null,"path":["builtins","listToAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.map","path":["builtins","map"],"aliases":[["lib","map"],["lib","lists","map"]],"signature":null,"is_primop":true,"primop_meta":{"name":"map","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","map"],"pos_type":"Lambda"}},"content":{"content":"Apply the function *f* to each element in the list *list*. For\nexample,\n\n```nix\nmap (x: \"foo\" + x) [ \"bar\" \"bla\" \"abc\" ]\n```\n\nevaluates to `[ \"foobar\" \"foobla\" \"fooabc\" ]`.\n\n# Time Complexity\n\nO(n) where:\n\nn = list length\n\nCalls to `f` are performed afterwards when needed.","source":{"position":null,"path":["builtins","map"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.mapAttrs","path":["builtins","mapAttrs"],"aliases":[["lib","mapAttrs"],["lib","attrsets","mapAttrs"]],"signature":"mapAttrs :: (String -> a -> b) -> { [String] :: a } -> { [String] :: b }\n","is_primop":true,"primop_meta":{"name":"mapAttrs","args":["f","attrset"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1015,"column":3},"path":["lib","attrsets","mapAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nApply a function to each element in an attribute set, creating a new attribute set.\n\n# Inputs\n\n`f`\n\n: A function that takes an attribute name and its value, and returns the new value for the attribute.\n\n`attrset`\n\n: The attribute set to iterate through.\n\n# Type\n\n```\nmapAttrs :: (String -> a -> b) -> { [String] :: a } -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrs` usage example\n\n```nix\nmapAttrs (name: value: name + \"-\" + value)\n   { x = \"foo\"; y = \"bar\"; }\n=> { x = \"x-foo\"; y = \"y-bar\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1015,"column":3},"path":["lib","attrsets","mapAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.match","path":["builtins","match"],"aliases":[["lib","match"],["lib","strings","match"]],"signature":null,"is_primop":true,"primop_meta":{"name":"match","args":["regex","str"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","match"],"pos_type":"Lambda"}},"content":{"content":"Returns a list if the [extended POSIX regular\nexpression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)\n*regex* matches *str* precisely, otherwise returns `null`. Each item\nin the list is a regex group.\n\n```nix\nbuiltins.match \"ab\" \"abc\"\n```\n\nEvaluates to `null`.\n\n```nix\nbuiltins.match \"abc\" \"abc\"\n```\n\nEvaluates to `[ ]`.\n\n```nix\nbuiltins.match \"a(b)(c)\" \"abc\"\n```\n\nEvaluates to `[ \"b\" \"c\" ]`.\n\n```nix\nbuiltins.match \"[[:space:]]+([[:upper:]]+)[[:space:]]+\" \"  FOO   \"\n```\n\nEvaluates to `[ \"FOO\" ]`.","source":{"position":null,"path":["builtins","match"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.mul","path":["builtins","mul"],"aliases":[["lib","mul"],["lib","trivial","mul"]],"signature":null,"is_primop":true,"primop_meta":{"name":"mul","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","mul"],"pos_type":"Lambda"}},"content":{"content":"Return the product of the numbers *e1* and *e2*.","source":{"position":null,"path":["builtins","mul"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.parseDrvName","path":["builtins","parseDrvName"],"aliases":[["lib","parseDrvName"],["lib","strings","parseDrvName"]],"signature":null,"is_primop":true,"primop_meta":{"name":"parseDrvName","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","parseDrvName"],"pos_type":"Lambda"}},"content":{"content":"Split the string *s* into a package name and version. The package\nname is everything up to but not including the first dash not followed\nby a letter, and the version is everything following that dash. The\nresult is returned in a set `{ name, version }`. Thus,\n`builtins.parseDrvName \"nix-0.12pre12876\"` returns `{ name =\n\"nix\"; version = \"0.12pre12876\"; }`.","source":{"position":null,"path":["builtins","parseDrvName"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.parseFlakeRef","path":["builtins","parseFlakeRef"],"aliases":[["lib","parseFlakeRef"],["lib","flakes","parseFlakeRef"]],"signature":null,"is_primop":true,"primop_meta":{"name":"parseFlakeRef","args":["flake-ref"],"experimental":true,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","parseFlakeRef"],"pos_type":"Lambda"}},"content":{"content":"Parse a flake reference, and return its exploded form.\n\nFor example:\n\n```nix\nbuiltins.parseFlakeRef \"github:NixOS/nixpkgs/23.05?dir=lib\"\n```\n\nevaluates to:\n\n```nix\n{ dir = \"lib\"; owner = \"NixOS\"; ref = \"23.05\"; repo = \"nixpkgs\"; type = \"github\"; }\n```","source":{"position":null,"path":["builtins","parseFlakeRef"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.partition","path":["builtins","partition"],"aliases":[["lib","partition"],["lib","lists","partition"]],"signature":"partition :: (a -> Bool) -> [a] -> { right :: [a]; wrong :: [a]; }\n","is_primop":true,"primop_meta":{"name":"partition","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":952,"column":3},"path":["lib","lists","partition"],"pos_type":"Attribute"}},"content":{"content":"\nSplits the elements of a list in two lists, `right` and\n`wrong`, depending on the evaluation of a predicate.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\npartition :: (a -> Bool) -> [a] -> { right :: [a]; wrong :: [a]; }\n```\n\n# Examples\n:::{.example}\n## `lib.lists.partition` usage example\n\n```nix\npartition (x: x > 2) [ 5 1 2 3 4 ]\n=> { right = [ 5 3 4 ]; wrong = [ 1 2 ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":952,"column":3},"path":["lib","lists","partition"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.path","path":["builtins","path"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"path","args":["args"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","path"],"pos_type":"Lambda"}},"content":{"content":"An enrichment of the built-in path type, based on the attributes\npresent in *args*. All are optional except `path`:\n\n  - path\\\n    The underlying path.\n\n  - name\\\n    The name of the path when added to the store. This can used to\n    reference paths that have nix-illegal characters in their names,\n    like `@`.\n\n  - filter\\\n    A function of the type expected by [`builtins.filterSource`](#builtins-filterSource),\n    with the same semantics.\n\n  - recursive\\\n    When `false`, when `path` is added to the store it is with a\n    [flat hash](@docroot@/store/file-system-object/content-address.md#serial-flat),\n    rather than a hash of the\n    [NAR serialization](@docroot@/store/file-system-object/content-address.md#serial-nix-archive)\n    of the file. Thus, `path` must refer to a regular file, not a\n    directory. This allows similar behavior to `fetchurl`. Defaults\n    to `true`.\n\n  - sha256\\\n    When provided, this is the expected\n    [content hash](@docroot@/store/file-system-object/content-address.md)\n    of the path. Evaluation fails if the hash is incorrect,\n    and providing a hash allows `builtins.path` to be used even\n    when the `pure-eval` nix config option is on.","source":{"position":null,"path":["builtins","path"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.pathExists","path":["builtins","pathExists"],"aliases":[["lib","pathExists"],["lib","trivial","pathExists"]],"signature":null,"is_primop":true,"primop_meta":{"name":"pathExists","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","pathExists"],"pos_type":"Lambda"}},"content":{"content":"Return `true` if the path *path* exists at evaluation time, and\n`false` otherwise.","source":{"position":null,"path":["builtins","pathExists"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.placeholder","path":["builtins","placeholder"],"aliases":[["lib","placeholder"]],"signature":null,"is_primop":true,"primop_meta":{"name":"placeholder","args":["output"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","placeholder"],"pos_type":"Lambda"}},"content":{"content":"Return an\n[output placeholder string](@docroot@/store/derivation/index.md#output-placeholder)\nfor the specified *output* that will be substituted by the corresponding\n[output path](@docroot@/glossary.md#gloss-output-path)\nat build time.\n\nTypical outputs would be `\"out\"`, `\"bin\"` or `\"dev\"`.","source":{"position":null,"path":["builtins","placeholder"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.readDir","path":["builtins","readDir"],"aliases":[["lib","readDir"],["lib","filesystem","readDir"]],"signature":null,"is_primop":true,"primop_meta":{"name":"readDir","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","readDir"],"pos_type":"Lambda"}},"content":{"content":"Return the contents of the directory *path* as a set mapping\ndirectory entries to the corresponding file type. For instance, if\ndirectory `A` contains a regular file `B` and another directory\n`C`, then `builtins.readDir ./A` returns the set\n\n```nix\n{ B = \"regular\"; C = \"directory\"; }\n```\n\nThe possible values for the file type are `\"regular\"`,\n`\"directory\"`, `\"symlink\"` and `\"unknown\"`.","source":{"position":null,"path":["builtins","readDir"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.readFile","path":["builtins","readFile"],"aliases":[["lib","readFile"],["lib","strings","readFile"],["lib","trivial","readFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"readFile","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","readFile"],"pos_type":"Lambda"}},"content":{"content":"Return the contents of the file *path* as a string.","source":{"position":null,"path":["builtins","readFile"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.readFileType","path":["builtins","readFileType"],"aliases":[["lib","pathType"],["lib","readFileType"],["lib","filesystem","pathType"],["lib","filesystem","readFileType"]],"signature":"pathType :: Path -> String\n","is_primop":true,"primop_meta":{"name":"readFileType","args":["p"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}},"content":{"content":"\nThe type of a path. The path needs to exist and be accessible.\nThe result is either `\"directory\"` for a directory, `\"regular\"` for a\nregular file, `\"symlink\"` for a symlink, or `\"unknown\"` for anything else.\n\n# Inputs\n\npath\n\n: The path to query\n\n# Type\n\n```\npathType :: Path -> String\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathType` usage example\n\n```nix\npathType /.\n=> \"directory\"\n\npathType /some/file.nix\n=> \"regular\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.removeAttrs","path":["builtins","removeAttrs"],"aliases":[["lib","removeAttrs"],["lib","attrsets","removeAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"removeAttrs","args":["set","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","removeAttrs"],"pos_type":"Lambda"}},"content":{"content":"Remove the attributes listed in *list* from *set*. The attributes\ndon’t have to exist in *set*. For instance,\n\n```nix\nremoveAttrs { x = 1; y = 2; z = 3; } [ \"a\" \"x\" \"z\" ]\n```\n\nevaluates to `{ y = 2; }`.\n\n# Time Complexity\n\nO(n + k log k) where:\n\nn = number of attributes in input set\nk = number of attribute names to remove","source":{"position":null,"path":["builtins","removeAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.replaceStrings","path":["builtins","replaceStrings"],"aliases":[["lib","replaceStrings"],["lib","strings","replaceStrings"]],"signature":null,"is_primop":true,"primop_meta":{"name":"replaceStrings","args":["from","to","s"],"experimental":false,"arity":3},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","replaceStrings"],"pos_type":"Lambda"}},"content":{"content":"Given string *s*, replace every occurrence of the strings in *from*\nwith the corresponding string in *to*.\n\nThe argument *to* is lazy, that is, it is only evaluated when its corresponding pattern in *from* is matched in the string *s*\n\nExample:\n\n```nix\nbuiltins.replaceStrings [\"oo\" \"a\"] [\"a\" \"i\"] \"foobar\"\n```\n\nevaluates to `\"fabir\"`.\n\n# Time Complexity\n\nO(n * k * c) (worst case) where:\n\nn = length of input string\nk = number of replacement patterns\nc = average length of patterns in 'from' list","source":{"position":null,"path":["builtins","replaceStrings"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.scopedImport","path":["builtins","scopedImport"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"scopedImport","args":[],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","scopedImport"],"pos_type":"Lambda"}},"content":{"content":"Load, parse, and return the Nix expression in the file *path*, with the attributes from *scope* available as variables in the lexical scope of the imported file.\n\nThis function is similar to [`import`](#builtins-import), but allows you to provide additional variables that will be available in the scope of the imported expression.\nThe *scope* argument must be an attribute set; each attribute becomes a variable available in the imported file.\nBuilt-in functions and values remain accessible unless shadowed by *scope* attributes.\n\n> **Note**\n>\n> Variables from *scope* shadow built-ins with the same name, allowing you to override built-ins for the imported expression.\n\n> **Note**\n>\n> Unlike [`import`](#builtins-import), `scopedImport` does not memoize evaluation results.\n> While the parsing result may be reused, each call produces a distinct value.\n> This is observable through performance and side effects such as [`builtins.trace`](#builtins-trace).\n\nThe *path* argument must meet the same criteria as an [interpolated expression](@docroot@/language/string-interpolation.md#interpolated-expression).\n\nIf *path* is a directory, the file `default.nix` in that directory is used if it exists.\n\n> **Example**\n>\n> Create a file `greet.nix`:\n>\n> ```nix\n> # greet.nix\n> \"${greeting}, ${name}!\"\n> ```\n>\n> Import it with additional variables in scope:\n>\n> ```nix\n> scopedImport { greeting = \"Hello\"; name = \"World\"; } ./greet.nix\n> ```\n>\n>     \"Hello, World!\"\n\nEvaluation aborts if the file doesn't exist or contains an invalid Nix expression.","source":{"position":null,"path":["builtins","scopedImport"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.seq","path":["builtins","seq"],"aliases":[["lib","seq"],["lib","trivial","seq"]],"signature":null,"is_primop":true,"primop_meta":{"name":"seq","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","seq"],"pos_type":"Lambda"}},"content":{"content":"Evaluate *e1*, then evaluate and return *e2*. This ensures that a\ncomputation is strict in the value of *e1*.","source":{"position":null,"path":["builtins","seq"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.sort","path":["builtins","sort"],"aliases":[["lib","sort"],["lib","lists","sort"]],"signature":"sort :: (a -> a -> Bool) -> [a] -> [a]\n","is_primop":true,"primop_meta":{"name":"sort","args":["comparator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1305,"column":3},"path":["lib","lists","sort"],"pos_type":"Attribute"}},"content":{"content":"\nSort a list based on a comparator function which compares two\nelements and returns true if the first argument is strictly below\nthe second argument.  The returned list is sorted in an increasing\norder.  The implementation does a quick-sort.\n\nSee also [`sortOn`](#function-library-lib.lists.sortOn), which applies the\ndefault comparison on a function-derived property, and may be more efficient.\n\n# Inputs\n\n`comparator`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsort :: (a -> a -> Bool) -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.sort` usage example\n\n```nix\nsort (p: q: p < q) [ 5 3 7 ]\n=> [ 3 5 7 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1305,"column":3},"path":["lib","lists","sort"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.split","path":["builtins","split"],"aliases":[["lib","split"],["lib","strings","split"]],"signature":null,"is_primop":true,"primop_meta":{"name":"split","args":["regex","str"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","split"],"pos_type":"Lambda"}},"content":{"content":"Returns a list composed of non matched strings interleaved with the\nlists of the [extended POSIX regular\nexpression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)\n*regex* matches of *str*. Each item in the lists of matched\nsequences is a regex group.\n\n```nix\nbuiltins.split \"(a)b\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" ] \"c\" ]`.\n\n```nix\nbuiltins.split \"([ac])\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" ] \"b\" [ \"c\" ] \"\" ]`.\n\n```nix\nbuiltins.split \"(a)|(c)\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" null ] \"b\" [ null \"c\" ] \"\" ]`.\n\n```nix\nbuiltins.split \"([[:upper:]]+)\" \" FOO \"\n```\n\nEvaluates to `[ \" \" [ \"FOO\" ] \" \" ]`.","source":{"position":null,"path":["builtins","split"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.splitVersion","path":["builtins","splitVersion"],"aliases":[["lib","splitVersion"],["lib","versions","splitVersion"]],"signature":"splitVersion :: String -> [String]\n","is_primop":true,"primop_meta":{"name":"splitVersion","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":28,"column":3},"path":["lib","versions","splitVersion"],"pos_type":"Attribute"}},"content":{"content":"\nBreak a version string into its component parts.\n\n# Type\n\n```\nsplitVersion :: String -> [String]\n```\n\n# Examples\n:::{.example}\n## `splitVersion` usage example\n\n```nix\nsplitVersion \"1.2.3\"\n=> [\"1\" \"2\" \"3\"]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":28,"column":3},"path":["lib","versions","splitVersion"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.storePath","path":["builtins","storePath"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"storePath","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","storePath"],"pos_type":"Lambda"}},"content":{"content":"This function allows you to define a dependency on an already\nexisting store path. For example, the derivation attribute `src\n= builtins.storePath /nix/store/f1d18v1y…-source` causes the\nderivation to depend on the specified path, which must exist or\nbe substitutable. Note that this differs from a plain path\n(e.g. `src = /nix/store/f1d18v1y…-source`) in that the latter\ncauses the path to be *copied* again to the Nix store, resulting\nin a new path (e.g. `/nix/store/ld01dnzc…-source-source`).\n\nNot available in [pure evaluation mode](@docroot@/command-ref/conf-file.md#conf-pure-eval).\n\nSee also [`builtins.fetchClosure`](#builtins-fetchClosure).","source":{"position":null,"path":["builtins","storePath"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.stringLength","path":["builtins","stringLength"],"aliases":[["lib","stringLength"],["lib","strings","stringLength"]],"signature":null,"is_primop":true,"primop_meta":{"name":"stringLength","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","stringLength"],"pos_type":"Lambda"}},"content":{"content":"Return the number of bytes of the string *e*. If *e* is not a string,\nevaluation is aborted.","source":{"position":null,"path":["builtins","stringLength"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.sub","path":["builtins","sub"],"aliases":[["lib","sub"],["lib","trivial","sub"]],"signature":null,"is_primop":true,"primop_meta":{"name":"sub","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","sub"],"pos_type":"Lambda"}},"content":{"content":"Return the difference between the numbers *e1* and *e2*.","source":{"position":null,"path":["builtins","sub"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.substring","path":["builtins","substring"],"aliases":[["lib","substring"],["lib","strings","substring"]],"signature":null,"is_primop":true,"primop_meta":{"name":"substring","args":["start","len","s"],"experimental":false,"arity":3},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","substring"],"pos_type":"Lambda"}},"content":{"content":"Return the substring of *s* from byte position *start*\n(zero-based) up to but not including *start + len*. If *start* is\ngreater than the length of the string, an empty string is returned.\nIf *start + len* lies beyond the end of the string or *len* is `-1`,\nonly the substring up to the end of the string is returned.\n*start* must be non-negative.\nFor example,\n\n```nix\nbuiltins.substring 0 3 \"nixos\"\n```\n\nevaluates to `\"nix\"`.","source":{"position":null,"path":["builtins","substring"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.tail","path":["builtins","tail"],"aliases":[["lib","tail"],["lib","lists","tail"],["lib","strings","tail"]],"signature":null,"is_primop":true,"primop_meta":{"name":"tail","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","tail"],"pos_type":"Lambda"}},"content":{"content":"Return the list without its first item; abort evaluation if\nthe argument isn’t a list or is an empty list.\n\n> **Warning**\n>\n> This function should generally be avoided since it's inefficient:\n> unlike Haskell's `tail`, it takes O(n) time, so recursing over a\n> list by repeatedly calling `tail` takes O(n^2) time.\n\n# Time Complexity\n\nO(n) where n = list length (copies n-1 elements)","source":{"position":null,"path":["builtins","tail"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.throw","path":["builtins","throw"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"throw","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","throw"],"pos_type":"Lambda"}},"content":{"content":"Throw an error message *s*. This usually aborts Nix expression\nevaluation, but in `nix-env -qa` and other commands that try to\nevaluate a set of derivations to get information about those\nderivations, a derivation that throws an error is silently skipped\n(which is not the case for `abort`).","source":{"position":null,"path":["builtins","throw"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.toFile","path":["builtins","toFile"],"aliases":[["lib","toFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toFile","args":["name","s"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","toFile"],"pos_type":"Lambda"}},"content":{"content":"Store the string *s* in a file in the Nix store and return its\npath.  The file has suffix *name*. This file can be used as an\ninput to derivations. One application is to write builders\n“inline”. For instance, the following Nix expression combines the\nNix expression for GNU Hello and its build script into one file:\n\n```nix\n{ stdenv, fetchurl, perl }:\n\nstdenv.mkDerivation {\n  name = \"hello-2.1.1\";\n\n  builder = builtins.toFile \"builder.sh\" \"\n    source $stdenv/setup\n\n    PATH=$perl/bin:$PATH\n\n    tar xvfz $src\n    cd hello-*\n    ./configure --prefix=$out\n    make\n    make install\n  \";\n\n  src = fetchurl {\n    url = \"http://ftp.nluug.nl/pub/gnu/hello/hello-2.1.1.tar.gz\";\n    sha256 = \"1md7jsfd8pa45z73bz1kszpp01yw6x5ljkjk2hx7wl800any6465\";\n  };\n  inherit perl;\n}\n```\n\nIt is even possible for one file to refer to another, e.g.,\n\n```nix\nbuilder = let\n  configFile = builtins.toFile \"foo.conf\" \"\n    # This is some dummy configuration file.\n    ...\n  \";\nin builtins.toFile \"builder.sh\" \"\n  source $stdenv/setup\n  ...\n  cp ${configFile} $out/etc/foo.conf\n\";\n```\n\nNote that `${configFile}` is a\n[string interpolation](@docroot@/language/types.md#type-string), so the result of the\nexpression `configFile`\n(i.e., a path like `/nix/store/m7p7jfny445k...-foo.conf`) will be\nspliced into the resulting string.\n\nIt is however *not* allowed to have files mutually referring to each\nother, like so:\n\n```nix\nlet\n  foo = builtins.toFile \"foo\" \"...${bar}...\";\n  bar = builtins.toFile \"bar\" \"...${foo}...\";\nin foo\n```\n\nThis is not allowed because it would cause a cyclic dependency in\nthe computation of the cryptographic hashes for `foo` and `bar`.\n\nIt is also not possible to reference the result of a derivation. If\nyou are using Nixpkgs, the `writeTextFile` function is able to do\nthat.","source":{"position":null,"path":["builtins","toFile"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.toJSON","path":["builtins","toJSON"],"aliases":[["lib","toJSON"],["lib","strings","toJSON"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toJSON","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","toJSON"],"pos_type":"Lambda"}},"content":{"content":"Return a string containing a JSON representation of *e*. Strings,\nintegers, floats, booleans, nulls and lists are mapped to their JSON\nequivalents. Sets (except derivations) are represented as objects.\nDerivations are translated to a JSON string containing the\nderivation’s output path. Paths are copied to the store and\nrepresented as a JSON string of the resulting store path.","source":{"position":null,"path":["builtins","toJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.toPath","path":["builtins","toPath"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"toPath","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","toPath"],"pos_type":"Lambda"}},"content":{"content":"**DEPRECATED.** Use `/. + \"/path\"` to convert a string into an absolute\npath. For relative paths, use `./. + \"/path\"`.","source":{"position":null,"path":["builtins","toPath"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.toString","path":["builtins","toString"],"aliases":[["lib","toString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toString","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","toString"],"pos_type":"Lambda"}},"content":{"content":"Convert the expression *e* to a string. *e* can be:\n\n  - A string (in which case the string is returned unmodified).\n\n  - A path (e.g., `toString /foo/bar` yields `\"/foo/bar\"`.\n\n  - A set containing `{ __toString = self: ...; }` or `{ outPath = ...; }`.\n\n  - An integer.\n\n  - A list, in which case the string representations of its elements\n    are joined with spaces.\n\n  - A Boolean (`false` yields `\"\"`, `true` yields `\"1\"`).\n\n  - `null`, which yields the empty string.","source":{"position":null,"path":["builtins","toString"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.toXML","path":["builtins","toXML"],"aliases":[["lib","toXML"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toXML","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","toXML"],"pos_type":"Lambda"}},"content":{"content":"Return a string containing an XML representation of *e*. The main\napplication for `toXML` is to communicate information with the\nbuilder in a more structured format than plain environment\nvariables.\n\nHere is an example where this is the case:\n\n```nix\n{ stdenv, fetchurl, libxslt, jira, uberwiki }:\n\nstdenv.mkDerivation (rec {\n  name = \"web-server\";\n\n  buildInputs = [ libxslt ];\n\n  builder = builtins.toFile \"builder.sh\" \"\n    source $stdenv/setup\n    mkdir $out\n    echo \"$servlets\" | xsltproc ${stylesheet} - > $out/server-conf.xml ①\n  \";\n\n  stylesheet = builtins.toFile \"stylesheet.xsl\" ②\n   \"<?xml version='1.0' encoding='UTF-8'?>\n    <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>\n      <xsl:template match='/'>\n        <Configure>\n          <xsl:for-each select='/expr/list/attrs'>\n            <Call name='addWebApplication'>\n              <Arg><xsl:value-of select=\\\"attr[@name = 'path']/string/@value\\\" /></Arg>\n              <Arg><xsl:value-of select=\\\"attr[@name = 'war']/path/@value\\\" /></Arg>\n            </Call>\n          </xsl:for-each>\n        </Configure>\n      </xsl:template>\n    </xsl:stylesheet>\n  \";\n\n  servlets = builtins.toXML [ ③\n    { path = \"/bugtracker\"; war = jira + \"/lib/atlassian-jira.war\"; }\n    { path = \"/wiki\"; war = uberwiki + \"/uberwiki.war\"; }\n  ];\n})\n```\n\nThe builder is supposed to generate the configuration file for a\n[Jetty servlet container](http://jetty.mortbay.org/). A servlet\ncontainer contains a number of servlets (`*.war` files) each\nexported under a specific URI prefix. So the servlet configuration\nis a list of sets containing the `path` and `war` of the servlet\n(①). This kind of information is difficult to communicate with the\nnormal method of passing information through an environment\nvariable, which just concatenates everything together into a\nstring (which might just work in this case, but wouldn’t work if\nfields are optional or contain lists themselves). Instead the Nix\nexpression is converted to an XML representation with `toXML`,\nwhich is unambiguous and can easily be processed with the\nappropriate tools. For instance, in the example an XSLT stylesheet\n(at point ②) is applied to it (at point ①) to generate the XML\nconfiguration file for the Jetty server. The XML representation\nproduced at point ③ by `toXML` is as follows:\n\n```xml\n<?xml version='1.0' encoding='utf-8'?>\n<expr>\n  <list>\n    <attrs>\n      <attr name=\"path\">\n        <string value=\"/bugtracker\" />\n      </attr>\n      <attr name=\"war\">\n        <path value=\"/nix/store/d1jh9pasa7k2...-jira/lib/atlassian-jira.war\" />\n      </attr>\n    </attrs>\n    <attrs>\n      <attr name=\"path\">\n        <string value=\"/wiki\" />\n      </attr>\n      <attr name=\"war\">\n        <path value=\"/nix/store/y6423b1yi4sx...-uberwiki/uberwiki.war\" />\n      </attr>\n    </attrs>\n  </list>\n</expr>\n```\n\nNote that we used the `toFile` built-in to write the builder and\nthe stylesheet “inline” in the Nix expression. The path of the\nstylesheet is spliced into the builder using the syntax `xsltproc\n${stylesheet}`.","source":{"position":null,"path":["builtins","toXML"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.trace","path":["builtins","trace"],"aliases":[["lib","trace"],["lib","debug","trace"]],"signature":null,"is_primop":true,"primop_meta":{"name":"trace","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","trace"],"pos_type":"Lambda"}},"content":{"content":"Evaluate *e1* and print its abstract syntax representation on\nstandard error. Then return *e2*. This function is useful for\ndebugging.\n\nIf the\n[`debugger-on-trace`](@docroot@/command-ref/conf-file.md#conf-debugger-on-trace)\noption is set to `true` and the `--debugger` flag is given, the\ninteractive debugger is started when `trace` is called (like\n[`break`](@docroot@/language/builtins.md#builtins-break)).","source":{"position":null,"path":["builtins","trace"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.traceVerbose","path":["builtins","traceVerbose"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":"traceVerbose","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","traceVerbose"],"pos_type":"Lambda"}},"content":{"content":"Evaluate *e1* and print its abstract syntax representation on standard\nerror if `--trace-verbose` is enabled. Then return *e2*. This function\nis useful for debugging.","source":{"position":null,"path":["builtins","traceVerbose"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.tryEval","path":["builtins","tryEval"],"aliases":[["lib","tryEval"]],"signature":null,"is_primop":true,"primop_meta":{"name":"tryEval","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","tryEval"],"pos_type":"Lambda"}},"content":{"content":"Try to shallowly evaluate *e*. Return a set containing the\nattributes `success` (`true` if *e* evaluated successfully,\n`false` if an error was thrown) and `value`, equalling *e* if\nsuccessful and `false` otherwise. `tryEval` only prevents\nerrors created by `throw` or `assert` from being thrown.\nErrors `tryEval` doesn't catch are, for example, those created\nby `abort` and type errors generated by builtins. Also note that\nthis doesn't evaluate *e* deeply, so `let e = { x = throw \"\"; };\nin (builtins.tryEval e).success` is `true`. Using\n`builtins.deepSeq` one can get the expected result:\n`let e = { x = throw \"\"; }; in\n(builtins.tryEval (builtins.deepSeq e e)).success` is\n`false`.\n\n`tryEval` intentionally does not return the error message, because that risks bringing non-determinism into the evaluation result, and it would become very difficult to improve error reporting without breaking existing expressions.\nInstead, use [`builtins.addErrorContext`](@docroot@/language/builtins.md#builtins-addErrorContext) to add context to the error message, and use a Nix unit testing tool for testing.","source":{"position":null,"path":["builtins","tryEval"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.typeOf","path":["builtins","typeOf"],"aliases":[["lib","typeOf"],["lib","strings","typeOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"typeOf","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","typeOf"],"pos_type":"Lambda"}},"content":{"content":"Return a string representing the type of the value *e*, namely\n`\"int\"`, `\"bool\"`, `\"string\"`, `\"path\"`, `\"null\"`, `\"set\"`,\n`\"list\"`, `\"lambda\"` or `\"float\"`.","source":{"position":null,"path":["builtins","typeOf"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.unsafeDiscardOutputDependency","path":["builtins","unsafeDiscardOutputDependency"],"aliases":[["lib","unsafeDiscardOutputDependency"],["lib","derivations","unsafeDiscardOutputDependency"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeDiscardOutputDependency","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","unsafeDiscardOutputDependency"],"pos_type":"Lambda"}},"content":{"content":"Create a copy of the given string where every\n[derivation deep](@docroot@/language/string-context.md#string-context-element-derivation-deep)\nstring context element is turned into a\n[constant](@docroot@/language/string-context.md#string-context-constant)\nstring context element.\n\nThis is the opposite of [`builtins.addDrvOutputDependencies`](#builtins-addDrvOutputDependencies).\n\nThis is unsafe because it allows us to \"forget\" store objects we would have otherwise referred to with the string context,\nwhereas Nix normally tracks all dependencies consistently.\nSafe operations \"grow\" but never \"shrink\" string contexts.\n[`builtins.addDrvOutputDependencies`] in contrast is safe because \"derivation deep\" string context element always refers to the underlying derivation (among many more things).\nReplacing a constant string context element with a \"derivation deep\" element is a safe operation that just enlargens the string context without forgetting anything.\n\n[`builtins.addDrvOutputDependencies`]: #builtins-addDrvOutputDependencies","source":{"position":null,"path":["builtins","unsafeDiscardOutputDependency"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.unsafeDiscardStringContext","path":["builtins","unsafeDiscardStringContext"],"aliases":[["lib","unsafeDiscardStringContext"],["lib","strings","unsafeDiscardStringContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeDiscardStringContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","unsafeDiscardStringContext"],"pos_type":"Lambda"}},"content":{"content":"Discard the [string context](@docroot@/language/string-context.md) from a value that can be coerced to a string.","source":{"position":null,"path":["builtins","unsafeDiscardStringContext"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.unsafeGetAttrPos","path":["builtins","unsafeGetAttrPos"],"aliases":[["lib","unsafeGetAttrPos"],["lib","debug","unsafeGetAttrPos"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeGetAttrPos","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["builtins","unsafeGetAttrPos"],"pos_type":"Lambda"}},"content":{"content":"`unsafeGetAttrPos` returns the position of the attribute named *s*\nfrom *set*. This is used by Nixpkgs to provide location information\nin error messages.","source":{"position":null,"path":["builtins","unsafeGetAttrPos"],"pos_type":"Lambda"}}},{"meta":{"title":"builtins.warn","path":["builtins","warn"],"aliases":[["lib","warn"],["lib","trivial","warn"]],"signature":"warn :: String -> a -> a\n","is_primop":true,"primop_meta":{"name":"warn","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":867,"column":3},"path":["lib","trivial","warn"],"pos_type":"Attribute"}},"content":{"content":"\n`warn` *`message`* *`value`*\n\nPrint a warning before returning the second argument.\n\nSee [`builtins.warn`](https://nix.dev/manual/nix/latest/language/builtins.html#builtins-warn) (Nix >= 2.23).\nOn older versions, the Nix 2.23 behavior is emulated with [`builtins.trace`](https://nix.dev/manual/nix/latest/language/builtins.html#builtins-warn), including the [`NIX_ABORT_ON_WARN`](https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-abort-on-warn) behavior, but not the `nix.conf` setting or command line option.\n\n# Inputs\n\n*`message`* (String)\n\n: Warning message to print before evaluating *`value`*.\n\n*`value`* (any value)\n\n: Value to return as-is.\n\n# Type\n\n```\nwarn :: String -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":867,"column":3},"path":["lib","trivial","warn"],"pos_type":"Attribute"}}},{"meta":{"title":"builtins.zipAttrsWith","path":["builtins","zipAttrsWith"],"aliases":[["lib","zipAttrsWith"],["lib","attrsets","zipAttrsWith"]],"signature":"zipAttrsWith :: (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n","is_primop":true,"primop_meta":{"name":"zipAttrsWith","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1549,"column":3},"path":["lib","attrsets","zipAttrsWith"],"pos_type":"Attribute"}},"content":{"content":"\nMerge sets of attributes and use the function `f` to merge attribute values.\nLike `lib.attrsets.zipAttrsWithNames` with all key names are passed for `names`.\n\nImplementation note: Common names appear multiple times in the list of\nnames, hopefully this does not affect the system because the maximal\nlaziness avoid computing twice the same expression and `listToAttrs` does\nnot care about duplicated attribute names.\n\n# Type\n\n```\nzipAttrsWith :: (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.zipAttrsWith` usage example\n\n```nix\nzipAttrsWith (name: values: values) [{a = \"x\";} {a = \"y\"; b = \"z\";}]\n=> { a = [\"x\" \"y\"]; b = [\"z\"]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1549,"column":3},"path":["lib","attrsets","zipAttrsWith"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.dhallPackages.__unfix__","path":["pkgs","dhallPackages","__unfix__"],"aliases":[["pkgs","python3Packages","packages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":122,"column":9},"attr_expr":"__unfix__ = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":329,"column":7},"lambda_expr":"final:\n      let\n        prev = f final;\n      in\n      prev // overlay final prev","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":329,"column":7},"path":["pkgs","dhallPackages","__unfix__"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":329,"column":7},"path":["pkgs","dhallPackages","__unfix__"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackages.buildDhallDirectoryPackage","path":["pkgs","dhallPackages","buildDhallDirectoryPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/dhall-packages.nix","line":35,"column":9},"attr_expr":"buildDhallDirectoryPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"lambda_expr":"args:\n    let\n      result = lib.makeOverridable f args;\n\n      copyArgs = g: lib.setFunctionArgs g (lib.functionArgs f);\n\n      overrideWith = update: args // (if lib.isFunction update then update args else update);\n\n      overridePackage = copyArgs (update: makePackageOverridable f (overrideWith update));\n\n    in\n    result // { inherit overridePackage; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"path":["pkgs","dhallPackages","buildDhallDirectoryPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"path":["pkgs","dhallPackages","buildDhallDirectoryPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackages.buildDhallGitHubPackage","path":["pkgs","dhallPackages","buildDhallGitHubPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/dhall-packages.nix","line":34,"column":9},"attr_expr":"buildDhallGitHubPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"lambda_expr":"args:\n    let\n      result = lib.makeOverridable f args;\n\n      copyArgs = g: lib.setFunctionArgs g (lib.functionArgs f);\n\n      overrideWith = update: args // (if lib.isFunction update then update args else update);\n\n      overridePackage = copyArgs (update: makePackageOverridable f (overrideWith update));\n\n    in\n    result // { inherit overridePackage; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"path":["pkgs","dhallPackages","buildDhallGitHubPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"path":["pkgs","dhallPackages","buildDhallGitHubPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackages.buildDhallPackage","path":["pkgs","dhallPackages","buildDhallPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/dhall-packages.nix","line":33,"column":9},"attr_expr":"buildDhallPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/dhall/build-dhall-package.nix","line":11,"column":1},"lambda_expr":"{\n  name,\n\n  # Expressions to add to the cache before interpreting the code\n  dependencies ? [ ],\n\n  # A Dhall expression\n  #\n  # Carefully note that the following expression must be devoid of uncached HTTP\n  # imports.  This is because the expression will be evaluated using an\n  # interpreter with HTTP support disabled, so all HTTP imports have to be\n  # protected by an integrity check that can be satisfied via cached\n  # dependencies.\n  #\n  # You can add a dependency to the cache using the preceding `dependencies`\n  # option\n  code,\n\n  # `buildDhallPackage` can include both a \"source distribution\" in\n  # `source.dhall` and a \"binary distribution\" in `binary.dhall`:\n  #\n  # * `source.dhall` is a dependency-free αβ-normalized Dhall expression\n  #\n  # * `binary.dhall` is an expression of the form: `missing sha256:${HASH}`\n  #\n  #   This expression requires you to install the cache product located at\n  #   `.cache/dhall/1220${HASH}` to successfully resolve\n  #\n  # By default, `buildDhallPackage` only includes \"binary.dhall\" to conserve\n  # space within the Nix store, but if you set the following `source` option to\n  # `true` then the package will also include `source.dhall`.\n  source ? false,\n\n  # Directory to generate documentation for (i.e. as the `--input` option to the\n  # `dhall-docs` command.)\n  #\n  # If `null`, then no documentation is generated.\n  documentationRoot ? null,\n\n  # Base URL prepended to paths copied to the clipboard\n  #\n  # This is used in conjunction with `documentationRoot`, and is unused if\n  # `documentationRoot` is `null`.\n  baseImportUrl ? null,\n}:\n\nlet\n  # HTTP support is disabled in order to force that HTTP dependencies are built\n  # using Nix instead of using Dhall's support for HTTP imports.\n  dhallNoHTTP = haskell.lib.compose.appendConfigureFlag \"-f-with-http\" dhall;\n\n  file = writeText \"${name}.dhall\" code;\n\n  cache = \".cache\";\n\n  data = \".local/share\";\n\n  cacheDhall = \"${cache}/dhall\";\n\n  dataDhall = \"${data}/dhall\";\n\n  sourceFile = \"source.dhall\";\n\nin\nrunCommand name { inherit dependencies; } ''\n  set -eu\n\n  mkdir -p ${cacheDhall}\n\n  for dependency in $dependencies; do\n    ${lndir}/bin/lndir -silent $dependency/${cacheDhall} ${cacheDhall}\n  done\n\n  export XDG_CACHE_HOME=$PWD/${cache}\n\n  mkdir -p $out/${cacheDhall}\n\n  ${dhallNoHTTP}/bin/dhall --alpha --file '${file}' > $out/${sourceFile}\n\n  SHA_HASH=$(${dhallNoHTTP}/bin/dhall hash <<< $out/${sourceFile})\n\n  HASH_FILE=\"''${SHA_HASH/sha256:/1220}\"\n\n  ${dhallNoHTTP}/bin/dhall encode --file $out/${sourceFile} > $out/${cacheDhall}/$HASH_FILE\n\n  echo \"missing $SHA_HASH\" > $out/binary.dhall\n\n  ${lib.optionalString (!source) \"rm $out/${sourceFile}\"}\n\n  ${lib.optionalString (documentationRoot != null) ''\n    mkdir -p $out/${dataDhall}\n\n    XDG_DATA_HOME=$out/${data} ${dhall-docs}/bin/dhall-docs --output-link $out/docs ${\n      lib.cli.toCommandLineShellGNU { } {\n        base-import-url = baseImportUrl;\n\n        input = documentationRoot;\n\n        package-name = name;\n      }\n    }\n  ''}\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/dhall/build-dhall-package.nix","line":11,"column":1},"path":["pkgs","dhallPackages","buildDhallPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/dhall/build-dhall-package.nix","line":11,"column":1},"path":["pkgs","dhallPackages","buildDhallPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackages.buildDhallUrl","path":["pkgs","dhallPackages","buildDhallUrl"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/dhall-packages.nix","line":36,"column":9},"attr_expr":"buildDhallUrl","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/dhall/build-dhall-url.nix","line":22,"column":1},"lambda_expr":"{\n  # URL of the input Dhall file.\n  # example: \"https://raw.githubusercontent.com/cdepillabout/example-dhall-repo/c1b0d0327146648dcf8de997b2aa32758f2ed735/example1.dhall\"\n  url,\n\n  # Nix hash of the input Dhall file.\n  # example: \"sha256-ZTSiQUXpPbPfPvS8OeK6dDQE6j6NbP27ho1cg9YfENI=\"\n  hash,\n\n  # Dhall hash of the input Dhall file.\n  # example: \"sha256:6534a24145e93db3df3ef4bc39e2ba743404ea3e8d6cfdbb868d5c83d61f10d2\"\n  dhallHash,\n\n  # Name for this derivation.\n  name ? (baseNameOf url + \"-cache\"),\n\n  # `buildDhallUrl` can include both a \"source distribution\" in\n  # `source.dhall` and a \"binary distribution\" in `binary.dhall`:\n  #\n  # * `source.dhall` is a dependency-free αβ-normalized Dhall expression\n  #\n  # * `binary.dhall` is an expression of the form: `missing sha256:${HASH}`\n  #\n  #   This expression requires you to install the cache product located at\n  #   `.cache/dhall/1220${HASH}` to successfully resolve\n  #\n  # By default, `buildDhallUrl` only includes \"binary.dhall\" to conserve\n  # space within the Nix store, but if you set the following `source` option to\n  # `true` then the package will also include `source.dhall`.\n  source ? false,\n}:\n\nlet\n  # HTTP support is disabled in order to force that HTTP dependencies are built\n  # using Nix instead of using Dhall's support for HTTP imports.\n  dhallNoHTTP = haskell.lib.appendConfigureFlag dhall \"-f-with-http\";\n\n  # This uses Dhall's remote importing capabilities for downloading a Dhall file.\n  # The output Dhall file has all imports resolved, and then is\n  # alpha-normalized and binary-encoded.\n  downloadedEncodedFile =\n    runCommand (baseNameOf url)\n      {\n        outputHashAlgo = null;\n        outputHash = hash;\n        name = baseNameOf url;\n        nativeBuildInputs = [ cacert ];\n        impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n      }\n      ''\n        echo \"${url} ${dhallHash}\" > in-dhall-file\n        ${dhall}/bin/dhall --alpha --plain --file in-dhall-file | ${dhallNoHTTP}/bin/dhall encode > $out\n      '';\n\n  cache = \".cache\";\n\n  data = \".local/share\";\n\n  cacheDhall = \"${cache}/dhall\";\n\n  dataDhall = \"${data}/dhall\";\n\n  sourceFile = \"source.dhall\";\n\nin\nrunCommand name { } (\n  ''\n    set -eu\n\n    mkdir -p ${cacheDhall} $out/${cacheDhall}\n\n    export XDG_CACHE_HOME=$PWD/${cache}\n\n    SHA_HASH=\"${dhallHash}\"\n\n    HASH_FILE=\"''${SHA_HASH/sha256:/1220}\"\n\n    cp ${downloadedEncodedFile} $out/${cacheDhall}/$HASH_FILE\n\n    echo \"missing $SHA_HASH\" > $out/binary.dhall\n  ''\n  + lib.optionalString source ''\n    ${dhallNoHTTP}/bin/dhall decode --file ${downloadedEncodedFile} > $out/${sourceFile}\n  ''\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/dhall/build-dhall-url.nix","line":22,"column":1},"path":["pkgs","dhallPackages","buildDhallUrl"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/dhall/build-dhall-url.nix","line":22,"column":1},"path":["pkgs","dhallPackages","buildDhallUrl"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackages.callPackage","path":["pkgs","dhallPackages","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/dhall-packages.nix","line":32,"column":9},"attr_expr":"callPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dhallPackages.generateDhallDirectoryPackage","path":["pkgs","dhallPackages","generateDhallDirectoryPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/dhall-packages.nix","line":37,"column":9},"attr_expr":"generateDhallDirectoryPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"lambda_expr":"args:\n    let\n      result = lib.makeOverridable f args;\n\n      copyArgs = g: lib.setFunctionArgs g (lib.functionArgs f);\n\n      overrideWith = update: args // (if lib.isFunction update then update args else update);\n\n      overridePackage = copyArgs (update: makePackageOverridable f (overrideWith update));\n\n    in\n    result // { inherit overridePackage; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"path":["pkgs","dhallPackages","generateDhallDirectoryPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/dhall-modules/lib.nix","line":8,"column":8},"path":["pkgs","dhallPackages","generateDhallDirectoryPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackages.override","path":["pkgs","dhallPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dhallPackages.overrideDerivation","path":["pkgs","dhallPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dhallPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dhallPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackages.buildDhallDirectoryPackage.override","path":["pkgs","dhallPackages","buildDhallDirectoryPackage","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dhallPackages.buildDhallGitHubPackage.override","path":["pkgs","dhallPackages","buildDhallGitHubPackage","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dhallPackages.buildDhallPackage.override","path":["pkgs","dhallPackages","buildDhallPackage","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dhallPackages.buildDhallUrl.override","path":["pkgs","dhallPackages","buildDhallUrl","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dhallPackages.generateDhallDirectoryPackage.override","path":["pkgs","dhallPackages","generateDhallDirectoryPackage","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dockerTools.buildImage","path":["pkgs","dockerTools","buildImage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":610,"column":3},"attr_expr":"buildImage = lib.makeOverridable (\n    args@{\n      # Image name.\n      name,\n      # Image tag, when null then the nix output hash will be used.\n      tag ? null,\n      # Parent image, to append to.\n      fromImage ? null,\n      # Name of the parent image; will be read from the image otherwise.\n      fromImageName ? null,\n      # Tag of the parent image; will be read from the image otherwise.\n      fromImageTag ? null,\n      # Files to put on the image (a nix store path or list of paths).\n      copyToRoot ? null,\n      # When copying the contents into the image, preserve symlinks to\n      # directories (see `rsync -K`).  Otherwise, transform those symlinks\n      # into directories.\n      keepContentsDirlinks ? false,\n      # Docker config; e.g. what command to run on the container.\n      config ? null,\n      # Image architecture, defaults to the architecture of the `hostPlatform` when unset\n      architecture ? defaultArchitecture,\n      # Optional bash script to run on the files prior to fixturizing the layer.\n      extraCommands ? \"\",\n      uid ? 0,\n      gid ? 0,\n      # Optional bash script to run as root on the image when provisioning.\n      runAsRoot ? null,\n      # Size of the virtual machine disk to provision when building the image.\n      diskSize ? 1024,\n      # Size of the virtual machine memory to provision when building the image.\n      buildVMMemorySize ? 512,\n      # Time of creation of the image.\n      created ? \"1970-01-01T00:00:01Z\",\n      # Compressor to use. One of: none, gz, zstd.\n      compressor ? \"gz\",\n      # Populate the nix database in the image with the dependencies of `copyToRoot`.\n      includeNixDB ? false,\n      # Deprecated.\n      contents ? null,\n      # Meta options to set on the resulting derivation.\n      meta ? { },\n    }:\n\n    let\n      checked =\n        lib.warnIf (contents != null)\n          \"in docker image ${name}: The contents parameter is deprecated. Change to copyToRoot if the contents are designed to be copied to the root filesystem, such as when you use `buildEnv` or similar between contents and your packages. Use copyToRoot = buildEnv { ... }; or similar if you intend to add packages to /bin.\"\n          lib.throwIf\n          (contents != null && copyToRoot != null)\n          \"in docker image ${name}: You can not specify both contents and copyToRoot.\";\n\n      rootContents = if copyToRoot == null then contents else copyToRoot;\n\n      baseName = baseNameOf name;\n\n      # Create a JSON blob of the configuration. Set the date to unix zero.\n      baseJson =\n        let\n          pure = writeText \"${baseName}-config.json\" (\n            builtins.toJSON {\n              inherit created config architecture;\n              preferLocalBuild = true;\n              os = \"linux\";\n            }\n          );\n          impure =\n            runCommand \"${baseName}-config.json\"\n              {\n                nativeBuildInputs = [ jq ];\n                preferLocalBuild = true;\n              }\n              ''\n                jq \".created = \\\"$(TZ=utc date --iso-8601=\"seconds\")\\\"\" ${pure} > $out\n              '';\n        in\n        if created == \"now\" then impure else pure;\n\n      compress = compressorForImage compressor name;\n\n      # TODO: add the dependencies of the config json.\n      extraCommandsWithDB =\n        if includeNixDB then (mkDbExtraCommand rootContents) + extraCommands else extraCommands;\n\n      layer =\n        if runAsRoot == null then\n          mkPureLayer {\n            name = baseName;\n            inherit\n              baseJson\n              keepContentsDirlinks\n              uid\n              gid\n              ;\n            extraCommands = extraCommandsWithDB;\n            copyToRoot = rootContents;\n          }\n        else\n          mkRootLayer {\n            name = baseName;\n            inherit\n              baseJson\n              fromImage\n              fromImageName\n              fromImageTag\n              keepContentsDirlinks\n              runAsRoot\n              diskSize\n              buildVMMemorySize\n              ;\n            extraCommands = extraCommandsWithDB;\n            copyToRoot = rootContents;\n          };\n      result =\n        runCommand \"docker-image-${baseName}.tar${compress.ext}\"\n          {\n            nativeBuildInputs = [\n              jshon\n              jq\n              moreutils\n            ]\n            ++ compress.nativeInputs;\n            # Image name must be lowercase\n            imageName = lib.toLower name;\n            imageTag = lib.optionalString (tag != null) tag;\n            inherit fromImage baseJson;\n            layerClosure = writeClosure [ layer ];\n            passthru.buildArgs = args;\n            passthru.layer = layer;\n            passthru.imageTag =\n              if tag != null then\n                tag\n              else\n                lib.head (\n                  lib.strings.splitString \"-\" (baseNameOf (builtins.unsafeDiscardStringContext result.outPath))\n                );\n            inherit meta;\n          }\n          ''\n            ${lib.optionalString (tag == null) ''\n              outName=\"$(basename \"$out\")\"\n              outHash=$(echo \"$outName\" | cut -d - -f 1)\n\n              imageTag=$outHash\n            ''}\n\n            # Print tar contents:\n            # 1: Interpreted as relative to the root directory\n            # 2: With no trailing slashes on directories\n            # This is useful for ensuring that the output matches the\n            # values generated by the \"find\" command\n            ls_tar() {\n              for f in $(tar -tf $1 | xargs realpath -ms --relative-to=.); do\n                if [[ \"$f\" != \".\" ]]; then\n                  echo \"/$f\"\n                fi\n              done\n            }\n\n            mkdir image\n            touch baseFiles\n            baseEnvs='[]'\n            if [[ -n \"$fromImage\" ]]; then\n              echo \"Unpacking base image...\"\n              tar -C image -xpf \"$fromImage\"\n\n              # Store the layers and the environment variables from the base image\n              cat ./image/manifest.json  | jq -r '.[0].Layers | .[]' > layer-list\n              configName=\"$(cat ./image/manifest.json | jq -r '.[0].Config')\"\n              baseEnvs=\"$(cat \"./image/$configName\" | jq '.config.Env // []')\"\n\n              # Extract the parentID from the manifest\n              if [[ -n \"$fromImageName\" ]] && [[ -n \"$fromImageTag\" ]]; then\n                parentID=\"$(\n                  cat \"image/manifest.json\" |\n                    jq -r '.[] | select(.RepoTags | contains([$desiredTag])) | rtrimstr(\".json\")' \\\n                      --arg desiredTag \"$fromImageName:$fromImageTag\"\n                )\"\n              else\n                echo \"From-image name or tag wasn't set. Reading the first ID.\"\n                parentID=\"$(cat \"image/manifest.json\" | jq -r '.[0].Config | rtrimstr(\".json\")')\"\n              fi\n\n              # Otherwise do not import the base image configuration and manifest\n              chmod a+w image image/*.json\n              rm -f image/*.json\n\n              for l in image/*/layer.tar; do\n                ls_tar $l >> baseFiles\n              done\n            else\n              touch layer-list\n            fi\n\n            chmod -R ug+rw image\n\n            mkdir temp\n            cp ${layer}/* temp/\n            chmod ug+w temp/*\n\n            for dep in $(cat $layerClosure); do\n              find $dep >> layerFiles\n            done\n\n            echo \"Adding layer...\"\n            # Record the contents of the tarball with ls_tar.\n            ls_tar temp/layer.tar >> baseFiles\n\n            # Append nix/store directory to the layer so that when the layer is loaded in the\n            # image /nix/store has read permissions for non-root users.\n            # nix/store is added only if the layer has /nix/store paths in it.\n            if [ $(wc -l < $layerClosure) -gt 1 ] && [ $(grep -c -e \"^/nix/store$\" baseFiles) -eq 0 ]; then\n              mkdir -p nix/store\n              chmod -R 555 nix\n              echo \"./nix\" >> layerFiles\n              echo \"./nix/store\" >> layerFiles\n            fi\n\n            # Get the files in the new layer which were *not* present in\n            # the old layer, and record them as newFiles.\n            comm <(sort -n baseFiles|uniq) \\\n                 <(sort -n layerFiles|uniq|grep -v ${layer}) -1 -3 > newFiles\n            # Append the new files to the layer.\n            tar -rpf temp/layer.tar --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" \\\n              --owner=0 --group=0 --no-recursion --verbatim-files-from --files-from newFiles\n\n            echo \"Adding meta...\"\n\n            # If we have a parentID, add it to the json metadata.\n            if [[ -n \"$parentID\" ]]; then\n              cat temp/json | jshon -s \"$parentID\" -i parent > tmpjson\n              mv tmpjson temp/json\n            fi\n\n            # Take the sha256 sum of the generated json and use it as the layer ID.\n            # Compute the size and add it to the json under the 'Size' field.\n            layerID=$(sha256sum temp/json|cut -d ' ' -f 1)\n            size=$(stat --printf=\"%s\" temp/layer.tar)\n            cat temp/json | jshon -s \"$layerID\" -i id -n $size -i Size > tmpjson\n            mv tmpjson temp/json\n\n            # Use the temp folder we've been working on to create a new image.\n            mv temp image/$layerID\n\n            # Add the new layer ID to the end of the layer list\n            (\n              cat layer-list\n              # originally this used `sed -i \"1i$layerID\" layer-list`, but\n              # would fail if layer-list was completely empty.\n              echo \"$layerID/layer.tar\"\n            ) | sponge layer-list\n\n            # Create image json and image manifest\n            imageJson=$(cat ${baseJson} | jq '.config.Env = $baseenv + .config.Env' --argjson baseenv \"$baseEnvs\")\n            imageJson=$(echo \"$imageJson\" | jq \". + {\\\"rootfs\\\": {\\\"diff_ids\\\": [], \\\"type\\\": \\\"layers\\\"}}\")\n            manifestJson=$(jq -n \"[{\\\"RepoTags\\\":[\\\"$imageName:$imageTag\\\"]}]\")\n\n            for layerTar in $(cat ./layer-list); do\n              layerChecksum=$(sha256sum image/$layerTar | cut -d ' ' -f1)\n              imageJson=$(echo \"$imageJson\" | jq \".history |= . + [{\\\"created\\\": \\\"$(jq -r .created ${baseJson})\\\"}]\")\n              # diff_ids order is from the bottom-most to top-most layer\n              imageJson=$(echo \"$imageJson\" | jq \".rootfs.diff_ids |= . + [\\\"sha256:$layerChecksum\\\"]\")\n              manifestJson=$(echo \"$manifestJson\" | jq \".[0].Layers |= . + [\\\"$layerTar\\\"]\")\n            done\n\n            imageJsonChecksum=$(echo \"$imageJson\" | sha256sum | cut -d ' ' -f1)\n            echo \"$imageJson\" > \"image/$imageJsonChecksum.json\"\n            manifestJson=$(echo \"$manifestJson\" | jq \".[0].Config = \\\"$imageJsonChecksum.json\\\"\")\n            echo \"$manifestJson\" > image/manifest.json\n\n            # Store the json under the name image/repositories.\n            jshon -n object \\\n              -n object -s \"$layerID\" -i \"$imageTag\" \\\n              -i \"$imageName\" > image/repositories\n\n            # Make the image read-only.\n            chmod -R a-w image\n\n            echo \"Cooking the image...\"\n            tar -C image --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" --owner=0 --group=0 --xform s:'^./':: -c . | ${compress.compress} > $out\n\n            echo \"Finished.\"\n          '';\n\n    in\n    checked result\n  );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dockerTools.buildImageWithNixDb","path":["pkgs","dockerTools","buildImageWithNixDb"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":994,"column":3},"attr_expr":"buildImageWithNixDb = args: buildImage (args // { includeNixDB = true; });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":994,"column":25},"lambda_expr":"buildImageWithNixDb = args: buildImage (args // { includeNixDB = true; });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":994,"column":25},"path":["pkgs","dockerTools","buildImageWithNixDb"],"pos_type":"Lambda"}},"content":{"content":"TODO: add the dependencies of the config json.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":994,"column":25},"path":["pkgs","dockerTools","buildImageWithNixDb"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.buildLayeredImage","path":["pkgs","dockerTools","buildLayeredImage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":577,"column":3},"attr_expr":"buildLayeredImage = lib.makeOverridable (\n    {\n      name,\n      compressor ? \"gz\",\n      meta ? { },\n      ...\n    }@args:\n    let\n      stream = streamLayeredImage (\n        removeAttrs args [\n          \"compressor\"\n          \"meta\"\n        ]\n      );\n      compress = compressorForImage compressor name;\n    in\n    runCommand \"${baseNameOf name}.tar${compress.ext}\" {\n      inherit (stream) imageName;\n      passthru = stream.passthru // {\n        inherit (stream) imageTag;\n        inherit stream;\n      };\n      nativeBuildInputs = compress.nativeInputs;\n      inherit meta;\n    } \"${stream} | ${compress.compress} > $out\"\n  );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dockerTools.buildLayeredImageWithNixDb","path":["pkgs","dockerTools","buildLayeredImageWithNixDb"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":996,"column":3},"attr_expr":"buildLayeredImageWithNixDb = args: buildLayeredImage (args // { includeNixDB = true; });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":996,"column":32},"lambda_expr":"args: buildLayeredImage (args // { includeNixDB = true; })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":996,"column":32},"path":["pkgs","dockerTools","buildLayeredImageWithNixDb"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":996,"column":32},"path":["pkgs","dockerTools","buildLayeredImageWithNixDb"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.buildNixShellImage","path":["pkgs","dockerTools","buildNixShellImage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1428,"column":3},"attr_expr":"buildNixShellImage =\n    {\n      drv,\n      compressor ? \"gz\",\n      ...\n    }@args:\n    let\n      stream = streamNixShellImage (removeAttrs args [ \"compressor\" ]);\n      compress = compressorForImage compressor drv.name;\n    in\n    runCommand \"${drv.name}-env.tar${compress.ext}\" {\n      inherit (stream) imageName;\n      passthru = { inherit (stream) imageTag; };\n      nativeBuildInputs = compress.nativeInputs;\n    } \"${stream} | ${compress.compress} > $out\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1429,"column":5},"lambda_expr":"buildNixShellImage =\n    {\n      drv,\n      compressor ? \"gz\",\n      ...\n    }@args:\n    let\n      stream = streamNixShellImage (removeAttrs args [ \"compressor\" ]);\n      compress = compressorForImage compressor drv.name;\n    in\n    runCommand \"${drv.name}-env.tar${compress.ext}\" {\n      inherit (stream) imageName;\n      passthru = { inherit (stream) imageTag; };\n      nativeBuildInputs = compress.nativeInputs;\n    } \"${stream} | ${compress.compress} > $out\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1429,"column":5},"path":["pkgs","dockerTools","buildNixShellImage"],"pos_type":"Lambda"}},"content":{"content":"Tests: nixos/tests/docker-tools-nix-shell.nix","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1429,"column":5},"path":["pkgs","dockerTools","buildNixShellImage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.exportImage","path":["pkgs","dockerTools","exportImage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":375,"column":3},"attr_expr":"exportImage =\n    {\n      name ? fromImage.name,\n      fromImage,\n      fromImageName ? null,\n      fromImageTag ? null,\n      diskSize ? 1024,\n    }:\n    runWithOverlay {\n      inherit\n        name\n        fromImage\n        fromImageName\n        fromImageTag\n        diskSize\n        ;\n\n      postMount = ''\n        echo \"Packing raw image...\"\n        mkdir -p $out\n        tar -C mnt --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" -cf $out/layer.tar .\n      '';\n\n      postUmount = ''\n        mv $out/layer.tar .\n        rm -rf $out\n        mv layer.tar $out\n      '';\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":376,"column":5},"lambda_expr":"{\n      name ? fromImage.name,\n      fromImage,\n      fromImageName ? null,\n      fromImageTag ? null,\n      diskSize ? 1024,\n    }:\n    runWithOverlay {\n      inherit\n        name\n        fromImage\n        fromImageName\n        fromImageTag\n        diskSize\n        ;\n\n      postMount = ''\n        echo \"Packing raw image...\"\n        mkdir -p $out\n        tar -C mnt --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" -cf $out/layer.tar .\n      '';\n\n      postUmount = ''\n        mv $out/layer.tar .\n        rm -rf $out\n        mv layer.tar $out\n      '';\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":376,"column":5},"path":["pkgs","dockerTools","exportImage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":376,"column":5},"path":["pkgs","dockerTools","exportImage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.mergeDrvs","path":["pkgs","dockerTools","mergeDrvs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":199,"column":3},"attr_expr":"mergeDrvs =\n    {\n      derivations,\n      onlyDeps ? false,\n    }:\n    runCommand \"merge-drvs\"\n      {\n        inherit derivations onlyDeps;\n      }\n      ''\n        if [[ -n \"$onlyDeps\" ]]; then\n          echo $derivations > $out\n          exit 0\n        fi\n\n        mkdir $out\n        for derivation in $derivations; do\n          echo \"Merging $derivation...\"\n          if [[ -d \"$derivation\" ]]; then\n            # If it's a directory, copy all of its contents into $out.\n            cp -drf --preserve=mode -f $derivation/* $out/\n          else\n            # Otherwise treat the derivation as a tarball and extract it\n            # into $out.\n            tar -C $out -xpf $drv || true\n          fi\n        done\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":200,"column":5},"lambda_expr":"mergeDrvs =\n    {\n      derivations,\n      onlyDeps ? false,\n    }:\n    runCommand \"merge-drvs\"\n      {\n        inherit derivations onlyDeps;\n      }\n      ''\n        if [[ -n \"$onlyDeps\" ]]; then\n          echo $derivations > $out\n          exit 0\n        fi\n\n        mkdir $out\n        for derivation in $derivations; do\n          echo \"Merging $derivation...\"\n          if [[ -d \"$derivation\" ]]; then\n            # If it's a directory, copy all of its contents into $out.\n            cp -drf --preserve=mode -f $derivation/* $out/\n          else\n            # Otherwise treat the derivation as a tarball and extract it\n            # into $out.\n            tar -C $out -xpf $drv || true\n          fi\n        done\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":200,"column":5},"path":["pkgs","dockerTools","mergeDrvs"],"pos_type":"Lambda"}},"content":{"content":"buildEnv creates symlinks to dirs, which is hard to edit inside the overlay VM","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":200,"column":5},"path":["pkgs","dockerTools","mergeDrvs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.mergeImages","path":["pkgs","dockerTools","mergeImages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":901,"column":3},"attr_expr":"mergeImages =\n    images:\n    runCommand \"merge-docker-images\"\n      {\n        inherit images;\n        nativeBuildInputs = [\n          file\n          jq\n        ]\n        ++ compressors.none.nativeInputs\n        ++ compressors.gz.nativeInputs\n        ++ compressors.zstd.nativeInputs;\n      }\n      ''\n        mkdir image inputs\n        # Extract images\n        repos=()\n        manifests=()\n        last_image_mime=\"application/gzip\"\n        for item in $images; do\n          name=$(basename $item)\n          mkdir inputs/$name\n\n          last_image_mime=$(file --mime-type -b $item)\n          case $last_image_mime in\n            \"application/x-tar\") ${compressors.none.decompress};;\n            \"application/zstd\") ${compressors.zstd.decompress};;\n            \"application/gzip\") ${compressors.gz.decompress};;\n            *) echo \"error: unexpected layer type $last_image_mime\" >&2; exit 1;;\n          esac < $item | tar -xC inputs/$name\n\n          if [ -f inputs/$name/repositories ]; then\n            repos+=(inputs/$name/repositories)\n          fi\n          if [ -f inputs/$name/manifest.json ]; then\n            manifests+=(inputs/$name/manifest.json)\n          fi\n        done\n        # Copy all layers from input images to output image directory\n        cp -R --update=none inputs/*/* image/\n        # Merge repositories objects and manifests\n        jq -s add \"''${repos[@]}\" > repositories\n        jq -s add \"''${manifests[@]}\" > manifest.json\n        # Replace output image repositories and manifest with merged versions\n        mv repositories image/repositories\n        mv manifest.json image/manifest.json\n        # Create tarball and gzip\n        tar -C image --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" --owner=0 --group=0 --xform s:'^./':: -c . | (\n          case $last_image_mime in\n            \"application/x-tar\") ${compressors.none.compress};;\n            \"application/zstd\") ${compressors.zstd.compress};;\n            \"application/gzip\") ${compressors.gz.compress};;\n            # `*)` not needed; already checked.\n          esac\n        ) > $out\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":902,"column":5},"lambda_expr":"mergeImages =\n    images:\n    runCommand \"merge-docker-images\"\n      {\n        inherit images;\n        nativeBuildInputs = [\n          file\n          jq\n        ]\n        ++ compressors.none.nativeInputs\n        ++ compressors.gz.nativeInputs\n        ++ compressors.zstd.nativeInputs;\n      }\n      ''\n        mkdir image inputs\n        # Extract images\n        repos=()\n        manifests=()\n        last_image_mime=\"application/gzip\"\n        for item in $images; do\n          name=$(basename $item)\n          mkdir inputs/$name\n\n          last_image_mime=$(file --mime-type -b $item)\n          case $last_image_mime in\n            \"application/x-tar\") ${compressors.none.decompress};;\n            \"application/zstd\") ${compressors.zstd.decompress};;\n            \"application/gzip\") ${compressors.gz.decompress};;\n            *) echo \"error: unexpected layer type $last_image_mime\" >&2; exit 1;;\n          esac < $item | tar -xC inputs/$name\n\n          if [ -f inputs/$name/repositories ]; then\n            repos+=(inputs/$name/repositories)\n          fi\n          if [ -f inputs/$name/manifest.json ]; then\n            manifests+=(inputs/$name/manifest.json)\n          fi\n        done\n        # Copy all layers from input images to output image directory\n        cp -R --update=none inputs/*/* image/\n        # Merge repositories objects and manifests\n        jq -s add \"''${repos[@]}\" > repositories\n        jq -s add \"''${manifests[@]}\" > manifest.json\n        # Replace output image repositories and manifest with merged versions\n        mv repositories image/repositories\n        mv manifest.json image/manifest.json\n        # Create tarball and gzip\n        tar -C image --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" --owner=0 --group=0 --xform s:'^./':: -c . | (\n          case $last_image_mime in\n            \"application/x-tar\") ${compressors.none.compress};;\n            \"application/zstd\") ${compressors.zstd.compress};;\n            \"application/gzip\") ${compressors.gz.compress};;\n            # `*)` not needed; already checked.\n          esac\n        ) > $out\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":902,"column":5},"path":["pkgs","dockerTools","mergeImages"],"pos_type":"Lambda"}},"content":{"content":"tarball will load the images into the docker daemon.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":902,"column":5},"path":["pkgs","dockerTools","mergeImages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.mkPureLayer","path":["pkgs","dockerTools","mkPureLayer"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":418,"column":3},"attr_expr":"mkPureLayer =\n    {\n      # Name of the layer\n      name,\n      # JSON containing configuration and metadata for this layer.\n      baseJson,\n      # Files to add to the layer.\n      copyToRoot ? null,\n      # When copying the contents into the image, preserve symlinks to\n      # directories (see `rsync -K`).  Otherwise, transform those symlinks\n      # into directories.\n      keepContentsDirlinks ? false,\n      # Additional commands to run on the layer before it is tar'd up.\n      extraCommands ? \"\",\n      uid ? 0,\n      gid ? 0,\n    }:\n    runCommand \"docker-layer-${name}\"\n      {\n        inherit baseJson extraCommands;\n        contents = copyToRoot;\n        nativeBuildInputs = [\n          jshon\n          rsync\n          tarsum\n        ];\n      }\n      ''\n        mkdir layer\n        if [[ -n \"$contents\" ]]; then\n          echo \"Adding contents...\"\n          for item in $contents; do\n            echo \"Adding $item\"\n            rsync -a${if keepContentsDirlinks then \"K\" else \"k\"} --chown=0:0 $item/ layer/\n          done\n        else\n          echo \"No contents to add to layer.\"\n        fi\n\n        chmod ug+w layer\n\n        if [[ -n \"$extraCommands\" ]]; then\n          (cd layer; eval \"$extraCommands\")\n        fi\n\n        # Tar up the layer and throw it into 'layer.tar'.\n        echo \"Packing layer...\"\n        mkdir $out\n        tarhash=$(tar -C layer --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" --owner=${toString uid} --group=${toString gid} -cf - . | tee -p $out/layer.tar | tarsum)\n\n        # Add a 'checksum' field to the JSON, with the value set to the\n        # checksum of the tarball.\n        cat ${baseJson} | jshon -s \"$tarhash\" -i checksum > $out/json\n\n        # Indicate to docker that we're using schema version 1.0.\n        echo -n \"1.0\" > $out/VERSION\n\n        echo \"Finished building layer '${name}'\"\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":419,"column":5},"lambda_expr":"mkPureLayer =\n    {\n      # Name of the layer\n      name,\n      # JSON containing configuration and metadata for this layer.\n      baseJson,\n      # Files to add to the layer.\n      copyToRoot ? null,\n      # When copying the contents into the image, preserve symlinks to\n      # directories (see `rsync -K`).  Otherwise, transform those symlinks\n      # into directories.\n      keepContentsDirlinks ? false,\n      # Additional commands to run on the layer before it is tar'd up.\n      extraCommands ? \"\",\n      uid ? 0,\n      gid ? 0,\n    }:\n    runCommand \"docker-layer-${name}\"\n      {\n        inherit baseJson extraCommands;\n        contents = copyToRoot;\n        nativeBuildInputs = [\n          jshon\n          rsync\n          tarsum\n        ];\n      }\n      ''\n        mkdir layer\n        if [[ -n \"$contents\" ]]; then\n          echo \"Adding contents...\"\n          for item in $contents; do\n            echo \"Adding $item\"\n            rsync -a${if keepContentsDirlinks then \"K\" else \"k\"} --chown=0:0 $item/ layer/\n          done\n        else\n          echo \"No contents to add to layer.\"\n        fi\n\n        chmod ug+w layer\n\n        if [[ -n \"$extraCommands\" ]]; then\n          (cd layer; eval \"$extraCommands\")\n        fi\n\n        # Tar up the layer and throw it into 'layer.tar'.\n        echo \"Packing layer...\"\n        mkdir $out\n        tarhash=$(tar -C layer --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" --owner=${toString uid} --group=${toString gid} -cf - . | tee -p $out/layer.tar | tarsum)\n\n        # Add a 'checksum' field to the JSON, with the value set to the\n        # checksum of the tarball.\n        cat ${baseJson} | jshon -s \"$tarhash\" -i checksum > $out/json\n\n        # Indicate to docker that we're using schema version 1.0.\n        echo -n \"1.0\" > $out/VERSION\n\n        echo \"Finished building layer '${name}'\"\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":419,"column":5},"path":["pkgs","dockerTools","mkPureLayer"],"pos_type":"Lambda"}},"content":{"content":"Create a \"layer\" (set of files).","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":419,"column":5},"path":["pkgs","dockerTools","mkPureLayer"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.mkRootLayer","path":["pkgs","dockerTools","mkRootLayer"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":481,"column":3},"attr_expr":"mkRootLayer =\n    {\n      # Name of the image.\n      name,\n      # Script to run as root. Bash.\n      runAsRoot,\n      # Files to add to the layer. If null, an empty layer will be created.\n      # To add packages to /bin, use `buildEnv` or similar.\n      copyToRoot ? null,\n      # When copying the contents into the image, preserve symlinks to\n      # directories (see `rsync -K`).  Otherwise, transform those symlinks\n      # into directories.\n      keepContentsDirlinks ? false,\n      # JSON containing configuration and metadata for this layer.\n      baseJson,\n      # Existing image onto which to append the new layer.\n      fromImage ? null,\n      # Name of the image we're appending onto.\n      fromImageName ? null,\n      # Tag of the image we're appending onto.\n      fromImageTag ? null,\n      # How much disk to allocate for the temporary virtual machine.\n      diskSize ? 1024,\n      # How much memory to allocate for the temporary virtual machine.\n      buildVMMemorySize ? 512,\n      # Commands (bash) to run on the layer; these do not require sudo.\n      extraCommands ? \"\",\n    }:\n    # Generate an executable script from the `runAsRoot` text.\n    let\n      runAsRootScript = shellScript \"run-as-root.sh\" runAsRoot;\n      extraCommandsScript = shellScript \"extra-commands.sh\" extraCommands;\n    in\n    runWithOverlay {\n      name = \"docker-layer-${name}\";\n\n      inherit\n        fromImage\n        fromImageName\n        fromImageTag\n        diskSize\n        buildVMMemorySize\n        ;\n\n      preMount = lib.optionalString (copyToRoot != null && copyToRoot != [ ]) ''\n        echo \"Adding contents...\"\n        for item in ${escapeShellArgs (map (c: \"${c}\") (toList copyToRoot))}; do\n          echo \"Adding $item...\"\n          rsync -a${if keepContentsDirlinks then \"K\" else \"k\"} --chown=0:0 $item/ layer/\n        done\n\n        chmod ug+w layer\n      '';\n\n      postMount = ''\n        mkdir -p mnt/{dev,proc,sys,tmp} mnt${storeDir}\n\n        # Mount /dev, /sys and the nix store as shared folders.\n        mount --rbind /dev mnt/dev\n        mount --rbind /sys mnt/sys\n        mount --rbind ${storeDir} mnt${storeDir}\n\n        # Execute the run as root script. See 'man unshare' for\n        # details on what's going on here; basically this command\n        # means that the runAsRootScript will be executed in a nearly\n        # completely isolated environment.\n        #\n        # Ideally we would use --mount-proc=mnt/proc or similar, but this\n        # doesn't work. The workaround is to setup proc after unshare.\n        # See: https://github.com/karelzak/util-linux/issues/648\n        unshare -imnpuf --mount-proc sh -c 'mount --rbind /proc mnt/proc && chroot mnt ${runAsRootScript}'\n\n        # Unmount directories and remove them.\n        umount -R mnt/dev mnt/sys mnt${storeDir}\n        rmdir --ignore-fail-on-non-empty \\\n          mnt/dev mnt/proc mnt/sys mnt${storeDir} \\\n          mnt$(dirname ${storeDir})\n      '';\n\n      postUmount = ''\n        (cd layer; ${extraCommandsScript})\n\n        echo \"Packing layer...\"\n        mkdir -p $out\n        tarhash=$(tar -C layer --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" -cf - . |\n                    tee -p $out/layer.tar |\n                    ${lib.getExe tarsum})\n\n        cat ${baseJson} | jshon -s \"$tarhash\" -i checksum > $out/json\n        # Indicate to docker that we're using schema version 1.0.\n        echo -n \"1.0\" > $out/VERSION\n\n        echo \"Finished building layer '${name}'\"\n      '';\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":482,"column":5},"lambda_expr":"mkRootLayer =\n    {\n      # Name of the image.\n      name,\n      # Script to run as root. Bash.\n      runAsRoot,\n      # Files to add to the layer. If null, an empty layer will be created.\n      # To add packages to /bin, use `buildEnv` or similar.\n      copyToRoot ? null,\n      # When copying the contents into the image, preserve symlinks to\n      # directories (see `rsync -K`).  Otherwise, transform those symlinks\n      # into directories.\n      keepContentsDirlinks ? false,\n      # JSON containing configuration and metadata for this layer.\n      baseJson,\n      # Existing image onto which to append the new layer.\n      fromImage ? null,\n      # Name of the image we're appending onto.\n      fromImageName ? null,\n      # Tag of the image we're appending onto.\n      fromImageTag ? null,\n      # How much disk to allocate for the temporary virtual machine.\n      diskSize ? 1024,\n      # How much memory to allocate for the temporary virtual machine.\n      buildVMMemorySize ? 512,\n      # Commands (bash) to run on the layer; these do not require sudo.\n      extraCommands ? \"\",\n    }:\n    # Generate an executable script from the `runAsRoot` text.\n    let\n      runAsRootScript = shellScript \"run-as-root.sh\" runAsRoot;\n      extraCommandsScript = shellScript \"extra-commands.sh\" extraCommands;\n    in\n    runWithOverlay {\n      name = \"docker-layer-${name}\";\n\n      inherit\n        fromImage\n        fromImageName\n        fromImageTag\n        diskSize\n        buildVMMemorySize\n        ;\n\n      preMount = lib.optionalString (copyToRoot != null && copyToRoot != [ ]) ''\n        echo \"Adding contents...\"\n        for item in ${escapeShellArgs (map (c: \"${c}\") (toList copyToRoot))}; do\n          echo \"Adding $item...\"\n          rsync -a${if keepContentsDirlinks then \"K\" else \"k\"} --chown=0:0 $item/ layer/\n        done\n\n        chmod ug+w layer\n      '';\n\n      postMount = ''\n        mkdir -p mnt/{dev,proc,sys,tmp} mnt${storeDir}\n\n        # Mount /dev, /sys and the nix store as shared folders.\n        mount --rbind /dev mnt/dev\n        mount --rbind /sys mnt/sys\n        mount --rbind ${storeDir} mnt${storeDir}\n\n        # Execute the run as root script. See 'man unshare' for\n        # details on what's going on here; basically this command\n        # means that the runAsRootScript will be executed in a nearly\n        # completely isolated environment.\n        #\n        # Ideally we would use --mount-proc=mnt/proc or similar, but this\n        # doesn't work. The workaround is to setup proc after unshare.\n        # See: https://github.com/karelzak/util-linux/issues/648\n        unshare -imnpuf --mount-proc sh -c 'mount --rbind /proc mnt/proc && chroot mnt ${runAsRootScript}'\n\n        # Unmount directories and remove them.\n        umount -R mnt/dev mnt/sys mnt${storeDir}\n        rmdir --ignore-fail-on-non-empty \\\n          mnt/dev mnt/proc mnt/sys mnt${storeDir} \\\n          mnt$(dirname ${storeDir})\n      '';\n\n      postUmount = ''\n        (cd layer; ${extraCommandsScript})\n\n        echo \"Packing layer...\"\n        mkdir -p $out\n        tarhash=$(tar -C layer --hard-dereference --sort=name --mtime=\"@$SOURCE_DATE_EPOCH\" -cf - . |\n                    tee -p $out/layer.tar |\n                    ${lib.getExe tarsum})\n\n        cat ${baseJson} | jshon -s \"$tarhash\" -i checksum > $out/json\n        # Indicate to docker that we're using schema version 1.0.\n        echo -n \"1.0\" > $out/VERSION\n\n        echo \"Finished building layer '${name}'\"\n      '';\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":482,"column":5},"path":["pkgs","dockerTools","mkRootLayer"],"pos_type":"Lambda"}},"content":{"content":"performed in a virtual machine sandbox.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":482,"column":5},"path":["pkgs","dockerTools","mkRootLayer"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.override","path":["pkgs","dockerTools","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dockerTools.overrideDerivation","path":["pkgs","dockerTools","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dockerTools","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dockerTools","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.pullImage","path":["pkgs","dockerTools","pullImage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":140,"column":3},"attr_expr":"pullImage =\n    let\n      fixName = name: builtins.replaceStrings [ \"/\" \":\" ] [ \"-\" \"-\" ] name;\n    in\n    lib.fetchers.withNormalizedHash { } (\n      {\n        imageName,\n        # To find the digest of an image, you can use skopeo:\n        # see doc/functions.xml\n        imageDigest,\n        outputHash,\n        outputHashAlgo,\n        os ? \"linux\",\n        # Image architecture, defaults to the architecture of the `hostPlatform` when unset\n        arch ? defaultArchitecture,\n        # This is used to set name to the pulled image\n        finalImageName ? imageName,\n        # This used to set a tag to the pulled image\n        finalImageTag ? \"latest\",\n        # This is used to disable TLS certificate verification, allowing access to http registries on (hopefully) trusted networks\n        tlsVerify ? true,\n\n        name ? fixName \"docker-image-${finalImageName}-${finalImageTag}.tar\",\n      }:\n\n      runCommand name\n        {\n          inherit imageDigest;\n          imageName = finalImageName;\n          imageTag = finalImageTag;\n          impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n\n          inherit outputHash outputHashAlgo;\n          outputHashMode = \"flat\";\n\n          nativeBuildInputs = [ skopeo ];\n          SSL_CERT_FILE = \"${cacert.out}/etc/ssl/certs/ca-bundle.crt\";\n\n          sourceURL = \"docker://${imageName}@${imageDigest}\";\n          destNameTag = \"${finalImageName}:${finalImageTag}\";\n        }\n        ''\n          skopeo \\\n            --insecure-policy \\\n            --tmpdir=$TMPDIR \\\n            --override-os ${os} \\\n            --override-arch ${arch} \\\n            copy \\\n            --src-tls-verify=${lib.boolToString tlsVerify} \\\n            \"$sourceURL\" \"docker-archive://$out:$destNameTag\" \\\n            | cat  # pipe through cat to force-disable progress bar\n        ''\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":30},"lambda_expr":"{\n    # TODO: Should we add call-time \"type\" checking like built in?\n    __functor = self: f;\n    __functionArgs = args;\n  }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dockerTools.runWithOverlay","path":["pkgs","dockerTools","runWithOverlay"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":256,"column":3},"attr_expr":"runWithOverlay =\n    {\n      name,\n      fromImage ? null,\n      fromImageName ? null,\n      fromImageTag ? null,\n      diskSize ? 1024,\n      buildVMMemorySize ? 512,\n      preMount ? \"\",\n      postMount ? \"\",\n      postUmount ? \"\",\n    }:\n    vmTools.runInLinuxVM (\n      runCommand name\n        {\n          preVM = vmTools.createEmptyImage {\n            size = diskSize;\n            fullName = \"docker-run-disk\";\n            destination = \"./image\";\n          };\n          inherit fromImage fromImageName fromImageTag;\n          memSize = buildVMMemorySize;\n\n          nativeBuildInputs = [\n            util-linux\n            e2fsprogs\n            jshon\n            rsync\n            jq\n          ];\n        }\n        ''\n          mkdir disk\n          mkfs /dev/${vmTools.hd}\n          mount /dev/${vmTools.hd} disk\n          cd disk\n\n          function dedup() {\n            declare -A seen\n            while read ln; do\n              if [[ -z \"''${seen[\"$ln\"]:-}\" ]]; then\n                echo \"$ln\"; seen[\"$ln\"]=1\n              fi\n            done\n          }\n\n          if [[ -n \"$fromImage\" ]]; then\n            echo \"Unpacking base image...\"\n            mkdir image\n            tar -C image -xpf \"$fromImage\"\n\n            if [[ -n \"$fromImageName\" ]] && [[ -n \"$fromImageTag\" ]]; then\n              parentID=\"$(\n                cat \"image/manifest.json\" |\n                  jq -r '.[] | select(.RepoTags | contains([$desiredTag])) | rtrimstr(\".json\")' \\\n                    --arg desiredTag \"$fromImageName:$fromImageTag\"\n              )\"\n            else\n              echo \"From-image name or tag wasn't set. Reading the first ID.\"\n              parentID=\"$(cat \"image/manifest.json\" | jq -r '.[0].Config | rtrimstr(\".json\")')\"\n            fi\n\n            # In case of repeated layers, unpack only the last occurrence of each\n            cat ./image/manifest.json  | jq -r '.[0].Layers | .[]' | tac | dedup | tac > layer-list\n          else\n            touch layer-list\n          fi\n\n          # Unpack all of the parent layers into the image.\n          lowerdir=\"\"\n          extractionID=0\n          for layerTar in $(cat layer-list); do\n            echo \"Unpacking layer $layerTar\"\n            extractionID=$((extractionID + 1))\n\n            mkdir -p image/$extractionID/layer\n            tar -C image/$extractionID/layer -xpf image/$layerTar\n            rm image/$layerTar\n\n            find image/$extractionID/layer -name \".wh.*\" -exec bash -c 'name=\"$(basename {}|sed \"s/^.wh.//\")\"; mknod \"$(dirname {})/$name\" c 0 0; rm {}' \\;\n\n            # Get the next lower directory and continue the loop.\n            lowerdir=image/$extractionID/layer''${lowerdir:+:}$lowerdir\n          done\n\n          mkdir work\n          mkdir layer\n          mkdir mnt\n\n          ${lib.optionalString (preMount != \"\") ''\n            # Execute pre-mount steps\n            echo \"Executing pre-mount steps...\"\n            ${preMount}\n          ''}\n\n          if [ -n \"$lowerdir\" ]; then\n            mount -t overlay overlay -olowerdir=$lowerdir,workdir=work,upperdir=layer mnt\n          else\n            mount --bind layer mnt\n          fi\n\n          ${lib.optionalString (postMount != \"\") ''\n            # Execute post-mount steps\n            echo \"Executing post-mount steps...\"\n            ${postMount}\n          ''}\n\n          umount mnt\n\n          (\n            cd layer\n            cmd='name=\"$(basename {})\"; touch \"$(dirname {})/.wh.$name\"; rm \"{}\"'\n            find . -type c -exec bash -c \"$cmd\" \\;\n          )\n\n          ${postUmount}\n        ''\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":257,"column":5},"lambda_expr":"runWithOverlay =\n    {\n      name,\n      fromImage ? null,\n      fromImageName ? null,\n      fromImageTag ? null,\n      diskSize ? 1024,\n      buildVMMemorySize ? 512,\n      preMount ? \"\",\n      postMount ? \"\",\n      postUmount ? \"\",\n    }:\n    vmTools.runInLinuxVM (\n      runCommand name\n        {\n          preVM = vmTools.createEmptyImage {\n            size = diskSize;\n            fullName = \"docker-run-disk\";\n            destination = \"./image\";\n          };\n          inherit fromImage fromImageName fromImageTag;\n          memSize = buildVMMemorySize;\n\n          nativeBuildInputs = [\n            util-linux\n            e2fsprogs\n            jshon\n            rsync\n            jq\n          ];\n        }\n        ''\n          mkdir disk\n          mkfs /dev/${vmTools.hd}\n          mount /dev/${vmTools.hd} disk\n          cd disk\n\n          function dedup() {\n            declare -A seen\n            while read ln; do\n              if [[ -z \"''${seen[\"$ln\"]:-}\" ]]; then\n                echo \"$ln\"; seen[\"$ln\"]=1\n              fi\n            done\n          }\n\n          if [[ -n \"$fromImage\" ]]; then\n            echo \"Unpacking base image...\"\n            mkdir image\n            tar -C image -xpf \"$fromImage\"\n\n            if [[ -n \"$fromImageName\" ]] && [[ -n \"$fromImageTag\" ]]; then\n              parentID=\"$(\n                cat \"image/manifest.json\" |\n                  jq -r '.[] | select(.RepoTags | contains([$desiredTag])) | rtrimstr(\".json\")' \\\n                    --arg desiredTag \"$fromImageName:$fromImageTag\"\n              )\"\n            else\n              echo \"From-image name or tag wasn't set. Reading the first ID.\"\n              parentID=\"$(cat \"image/manifest.json\" | jq -r '.[0].Config | rtrimstr(\".json\")')\"\n            fi\n\n            # In case of repeated layers, unpack only the last occurrence of each\n            cat ./image/manifest.json  | jq -r '.[0].Layers | .[]' | tac | dedup | tac > layer-list\n          else\n            touch layer-list\n          fi\n\n          # Unpack all of the parent layers into the image.\n          lowerdir=\"\"\n          extractionID=0\n          for layerTar in $(cat layer-list); do\n            echo \"Unpacking layer $layerTar\"\n            extractionID=$((extractionID + 1))\n\n            mkdir -p image/$extractionID/layer\n            tar -C image/$extractionID/layer -xpf image/$layerTar\n            rm image/$layerTar\n\n            find image/$extractionID/layer -name \".wh.*\" -exec bash -c 'name=\"$(basename {}|sed \"s/^.wh.//\")\"; mknod \"$(dirname {})/$name\" c 0 0; rm {}' \\;\n\n            # Get the next lower directory and continue the loop.\n            lowerdir=image/$extractionID/layer''${lowerdir:+:}$lowerdir\n          done\n\n          mkdir work\n          mkdir layer\n          mkdir mnt\n\n          ${lib.optionalString (preMount != \"\") ''\n            # Execute pre-mount steps\n            echo \"Executing pre-mount steps...\"\n            ${preMount}\n          ''}\n\n          if [ -n \"$lowerdir\" ]; then\n            mount -t overlay overlay -olowerdir=$lowerdir,workdir=work,upperdir=layer mnt\n          else\n            mount --bind layer mnt\n          fi\n\n          ${lib.optionalString (postMount != \"\") ''\n            # Execute post-mount steps\n            echo \"Executing post-mount steps...\"\n            ${postMount}\n          ''}\n\n          umount mnt\n\n          (\n            cd layer\n            cmd='name=\"$(basename {})\"; touch \"$(dirname {})/.wh.$name\"; rm \"{}\"'\n            find . -type c -exec bash -c \"$cmd\" \\;\n          )\n\n          ${postUmount}\n        ''\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":257,"column":5},"path":["pkgs","dockerTools","runWithOverlay"],"pos_type":"Lambda"}},"content":{"content":"Run commands in a virtual machine.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":257,"column":5},"path":["pkgs","dockerTools","runWithOverlay"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.shellScript","path":["pkgs","dockerTools","shellScript"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":408,"column":3},"attr_expr":"shellScript =\n    name: text:\n    writeScript name ''\n      #!${runtimeShell}\n      set -e\n      export PATH=${coreutils}/bin:/bin\n      ${text}\n    '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":409,"column":5},"lambda_expr":"shellScript =\n    name: text:\n    writeScript name ''\n      #!${runtimeShell}\n      set -e\n      export PATH=${coreutils}/bin:/bin\n      ${text}\n    '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":409,"column":5},"path":["pkgs","dockerTools","shellScript"],"pos_type":"Lambda"}},"content":{"content":"things like `ls` or `echo` will be missing.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":409,"column":5},"path":["pkgs","dockerTools","shellScript"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerTools.streamLayeredImage","path":["pkgs","dockerTools","streamLayeredImage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":999,"column":3},"attr_expr":"streamLayeredImage = lib.makeOverridable (\n    {\n      name,\n      tag ? null,\n      fromImage ? null,\n      contents ? [ ],\n      config ? { },\n      architecture ? defaultArchitecture,\n      created ? \"1970-01-01T00:00:01Z\",\n      mtime ? \"1970-01-01T00:00:01Z\",\n      uid ? 0,\n      gid ? 0,\n      uname ? \"root\",\n      gname ? \"root\",\n      maxLayers ? 100,\n      extraCommands ? \"\",\n      fakeRootCommands ? \"\",\n      enableFakechroot ? false,\n      includeStorePaths ? true,\n      includeNixDB ? false,\n      passthru ? { },\n      meta ? { },\n      # Pipeline used to produce docker layers. If not set, popularity contest\n      # algorithm is used. If set, maxLayers is ignored as the author of the\n      # pipeline can use one of the available functions (like \"limit_layers\")\n      # to control the amount of layers.\n      # See: pkgs/build-support/flatten-references-graph/src/flatten_references_graph/pipe.py\n      # for available functions, and it's test for how to use them.\n      # WARNING!! this interface is highly experimental and subject to change.\n      layeringPipeline ? null,\n      # Enables debug logging for the layering pipeline.\n      debug ? false,\n    }:\n    assert (\n      lib.assertMsg (layeringPipeline == null -> maxLayers > 1)\n        \"the maxLayers argument of dockerTools.buildLayeredImage function must be greather than 1 (current value: ${toString maxLayers})\"\n    );\n    assert (\n      lib.assertMsg (enableFakechroot -> !stdenv.hostPlatform.isDarwin) ''\n        cannot use `enableFakechroot` because `proot` is not portable to Darwin. Workarounds:\n              - use `fakeRootCommands` with the restricted `fakeroot` environment\n              - cross-compile your packages\n              - run your packages in a virtual machine\n              Discussion: https://github.com/NixOS/nixpkgs/issues/327311''\n    );\n    let\n      baseName = baseNameOf name;\n\n      streamScript = writePython3 \"stream\" { } ./stream_layered_image.py;\n      baseJson = writeText \"${baseName}-base.json\" (\n        builtins.toJSON {\n          inherit config architecture;\n          os = \"linux\";\n        }\n      );\n\n      contentsList = if builtins.isList contents then contents else [ contents ];\n      bind-paths = toString (\n        map (path: \"--bind=${path}:${path}!\") [\n          \"/dev/\"\n          \"/proc/\"\n          \"/sys/\"\n          \"${builtins.storeDir}/\"\n          \"$NIX_BUILD_TOP\"\n          \"$out/layer.tar\"\n        ]\n      );\n\n      # We store the customisation layer as a tarball, to make sure that\n      # things like permissions set on 'extraCommands' are not overridden\n      # by Nix. Then we precompute the sha256 for performance.\n      customisationLayer = symlinkJoin {\n        name = \"${baseName}-customisation-layer\";\n        paths = contentsList;\n        extraCommands = (lib.optionalString includeNixDB (mkDbExtraCommand contents)) + extraCommands;\n        inherit fakeRootCommands;\n        nativeBuildInputs = [\n          fakeroot\n        ]\n        ++ optionals enableFakechroot [\n          proot\n        ];\n        postBuild = ''\n          mv $out old_out\n          (cd old_out; eval \"$extraCommands\" )\n\n          mkdir $out\n          ${\n            if enableFakechroot then\n              ''\n                proot -r $PWD/old_out ${bind-paths} --pwd=/ fakeroot bash -e -c '\n                  if [ -e \"$NIX_ATTRS_SH_FILE\" ]; then . \"$NIX_ATTRS_SH_FILE\"; fi\n                  source $stdenv/setup\n                  eval \"$fakeRootCommands\"\n                  tar \\\n                    --sort name \\\n                    --exclude=./dev \\\n                    --exclude=./proc \\\n                    --exclude=./sys \\\n                    --exclude=.${builtins.storeDir} \\\n                    --exclude=\".$NIX_BUILD_TOP\" \\\n                    --numeric-owner --mtime \"@$SOURCE_DATE_EPOCH\" \\\n                    --hard-dereference \\\n                    -cf $out/layer.tar .\n                '\n              ''\n            else\n              ''\n                fakeroot bash -e -c '\n                  if [ -e \"$NIX_ATTRS_SH_FILE\" ]; then . \"$NIX_ATTRS_SH_FILE\"; fi\n                  source $stdenv/setup\n                  cd old_out\n                  eval \"$fakeRootCommands\"\n                  tar \\\n                    --sort name \\\n                    --numeric-owner --mtime \"@$SOURCE_DATE_EPOCH\" \\\n                    --hard-dereference \\\n                    -cf $out/layer.tar .\n                '\n              ''\n          }\n          sha256sum $out/layer.tar \\\n            | cut -f 1 -d ' ' \\\n            > $out/checksum\n        '';\n      };\n\n      closureRoots = optionals includeStorePaths [\n        baseJson\n        customisationLayer\n      ];\n\n      excludePaths = [\n        baseJson\n        customisationLayer\n      ];\n\n      layersJsonFile =\n        if layeringPipeline == null then\n          buildPackages.dockerAutoLayer {\n            inherit\n              closureRoots\n              debug\n              excludePaths\n              fromImage\n              maxLayers\n              ;\n          }\n        else\n          buildPackages.dockerMakeLayers {\n            inherit closureRoots debug excludePaths;\n            pipeline = layeringPipeline;\n          };\n\n      conf =\n        runCommand \"${baseName}-conf.json\"\n          {\n            inherit\n              fromImage\n              created\n              mtime\n              uid\n              gid\n              uname\n              gname\n              layersJsonFile\n              ;\n            imageName = lib.toLower name;\n            preferLocalBuild = true;\n            passthru.imageTag =\n              if tag != null then\n                tag\n              else\n                lib.head (\n                  lib.strings.splitString \"-\" (baseNameOf (builtins.unsafeDiscardStringContext conf.outPath))\n                );\n            nativeBuildInputs = [ jq ];\n          }\n          ''\n            ${\n              if (tag == null) then\n                ''\n                  outName=\"$(basename \"$out\")\"\n                  outHash=$(echo \"$outName\" | cut -d - -f 1)\n\n                  imageTag=$outHash\n                ''\n              else\n                ''\n                  imageTag=\"${tag}\"\n                ''\n            }\n\n            # convert \"created\" and \"mtime\" to iso format\n            if [[ \"$created\" != \"now\" ]]; then\n                created=\"$(date -Iseconds -d \"$created\")\"\n            fi\n            if [[ \"$mtime\" != \"now\" ]]; then\n                mtime=\"$(date -Iseconds -d \"$mtime\")\"\n            fi\n\n            jq '\n              . + {\n                \"store_dir\": $store_dir,\n                \"from_image\": $from_image,\n                \"store_layers\": $store_layers[0],\n                \"customisation_layer\", $customisation_layer,\n                \"repo_tag\": $repo_tag,\n                \"created\": $created,\n                \"mtime\": $mtime,\n                \"uid\": $uid,\n                \"gid\": $gid,\n                \"uname\": $uname,\n                \"gname\": $gname\n              }\n              ' --arg store_dir \"${storeDir}\" \\\n                --argjson from_image ${if fromImage == null then \"null\" else \"'\\\"${fromImage}\\\"'\"} \\\n                --slurpfile store_layers \"$layersJsonFile\" \\\n                --arg customisation_layer ${customisationLayer} \\\n                --arg repo_tag \"$imageName:$imageTag\" \\\n                --arg created \"$created\" \\\n                --arg mtime \"$mtime\" \\\n                --arg uid \"$uid\" \\\n                --arg gid \"$gid\" \\\n                --arg uname \"$uname\" \\\n                --arg gname \"$gname\" \\\n                ${baseJson} \\\n                  | tee $out\n          '';\n\n      result =\n        runCommand \"stream-${baseName}\"\n          {\n            inherit conf;\n            inherit (conf) imageName;\n            inherit streamScript;\n            preferLocalBuild = true;\n            passthru = passthru // {\n              inherit (conf) imageTag;\n              inherit conf;\n              inherit streamScript;\n\n              # Distinguish tarballs and exes at the Nix level so functions that\n              # take images can know in advance how the image is supposed to be used.\n              isExe = true;\n            };\n            nativeBuildInputs = [ makeWrapper ];\n            inherit meta;\n          }\n          ''\n            makeWrapper $streamScript $out --add-flags $conf\n          '';\n    in\n    result\n  );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dockerTools.streamNixShellImage","path":["pkgs","dockerTools","streamNixShellImage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1259,"column":3},"attr_expr":"streamNixShellImage =\n    {\n      drv,\n      name ? drv.name + \"-env\",\n      tag ? null,\n      uid ? 1000,\n      gid ? 1000,\n      # Default to `/build` instead of a non-existent `/homeless-shelter` for backwards compatibility.\n      #\n      # https://github.com/NixOS/nix/issues/6379\n      homeDirectory ? \"/build\",\n      shell ? lib.getExe bash,\n      command ? null,\n      run ? null,\n    }:\n    assert lib.assertMsg (!(drv.drvAttrs.__structuredAttrs or false))\n      \"streamNixShellImage: Does not work with the derivation ${drv.name} because it uses __structuredAttrs\";\n    assert lib.assertMsg (\n      command == null || run == null\n    ) \"streamNixShellImage: Can't specify both command and run\";\n    let\n\n      # A binary that calls the command to build the derivation\n      builder = writeShellScriptBin \"buildDerivation\" ''\n        exec ${lib.escapeShellArg (valueToString drv.drvAttrs.builder)} ${lib.escapeShellArgs (map valueToString drv.drvAttrs.args)}\n      '';\n\n      staticPath = \"${dirOf shell}:${lib.makeBinPath [ builder ]}\";\n\n      # https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L617-L651\n      rcfile = writeText \"nix-shell-rc\" ''\n        unset PATH\n        dontAddDisableDepTrack=1\n        # TODO: https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L628\n        [ -e $stdenv/setup ] && source $stdenv/setup\n        PATH=${staticPath}:\"$PATH\"\n        SHELL=${lib.escapeShellArg shell}\n        BASH=${lib.escapeShellArg shell}\n        set +e\n        [ -n \"$PS1\" -a -z \"$NIX_SHELL_PRESERVE_PROMPT\" ] && PS1='\\n\\[\\033[1;32m\\][nix-shell:\\w]\\$\\[\\033[0m\\] '\n        if [ \"$(type -t runHook)\" = function ]; then\n          runHook shellHook\n        fi\n        unset NIX_ENFORCE_PURITY\n        shopt -u nullglob\n        shopt -s execfail\n        ${optionalString (command != null || run != null) ''\n          ${optionalString (command != null) command}\n          ${optionalString (run != null) run}\n          exit\n        ''}\n      '';\n\n      # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/include/nix/store/globals.hh#L778-L788\n      sandboxBuildDir = \"/build\";\n\n      drvEnv =\n        devShellTools.unstructuredDerivationInputEnv { inherit (drv) drvAttrs; }\n        // devShellTools.derivationOutputEnv {\n          outputList = drv.outputs;\n          outputMap = drv;\n        };\n\n      # Environment variables set in the image\n      envVars = {\n\n        # Root certificates for internet access\n        SSL_CERT_FILE = \"${cacert}/etc/ssl/certs/ca-bundle.crt\";\n        NIX_SSL_CERT_FILE = \"${cacert}/etc/ssl/certs/ca-bundle.crt\";\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1001-L1004\n        # PATH = \"/path-not-set\";\n        # Allows calling bash and `buildDerivation` as the Cmd\n        PATH = staticPath;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1006-L1012\n        HOME = homeDirectory;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1014-L1018\n        NIX_STORE = storeDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1020-L1021\n        # TODO: Make configurable?\n        NIX_BUILD_CORES = \"1\";\n\n      }\n      // drvEnv\n      // {\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1035-L1037\n        NIX_BUILD_TOP = sandboxBuildDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1039-L1040\n        TMPDIR = sandboxBuildDir;\n        TEMPDIR = sandboxBuildDir;\n        TMP = sandboxBuildDir;\n        TEMP = sandboxBuildDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1042-L1046\n        PWD = sandboxBuildDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1079-L1082\n        # We don't set it here because the output here isn't handled in any special way\n        # NIX_LOG_FD = \"2\";\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1084-L1085\n        TERM = \"xterm-256color\";\n      };\n\n    in\n    streamLayeredImage {\n      inherit name tag;\n      contents = [\n        binSh\n        usrBinEnv\n        (fakeNss.override {\n          # Allows programs to look up the build user's home directory.\n          #\n          # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/linux-derivation-builder.cc#L409-L416\n          #\n          # This slightly differs, however, since we use the passed-in `homeDirectory` instead of `sandboxBuildDir`.\n          # We're doing this because it is arguably a bug in Nix that `sandboxBuildDir` is used here.\n          #\n          # https://github.com/NixOS/nix/issues/6379\n          extraPasswdLines = [\n            \"nixbld:x:${toString uid}:${toString gid}:Build user:${homeDirectory}:/noshell\"\n          ];\n          extraGroupLines = [\n            \"nixbld:!:${toString gid}:\"\n          ];\n        })\n      ];\n\n      fakeRootCommands = ''\n        # Effectively a single-user installation of Nix, giving the user full\n        # control over the Nix store. Needed for building the derivation this\n        # shell is for, but also in case one wants to use Nix inside the image.\n        mkdir -p ./nix/{store,var/nix} ./etc/nix\n        chown -R ${toString uid}:${toString gid} ./nix ./etc/nix\n\n        # Gives the user control over the build directory.\n        mkdir -p .${sandboxBuildDir}\n        chown -R ${toString uid}:${toString gid} .${sandboxBuildDir}\n      '';\n\n      # Run this image as the given uid/gid\n      config.User = \"${toString uid}:${toString gid}\";\n      config.Cmd =\n        # https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L240-L241\n        # https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L659\n        if run == null then\n          [\n            shell\n            \"--rcfile\"\n            rcfile\n          ]\n        else\n          [\n            shell\n            rcfile\n          ];\n      config.WorkingDir = sandboxBuildDir;\n      config.Env = lib.mapAttrsToList (name: value: \"${name}=${value}\") envVars;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1260,"column":5},"lambda_expr":"streamNixShellImage =\n    {\n      drv,\n      name ? drv.name + \"-env\",\n      tag ? null,\n      uid ? 1000,\n      gid ? 1000,\n      # Default to `/build` instead of a non-existent `/homeless-shelter` for backwards compatibility.\n      #\n      # https://github.com/NixOS/nix/issues/6379\n      homeDirectory ? \"/build\",\n      shell ? lib.getExe bash,\n      command ? null,\n      run ? null,\n    }:\n    assert lib.assertMsg (!(drv.drvAttrs.__structuredAttrs or false))\n      \"streamNixShellImage: Does not work with the derivation ${drv.name} because it uses __structuredAttrs\";\n    assert lib.assertMsg (\n      command == null || run == null\n    ) \"streamNixShellImage: Can't specify both command and run\";\n    let\n\n      # A binary that calls the command to build the derivation\n      builder = writeShellScriptBin \"buildDerivation\" ''\n        exec ${lib.escapeShellArg (valueToString drv.drvAttrs.builder)} ${lib.escapeShellArgs (map valueToString drv.drvAttrs.args)}\n      '';\n\n      staticPath = \"${dirOf shell}:${lib.makeBinPath [ builder ]}\";\n\n      # https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L617-L651\n      rcfile = writeText \"nix-shell-rc\" ''\n        unset PATH\n        dontAddDisableDepTrack=1\n        # TODO: https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L628\n        [ -e $stdenv/setup ] && source $stdenv/setup\n        PATH=${staticPath}:\"$PATH\"\n        SHELL=${lib.escapeShellArg shell}\n        BASH=${lib.escapeShellArg shell}\n        set +e\n        [ -n \"$PS1\" -a -z \"$NIX_SHELL_PRESERVE_PROMPT\" ] && PS1='\\n\\[\\033[1;32m\\][nix-shell:\\w]\\$\\[\\033[0m\\] '\n        if [ \"$(type -t runHook)\" = function ]; then\n          runHook shellHook\n        fi\n        unset NIX_ENFORCE_PURITY\n        shopt -u nullglob\n        shopt -s execfail\n        ${optionalString (command != null || run != null) ''\n          ${optionalString (command != null) command}\n          ${optionalString (run != null) run}\n          exit\n        ''}\n      '';\n\n      # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/include/nix/store/globals.hh#L778-L788\n      sandboxBuildDir = \"/build\";\n\n      drvEnv =\n        devShellTools.unstructuredDerivationInputEnv { inherit (drv) drvAttrs; }\n        // devShellTools.derivationOutputEnv {\n          outputList = drv.outputs;\n          outputMap = drv;\n        };\n\n      # Environment variables set in the image\n      envVars = {\n\n        # Root certificates for internet access\n        SSL_CERT_FILE = \"${cacert}/etc/ssl/certs/ca-bundle.crt\";\n        NIX_SSL_CERT_FILE = \"${cacert}/etc/ssl/certs/ca-bundle.crt\";\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1001-L1004\n        # PATH = \"/path-not-set\";\n        # Allows calling bash and `buildDerivation` as the Cmd\n        PATH = staticPath;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1006-L1012\n        HOME = homeDirectory;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1014-L1018\n        NIX_STORE = storeDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1020-L1021\n        # TODO: Make configurable?\n        NIX_BUILD_CORES = \"1\";\n\n      }\n      // drvEnv\n      // {\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1035-L1037\n        NIX_BUILD_TOP = sandboxBuildDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1039-L1040\n        TMPDIR = sandboxBuildDir;\n        TEMPDIR = sandboxBuildDir;\n        TMP = sandboxBuildDir;\n        TEMP = sandboxBuildDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1042-L1046\n        PWD = sandboxBuildDir;\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1079-L1082\n        # We don't set it here because the output here isn't handled in any special way\n        # NIX_LOG_FD = \"2\";\n\n        # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/derivation-builder.cc#L1084-L1085\n        TERM = \"xterm-256color\";\n      };\n\n    in\n    streamLayeredImage {\n      inherit name tag;\n      contents = [\n        binSh\n        usrBinEnv\n        (fakeNss.override {\n          # Allows programs to look up the build user's home directory.\n          #\n          # https://github.com/NixOS/nix/blob/2.32.0/src/libstore/unix/build/linux-derivation-builder.cc#L409-L416\n          #\n          # This slightly differs, however, since we use the passed-in `homeDirectory` instead of `sandboxBuildDir`.\n          # We're doing this because it is arguably a bug in Nix that `sandboxBuildDir` is used here.\n          #\n          # https://github.com/NixOS/nix/issues/6379\n          extraPasswdLines = [\n            \"nixbld:x:${toString uid}:${toString gid}:Build user:${homeDirectory}:/noshell\"\n          ];\n          extraGroupLines = [\n            \"nixbld:!:${toString gid}:\"\n          ];\n        })\n      ];\n\n      fakeRootCommands = ''\n        # Effectively a single-user installation of Nix, giving the user full\n        # control over the Nix store. Needed for building the derivation this\n        # shell is for, but also in case one wants to use Nix inside the image.\n        mkdir -p ./nix/{store,var/nix} ./etc/nix\n        chown -R ${toString uid}:${toString gid} ./nix ./etc/nix\n\n        # Gives the user control over the build directory.\n        mkdir -p .${sandboxBuildDir}\n        chown -R ${toString uid}:${toString gid} .${sandboxBuildDir}\n      '';\n\n      # Run this image as the given uid/gid\n      config.User = \"${toString uid}:${toString gid}\";\n      config.Cmd =\n        # https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L240-L241\n        # https://github.com/NixOS/nix/blob/2.32.0/src/nix/nix-build/nix-build.cc#L659\n        if run == null then\n          [\n            shell\n            \"--rcfile\"\n            rcfile\n          ]\n        else\n          [\n            shell\n            rcfile\n          ];\n      config.WorkingDir = sandboxBuildDir;\n      config.Env = lib.mapAttrsToList (name: value: \"${name}=${value}\") envVars;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1260,"column":5},"path":["pkgs","dockerTools","streamNixShellImage"],"pos_type":"Lambda"}},"content":{"content":"Tests: nixos/tests/docker-tools-nix-shell.nix","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/default.nix","line":1260,"column":5},"path":["pkgs","dockerTools","streamNixShellImage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.addNuGetDeps","path":["pkgs","dotnetCorePackages","addNuGetDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":78,"column":9},"attr_expr":"addNuGetDeps = callPackage ../../../build-support/dotnet/add-nuget-deps { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/add-nuget-deps/default.nix","line":14,"column":1},"lambda_expr":"{\n  /**\n    A list of nuget packages.\n\n    Should be a JSON file with arguments to `fetchNupkg`:\n\n    ```json\n    [\n      {\n        \"pname\": \"AsyncIO\",\n        \"version\": \"0.1.69\",\n        \"hash\": \"sha256-JQKq/U71NQTfPuUqj7z5bALe+d7G1o3GcI8kvVDxy6o=\"\n      }\n    ]\n    ```\n\n    (to generate this file, use the script generated by `passthru.fetch-deps`)\n\n    Or a derivation (or list of derivations) containing nuget packages.\n  */\n  nugetDeps,\n  overrideFetchAttrs ? x: { },\n}:\nfnOrAttrs: finalAttrs:\nlet\n  attrs = if builtins.isFunction fnOrAttrs then fnOrAttrs finalAttrs else fnOrAttrs;\n\n  deps =\n    if nugetDeps == null then\n      [ ]\n    else if lib.isDerivation nugetDeps then\n      [ nugetDeps ]\n    else if lib.isList nugetDeps then\n      nugetDeps\n    else if lib.hasSuffix \".nix\" nugetDeps then\n      assert (lib.isPath nugetDeps);\n      callPackage nugetDeps { fetchNuGet = fetchNupkg; }\n    else\n      map fetchNupkg (lib.importJSON nugetDeps);\n\n  finalPackage = finalAttrs.finalPackage;\n\nin\nattrs\n// {\n  buildInputs = attrs.buildInputs or [ ] ++ deps;\n\n  passthru =\n    attrs.passthru or { }\n    // {\n      nugetDeps = deps;\n    }\n    // lib.optionalAttrs (nugetDeps == null || lib.isPath nugetDeps) rec {\n      fetch-drv =\n        let\n          pkg' = finalPackage.overrideAttrs (old: {\n            buildInputs = attrs.buildInputs or [ ];\n            nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ cacert ];\n            keepNugetConfig = true;\n            dontBuild = true;\n            doCheck = false;\n            dontInstall = true;\n            doInstallCheck = false;\n            dontFixup = true;\n            doDist = false;\n          });\n        in\n        pkg'.overrideAttrs overrideFetchAttrs;\n      fetch-deps =\n        let\n          drv = builtins.unsafeDiscardOutputDependency fetch-drv.drvPath;\n\n          innerScript = replaceVarsWith {\n            src = ./fetch-deps.sh;\n            isExecutable = true;\n            replacements = {\n              binPath = lib.makeBinPath [\n                nixfmt\n                nuget-to-json\n              ];\n            };\n          };\n\n          defaultDepsFile =\n            # Wire in the depsFile such that running the script with no args\n            # runs it agains the correct deps file by default.\n            # Note that toString is necessary here as it results in the path at\n            # eval time (i.e. to the file in your local Nixpkgs checkout) rather\n            # than the Nix store path of the path after it's been imported.\n            if lib.isPath nugetDeps && !lib.isStorePath nugetDeps then\n              toString nugetDeps\n            else\n              ''$(mktemp -t \"${finalAttrs.pname or finalPackage.name}-deps-XXXXXX.nix\")'';\n\n        in\n        writeShellScript \"${finalPackage.name}-fetch-deps\" ''\n          set -euo pipefail\n\n          echo 'fetching dependencies for' ${lib.escapeShellArg finalPackage.name} >&2\n\n          # this needs to be before TMPDIR is changed, so the output isn't deleted\n          # if it uses mktemp\n          ${lib.toShellVars { inherit defaultDepsFile; }}\n          depsFile=$(realpath \"''${1:-$defaultDepsFile}\")\n\n          export TMPDIR\n          TMPDIR=$(mktemp -d -t fetch-deps-${lib.escapeShellArg finalPackage.name}.XXXXXX)\n          trap 'chmod -R +w \"$TMPDIR\" && rm -fr \"$TMPDIR\"' EXIT\n\n          export NUGET_HTTP_CACHE_PATH=''${NUGET_HTTP_CACHE_PATH-~/.local/share/NuGet/v3-cache}\n\n          HOME=$TMPDIR/home\n          mkdir \"$HOME\"\n\n          cd \"$TMPDIR\"\n\n          NIX_BUILD_SHELL=${lib.escapeShellArg runtimeShell} ${nix}/bin/nix-shell \\\n            --pure --keep NUGET_HTTP_CACHE_PATH --run 'source '${lib.escapeShellArg innerScript}' '\"''${depsFile@Q}\" \"${drv}\"\n        '';\n    };\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/add-nuget-deps/default.nix","line":14,"column":1},"path":["pkgs","dotnetCorePackages","addNuGetDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/add-nuget-deps/default.nix","line":14,"column":1},"path":["pkgs","dotnetCorePackages","addNuGetDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.buildDotnetGlobalTool","path":["pkgs","dotnetCorePackages","buildDotnetGlobalTool"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":74,"column":9},"attr_expr":"buildDotnetGlobalTool = callPackage ../../../build-support/dotnet/build-dotnet-global-tool { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix","line":9,"column":1},"lambda_expr":"fnOrAttrs:\n\nbuildDotnetModule (\n  finalAttrs:\n  (\n    {\n      pname,\n      version,\n      # Name of the nuget package to install, if different from pname\n      nugetName ? pname,\n      # Hash of the nuget package to install, will be given on first build\n      # nugetHash uses SRI hash and should be preferred\n      nugetHash ? \"\",\n      nugetSha256 ? \"\",\n      # Additional nuget deps needed by the tool package\n      nugetDeps ? (_: [ ]),\n      # Executables to wrap into `$out/bin`, same as in `buildDotnetModule`, but with\n      # a default of `pname` instead of null, to avoid auto-wrapping everything\n      executables ? pname,\n      # The dotnet runtime to use, dotnet tools need a full SDK to function\n      dotnet-runtime ? dotnet-sdk,\n      ...\n    }@args:\n    let\n      nupkg = fetchNupkg {\n        pname = nugetName;\n        inherit version;\n        sha256 = nugetSha256;\n        hash = nugetHash;\n        installable = true;\n      };\n    in\n    args\n    // {\n      inherit\n        pname\n        version\n        dotnet-runtime\n        executables\n        ;\n\n      src = emptyDirectory;\n\n      buildInputs = [ nupkg ];\n\n      dotnetGlobalTool = true;\n\n      useDotnetFromEnv = true;\n\n      dontBuild = true;\n\n      installPhase = ''\n        runHook preInstall\n\n        dotnet tool install --tool-path $out/lib/${pname} ${nugetName} --version ${version}\n\n        # remove files that contain nix store paths to temp nuget sources we made\n        find $out -name 'project.assets.json' -delete\n        find $out -name '.nupkg.metadata' -delete\n\n        runHook postInstall\n      '';\n\n      passthru = {\n        updateScript = ./update.sh;\n        nupkg = nupkg;\n      }\n      // args.passthru or { };\n    }\n  )\n    (if lib.isFunction fnOrAttrs then fnOrAttrs finalAttrs else fnOrAttrs)\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix","line":9,"column":1},"path":["pkgs","dotnetCorePackages","buildDotnetGlobalTool"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix","line":9,"column":1},"path":["pkgs","dotnetCorePackages","buildDotnetGlobalTool"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.buildDotnetModule","path":["pkgs","dotnetCorePackages","buildDotnetModule"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":73,"column":9},"attr_expr":"buildDotnetModule = callPackage ../../../build-support/dotnet/build-dotnet-module { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-module/default.nix","line":193,"column":1},"lambda_expr":"fnOrAttrs:\nstdenvNoCC.mkDerivation (\n  finalAttrs:\n  let\n    args = if lib.isFunction fnOrAttrs then fnOrAttrs (args' // finalAttrs) else fnOrAttrs;\n    args' = transformArgs finalAttrs args;\n    inherit (args')\n      nugetDeps\n      runtimeId\n      meta\n      dotnet-sdk\n      ;\n    args'' = removeAttrs args' [\n      \"nugetDeps\"\n      \"runtimeId\"\n      \"installPath\"\n      \"executables\"\n      \"projectFile\"\n      \"projectReferences\"\n      \"runtimeDeps\"\n      \"disabledTests\"\n      \"testProjectFile\"\n      \"buildType\"\n      \"selfContainedBuild\"\n      \"useDotnet\"\n      \"useAppHost\"\n      \"dotnet-sdk\"\n    ];\n  in\n  if nugetDeps != null then\n    addNuGetDeps {\n      inherit nugetDeps;\n      overrideFetchAttrs =\n        old:\n        lib.optionalAttrs ((args'.runtimeId or null) == null) rec {\n          dotnetRuntimeIds = map (system: dotnetCorePackages.systemToDotnetRid system) meta.platforms;\n          buildInputs =\n            old.buildInputs\n            ++ lib.concatLists (lib.attrValues (lib.getAttrs dotnetRuntimeIds dotnet-sdk.targetPackages));\n        };\n    } args'' finalAttrs\n  else\n    args''\n)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-module/default.nix","line":193,"column":1},"path":["pkgs","dotnetCorePackages","buildDotnetModule"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-module/default.nix","line":193,"column":1},"path":["pkgs","dotnetCorePackages","buildDotnetModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.buildDotnetSdk","path":["pkgs","dotnetCorePackages","buildDotnetSdk"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":55,"column":11},"attr_expr":"buildDotnetSdk","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":31,"column":9},"lambda_expr":"version:\n        import version {\n          inherit fetchNupkg;\n          buildAspNetCore = attrs: buildDotnet (attrs // { type = \"aspnetcore\"; });\n          buildNetRuntime = attrs: buildDotnet (attrs // { type = \"runtime\"; });\n          buildNetSdk = attrs: buildDotnet (attrs // { type = \"sdk\"; });\n        }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":31,"column":9},"path":["pkgs","dotnetCorePackages","buildDotnetSdk"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":31,"column":9},"path":["pkgs","dotnetCorePackages","buildDotnetSdk"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.callPackage","path":["pkgs","dotnetCorePackages","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":742,"column":9},"attr_expr":"callPackage = newScope spliced;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.combinePackages","path":["pkgs","dotnetCorePackages","combinePackages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":67,"column":9},"attr_expr":"combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":67,"column":27},"lambda_expr":"attrs: callPackage (import ./combine-packages.nix attrs) { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":67,"column":27},"path":["pkgs","dotnetCorePackages","combinePackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":67,"column":27},"path":["pkgs","dotnetCorePackages","combinePackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.fetchNupkg","path":["pkgs","dotnetCorePackages","fetchNupkg"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":54,"column":11},"attr_expr":"fetchNupkg","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","dotnetCorePackages","fetchNupkg"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","dotnetCorePackages","fetchNupkg"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.mkNugetDeps","path":["pkgs","dotnetCorePackages","mkNugetDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":77,"column":9},"attr_expr":"mkNugetDeps = callPackage ../../../build-support/dotnet/make-nuget-deps { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-deps/default.nix","line":7,"column":3},"lambda_expr":"{\n    name,\n    nugetDeps ? null,\n    sourceFile ? null,\n    installable ? false,\n  }:\n  (symlinkJoin {\n    name = \"${name}-nuget-deps\";\n    paths =\n      let\n        loadDeps =\n          if nugetDeps != null then\n            nugetDeps\n          else if lib.hasSuffix \".nix\" sourceFile then\n            assert (lib.isPath sourceFile);\n            import sourceFile\n          else\n            { fetchNuGet }: map fetchNuGet (lib.importJSON sourceFile);\n      in\n      loadDeps {\n        fetchNuGet = args: fetchNupkg (args // { inherit installable; });\n      };\n  })\n  // {\n    inherit sourceFile;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-deps/default.nix","line":7,"column":3},"path":["pkgs","dotnetCorePackages","mkNugetDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-deps/default.nix","line":7,"column":3},"path":["pkgs","dotnetCorePackages","mkNugetDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.mkNugetSource","path":["pkgs","dotnetCorePackages","mkNugetSource"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":76,"column":9},"attr_expr":"mkNugetSource = callPackage ../../../build-support/dotnet/make-nuget-source { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-source/default.nix","line":7,"column":1},"lambda_expr":"{\n  name,\n  description ? \"\",\n  deps ? [ ],\n  ...\n}@args:\n\nstdenvNoCC.mkDerivation (\n  lib.recursiveUpdate\n    {\n      inherit name;\n\n      nativeBuildInputs = [ python3 ];\n\n      buildCommand = ''\n        mkdir -p $out/{lib,share}\n\n        # use -L to follow symbolic links. When `projectReferences` is used in\n        # buildDotnetModule, one of the deps will be a symlink farm.\n        find -L ${lib.concatStringsSep \" \" deps} -type f -name '*.nupkg' -exec \\\n          ln -s '{}' -t $out/lib ';'\n\n        # Generates a list of all licenses' spdx ids, if available.\n        # Note that this currently ignores any license provided in plain text (e.g. \"LICENSE.txt\")\n        python ${./extract-licenses-from-nupkgs.py} $out/lib > $out/share/licenses\n      '';\n\n      meta.description = description;\n    }\n    (\n      removeAttrs args [\n        \"name\"\n        \"description\"\n        \"deps\"\n      ]\n    )\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-source/default.nix","line":7,"column":1},"path":["pkgs","dotnetCorePackages","mkNugetSource"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-source/default.nix","line":7,"column":1},"path":["pkgs","dotnetCorePackages","mkNugetSource"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.newScope","path":["pkgs","dotnetCorePackages","newScope"],"aliases":[["pkgs","python3Packages","newScope"],["pkgs","rustPackages","rustPlatform","newScope"],["pkgs","rustPackages","buildRustPackages","rustPlatform","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":9},"attr_expr":"newScope = scope: newScope (spliced // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"lambda_expr":"scope: newScope (spliced // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","dotnetCorePackages","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","dotnetCorePackages","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.override","path":["pkgs","dotnetCorePackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.overrideDerivation","path":["pkgs","dotnetCorePackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.overrideScope","path":["pkgs","dotnetCorePackages","overrideScope"],"aliases":[["pkgs","python3Packages","overrideScope"],["pkgs","rustPackages","rustPlatform","overrideScope"],["pkgs","rustPackages","buildRustPackages","rustPlatform","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":745,"column":9},"attr_expr":"overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"lambda_expr":"overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","dotnetCorePackages","overrideScope"],"pos_type":"Lambda"}},"content":{"content":"overridden.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","dotnetCorePackages","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.packages","path":["pkgs","dotnetCorePackages","packages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":751,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":21,"column":5},"lambda_expr":"self:\n    let\n      callPackage = self.callPackage;\n\n      fetchNupkg = callPackage ../../../build-support/dotnet/fetch-nupkg { };\n\n      buildDotnetSdk =\n        let\n          buildDotnet = attrs: callWithUtils (import ./binary/build-dotnet.nix attrs) { };\n        in\n        version:\n        import version {\n          inherit fetchNupkg;\n          buildAspNetCore = attrs: buildDotnet (attrs // { type = \"aspnetcore\"; });\n          buildNetRuntime = attrs: buildDotnet (attrs // { type = \"runtime\"; });\n          buildNetSdk = attrs: buildDotnet (attrs // { type = \"sdk\"; });\n        };\n\n      runtimeIdentifierMap = {\n        \"x86_64-linux\" = \"linux-x64\";\n        \"aarch64-linux\" = \"linux-arm64\";\n        \"x86_64-darwin\" = \"osx-x64\";\n        \"aarch64-darwin\" = \"osx-arm64\";\n        \"x86_64-windows\" = \"win-x64\";\n        \"i686-windows\" = \"win-x86\";\n      };\n\n      # used to break cycle in attribute names\n      callWithUtils = newScope (utils // { callPackage = callWithUtils; });\n\n      utils = {\n        inherit\n          callPackage\n          fetchNupkg\n          buildDotnetSdk\n          ;\n\n        generate-dotnet-sdk = writeScriptBin \"generate-dotnet-sdk\" (\n          # Don't include current nixpkgs in the exposed version. We want to make the script runnable without nixpkgs repo.\n          builtins.replaceStrings [ \" -I nixpkgs=./.\" ] [ \"\" ] (builtins.readFile ./binary/update.sh)\n        );\n\n        # Convert a \"stdenv.hostPlatform.system\" to a dotnet RID\n        systemToDotnetRid =\n          system: runtimeIdentifierMap.${system} or (throw \"unsupported platform ${system}\");\n\n        combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) { };\n\n        patchNupkgs = buildPackages.callPackage ./patch-nupkgs.nix { };\n        nugetPackageHook = callPackage ./nuget-package-hook.nix { };\n        autoPatchcilHook = callPackage ../../../build-support/dotnet/auto-patchcil-hook { };\n\n        buildDotnetModule = callPackage ../../../build-support/dotnet/build-dotnet-module { };\n        buildDotnetGlobalTool = callPackage ../../../build-support/dotnet/build-dotnet-global-tool { };\n\n        mkNugetSource = callPackage ../../../build-support/dotnet/make-nuget-source { };\n        mkNugetDeps = callPackage ../../../build-support/dotnet/make-nuget-deps { };\n        addNuGetDeps = callPackage ../../../build-support/dotnet/add-nuget-deps { };\n      };\n\n    in\n    utils\n    // (\n      let\n        dotnet_6 = callWithUtils ./dotnet.nix {\n          channel = \"6.0\";\n        };\n\n        dotnet_7 = callWithUtils ./dotnet.nix {\n          channel = \"7.0\";\n        };\n\n        dotnet_8 = callWithUtils ./dotnet.nix {\n          channel = \"8.0\";\n        };\n\n        dotnet_9 = callWithUtils ./dotnet.nix {\n          channel = \"9.0\";\n        };\n\n        dotnet_10 = callWithUtils ./dotnet.nix {\n          channel = \"10.0\";\n        };\n\n        dotnet_11 = callWithUtils ./dotnet.nix {\n          channel = \"11.0\";\n        };\n      in\n      lib.optionalAttrs config.allowAliases {\n        # EOL\n        sdk_2_1 = throw \"Dotnet SDK 2.1 is EOL, please use 8.0 (LTS) or 9.0 (Current)\";\n        sdk_2_2 = throw \"Dotnet SDK 2.2 is EOL, please use 8.0 (LTS) or 9.0 (Current)\";\n        sdk_3_0 = throw \"Dotnet SDK 3.0 is EOL, please use 8.0 (LTS) or 9.0 (Current)\";\n        sdk_3_1 = throw \"Dotnet SDK 3.1 is EOL, please use 8.0 (LTS) or 9.0 (Current)\";\n        sdk_5_0 = throw \"Dotnet SDK 5.0 is EOL, please use 8.0 (LTS) or 9.0 (Current)\";\n      }\n      // lib.mergeAttrsList [\n        dotnet_6\n        dotnet_7\n        dotnet_8\n        dotnet_9\n        dotnet_10\n        dotnet_11\n      ]\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":21,"column":5},"path":["pkgs","dotnetCorePackages","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":21,"column":5},"path":["pkgs","dotnetCorePackages","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.systemToDotnetRid","path":["pkgs","dotnetCorePackages","systemToDotnetRid"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":64,"column":9},"attr_expr":"systemToDotnetRid =\n          system: runtimeIdentifierMap.${system} or (throw \"unsupported platform ${system}\");","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":65,"column":11},"lambda_expr":"systemToDotnetRid =\n          system: runtimeIdentifierMap.${system} or (throw \"unsupported platform ${system}\");","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":65,"column":11},"path":["pkgs","dotnetCorePackages","systemToDotnetRid"],"pos_type":"Lambda"}},"content":{"content":"Convert a \"stdenv.hostPlatform.system\" to a dotnet RID","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/dotnet/default.nix","line":65,"column":11},"path":["pkgs","dotnetCorePackages","systemToDotnetRid"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.addNuGetDeps.override","path":["pkgs","dotnetCorePackages","addNuGetDeps","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.buildDotnetGlobalTool.override","path":["pkgs","dotnetCorePackages","buildDotnetGlobalTool","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.buildDotnetModule.override","path":["pkgs","dotnetCorePackages","buildDotnetModule","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_10.override","path":["pkgs","dotnetCorePackages","dotnet_10","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_10.overrideDerivation","path":["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_10_0_2xx.override","path":["pkgs","dotnetCorePackages","dotnet_10_0_2xx","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_10_0_2xx.overrideDerivation","path":["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_10_0_3xx.override","path":["pkgs","dotnetCorePackages","dotnet_10_0_3xx","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_10_0_3xx.overrideDerivation","path":["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_11.override","path":["pkgs","dotnetCorePackages","dotnet_11","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_11.overrideDerivation","path":["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_8.override","path":["pkgs","dotnetCorePackages","dotnet_8","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_8.overrideDerivation","path":["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_9.override","path":["pkgs","dotnetCorePackages","dotnet_9","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.dotnet_9.overrideDerivation","path":["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.fetchNupkg.override","path":["pkgs","dotnetCorePackages","fetchNupkg","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.fetchNupkg.overrideDerivation","path":["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.mkNugetDeps.override","path":["pkgs","dotnetCorePackages","mkNugetDeps","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.dotnetCorePackages.mkNugetDeps.overrideDerivation","path":["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dotnetCorePackages.mkNugetSource.override","path":["pkgs","dotnetCorePackages","mkNugetSource","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.elmPackages.callPackage","path":["pkgs","elmPackages","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":627,"column":9},"attr_expr":"callPackage = self.newScope { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.elmPackages.fetchElmDeps","path":["pkgs","elmPackages","fetchElmDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/default.nix","line":33,"column":15},"attr_expr":"fetchElmDeps","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/lib/fetchElmDeps.nix","line":7,"column":1},"lambda_expr":"{\n  elmPackages,\n  registryDat,\n  elmVersion,\n}:\n\nlet\n  makeDotElm = import ./makeDotElm.nix {\n    inherit\n      stdenv\n      lib\n      fetchurl\n      registryDat\n      ;\n  };\nin\n''\n  export ELM_HOME=`pwd`/.elm\n''\n+ (makeDotElm elmVersion elmPackages)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/lib/fetchElmDeps.nix","line":7,"column":1},"path":["pkgs","elmPackages","fetchElmDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/lib/fetchElmDeps.nix","line":7,"column":1},"path":["pkgs","elmPackages","fetchElmDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.elmPackages.newScope","path":["pkgs","elmPackages","newScope"],"aliases":[["pkgs","agdaPackages","newScope"],["pkgs","emacsPackages","newScope"],["pkgs","rustPackages","newScope"],["pkgs","rustPackages","buildRustPackages","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":9},"attr_expr":"newScope = scope: newScope (self // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"lambda_expr":"scope: newScope (self // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","elmPackages","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","elmPackages","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.elmPackages.override","path":["pkgs","elmPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.elmPackages.overrideDerivation","path":["pkgs","elmPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","elmPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","elmPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.elmPackages.overrideScope","path":["pkgs","elmPackages","overrideScope"],"aliases":[["pkgs","agdaPackages","overrideScope"],["pkgs","emacsPackages","overrideScope"],["pkgs","rustPackages","overrideScope"],["pkgs","rustPackages","buildRustPackages","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":9},"attr_expr":"overrideScope = g: makeScope newScope (extends g f);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"lambda_expr":"g: makeScope newScope (extends g f)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","elmPackages","overrideScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","elmPackages","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.elmPackages.packages","path":["pkgs","elmPackages","packages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":633,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/default.nix","line":29,"column":3},"lambda_expr":"self:\n  assembleScope self (\n    with self;\n    {\n      inherit fetchElmDeps nodejs;\n\n      elmLib = import ./lib {\n        inherit lib;\n        inherit (pkgs) writeScriptBin stdenv;\n        inherit (self) elm;\n      };\n\n      elm-analyse = callPackage ./packages/elm-analyse { };\n\n      elm-doc-preview = callPackage ./packages/elm-doc-preview { };\n\n      elm-git-install = callPackage ./packages/elm-git-install { };\n\n      elm-graphql = callPackage ./packages/elm-graphql { };\n\n      elm-json = callPackage ./packages/elm-json { };\n\n      elm-language-server = callPackage ./packages/elm-language-server { };\n\n      elm-live = callPackage ./packages/elm-live { };\n\n      elm-optimize-level-2 = callPackage ./packages/elm-optimize-level-2 { };\n\n      elm-review = callPackage ./packages/elm-review { };\n\n      elm-spa = callPackage ./packages/elm-spa { };\n\n      elm-test-rs = callPackage ./packages/elm-test-rs { };\n\n      elm-test = callPackage ./packages/elm-test { };\n\n      elm-upgrade = callPackage ./packages/elm-upgrade { };\n\n      elm-verify-examples = callPackage ./packages/elm-verify-examples { };\n\n      elm-xref = callPackage ./packages/elm-xref { };\n\n      lamdera = callPackage ./packages/lamdera { };\n    }\n    // lib.optionalAttrs config.allowAliases {\n      create-elm-app = throw \"'elmPackages.create-elm-app' has not had a release since December 2020, so it was removed.\"; # Added 2025-11-15\n      elm-pages = throw \"'elmPackages.elm-pages' has been removed, as it was broken in nixpkgs and was not maintained.\"; # Added 2025-11-15\n    }\n  )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/default.nix","line":29,"column":3},"path":["pkgs","elmPackages","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/default.nix","line":29,"column":3},"path":["pkgs","elmPackages","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.elmPackages.elmLib.patchNpmElm","path":["pkgs","elmPackages","elmLib","patchNpmElm"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/lib/default.nix","line":21,"column":11},"attr_expr":"patchNpmElm","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/lib/default.nix","line":9,"column":5},"lambda_expr":"pkg:\n    pkg.override (old: {\n      preRebuild = (old.preRebuild or \"\") + ''\n        rm node_modules/elm/install.js\n        echo \"console.log('Nixpkgs\\' version of Elm will be used');\" > node_modules/elm/install.js\n      '';\n      postInstall = (old.postInstall or \"\") + ''\n        ln -sf ${elm}/bin/elm node_modules/elm/bin/elm\n      '';\n    })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/lib/default.nix","line":9,"column":5},"path":["pkgs","elmPackages","elmLib","patchNpmElm"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/elm/lib/default.nix","line":9,"column":5},"path":["pkgs","elmPackages","elmLib","patchNpmElm"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.elmPackages.fetchElmDeps.override","path":["pkgs","elmPackages","fetchElmDeps","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.callPackage","path":["pkgs","emacsPackages","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":627,"column":9},"attr_expr":"callPackage = self.newScope { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.elpaBuild","path":["pkgs","emacsPackages","elpaBuild"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":131,"column":9},"attr_expr":"elpaBuild = pkgs.callPackage ../applications/editors/emacs/build-support/elpa.nix {\n          inherit (self) emacs;\n        };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","elpaBuild"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","elpaBuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.emacsWithPackages","path":["pkgs","emacsPackages","emacsWithPackages"],"aliases":[["pkgs","emacsPackages","withPackages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":139,"column":9},"attr_expr":"emacsWithPackages = emacsWithPackages { inherit pkgs lib; } self;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/wrapper.nix","line":45,"column":1},"lambda_expr":"packagesFun: # packages explicitly requested by the user\nlet\n  explicitRequires = if lib.isFunction packagesFun then packagesFun self else packagesFun;\nin\nrunCommand (lib.appendToName \"with-packages\" emacs).name\n  {\n    inherit emacs explicitRequires;\n    nativeBuildInputs = [\n      emacs\n      lndir\n      makeBinaryWrapper\n    ];\n\n    preferLocalBuild = true;\n    allowSubstitutes = false;\n\n    # Store all paths we want to add to emacs here, so that we only need to add\n    # one path to the load lists\n    deps =\n      runCommand \"emacs-packages-deps\"\n        (\n          {\n            inherit explicitRequires lndir emacs;\n          }\n          // lib.optionalAttrs withNativeCompilation {\n            inherit (emacs) LIBRARY_PATH;\n          }\n        )\n        ''\n          findInputsOld() {\n            local pkg=\"$1\"; shift\n            local var=\"$1\"; shift\n            local propagatedBuildInputsFiles=(\"$@\")\n\n            # TODO(@Ericson2314): Restore using associative array once Darwin\n            # nix-shell doesn't use impure bash. This should replace the O(n)\n            # case with an O(1) hash map lookup, assuming bash is implemented\n            # well :D.\n            local varSlice=\"$var[*]\"\n            # ''${..-} to hack around old bash empty array problem\n            case \" ''${!varSlice-} \" in\n                *\" $pkg \"*) return 0 ;;\n            esac\n            unset -v varSlice\n\n            eval \"$var\"'+=(\"$pkg\")'\n\n            if ! [ -e \"$pkg\" ]; then\n                echo \"build input $pkg does not exist\" >&2\n                exit 1\n            fi\n\n            local file\n            for file in \"''${propagatedBuildInputsFiles[@]}\"; do\n                file=\"$pkg/nix-support/$file\"\n                [[ -f \"$file\" ]] || continue\n\n                local pkgNext\n                for pkgNext in $(< \"$file\"); do\n                    findInputsOld \"$pkgNext\" \"$var\" \"''${propagatedBuildInputsFiles[@]}\"\n                done\n            done\n          }\n          mkdir -p $out/bin\n          mkdir -p $out/share/emacs/site-lisp\n          ${lib.optionalString withNativeCompilation ''\n            mkdir -p $out/share/emacs/native-lisp\n          ''}\n          ${lib.optionalString withTreeSitter ''\n            mkdir -p $out/lib\n          ''}\n\n          local requires\n          for pkg in $explicitRequires; do\n            findInputsOld $pkg requires propagated-user-env-packages\n          done\n          # requires now holds all requested packages and their transitive dependencies\n\n          linkPath() {\n            local pkg=$1\n            local origin_path=$2\n            local dest_path=$3\n\n            # Add the path to the search path list, but only if it exists.\n            # Executables in /bin are linked by their resolved paths in case they are\n            # relative symlinks (which break when 'lndir'ed as is);\n            # see https://github.com/NixOS/nixpkgs/issues/395442\n            if [[ -d \"$pkg/$origin_path\" ]]; then\n              case \"$origin_path\" in\n                bin)\n                  for exe in $pkg/$origin_path/*; do\n                    ln -s \"$(realpath \"$exe\")\" \"$out/$dest_path/$(basename \"$exe\")\"\n                  done\n                  ;;\n                *) $lndir/bin/lndir -silent \"$pkg/$origin_path\" \"$out/$dest_path\";;\n              esac\n            fi\n          }\n\n          linkEmacsPackage() {\n            linkPath \"$1\" \"bin\" \"bin\"\n            linkPath \"$1\" \"share/emacs/site-lisp\" \"share/emacs/site-lisp\"\n            ${lib.optionalString withNativeCompilation ''\n              linkPath \"$1\" \"share/emacs/native-lisp\" \"share/emacs/native-lisp\"\n            ''}\n            ${lib.optionalString withTreeSitter ''\n              linkPath \"$1\" \"lib\" \"lib\"\n            ''}\n          }\n\n          # Iterate over the array of inputs (avoiding nix's own interpolation)\n          for pkg in \"''${requires[@]}\"; do\n            linkEmacsPackage $pkg\n          done\n\n          siteStart=\"$out/share/emacs/site-lisp/site-start.el\"\n          siteStartByteCompiled=\"$siteStart\"c\n          subdirs=\"$out/share/emacs/site-lisp/subdirs.el\"\n          subdirsByteCompiled=\"$subdirs\"c\n\n          # A dependency may have brought the original siteStart or subdirs, delete\n          # it and create our own\n          # Begin the new site-start.el by loading the original, which sets some\n          # NixOS-specific paths. Paths are searched in the reverse of the order\n          # they are specified in, so user and system profile paths are searched last.\n          #\n          # NOTE: Avoid displaying messages early at startup by binding\n          # inhibit-message to t. This would prevent the Emacs GUI from showing up\n          # prematurely. The messages would still be logged to the *Messages*\n          # buffer.\n          rm -f $siteStart $siteStartByteCompiled $subdirs $subdirsByteCompiled\n          cat >\"$siteStart\" <<EOF\n          ;;; -*- lexical-binding: t -*-\n          (let ((inhibit-message t))\n            (load \"$emacs/share/emacs/site-lisp/site-start\"))\n          ;; \"$out/share/emacs/site-lisp\" is added to load-path in wrapper.sh\n          ;; \"$out/share/emacs/native-lisp\" is added to native-comp-eln-load-path in wrapper.sh\n          (add-to-list 'exec-path \"$out/bin\")\n          ${lib.optionalString withTreeSitter ''\n            (add-to-list 'treesit-extra-load-path \"$out/lib/\")\n          ''}\n          EOF\n\n          # Generate a subdirs.el that statically adds all subdirectories to load-path.\n          cat >\"$subdirs\" <<EOF\n          ;;; -*- lexical-binding: t -*-\n          EOF\n          $emacs/bin/emacs \\\n            --batch \\\n            --load ${./mk-wrapper-subdirs.el} \\\n            --eval \"(prin1 (macroexpand-1 '(mk-subdirs-expr \\\"$out/share/emacs/site-lisp\\\")))\" \\\n            >> \"$subdirs\"\n\n          # Byte-compiling improves start-up time only slightly, but costs nothing.\n          $emacs/bin/emacs --batch -f batch-byte-compile \"$siteStart\" \"$subdirs\"\n\n          ${lib.optionalString withNativeCompilation ''\n            $emacs/bin/emacs --batch \\\n              --eval \"(add-to-list 'native-comp-eln-load-path \\\"$out/share/emacs/native-lisp/\\\")\" \\\n              -f batch-native-compile \"$siteStart\" \"$subdirs\"\n          ''}\n        '';\n\n    inherit (emacs) meta;\n  }\n  ''\n    mkdir -p \"$out/bin\"\n\n    # Wrap emacs and friends so they find our site-start.el before the original.\n    for prog in $emacs/bin/*; do # */\n      local progname=$(basename \"$prog\")\n      rm -f \"$out/bin/$progname\"\n\n      substitute ${./wrapper.sh} $out/bin/$progname \\\n        --subst-var-by bash ${emacs.stdenv.shell} \\\n        --subst-var-by wrapperSiteLisp \"$deps/share/emacs/site-lisp\" \\\n        --subst-var-by wrapperSiteLispNative \"$deps/share/emacs/native-lisp\" \\\n        --subst-var-by wrapperInvocationDirectory \"$out/bin/\" \\\n        --subst-var-by wrapperInvocationName \"$progname\" \\\n        --subst-var prog\n      chmod +x $out/bin/$progname\n      # Create a “NOP” binary wrapper for the pure sake of it becoming a\n      # non-shebang, actual binary. See the makeBinaryWrapper docs for rationale\n      # (summary: it allows you to use emacs as a shebang itself on Darwin,\n      # e.g. #!$ {emacs}/bin/emacs --script)\n      wrapProgramBinary $out/bin/$progname\n    done\n\n    # Wrap MacOS app\n    # this has to pick up resources and metadata\n    # to recognize it as an \"app\"\n    if [ -d \"$emacs/Applications/Emacs.app\" ]; then\n      mkdir -p $out/Applications/Emacs.app/Contents/MacOS\n      cp -r $emacs/Applications/Emacs.app/Contents/Info.plist \\\n            $emacs/Applications/Emacs.app/Contents/PkgInfo \\\n            $emacs/Applications/Emacs.app/Contents/Resources \\\n            $out/Applications/Emacs.app/Contents\n\n\n      substitute ${./wrapper.sh} $out/Applications/Emacs.app/Contents/MacOS/Emacs \\\n        --subst-var-by bash ${emacs.stdenv.shell} \\\n        --subst-var-by wrapperSiteLisp \"$deps/share/emacs/site-lisp\" \\\n        --subst-var-by wrapperSiteLispNative \"$deps/share/emacs/native-lisp\" \\\n        --subst-var-by wrapperInvocationDirectory \"$out/Applications/Emacs.app/Contents/MacOS/\" \\\n        --subst-var-by wrapperInvocationName \"Emacs\" \\\n        --subst-var-by prog \"$emacs/Applications/Emacs.app/Contents/MacOS/Emacs\"\n      chmod +x $out/Applications/Emacs.app/Contents/MacOS/Emacs\n      wrapProgramBinary $out/Applications/Emacs.app/Contents/MacOS/Emacs\n    fi\n\n    mkdir -p $out/share\n    # Link icons and desktop files into place\n    for dir in applications icons info man; do\n      ln -s $emacs/share/$dir $out/share/$dir\n    done\n  ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/wrapper.nix","line":45,"column":1},"path":["pkgs","emacsPackages","emacsWithPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/wrapper.nix","line":45,"column":1},"path":["pkgs","emacsPackages","emacsWithPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.melpaBuild","path":["pkgs","emacsPackages","melpaBuild"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":135,"column":9},"attr_expr":"melpaBuild = pkgs.callPackage ../applications/editors/emacs/build-support/melpa.nix {\n          inherit (self) emacs;\n        };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","melpaBuild"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","melpaBuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.newScope","path":["pkgs","emacsPackages","newScope"],"aliases":[["pkgs","agdaPackages","newScope"],["pkgs","elmPackages","newScope"],["pkgs","rustPackages","newScope"],["pkgs","rustPackages","buildRustPackages","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":9},"attr_expr":"newScope = scope: newScope (self // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"lambda_expr":"scope: newScope (self // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","emacsPackages","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","emacsPackages","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.override","path":["pkgs","emacsPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.overrideDerivation","path":["pkgs","emacsPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.overrideScope","path":["pkgs","emacsPackages","overrideScope"],"aliases":[["pkgs","agdaPackages","overrideScope"],["pkgs","elmPackages","overrideScope"],["pkgs","rustPackages","overrideScope"],["pkgs","rustPackages","buildRustPackages","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":9},"attr_expr":"overrideScope = g: makeScope newScope (extends g f);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"lambda_expr":"g: makeScope newScope (extends g f)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","emacsPackages","overrideScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","emacsPackages","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.packages","path":["pkgs","emacsPackages","packages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":633,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":75,"column":3},"lambda_expr":"self:\n  lib.makeOverridable (\n    {\n      pkgs ? pkgs',\n      lib ? pkgs.lib,\n      elpaDevelPackages ? mkElpaDevelPackages { inherit pkgs lib; } self,\n      elpaPackages ? mkElpaPackages { inherit pkgs lib; } self,\n      nongnuDevelPackages ? mkNongnuDevelPackages { inherit pkgs lib; } self,\n      nongnuPackages ? mkNongnuPackages { inherit pkgs lib; } self,\n      melpaStablePackages ? melpaGeneric { inherit pkgs lib; } \"stable\" self,\n      melpaPackages ? melpaGeneric { inherit pkgs lib; } \"unstable\" self,\n      manualPackages ? mkManualPackages { inherit pkgs lib; } self,\n    }:\n    (\n      { }\n      // elpaDevelPackages\n      // {\n        inherit elpaDevelPackages;\n      }\n      // elpaPackages\n      // {\n        inherit elpaPackages;\n      }\n      // nongnuDevelPackages\n      // {\n        inherit nongnuDevelPackages;\n      }\n      // nongnuPackages\n      // {\n        inherit nongnuPackages;\n      }\n      // melpaStablePackages\n      // {\n        inherit melpaStablePackages;\n      }\n      // melpaPackages\n      // {\n        inherit melpaPackages;\n      }\n      // manualPackages\n      // {\n        inherit manualPackages;\n      }\n      // {\n\n        # Propagate overridden scope\n        emacs = emacs'.overrideAttrs (old: {\n          passthru = (old.passthru or { }) // {\n            pkgs = lib.dontRecurseIntoAttrs self;\n          };\n        });\n\n        trivialBuild = pkgs.callPackage ../applications/editors/emacs/build-support/trivial.nix {\n          inherit (self) emacs;\n        };\n\n        elpaBuild = pkgs.callPackage ../applications/editors/emacs/build-support/elpa.nix {\n          inherit (self) emacs;\n        };\n\n        melpaBuild = pkgs.callPackage ../applications/editors/emacs/build-support/melpa.nix {\n          inherit (self) emacs;\n        };\n\n        emacsWithPackages = emacsWithPackages { inherit pkgs lib; } self;\n        withPackages = emacsWithPackages { inherit pkgs lib; } self;\n\n      }\n      // {\n\n        # Package specific priority overrides goes here\n\n        # EXWM is not tagged very often, prefer it from elpa devel.\n        inherit (elpaDevelPackages) exwm;\n\n        # Telega uploads packages incompatible with stable tdlib to melpa\n        # Prefer the one from melpa stable\n        inherit (melpaStablePackages) telega;\n\n      }\n    )\n  ) { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":75,"column":3},"path":["pkgs","emacsPackages","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":75,"column":3},"path":["pkgs","emacsPackages","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild","path":["pkgs","emacsPackages","trivialBuild"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":127,"column":9},"attr_expr":"trivialBuild = pkgs.callPackage ../applications/editors/emacs/build-support/trivial.nix {\n          inherit (self) emacs;\n        };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","trivialBuild"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","trivialBuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.withPackages","path":["pkgs","emacsPackages","withPackages"],"aliases":[["pkgs","emacsPackages","emacsWithPackages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/emacs-packages.nix","line":140,"column":9},"attr_expr":"withPackages = emacsWithPackages { inherit pkgs lib; } self;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/wrapper.nix","line":45,"column":1},"lambda_expr":"packagesFun: # packages explicitly requested by the user\nlet\n  explicitRequires = if lib.isFunction packagesFun then packagesFun self else packagesFun;\nin\nrunCommand (lib.appendToName \"with-packages\" emacs).name\n  {\n    inherit emacs explicitRequires;\n    nativeBuildInputs = [\n      emacs\n      lndir\n      makeBinaryWrapper\n    ];\n\n    preferLocalBuild = true;\n    allowSubstitutes = false;\n\n    # Store all paths we want to add to emacs here, so that we only need to add\n    # one path to the load lists\n    deps =\n      runCommand \"emacs-packages-deps\"\n        (\n          {\n            inherit explicitRequires lndir emacs;\n          }\n          // lib.optionalAttrs withNativeCompilation {\n            inherit (emacs) LIBRARY_PATH;\n          }\n        )\n        ''\n          findInputsOld() {\n            local pkg=\"$1\"; shift\n            local var=\"$1\"; shift\n            local propagatedBuildInputsFiles=(\"$@\")\n\n            # TODO(@Ericson2314): Restore using associative array once Darwin\n            # nix-shell doesn't use impure bash. This should replace the O(n)\n            # case with an O(1) hash map lookup, assuming bash is implemented\n            # well :D.\n            local varSlice=\"$var[*]\"\n            # ''${..-} to hack around old bash empty array problem\n            case \" ''${!varSlice-} \" in\n                *\" $pkg \"*) return 0 ;;\n            esac\n            unset -v varSlice\n\n            eval \"$var\"'+=(\"$pkg\")'\n\n            if ! [ -e \"$pkg\" ]; then\n                echo \"build input $pkg does not exist\" >&2\n                exit 1\n            fi\n\n            local file\n            for file in \"''${propagatedBuildInputsFiles[@]}\"; do\n                file=\"$pkg/nix-support/$file\"\n                [[ -f \"$file\" ]] || continue\n\n                local pkgNext\n                for pkgNext in $(< \"$file\"); do\n                    findInputsOld \"$pkgNext\" \"$var\" \"''${propagatedBuildInputsFiles[@]}\"\n                done\n            done\n          }\n          mkdir -p $out/bin\n          mkdir -p $out/share/emacs/site-lisp\n          ${lib.optionalString withNativeCompilation ''\n            mkdir -p $out/share/emacs/native-lisp\n          ''}\n          ${lib.optionalString withTreeSitter ''\n            mkdir -p $out/lib\n          ''}\n\n          local requires\n          for pkg in $explicitRequires; do\n            findInputsOld $pkg requires propagated-user-env-packages\n          done\n          # requires now holds all requested packages and their transitive dependencies\n\n          linkPath() {\n            local pkg=$1\n            local origin_path=$2\n            local dest_path=$3\n\n            # Add the path to the search path list, but only if it exists.\n            # Executables in /bin are linked by their resolved paths in case they are\n            # relative symlinks (which break when 'lndir'ed as is);\n            # see https://github.com/NixOS/nixpkgs/issues/395442\n            if [[ -d \"$pkg/$origin_path\" ]]; then\n              case \"$origin_path\" in\n                bin)\n                  for exe in $pkg/$origin_path/*; do\n                    ln -s \"$(realpath \"$exe\")\" \"$out/$dest_path/$(basename \"$exe\")\"\n                  done\n                  ;;\n                *) $lndir/bin/lndir -silent \"$pkg/$origin_path\" \"$out/$dest_path\";;\n              esac\n            fi\n          }\n\n          linkEmacsPackage() {\n            linkPath \"$1\" \"bin\" \"bin\"\n            linkPath \"$1\" \"share/emacs/site-lisp\" \"share/emacs/site-lisp\"\n            ${lib.optionalString withNativeCompilation ''\n              linkPath \"$1\" \"share/emacs/native-lisp\" \"share/emacs/native-lisp\"\n            ''}\n            ${lib.optionalString withTreeSitter ''\n              linkPath \"$1\" \"lib\" \"lib\"\n            ''}\n          }\n\n          # Iterate over the array of inputs (avoiding nix's own interpolation)\n          for pkg in \"''${requires[@]}\"; do\n            linkEmacsPackage $pkg\n          done\n\n          siteStart=\"$out/share/emacs/site-lisp/site-start.el\"\n          siteStartByteCompiled=\"$siteStart\"c\n          subdirs=\"$out/share/emacs/site-lisp/subdirs.el\"\n          subdirsByteCompiled=\"$subdirs\"c\n\n          # A dependency may have brought the original siteStart or subdirs, delete\n          # it and create our own\n          # Begin the new site-start.el by loading the original, which sets some\n          # NixOS-specific paths. Paths are searched in the reverse of the order\n          # they are specified in, so user and system profile paths are searched last.\n          #\n          # NOTE: Avoid displaying messages early at startup by binding\n          # inhibit-message to t. This would prevent the Emacs GUI from showing up\n          # prematurely. The messages would still be logged to the *Messages*\n          # buffer.\n          rm -f $siteStart $siteStartByteCompiled $subdirs $subdirsByteCompiled\n          cat >\"$siteStart\" <<EOF\n          ;;; -*- lexical-binding: t -*-\n          (let ((inhibit-message t))\n            (load \"$emacs/share/emacs/site-lisp/site-start\"))\n          ;; \"$out/share/emacs/site-lisp\" is added to load-path in wrapper.sh\n          ;; \"$out/share/emacs/native-lisp\" is added to native-comp-eln-load-path in wrapper.sh\n          (add-to-list 'exec-path \"$out/bin\")\n          ${lib.optionalString withTreeSitter ''\n            (add-to-list 'treesit-extra-load-path \"$out/lib/\")\n          ''}\n          EOF\n\n          # Generate a subdirs.el that statically adds all subdirectories to load-path.\n          cat >\"$subdirs\" <<EOF\n          ;;; -*- lexical-binding: t -*-\n          EOF\n          $emacs/bin/emacs \\\n            --batch \\\n            --load ${./mk-wrapper-subdirs.el} \\\n            --eval \"(prin1 (macroexpand-1 '(mk-subdirs-expr \\\"$out/share/emacs/site-lisp\\\")))\" \\\n            >> \"$subdirs\"\n\n          # Byte-compiling improves start-up time only slightly, but costs nothing.\n          $emacs/bin/emacs --batch -f batch-byte-compile \"$siteStart\" \"$subdirs\"\n\n          ${lib.optionalString withNativeCompilation ''\n            $emacs/bin/emacs --batch \\\n              --eval \"(add-to-list 'native-comp-eln-load-path \\\"$out/share/emacs/native-lisp/\\\")\" \\\n              -f batch-native-compile \"$siteStart\" \"$subdirs\"\n          ''}\n        '';\n\n    inherit (emacs) meta;\n  }\n  ''\n    mkdir -p \"$out/bin\"\n\n    # Wrap emacs and friends so they find our site-start.el before the original.\n    for prog in $emacs/bin/*; do # */\n      local progname=$(basename \"$prog\")\n      rm -f \"$out/bin/$progname\"\n\n      substitute ${./wrapper.sh} $out/bin/$progname \\\n        --subst-var-by bash ${emacs.stdenv.shell} \\\n        --subst-var-by wrapperSiteLisp \"$deps/share/emacs/site-lisp\" \\\n        --subst-var-by wrapperSiteLispNative \"$deps/share/emacs/native-lisp\" \\\n        --subst-var-by wrapperInvocationDirectory \"$out/bin/\" \\\n        --subst-var-by wrapperInvocationName \"$progname\" \\\n        --subst-var prog\n      chmod +x $out/bin/$progname\n      # Create a “NOP” binary wrapper for the pure sake of it becoming a\n      # non-shebang, actual binary. See the makeBinaryWrapper docs for rationale\n      # (summary: it allows you to use emacs as a shebang itself on Darwin,\n      # e.g. #!$ {emacs}/bin/emacs --script)\n      wrapProgramBinary $out/bin/$progname\n    done\n\n    # Wrap MacOS app\n    # this has to pick up resources and metadata\n    # to recognize it as an \"app\"\n    if [ -d \"$emacs/Applications/Emacs.app\" ]; then\n      mkdir -p $out/Applications/Emacs.app/Contents/MacOS\n      cp -r $emacs/Applications/Emacs.app/Contents/Info.plist \\\n            $emacs/Applications/Emacs.app/Contents/PkgInfo \\\n            $emacs/Applications/Emacs.app/Contents/Resources \\\n            $out/Applications/Emacs.app/Contents\n\n\n      substitute ${./wrapper.sh} $out/Applications/Emacs.app/Contents/MacOS/Emacs \\\n        --subst-var-by bash ${emacs.stdenv.shell} \\\n        --subst-var-by wrapperSiteLisp \"$deps/share/emacs/site-lisp\" \\\n        --subst-var-by wrapperSiteLispNative \"$deps/share/emacs/native-lisp\" \\\n        --subst-var-by wrapperInvocationDirectory \"$out/Applications/Emacs.app/Contents/MacOS/\" \\\n        --subst-var-by wrapperInvocationName \"Emacs\" \\\n        --subst-var-by prog \"$emacs/Applications/Emacs.app/Contents/MacOS/Emacs\"\n      chmod +x $out/Applications/Emacs.app/Contents/MacOS/Emacs\n      wrapProgramBinary $out/Applications/Emacs.app/Contents/MacOS/Emacs\n    fi\n\n    mkdir -p $out/share\n    # Link icons and desktop files into place\n    for dir in applications icons info man; do\n      ln -s $emacs/share/$dir $out/share/$dir\n    done\n  ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/wrapper.nix","line":45,"column":1},"path":["pkgs","emacsPackages","withPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/wrapper.nix","line":45,"column":1},"path":["pkgs","emacsPackages","withPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.eaf.override","path":["pkgs","emacsPackages","eaf","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.eaf.overrideDerivation","path":["pkgs","emacsPackages","eaf","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","eaf","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","eaf","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.eaf.withApplications","path":["pkgs","emacsPackages","eaf","withApplications"],"aliases":[["pkgs","emacsPackages","manualPackages","eaf","withApplications"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":16,"column":11},"attr_expr":"withApplications","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":8,"column":5},"lambda_expr":"enabledApps:\n    emacs-application-framework.override {\n      inherit enabledApps;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":8,"column":5},"path":["pkgs","emacsPackages","eaf","withApplications"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":8,"column":5},"path":["pkgs","emacsPackages","eaf","withApplications"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.elpaBuild.constructDrv","path":["pkgs","emacsPackages","elpaBuild","constructDrv"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":862,"column":5},"lambda_expr":"{\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.elpaBuild.extendDrvArgs","path":["pkgs","emacsPackages","elpaBuild","extendDrvArgs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/elpa.nix","line":25,"column":5},"lambda_expr":"finalAttrs:\n\n    {\n      pname,\n      dontUnpack ? true,\n      meta ? { },\n      ...\n    }@args:\n\n    {\n\n      elpa2nix = args.elpa2nix or ./elpa2nix.el;\n\n      inherit dontUnpack;\n\n      installPhase =\n        args.installPhase or ''\n          runHook preInstall\n\n          emacs --batch -Q -l \"$elpa2nix\" \\\n              -f elpa2nix-install-package \\\n              \"$src\" \"$out/share/emacs/site-lisp/elpa\" \\\n              ${if finalAttrs.turnCompilationWarningToError then \"t\" else \"nil\"} \\\n              ${if finalAttrs.ignoreCompilationError then \"t\" else \"nil\"}\n\n          runHook postInstall\n        '';\n\n      meta = {\n        homepage = args.src.meta.homepage or \"https://elpa.gnu.org/packages/${pname}.html\";\n      }\n      // meta;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/elpa.nix","line":25,"column":5},"path":["pkgs","emacsPackages","elpaBuild","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/elpa.nix","line":25,"column":5},"path":["pkgs","emacsPackages","elpaBuild","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.elpaBuild.override","path":["pkgs","emacsPackages","elpaBuild","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.elpaBuild.overrideDerivation","path":["pkgs","emacsPackages","elpaBuild","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","elpaBuild","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","elpaBuild","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.elpaBuild.transformDrv","path":["pkgs","emacsPackages","elpaBuild","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.emacsPackages.elpaDevelPackages.override","path":["pkgs","emacsPackages","elpaDevelPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.elpaDevelPackages.overrideDerivation","path":["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.elpaPackages.override","path":["pkgs","emacsPackages","elpaPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.elpaPackages.overrideDerivation","path":["pkgs","emacsPackages","elpaPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","elpaPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","elpaPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.melpaBuild.constructDrv","path":["pkgs","emacsPackages","melpaBuild","constructDrv"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":862,"column":5},"lambda_expr":"{\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.melpaBuild.extendDrvArgs","path":["pkgs","emacsPackages","melpaBuild","extendDrvArgs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/melpa.nix","line":51,"column":5},"lambda_expr":"finalAttrs:\n\n    {\n      /*\n        pname: Nix package name without special symbols and without version or\n        \"emacs-\" prefix.\n      */\n      pname,\n      /*\n        ename: Original Emacs package name, possibly containing special symbols.\n        Default: pname\n      */\n      ename ? pname,\n      /*\n        version: Either a stable version such as \"1.2\" or an unstable version.\n        An unstable version can use either Nix format (preferred) such as\n        \"1.2-unstable-2024-06-01\" or MELPA format such as \"20240601.1230\".\n      */\n      version,\n      /*\n        commit: Optional package history commit.\n        Default: src.rev or \"unknown\"\n        This will be written into the generated package but it is not needed during\n        the build process.\n      */\n      commit ? (finalAttrs.src.rev or \"unknown\"),\n      /*\n        files: Optional recipe property specifying the files used to build the package.\n        If null, do not set it in recipe, keeping the default upstream behaviour.\n        Default: null\n      */\n      files ? null,\n      /*\n        recipe: Optional MELPA recipe.\n        Default: a minimally functional recipe\n        This can be a path of a recipe file, a string of the recipe content or an empty string.\n        The default value is used if it is an empty string.\n      */\n      recipe ? \"\",\n      preUnpack ? \"\",\n      postUnpack ? \"\",\n      meta ? { },\n      ...\n    }@args:\n\n    {\n\n      elpa2nix = args.elpa2nix or ./elpa2nix.el;\n      melpa2nix = args.melpa2nix or ./melpa2nix.el;\n\n      inherit\n        commit\n        ename\n        files\n        recipe\n        ;\n\n      packageBuild = args.packageBuild or packageBuild;\n\n      melpaVersion =\n        args.melpaVersion or (\n          let\n            parsed =\n              lib.flip builtins.match finalAttrs.version\n                # match <version>-unstable-YYYY-MM-DD format\n                \"^.*-unstable-([[:digit:]]{4})-([[:digit:]]{2})-([[:digit:]]{2})$\";\n            unstableVersionInNixFormat = parsed != null; # heuristics\n            date = builtins.concatStringsSep \"\" parsed;\n            time = \"0\"; # unstable version in nix format lacks this info\n          in\n          if unstableVersionInNixFormat then date + \".\" + time else finalAttrs.version\n        );\n\n      preUnpack = ''\n        mkdir -p \"$NIX_BUILD_TOP/recipes\"\n        recipeFile=\"$NIX_BUILD_TOP/recipes/$ename\"\n        if [ -r \"$recipe\" ]; then\n          ln -s \"$recipe\" \"$recipeFile\"\n          nixInfoLog \"link recipe\"\n        elif [ -n \"$recipe\" ]; then\n          printf \"%s\" \"$recipe\" > \"$recipeFile\"\n          nixInfoLog \"write recipe\"\n        else\n          cat > \"$recipeFile\" <<'EOF'\n        (${finalAttrs.ename} :fetcher git :url \"\" ${\n          lib.optionalString (finalAttrs.files != null) \":files ${finalAttrs.files}\"\n        })\n        EOF\n          nixInfoLog \"use default recipe\"\n        fi\n        nixInfoLog \"recipe content:\" \"$(< $recipeFile)\"\n        unset -v recipeFile\n\n        ln -s \"$packageBuild\" \"$NIX_BUILD_TOP/package-build\"\n\n        mkdir -p \"$NIX_BUILD_TOP/packages\"\n      ''\n      + preUnpack;\n\n      postUnpack = ''\n        mkdir -p \"$NIX_BUILD_TOP/working\"\n        ln -s \"$NIX_BUILD_TOP/$sourceRoot\" \"$NIX_BUILD_TOP/working/$ename\"\n      ''\n      + postUnpack;\n\n      buildPhase =\n        args.buildPhase or ''\n          runHook preBuild\n\n          # This is modified from stdenv buildPhase. foundMakefile is used in stdenv checkPhase.\n          if [[ ! ( -z \"''${makeFlags-}\" && -z \"''${makefile:-}\" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ) ]]; then\n            foundMakefile=1\n          fi\n\n          pushd \"$NIX_BUILD_TOP\"\n\n          emacs --batch -Q \\\n              -L \"$NIX_BUILD_TOP/package-build\" \\\n              -l \"$melpa2nix\" \\\n              -f melpa2nix-build-package \\\n              $ename $melpaVersion $commit\n\n          popd\n\n          runHook postBuild\n        '';\n\n      installPhase =\n        args.installPhase or ''\n          runHook preInstall\n\n          archive=\"$NIX_BUILD_TOP/packages/$ename-$melpaVersion.el\"\n          if [ ! -f \"$archive\" ]; then\n              archive=\"$NIX_BUILD_TOP/packages/$ename-$melpaVersion.tar\"\n          fi\n\n          emacs --batch -Q \\\n              -l \"$elpa2nix\" \\\n              -f elpa2nix-install-package \\\n              \"$archive\" \"$out/share/emacs/site-lisp/elpa\" \\\n              ${if finalAttrs.turnCompilationWarningToError then \"t\" else \"nil\"} \\\n              ${if finalAttrs.ignoreCompilationError then \"t\" else \"nil\"}\n\n          runHook postInstall\n        '';\n\n      meta = {\n        homepage = args.src.meta.homepage or \"https://melpa.org/#/${pname}\";\n      }\n      // meta;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/melpa.nix","line":51,"column":5},"path":["pkgs","emacsPackages","melpaBuild","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/melpa.nix","line":51,"column":5},"path":["pkgs","emacsPackages","melpaBuild","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.melpaBuild.override","path":["pkgs","emacsPackages","melpaBuild","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.melpaBuild.overrideDerivation","path":["pkgs","emacsPackages","melpaBuild","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","melpaBuild","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","melpaBuild","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.melpaBuild.transformDrv","path":["pkgs","emacsPackages","melpaBuild","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.emacsPackages.melpaPackages.override","path":["pkgs","emacsPackages","melpaPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.melpaPackages.overrideDerivation","path":["pkgs","emacsPackages","melpaPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","melpaPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","melpaPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.melpaStablePackages.override","path":["pkgs","emacsPackages","melpaStablePackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.melpaStablePackages.overrideDerivation","path":["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.nongnuDevelPackages.override","path":["pkgs","emacsPackages","nongnuDevelPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.nongnuDevelPackages.overrideDerivation","path":["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.nongnuPackages.override","path":["pkgs","emacsPackages","nongnuPackages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.nongnuPackages.overrideDerivation","path":["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.treesit-grammars.override","path":["pkgs","emacsPackages","treesit-grammars","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.treesit-grammars.overrideDerivation","path":["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.treesit-grammars.with-grammars","path":["pkgs","emacsPackages","treesit-grammars","with-grammars"],"aliases":[["pkgs","emacsPackages","manualPackages","treesit-grammars","with-grammars"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":23,"column":11},"attr_expr":"with-grammars","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":18,"column":19},"lambda_expr":"with-grammars = fn: grammarPackage (fn pkgs.tree-sitter.builtGrammars);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":18,"column":19},"path":["pkgs","emacsPackages","treesit-grammars","with-grammars"],"pos_type":"Lambda"}},"content":{"content":"treesit-grammars.with-grammars (p: [ p.tree-sitter-bash p.tree-sitter-c ... ])","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":18,"column":19},"path":["pkgs","emacsPackages","treesit-grammars","with-grammars"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.constructDrv","path":["pkgs","emacsPackages","trivialBuild","constructDrv"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","trivialBuild","constructDrv"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","emacsPackages","trivialBuild","constructDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.extendDrvArgs","path":["pkgs","emacsPackages","trivialBuild","extendDrvArgs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/trivial.nix","line":8,"column":5},"lambda_expr":"finalAttrs:\n\n    args:\n\n    {\n      buildPhase =\n        args.buildPhase or ''\n          runHook preBuild\n\n          # This is modified from stdenv buildPhase. foundMakefile is used in stdenv checkPhase.\n          if [[ ! ( -z \"''${makeFlags-}\" && -z \"''${makefile:-}\" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ) ]]; then\n            foundMakefile=1\n          fi\n\n          emacs -l package -f package-initialize \\\n            --eval \"(setq byte-compile-debug ${if finalAttrs.ignoreCompilationError then \"nil\" else \"t\"})\" \\\n            --eval \"(setq byte-compile-error-on-warn ${\n              if finalAttrs.turnCompilationWarningToError then \"t\" else \"nil\"\n            })\" \\\n            -L . --batch -f batch-byte-compile *.el\n\n          runHook postBuild\n        '';\n\n      installPhase =\n        args.installPhase or ''\n          runHook preInstall\n\n          LISPDIR=$out/share/emacs/site-lisp\n          install -d $LISPDIR\n          install *.el *.elc $LISPDIR\n\n          runHook postInstall\n        '';\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/trivial.nix","line":8,"column":5},"path":["pkgs","emacsPackages","trivialBuild","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/trivial.nix","line":8,"column":5},"path":["pkgs","emacsPackages","trivialBuild","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.override","path":["pkgs","emacsPackages","trivialBuild","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.overrideDerivation","path":["pkgs","emacsPackages","trivialBuild","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","trivialBuild","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","trivialBuild","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.transformDrv","path":["pkgs","emacsPackages","trivialBuild","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.emacsPackages.elpaBuild.constructDrv.extendDrvArgs","path":["pkgs","emacsPackages","elpaBuild","constructDrv","extendDrvArgs"],"aliases":[["pkgs","emacsPackages","melpaBuild","constructDrv","extendDrvArgs"],["pkgs","emacsPackages","trivialBuild","constructDrv","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"lambda_expr":"finalAttrs:\n\n    {\n      buildInputs ? [ ],\n      nativeBuildInputs ? [ ],\n      packageRequires ? [ ],\n      propagatedBuildInputs ? [ ],\n      propagatedUserEnvPkgs ? [ ],\n      postInstall ? \"\",\n      meta ? { },\n      turnCompilationWarningToError ? false,\n      ignoreCompilationError ? false,\n      ...\n    }@args:\n\n    {\n      name = args.name or \"emacs-${finalAttrs.pname}-${finalAttrs.version}\";\n\n      unpackCmd =\n        args.unpackCmd or ''\n          case \"$curSrc\" in\n            *.el)\n              # keep original source filename without the hash\n              local filename=$(basename \"$curSrc\")\n              filename=\"''${filename:33}\"\n              cp $curSrc $filename\n              chmod +w $filename\n              sourceRoot=\".\"\n              ;;\n            *)\n              _defaultUnpack \"$curSrc\"\n              ;;\n          esac\n        '';\n\n      inherit packageRequires;\n      buildInputs = [ emacs ] ++ buildInputs;\n      nativeBuildInputs = [\n        emacs\n        texinfo\n      ]\n      ++ nativeBuildInputs;\n      propagatedBuildInputs = finalAttrs.packageRequires ++ propagatedBuildInputs;\n      propagatedUserEnvPkgs = finalAttrs.packageRequires ++ propagatedUserEnvPkgs;\n\n      strictDeps = args.strictDeps or true;\n      __structuredAttrs = args.__structuredAttrs or true;\n\n      inherit turnCompilationWarningToError ignoreCompilationError;\n\n      meta = {\n        broken = false;\n        platforms = emacs.meta.platforms;\n      }\n      // optionalAttrs ((args.src.meta.homepage or \"\") != \"\") {\n        homepage = args.src.meta.homepage;\n      }\n      // meta;\n    }\n\n    // optionalAttrs (emacs.withNativeCompilation or false) {\n\n      addEmacsNativeLoadPath = args.addEmacsNativeLoadPath or true;\n\n      postInstall = ''\n        # Besides adding the output directory to the native load path, make sure\n        # the current package's elisp files are in the load path, otherwise\n        # (require 'file-b) from file-a.el in the same package will fail.\n        mkdir -p $out/share/emacs/native-lisp\n        addEmacsVars \"$out\"\n\n        # package-activate-all is used to activate packages.  In other builder\n        # helpers, package-initialize is used for this purpose because\n        # package-activate-all is not available before Emacs 27.\n        find $out/share/emacs -type f -name '*.el' -not -name \".dir-locals.el\" -print0 \\\n          | xargs --verbose -0 -I {} -n 1 -P $NIX_BUILD_CORES sh -c \\\n              \"emacs \\\n                 --batch \\\n                 -f package-activate-all \\\n                 --eval '(setq native-comp-eln-load-path (cdr native-comp-eln-load-path))' \\\n                 --eval '(let ((default-directory \\\"$out/share/emacs/site-lisp\\\")) (normal-top-level-add-subdirs-to-load-path))' \\\n                 --eval '(setq large-file-warning-threshold nil)' \\\n                 --eval '(setq byte-compile-error-on-warn ${\n                   if finalAttrs.turnCompilationWarningToError then \"t\" else \"nil\"\n                 })' \\\n                 -f batch-native-compile {} \\\n               || exit ${if finalAttrs.ignoreCompilationError then \"0\" else \"\\\\$?\"}\"\n      ''\n      + postInstall;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"path":["pkgs","emacsPackages","elpaBuild","constructDrv","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"path":["pkgs","emacsPackages","elpaBuild","constructDrv","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.elpaBuild.constructDrv.transformDrv","path":["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.emacsPackages.manualPackages.eaf.override","path":["pkgs","emacsPackages","manualPackages","eaf","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.manualPackages.eaf.overrideDerivation","path":["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.manualPackages.eaf.withApplications","path":["pkgs","emacsPackages","manualPackages","eaf","withApplications"],"aliases":[["pkgs","emacsPackages","eaf","withApplications"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":16,"column":11},"attr_expr":"withApplications","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":8,"column":5},"lambda_expr":"enabledApps:\n    emacs-application-framework.override {\n      inherit enabledApps;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":8,"column":5},"path":["pkgs","emacsPackages","manualPackages","eaf","withApplications"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/eaf/package.nix","line":8,"column":5},"path":["pkgs","emacsPackages","manualPackages","eaf","withApplications"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.manualPackages.treesit-grammars.override","path":["pkgs","emacsPackages","manualPackages","treesit-grammars","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.manualPackages.treesit-grammars.overrideDerivation","path":["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.manualPackages.treesit-grammars.with-grammars","path":["pkgs","emacsPackages","manualPackages","treesit-grammars","with-grammars"],"aliases":[["pkgs","emacsPackages","treesit-grammars","with-grammars"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":23,"column":11},"attr_expr":"with-grammars","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":18,"column":19},"lambda_expr":"with-grammars = fn: grammarPackage (fn pkgs.tree-sitter.builtGrammars);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":18,"column":19},"path":["pkgs","emacsPackages","manualPackages","treesit-grammars","with-grammars"],"pos_type":"Lambda"}},"content":{"content":"treesit-grammars.with-grammars (p: [ p.tree-sitter-bash p.tree-sitter-c ... ])","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/elisp-packages/manual-packages/treesit-grammars/package.nix","line":18,"column":19},"path":["pkgs","emacsPackages","manualPackages","treesit-grammars","with-grammars"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.melpaBuild.constructDrv.extendDrvArgs","path":["pkgs","emacsPackages","melpaBuild","constructDrv","extendDrvArgs"],"aliases":[["pkgs","emacsPackages","elpaBuild","constructDrv","extendDrvArgs"],["pkgs","emacsPackages","trivialBuild","constructDrv","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"lambda_expr":"finalAttrs:\n\n    {\n      buildInputs ? [ ],\n      nativeBuildInputs ? [ ],\n      packageRequires ? [ ],\n      propagatedBuildInputs ? [ ],\n      propagatedUserEnvPkgs ? [ ],\n      postInstall ? \"\",\n      meta ? { },\n      turnCompilationWarningToError ? false,\n      ignoreCompilationError ? false,\n      ...\n    }@args:\n\n    {\n      name = args.name or \"emacs-${finalAttrs.pname}-${finalAttrs.version}\";\n\n      unpackCmd =\n        args.unpackCmd or ''\n          case \"$curSrc\" in\n            *.el)\n              # keep original source filename without the hash\n              local filename=$(basename \"$curSrc\")\n              filename=\"''${filename:33}\"\n              cp $curSrc $filename\n              chmod +w $filename\n              sourceRoot=\".\"\n              ;;\n            *)\n              _defaultUnpack \"$curSrc\"\n              ;;\n          esac\n        '';\n\n      inherit packageRequires;\n      buildInputs = [ emacs ] ++ buildInputs;\n      nativeBuildInputs = [\n        emacs\n        texinfo\n      ]\n      ++ nativeBuildInputs;\n      propagatedBuildInputs = finalAttrs.packageRequires ++ propagatedBuildInputs;\n      propagatedUserEnvPkgs = finalAttrs.packageRequires ++ propagatedUserEnvPkgs;\n\n      strictDeps = args.strictDeps or true;\n      __structuredAttrs = args.__structuredAttrs or true;\n\n      inherit turnCompilationWarningToError ignoreCompilationError;\n\n      meta = {\n        broken = false;\n        platforms = emacs.meta.platforms;\n      }\n      // optionalAttrs ((args.src.meta.homepage or \"\") != \"\") {\n        homepage = args.src.meta.homepage;\n      }\n      // meta;\n    }\n\n    // optionalAttrs (emacs.withNativeCompilation or false) {\n\n      addEmacsNativeLoadPath = args.addEmacsNativeLoadPath or true;\n\n      postInstall = ''\n        # Besides adding the output directory to the native load path, make sure\n        # the current package's elisp files are in the load path, otherwise\n        # (require 'file-b) from file-a.el in the same package will fail.\n        mkdir -p $out/share/emacs/native-lisp\n        addEmacsVars \"$out\"\n\n        # package-activate-all is used to activate packages.  In other builder\n        # helpers, package-initialize is used for this purpose because\n        # package-activate-all is not available before Emacs 27.\n        find $out/share/emacs -type f -name '*.el' -not -name \".dir-locals.el\" -print0 \\\n          | xargs --verbose -0 -I {} -n 1 -P $NIX_BUILD_CORES sh -c \\\n              \"emacs \\\n                 --batch \\\n                 -f package-activate-all \\\n                 --eval '(setq native-comp-eln-load-path (cdr native-comp-eln-load-path))' \\\n                 --eval '(let ((default-directory \\\"$out/share/emacs/site-lisp\\\")) (normal-top-level-add-subdirs-to-load-path))' \\\n                 --eval '(setq large-file-warning-threshold nil)' \\\n                 --eval '(setq byte-compile-error-on-warn ${\n                   if finalAttrs.turnCompilationWarningToError then \"t\" else \"nil\"\n                 })' \\\n                 -f batch-native-compile {} \\\n               || exit ${if finalAttrs.ignoreCompilationError then \"0\" else \"\\\\$?\"}\"\n      ''\n      + postInstall;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"path":["pkgs","emacsPackages","melpaBuild","constructDrv","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"path":["pkgs","emacsPackages","melpaBuild","constructDrv","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.melpaBuild.constructDrv.transformDrv","path":["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.constructDrv.extendDrvArgs","path":["pkgs","emacsPackages","trivialBuild","constructDrv","extendDrvArgs"],"aliases":[["pkgs","emacsPackages","elpaBuild","constructDrv","extendDrvArgs"],["pkgs","emacsPackages","melpaBuild","constructDrv","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"lambda_expr":"finalAttrs:\n\n    {\n      buildInputs ? [ ],\n      nativeBuildInputs ? [ ],\n      packageRequires ? [ ],\n      propagatedBuildInputs ? [ ],\n      propagatedUserEnvPkgs ? [ ],\n      postInstall ? \"\",\n      meta ? { },\n      turnCompilationWarningToError ? false,\n      ignoreCompilationError ? false,\n      ...\n    }@args:\n\n    {\n      name = args.name or \"emacs-${finalAttrs.pname}-${finalAttrs.version}\";\n\n      unpackCmd =\n        args.unpackCmd or ''\n          case \"$curSrc\" in\n            *.el)\n              # keep original source filename without the hash\n              local filename=$(basename \"$curSrc\")\n              filename=\"''${filename:33}\"\n              cp $curSrc $filename\n              chmod +w $filename\n              sourceRoot=\".\"\n              ;;\n            *)\n              _defaultUnpack \"$curSrc\"\n              ;;\n          esac\n        '';\n\n      inherit packageRequires;\n      buildInputs = [ emacs ] ++ buildInputs;\n      nativeBuildInputs = [\n        emacs\n        texinfo\n      ]\n      ++ nativeBuildInputs;\n      propagatedBuildInputs = finalAttrs.packageRequires ++ propagatedBuildInputs;\n      propagatedUserEnvPkgs = finalAttrs.packageRequires ++ propagatedUserEnvPkgs;\n\n      strictDeps = args.strictDeps or true;\n      __structuredAttrs = args.__structuredAttrs or true;\n\n      inherit turnCompilationWarningToError ignoreCompilationError;\n\n      meta = {\n        broken = false;\n        platforms = emacs.meta.platforms;\n      }\n      // optionalAttrs ((args.src.meta.homepage or \"\") != \"\") {\n        homepage = args.src.meta.homepage;\n      }\n      // meta;\n    }\n\n    // optionalAttrs (emacs.withNativeCompilation or false) {\n\n      addEmacsNativeLoadPath = args.addEmacsNativeLoadPath or true;\n\n      postInstall = ''\n        # Besides adding the output directory to the native load path, make sure\n        # the current package's elisp files are in the load path, otherwise\n        # (require 'file-b) from file-a.el in the same package will fail.\n        mkdir -p $out/share/emacs/native-lisp\n        addEmacsVars \"$out\"\n\n        # package-activate-all is used to activate packages.  In other builder\n        # helpers, package-initialize is used for this purpose because\n        # package-activate-all is not available before Emacs 27.\n        find $out/share/emacs -type f -name '*.el' -not -name \".dir-locals.el\" -print0 \\\n          | xargs --verbose -0 -I {} -n 1 -P $NIX_BUILD_CORES sh -c \\\n              \"emacs \\\n                 --batch \\\n                 -f package-activate-all \\\n                 --eval '(setq native-comp-eln-load-path (cdr native-comp-eln-load-path))' \\\n                 --eval '(let ((default-directory \\\"$out/share/emacs/site-lisp\\\")) (normal-top-level-add-subdirs-to-load-path))' \\\n                 --eval '(setq large-file-warning-threshold nil)' \\\n                 --eval '(setq byte-compile-error-on-warn ${\n                   if finalAttrs.turnCompilationWarningToError then \"t\" else \"nil\"\n                 })' \\\n                 -f batch-native-compile {} \\\n               || exit ${if finalAttrs.ignoreCompilationError then \"0\" else \"\\\\$?\"}\"\n      ''\n      + postInstall;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"path":["pkgs","emacsPackages","trivialBuild","constructDrv","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/emacs/build-support/generic.nix","line":19,"column":5},"path":["pkgs","emacsPackages","trivialBuild","constructDrv","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.constructDrv.override","path":["pkgs","emacsPackages","trivialBuild","constructDrv","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.constructDrv.overrideDerivation","path":["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackages.trivialBuild.constructDrv.transformDrv","path":["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.gradle-packages.mkGradle","path":["pkgs","gradle-packages","mkGradle"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":367,"column":11},"attr_expr":"mkGradle","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":361,"column":14},"lambda_expr":"mkGradle = args: callPackage (mkGradle' args) { };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":361,"column":14},"path":["pkgs","gradle-packages","mkGradle"],"pos_type":"Lambda"}},"content":{"content":"Calls the generated Gradle package with default arguments.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":361,"column":14},"path":["pkgs","gradle-packages","mkGradle"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.gradle-packages.override","path":["pkgs","gradle-packages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.gradle-packages.overrideDerivation","path":["pkgs","gradle-packages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","gradle-packages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","gradle-packages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.gradle-packages.wrapGradle","path":["pkgs","gradle-packages","wrapGradle"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":367,"column":20},"attr_expr":"wrapGradle","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":11,"column":5},"lambda_expr":"{\n      lib,\n      callPackage,\n      mitm-cache,\n      replaceVars,\n      symlinkJoin,\n      concatTextFile,\n      makeSetupHook,\n      gradle-unwrapped,\n      runCommand,\n      ...\n    }@args:\n    let\n      gradle = gradle-unwrapped.override args;\n    in\n    symlinkJoin {\n      pname = \"gradle\";\n      inherit (gradle) version;\n\n      paths = [\n        (makeSetupHook\n          {\n            name = \"gradle-setup-hook\";\n            meta.license = lib.licenses.mit;\n          }\n          (concatTextFile {\n            name = \"setup-hook.sh\";\n            files = [\n              (mitm-cache.setupHook)\n              (replaceVars ./setup-hook.sh {\n                # jdk used for keytool\n                inherit (gradle) jdk;\n                init_script = \"${./init-build.gradle}\";\n              })\n            ];\n          })\n        )\n        gradle\n        mitm-cache\n      ];\n\n      passthru = {\n        fetchDeps = callPackage ./fetch-deps.nix { inherit mitm-cache; };\n        inherit (gradle) jdk;\n        unwrapped = gradle;\n        tests = {\n          toolchains =\n            let\n              javaVersion = lib.getVersion jdk11;\n              javaMajorVersion = lib.versions.major javaVersion;\n            in\n            runCommand \"detects-toolchains-from-nix-env\"\n              {\n                # Use JDKs that are not the default for any of the gradle versions\n                nativeBuildInputs = [\n                  (gradle.override {\n                    javaToolchains = [\n                      jdk11\n                    ];\n                  })\n                ];\n                src = ./tests/toolchains;\n              }\n              ''\n                cp -a $src/* .\n                substituteInPlace ./build.gradle --replace-fail '@JAVA_VERSION@' '${javaMajorVersion}'\n                env GRADLE_USER_HOME=$TMPDIR/gradle GRADLE_OPTS=-Dorg.gradle.native.dir=$TMPDIR/native \\\n                  gradle run --no-daemon --quiet --console plain > $out\n                actual=\"$(<$out)\"\n                if [[ \"${javaVersion}\" != \"$actual\"* ]]; then\n                  echo \"Error: Expected '${javaVersion}', to start with '$actual'\" >&2\n                  exit 1\n                fi\n              '';\n        }\n        // gradle.tests;\n      };\n\n      meta = gradle.meta // {\n        # prefer normal gradle/mitm-cache over this wrapper, this wrapper only provides the setup hook\n        # and passthru\n        priority = (gradle.meta.priority or lib.meta.defaultPriority) + 1;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":11,"column":5},"path":["pkgs","gradle-packages","wrapGradle"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/gradle/default.nix","line":11,"column":5},"path":["pkgs","gradle-packages","wrapGradle"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addBuildDepend","path":["pkgs","haskell","lib","addBuildDepend"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":176,"column":3},"attr_expr":"addBuildDepend = drv: x: compose.addBuildDepend x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":176,"column":20},"lambda_expr":"drv: x: compose.addBuildDepend x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":176,"column":20},"path":["pkgs","haskell","lib","addBuildDepend"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":176,"column":20},"path":["pkgs","haskell","lib","addBuildDepend"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addBuildDepends","path":["pkgs","haskell","lib","addBuildDepends"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":177,"column":3},"attr_expr":"addBuildDepends = drv: xs: compose.addBuildDepends xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":177,"column":21},"lambda_expr":"drv: xs: compose.addBuildDepends xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":177,"column":21},"path":["pkgs","haskell","lib","addBuildDepends"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":177,"column":21},"path":["pkgs","haskell","lib","addBuildDepends"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addBuildTool","path":["pkgs","haskell","lib","addBuildTool"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":170,"column":3},"attr_expr":"addBuildTool = drv: x: compose.addBuildTool x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":170,"column":18},"lambda_expr":"drv: x: compose.addBuildTool x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":170,"column":18},"path":["pkgs","haskell","lib","addBuildTool"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":170,"column":18},"path":["pkgs","haskell","lib","addBuildTool"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addBuildTools","path":["pkgs","haskell","lib","addBuildTools"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":171,"column":3},"attr_expr":"addBuildTools = drv: xs: compose.addBuildTools xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":171,"column":19},"lambda_expr":"drv: xs: compose.addBuildTools xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":171,"column":19},"path":["pkgs","haskell","lib","addBuildTools"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":171,"column":19},"path":["pkgs","haskell","lib","addBuildTools"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addExtraLibraries","path":["pkgs","haskell","lib","addExtraLibraries"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":174,"column":3},"attr_expr":"addExtraLibraries = drv: xs: compose.addExtraLibraries xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":174,"column":23},"lambda_expr":"drv: xs: compose.addExtraLibraries xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":174,"column":23},"path":["pkgs","haskell","lib","addExtraLibraries"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":174,"column":23},"path":["pkgs","haskell","lib","addExtraLibraries"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addExtraLibrary","path":["pkgs","haskell","lib","addExtraLibrary"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":173,"column":3},"attr_expr":"addExtraLibrary = drv: x: compose.addExtraLibrary x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":173,"column":21},"lambda_expr":"drv: x: compose.addExtraLibrary x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":173,"column":21},"path":["pkgs","haskell","lib","addExtraLibrary"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":173,"column":21},"path":["pkgs","haskell","lib","addExtraLibrary"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addPkgconfigDepend","path":["pkgs","haskell","lib","addPkgconfigDepend"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":182,"column":3},"attr_expr":"addPkgconfigDepend = drv: x: compose.addPkgconfigDepend x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":182,"column":24},"lambda_expr":"drv: x: compose.addPkgconfigDepend x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":182,"column":24},"path":["pkgs","haskell","lib","addPkgconfigDepend"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":182,"column":24},"path":["pkgs","haskell","lib","addPkgconfigDepend"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addPkgconfigDepends","path":["pkgs","haskell","lib","addPkgconfigDepends"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":183,"column":3},"attr_expr":"addPkgconfigDepends = drv: xs: compose.addPkgconfigDepends xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":183,"column":25},"lambda_expr":"drv: xs: compose.addPkgconfigDepends xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":183,"column":25},"path":["pkgs","haskell","lib","addPkgconfigDepends"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":183,"column":25},"path":["pkgs","haskell","lib","addPkgconfigDepends"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addSetupDepend","path":["pkgs","haskell","lib","addSetupDepend"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":185,"column":3},"attr_expr":"addSetupDepend = drv: x: compose.addSetupDepend x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":185,"column":20},"lambda_expr":"drv: x: compose.addSetupDepend x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":185,"column":20},"path":["pkgs","haskell","lib","addSetupDepend"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":185,"column":20},"path":["pkgs","haskell","lib","addSetupDepend"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addSetupDepends","path":["pkgs","haskell","lib","addSetupDepends"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":186,"column":3},"attr_expr":"addSetupDepends = drv: xs: compose.addSetupDepends xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":186,"column":21},"lambda_expr":"drv: xs: compose.addSetupDepends xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":186,"column":21},"path":["pkgs","haskell","lib","addSetupDepends"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":186,"column":21},"path":["pkgs","haskell","lib","addSetupDepends"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addTestToolDepend","path":["pkgs","haskell","lib","addTestToolDepend"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":179,"column":3},"attr_expr":"addTestToolDepend = drv: x: compose.addTestToolDepend x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":179,"column":23},"lambda_expr":"drv: x: compose.addTestToolDepend x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":179,"column":23},"path":["pkgs","haskell","lib","addTestToolDepend"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":179,"column":23},"path":["pkgs","haskell","lib","addTestToolDepend"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.addTestToolDepends","path":["pkgs","haskell","lib","addTestToolDepends"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":180,"column":3},"attr_expr":"addTestToolDepends = drv: xs: compose.addTestToolDepends xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":180,"column":24},"lambda_expr":"drv: xs: compose.addTestToolDepends xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":180,"column":24},"path":["pkgs","haskell","lib","addTestToolDepends"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":180,"column":24},"path":["pkgs","haskell","lib","addTestToolDepends"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.allowInconsistentDependencies","path":["pkgs","haskell","lib","allowInconsistentDependencies"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":374,"column":3},"attr_expr":"allowInconsistentDependencies = compose.allowInconsistentDependencies;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.appendBuildFlag","path":["pkgs","haskell","lib","appendBuildFlag"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":159,"column":3},"attr_expr":"appendBuildFlag = drv: x: compose.appendBuildFlag x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":159,"column":21},"lambda_expr":"drv: x: compose.appendBuildFlag x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":159,"column":21},"path":["pkgs","haskell","lib","appendBuildFlag"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":159,"column":21},"path":["pkgs","haskell","lib","appendBuildFlag"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.appendBuildFlags","path":["pkgs","haskell","lib","appendBuildFlags"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":160,"column":3},"attr_expr":"appendBuildFlags = drv: xs: compose.appendBuildFlags xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":160,"column":22},"lambda_expr":"drv: xs: compose.appendBuildFlags xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":160,"column":22},"path":["pkgs","haskell","lib","appendBuildFlags"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":160,"column":22},"path":["pkgs","haskell","lib","appendBuildFlags"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.appendConfigureFlag","path":["pkgs","haskell","lib","appendConfigureFlag"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":156,"column":3},"attr_expr":"appendConfigureFlag = drv: x: compose.appendConfigureFlag x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":156,"column":25},"lambda_expr":"appendConfigureFlag = drv: x: compose.appendConfigureFlag x drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":156,"column":25},"path":["pkgs","haskell","lib","appendConfigureFlag"],"pos_type":"Lambda"}},"content":{"content":"\nappendConfigureFlag adds a single argument that will be passed to the\ncabal configure command, after the arguments that have been defined\nin the initial declaration or previous overrides.\n\nExample:\n\n    > haskell.lib.appendConfigureFlag haskellPackages.servant \"--profiling-detail=all-functions\"\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":156,"column":25},"path":["pkgs","haskell","lib","appendConfigureFlag"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.appendConfigureFlags","path":["pkgs","haskell","lib","appendConfigureFlags"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":157,"column":3},"attr_expr":"appendConfigureFlags = drv: xs: compose.appendConfigureFlags xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":157,"column":26},"lambda_expr":"drv: xs: compose.appendConfigureFlags xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":157,"column":26},"path":["pkgs","haskell","lib","appendConfigureFlags"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":157,"column":26},"path":["pkgs","haskell","lib","appendConfigureFlags"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.appendPatch","path":["pkgs","haskell","lib","appendPatch"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":218,"column":3},"attr_expr":"appendPatch = drv: x: compose.appendPatch x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":218,"column":17},"lambda_expr":"drv: x: compose.appendPatch x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":218,"column":17},"path":["pkgs","haskell","lib","appendPatch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":218,"column":17},"path":["pkgs","haskell","lib","appendPatch"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.appendPatches","path":["pkgs","haskell","lib","appendPatches"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":219,"column":3},"attr_expr":"appendPatches = drv: xs: compose.appendPatches xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":219,"column":19},"lambda_expr":"drv: xs: compose.appendPatches xs drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":219,"column":19},"path":["pkgs","haskell","lib","appendPatches"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":219,"column":19},"path":["pkgs","haskell","lib","appendPatches"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.buildFromSdist","path":["pkgs","haskell","lib","buildFromSdist"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":284,"column":3},"attr_expr":"buildFromSdist = compose.buildFromSdist;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":481,"column":5},"lambda_expr":"buildFromSdist =\n    pkg:\n    overrideCabal (drv: {\n      src = \"${sdistTarball pkg}/${pkg.pname}-${pkg.version}.tar.gz\";\n\n      # Revising, jailbreaking and patches have been handled in sdistTarball\n      revision = null;\n      editedCabalFile = null;\n      jailbreak = false;\n      patches = [ ];\n    }) pkg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":481,"column":5},"path":["pkgs","haskell","lib","buildFromSdist"],"pos_type":"Lambda"}},"content":{"content":"\nBuild a source distribution tarball instead of using the source files\ndirectly. The effect is that the package is built as if it were published\non hackage. This can be used as a test for the source distribution,\nassuming the build fails when packaging mistakes are in the cabal file.\n\nA faster implementation using `cabal-install` is available as\n`buildFromCabalSdist` in your Haskell package set.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":481,"column":5},"path":["pkgs","haskell","lib","buildFromSdist"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.buildStackProject","path":["pkgs","haskell","lib","buildStackProject"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":311,"column":3},"attr_expr":"buildStackProject = compose.buildStackProject;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/generic-stack-builder.nix","line":12,"column":1},"lambda_expr":"{\n  buildInputs ? [ ],\n  nativeBuildInputs ? [ ],\n  extraArgs ? [ ],\n  LD_LIBRARY_PATH ? [ ],\n  ghc ? depArgs.ghc,\n  stack ? depArgs.stack,\n  ...\n}@args:\n\nlet\n\n  stackCmd = \"stack --internal-re-exec-version=${stack.version}\";\n\n  # Add all dependencies in buildInputs including propagated ones to\n  # STACK_IN_NIX_EXTRA_ARGS.\n  stackHook = makeSetupHook {\n    name = \"stack-hook\";\n\n    meta.license = lib.licenses.mit;\n  } ./stack-hook.sh;\n\nin\nstdenv.mkDerivation (\n  args\n  // {\n\n    # Doesn't work in the sandbox. Pass `--option sandbox relaxed` or\n    # `--option sandbox false` to be able to build this\n    __noChroot = true;\n\n    buildInputs = buildInputs ++ lib.optional (stdenv.hostPlatform.libc == \"glibc\") glibcLocales;\n\n    nativeBuildInputs = nativeBuildInputs ++ [\n      ghc\n      pkg-config\n      stack\n      stackHook\n    ];\n\n    env = {\n      STACK_PLATFORM_VARIANT = \"nix\";\n      STACK_IN_NIX_SHELL = 1;\n      STACK_IN_NIX_EXTRA_ARGS = extraArgs;\n\n      # XXX: workaround for https://ghc.haskell.org/trac/ghc/ticket/11042.\n      LD_LIBRARY_PATH = lib.makeLibraryPath (LD_LIBRARY_PATH ++ buildInputs);\n      # ^^^ Internally uses `getOutput \"lib\"` (equiv. to getLib)\n\n      # Non-NixOS git needs cert\n      GIT_SSL_CAINFO = \"${cacert}/etc/ssl/certs/ca-bundle.crt\";\n\n      # Fixes https://github.com/commercialhaskell/stack/issues/2358 krank:ignore-line\n      LANG = \"en_US.UTF-8\";\n    };\n\n    preferLocalBuild = true;\n\n    preConfigure = ''\n      export STACK_ROOT=$NIX_BUILD_TOP/.stack\n    '';\n\n    buildPhase =\n      args.buildPhase or ''\n        runHook preBuild\n\n        ${stackCmd} build\n\n        runHook postBuild\n      '';\n\n    checkPhase =\n      args.checkPhase or ''\n        runHook preCheck\n\n        ${stackCmd} test\n\n        runHook postCheck\n      '';\n\n    doCheck = args.doCheck or true;\n\n    installPhase =\n      args.installPhase or ''\n        runHook preInstall\n\n        ${stackCmd} --local-bin-path=$out/bin build --copy-bins\n\n        runHook postInstall\n      '';\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/generic-stack-builder.nix","line":12,"column":1},"path":["pkgs","haskell","lib","buildStackProject"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/generic-stack-builder.nix","line":12,"column":1},"path":["pkgs","haskell","lib","buildStackProject"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.buildStrictly","path":["pkgs","haskell","lib","buildStrictly"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":290,"column":3},"attr_expr":"buildStrictly = compose.buildStrictly;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":496,"column":19},"lambda_expr":"buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":496,"column":19},"path":["pkgs","haskell","lib","buildStrictly"],"pos_type":"Lambda"}},"content":{"content":"\nBuild the package in a strict way to uncover potential problems.\nThis includes buildFromSdist and failOnAllWarnings.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":496,"column":19},"path":["pkgs","haskell","lib","buildStrictly"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.checkUnusedPackages","path":["pkgs","haskell","lib","checkUnusedPackages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":309,"column":3},"attr_expr":"checkUnusedPackages = compose.checkUnusedPackages;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":516,"column":5},"lambda_expr":"checkUnusedPackages =\n    {\n      ignoreEmptyImports ? false,\n      ignoreMainModule ? false,\n      ignorePackages ? [ ],\n    }:\n    drv:\n    overrideCabal (_drv: {\n      postBuild =\n        let\n          args = lib.concatStringsSep \" \" (\n            lib.optional ignoreEmptyImports \"--ignore-empty-imports\"\n            ++ lib.optional ignoreMainModule \"--ignore-main-module\"\n            ++ map (pkg: \"--ignore-package ${pkg}\") ignorePackages\n          );\n        in\n        \"${pkgs.haskellPackages.packunused}/bin/packunused\" + lib.optionalString (args != \"\") \" ${args}\";\n    }) (appendConfigureFlag \"--ghc-option=-ddump-minimal-imports\" drv);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":516,"column":5},"path":["pkgs","haskell","lib","checkUnusedPackages"],"pos_type":"Lambda"}},"content":{"content":"\nAdd a post-build check to verify that dependencies declared in\nthe cabal file are actually used.\n\nThe first attrset argument can be used to configure the strictness\nof this check and a list of ignored package names that would otherwise\ncause false alarms.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":516,"column":5},"path":["pkgs","haskell","lib","checkUnusedPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.disableCabalFlag","path":["pkgs","haskell","lib","disableCabalFlag"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":189,"column":3},"attr_expr":"disableCabalFlag = drv: x: compose.disableCabalFlag x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":189,"column":22},"lambda_expr":"drv: x: compose.disableCabalFlag x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":189,"column":22},"path":["pkgs","haskell","lib","disableCabalFlag"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":189,"column":22},"path":["pkgs","haskell","lib","disableCabalFlag"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.disableDeadCodeElimination","path":["pkgs","haskell","lib","disableDeadCodeElimination"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":211,"column":3},"attr_expr":"disableDeadCodeElimination = compose.disableDeadCodeElimination;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.disableExecutableProfiling","path":["pkgs","haskell","lib","disableExecutableProfiling"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":202,"column":3},"attr_expr":"disableExecutableProfiling = compose.disableExecutableProfiling;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.disableHardening","path":["pkgs","haskell","lib","disableHardening"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":234,"column":3},"attr_expr":"disableHardening = drv: flags: compose.disableHardening flags drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":234,"column":22},"lambda_expr":"drv: flags: compose.disableHardening flags drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":234,"column":22},"path":["pkgs","haskell","lib","disableHardening"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":234,"column":22},"path":["pkgs","haskell","lib","disableHardening"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.disableLibraryProfiling","path":["pkgs","haskell","lib","disableLibraryProfiling"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":199,"column":3},"attr_expr":"disableLibraryProfiling = compose.disableLibraryProfiling;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.disableOptimization","path":["pkgs","haskell","lib","disableOptimization"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":293,"column":3},"attr_expr":"disableOptimization = compose.disableOptimization;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.disableParallelBuilding","path":["pkgs","haskell","lib","disableParallelBuilding"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":196,"column":3},"attr_expr":"disableParallelBuilding = compose.disableParallelBuilding;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.disableSharedExecutables","path":["pkgs","haskell","lib","disableSharedExecutables"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":205,"column":3},"attr_expr":"disableSharedExecutables = compose.disableSharedExecutables;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.disableSharedLibraries","path":["pkgs","haskell","lib","disableSharedLibraries"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":208,"column":3},"attr_expr":"disableSharedLibraries = compose.disableSharedLibraries;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.disableStaticLibraries","path":["pkgs","haskell","lib","disableStaticLibraries"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":214,"column":3},"attr_expr":"disableStaticLibraries = compose.disableStaticLibraries;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doBenchmark","path":["pkgs","haskell","lib","doBenchmark"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":129,"column":3},"attr_expr":"doBenchmark = compose.doBenchmark;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doCheck","path":["pkgs","haskell","lib","doCheck"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":112,"column":3},"attr_expr":"doCheck = compose.doCheck;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doCoverage","path":["pkgs","haskell","lib","doCoverage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":61,"column":3},"attr_expr":"doCoverage = compose.doCoverage;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doDistribute","path":["pkgs","haskell","lib","doDistribute"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":140,"column":3},"attr_expr":"doDistribute = compose.doDistribute;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doHaddock","path":["pkgs","haskell","lib","doHaddock"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":74,"column":3},"attr_expr":"doHaddock = compose.doHaddock;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doHyperlinkSource","path":["pkgs","haskell","lib","doHyperlinkSource"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":231,"column":3},"attr_expr":"doHyperlinkSource = compose.doHyperlinkSource;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doJailbreak","path":["pkgs","haskell","lib","doJailbreak"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":100,"column":3},"attr_expr":"doJailbreak = compose.doJailbreak;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.doStrip","path":["pkgs","haskell","lib","doStrip"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":240,"column":3},"attr_expr":"doStrip = compose.doStrip;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.documentationTarball","path":["pkgs","haskell","lib","documentationTarball"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":264,"column":3},"attr_expr":"documentationTarball = compose.documentationTarball;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":426,"column":5},"lambda_expr":"documentationTarball =\n    pkg:\n    pkgs.lib.overrideDerivation pkg (drv: {\n      name = \"${drv.name}-docs\";\n      # Like sdistTarball, disable the \"doc\" output here.\n      outputs = [ \"out\" ];\n      buildPhase = ''\n        runHook preHaddock\n        ./Setup haddock --for-hackage\n        runHook postHaddock\n      '';\n      haddockPhase = \":\";\n      checkPhase = \":\";\n      installPhase = ''\n        runHook preInstall\n        mkdir -p \"$out\"\n        tar --format=ustar \\\n          -czf \"$out/${drv.name}-docs.tar.gz\" \\\n          -C dist/doc/html \"${drv.name}-docs\"\n        runHook postInstall\n      '';\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":426,"column":5},"path":["pkgs","haskell","lib","documentationTarball"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a documentation tarball suitable for uploading to Hackage instead\nof building the package.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":426,"column":5},"path":["pkgs","haskell","lib","documentationTarball"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.dontBenchmark","path":["pkgs","haskell","lib","dontBenchmark"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":134,"column":3},"attr_expr":"dontBenchmark = compose.dontBenchmark;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.dontCheck","path":["pkgs","haskell","lib","dontCheck"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":117,"column":3},"attr_expr":"dontCheck = compose.dontCheck;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.dontCheckIf","path":["pkgs","haskell","lib","dontCheckIf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":123,"column":3},"attr_expr":"dontCheckIf = drv: condition: compose.dontCheckIf condition drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":123,"column":17},"lambda_expr":"dontCheckIf = drv: condition: compose.dontCheckIf condition drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":123,"column":17},"path":["pkgs","haskell","lib","dontCheckIf"],"pos_type":"Lambda"}},"content":{"content":"\nThe dontCheckIf variant sets doCheck = false if the condition\napplies. In any other case the previously set/default value is used.\nThis prevents accidentally re-enabling tests in a later override.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":123,"column":17},"path":["pkgs","haskell","lib","dontCheckIf"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.dontCoverage","path":["pkgs","haskell","lib","dontCoverage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":67,"column":3},"attr_expr":"dontCoverage = compose.dontCoverage;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.dontDistribute","path":["pkgs","haskell","lib","dontDistribute"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":145,"column":3},"attr_expr":"dontDistribute = compose.dontDistribute;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.dontHaddock","path":["pkgs","haskell","lib","dontHaddock"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":81,"column":3},"attr_expr":"dontHaddock = compose.dontHaddock;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.dontHyperlinkSource","path":["pkgs","haskell","lib","dontHyperlinkSource"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":232,"column":3},"attr_expr":"dontHyperlinkSource = compose.dontHyperlinkSource;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.dontJailbreak","path":["pkgs","haskell","lib","dontJailbreak"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":106,"column":3},"attr_expr":"dontJailbreak = compose.dontJailbreak;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.dontStrip","path":["pkgs","haskell","lib","dontStrip"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":246,"column":3},"attr_expr":"dontStrip = compose.dontStrip;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.enableCabalFlag","path":["pkgs","haskell","lib","enableCabalFlag"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":188,"column":3},"attr_expr":"enableCabalFlag = drv: x: compose.enableCabalFlag x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":188,"column":21},"lambda_expr":"drv: x: compose.enableCabalFlag x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":188,"column":21},"path":["pkgs","haskell","lib","enableCabalFlag"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":188,"column":21},"path":["pkgs","haskell","lib","enableCabalFlag"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.enableDWARFDebugging","path":["pkgs","haskell","lib","enableDWARFDebugging"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":252,"column":3},"attr_expr":"enableDWARFDebugging = compose.enableDWARFDebugging;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":395,"column":5},"lambda_expr":"enableDWARFDebugging =\n    drv:\n    # -g: enables debugging symbols\n    # --disable-*-stripping: tell GHC not to strip resulting binaries\n    # dontStrip: see above\n    appendConfigureFlag \"--ghc-options=-g --disable-executable-stripping --disable-library-stripping\" (\n      dontStrip drv\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":395,"column":5},"path":["pkgs","haskell","lib","enableDWARFDebugging"],"pos_type":"Lambda"}},"content":{"content":"\nUseful for debugging segfaults with gdb.\nThis includes dontStrip.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":395,"column":5},"path":["pkgs","haskell","lib","enableDWARFDebugging"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.enableDeadCodeElimination","path":["pkgs","haskell","lib","enableDeadCodeElimination"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":210,"column":3},"attr_expr":"enableDeadCodeElimination = compose.enableDeadCodeElimination;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.enableExecutableProfiling","path":["pkgs","haskell","lib","enableExecutableProfiling"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":201,"column":3},"attr_expr":"enableExecutableProfiling = compose.enableExecutableProfiling;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.enableLibraryProfiling","path":["pkgs","haskell","lib","enableLibraryProfiling"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":198,"column":3},"attr_expr":"enableLibraryProfiling = compose.enableLibraryProfiling;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.enableSeparateBinOutput","path":["pkgs","haskell","lib","enableSeparateBinOutput"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":216,"column":3},"attr_expr":"enableSeparateBinOutput = compose.enableSeparateBinOutput;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.enableSharedExecutables","path":["pkgs","haskell","lib","enableSharedExecutables"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":204,"column":3},"attr_expr":"enableSharedExecutables = compose.enableSharedExecutables;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.enableSharedLibraries","path":["pkgs","haskell","lib","enableSharedLibraries"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":207,"column":3},"attr_expr":"enableSharedLibraries = compose.enableSharedLibraries;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.enableStaticLibraries","path":["pkgs","haskell","lib","enableStaticLibraries"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":213,"column":3},"attr_expr":"enableStaticLibraries = compose.enableStaticLibraries;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.failOnAllWarnings","path":["pkgs","haskell","lib","failOnAllWarnings"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":299,"column":3},"attr_expr":"failOnAllWarnings = compose.failOnAllWarnings;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.generateOptparseApplicativeCompletion","path":["pkgs","haskell","lib","generateOptparseApplicativeCompletion"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":355,"column":3},"attr_expr":"generateOptparseApplicativeCompletion = compose.generateOptparseApplicativeCompletion;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":638,"column":5},"lambda_expr":"generateOptparseApplicativeCompletion =\n    command: pkg:\n    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2211)\n      \"haskellLib.generateOptparseApplicativeCompletion is deprecated in favor of haskellPackages.generateOptparseApplicativeCompletions (plural!). Please change ${pkg.name} to use the latter and make sure it uses its matching haskell.packages set!\"\n      (__generateOptparseApplicativeCompletion command pkg);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":638,"column":5},"path":["pkgs","haskell","lib","generateOptparseApplicativeCompletion"],"pos_type":"Lambda"}},"content":{"content":"\nRetained for backwards compatibility.\nUse haskell.packages.*.generateOptparseApplicativeCompletions\nwhich is cross aware instead.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":638,"column":5},"path":["pkgs","haskell","lib","generateOptparseApplicativeCompletion"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.generateOptparseApplicativeCompletions","path":["pkgs","haskell","lib","generateOptparseApplicativeCompletions"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":369,"column":3},"attr_expr":"generateOptparseApplicativeCompletions = compose.generateOptparseApplicativeCompletions;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":627,"column":5},"lambda_expr":"generateOptparseApplicativeCompletions =\n    commands: pkg:\n    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2211)\n      \"haskellLib.generateOptparseApplicativeCompletions is deprecated in favor of haskellPackages.generateOptparseApplicativeCompletions. Please change ${pkg.name} to use the latter and make sure it uses its matching haskell.packages set!\"\n      (pkgs.lib.foldr __generateOptparseApplicativeCompletion pkg commands);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":627,"column":5},"path":["pkgs","haskell","lib","generateOptparseApplicativeCompletions"],"pos_type":"Lambda"}},"content":{"content":"\nRetained for backwards compatibility.\nUse haskell.packages.*.generateOptparseApplicativeCompletions\nwhich is cross aware instead.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":627,"column":5},"path":["pkgs","haskell","lib","generateOptparseApplicativeCompletions"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.getBuildInputs","path":["pkgs","haskell","lib","getBuildInputs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":326,"column":3},"attr_expr":"getBuildInputs = compose.getBuildInputs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":566,"column":20},"lambda_expr":"getBuildInputs = p: p.getBuildInputs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":566,"column":20},"path":["pkgs","haskell","lib","getBuildInputs"],"pos_type":"Lambda"}},"content":{"content":"Get all of the build inputs of a haskell package, divided by category.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":566,"column":20},"path":["pkgs","haskell","lib","getBuildInputs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.getHaskellBuildInputs","path":["pkgs","haskell","lib","getHaskellBuildInputs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":331,"column":3},"attr_expr":"getHaskellBuildInputs = compose.getHaskellBuildInputs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":571,"column":27},"lambda_expr":"getHaskellBuildInputs = p: (getBuildInputs p).haskellBuildInputs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":571,"column":27},"path":["pkgs","haskell","lib","getHaskellBuildInputs"],"pos_type":"Lambda"}},"content":{"content":"package.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":571,"column":27},"path":["pkgs","haskell","lib","getHaskellBuildInputs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.justStaticExecutables","path":["pkgs","haskell","lib","justStaticExecutables"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":276,"column":3},"attr_expr":"justStaticExecutables = compose.justStaticExecutables;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.linkWithGold","path":["pkgs","haskell","lib","linkWithGold"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":270,"column":3},"attr_expr":"linkWithGold = compose.linkWithGold;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.makePackageSet","path":["pkgs","haskell","lib","makePackageSet"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":19,"column":3},"attr_expr":"makePackageSet = compose.makePackageSet;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/make-package-set.nix","line":4,"column":1},"lambda_expr":"{\n  # package-set used for build tools (all of nixpkgs)\n  buildPackages,\n\n  # A haskell package set for Setup.hs, compiler plugins, and similar\n  # build-time uses.\n  buildHaskellPackages,\n\n  # package-set used for non-haskell dependencies (all of nixpkgs)\n  pkgs,\n\n  # stdenv provides our build and host platforms\n  stdenv,\n\n  # this module provides the list of known licenses and maintainers\n  lib,\n\n  # needed for overrideCabal & packageSourceOverrides\n  haskellLib,\n\n  # hashes for downloading Hackage packages\n  # This is either a directory or a .tar.gz containing the cabal files and\n  # hashes of Hackage as exemplified by this repository:\n  # https://github.com/commercialhaskell/all-cabal-hashes/tree/hackage\n  all-cabal-hashes,\n\n  # compiler to use\n  ghc,\n\n  # A function that takes `{ pkgs, lib, callPackage }` as the first arg and\n  # `self` as second, and returns a set of haskell packages\n  package-set,\n\n  # The final, fully overridden package set usable with the nixpkgs fixpoint\n  # overriding functionality\n  extensible-self,\n}:\n\n# return value: a function from self to the package set\nself:\n\nlet\n  inherit (stdenv) buildPlatform hostPlatform;\n\n  inherit (lib) fix' extends makeOverridable;\n  inherit (haskellLib) overrideCabal;\n\n  builder = if !(ghc.isMhs or false) then ./generic-builder.nix else ./microhs-builder.nix;\n\n  mkDerivationImpl = pkgs.callPackage builder (\n    {\n      inherit stdenv;\n      inherit (self)\n        buildHaskellPackages\n        ghc\n        ;\n      inherit (self.buildHaskellPackages) jailbreak-cabal;\n    }\n    // lib.optionalAttrs (!(ghc.isMhs or false)) {\n      inherit haskellLib;\n      inherit (self)\n        ghcWithHoogle\n        ghcWithPackages\n        ;\n      nodejs = buildPackages.nodejs-slim;\n      iserv-proxy = {\n        build = buildHaskellPackages.iserv-proxy;\n        host = self.iserv-proxy;\n      };\n      hscolour = overrideCabal (drv: {\n        isLibrary = false;\n        doHaddock = false;\n        hyperlinkSource = false; # Avoid depending on hscolour for this build.\n        postFixup = \"rm -rf $out/lib $out/share $out/nix-support\";\n      }) self.buildHaskellPackages.hscolour;\n      cpphs =\n        overrideCabal\n          (drv: {\n            isLibrary = false;\n            postFixup = \"rm -rf $out/lib $out/share $out/nix-support\";\n          })\n          (\n            self.cpphs.overrideScope (\n              self: super: {\n                mkDerivation =\n                  drv:\n                  super.mkDerivation (\n                    drv\n                    // {\n                      enableSharedExecutables = false;\n                      enableSharedLibraries = false;\n                      doHaddock = false;\n                      useCpphs = false;\n                    }\n                  );\n              }\n            )\n          );\n    }\n    // lib.optionalAttrs (ghc.isMhs or false) {\n      inherit (self) wrapMhs ghc-compat;\n      MicroCabal = self.ghc.microcabal-stage1;\n      cpphs = self.ghc.cpphs;\n    }\n  );\n\n  mkDerivation = makeOverridable mkDerivationImpl;\n\n  # manualArgs are the arguments that were explicitly passed to `callPackage`, like:\n  #\n  # callPackage foo { bar = null; };\n  #\n  # here `bar` is a manual argument.\n  callPackageWithScope =\n    scope: fn: manualArgs:\n    let\n      # this code is copied from callPackage in lib/customisation.nix\n      #\n      # we cannot use `callPackage` here because we want to call `makeOverridable`\n      # on `drvScope` (we cannot add `overrideScope` after calling `callPackage` because then it is\n      # lost on `.override`) but determine the auto-args based on `drv` (the problem here\n      # is that nix has no way to \"passthrough\" args while preserving the reflection\n      # info that callPackage uses to determine the arguments).\n      drv = if lib.isFunction fn then fn else import fn;\n      drvFunctionArgs = lib.functionArgs drv;\n      auto = builtins.intersectAttrs drvFunctionArgs scope;\n\n      # Converts a returned function to a functor attribute set if necessary\n      ensureAttrs = v: if builtins.isFunction v then { __functor = _: v; } else v;\n\n      # this wraps the `drv` function to add `scope` and `overrideScope` to the result.\n      # it's a functor, so that we can pass through `functionArgs`\n      drvScope = {\n        __functor =\n          _: allArgs:\n          ensureAttrs (drv allArgs)\n          // {\n            inherit scope;\n            overrideScope =\n              f:\n              let\n                newScope = mkScope (fix' (extends f scope.__unfix__));\n              in\n              # note that we have to be careful here: `allArgs` includes the auto-arguments that\n              # weren't manually specified. If we would just pass `allArgs` to the recursive call here,\n              # then we wouldn't look up any packages in the scope in the next interation, because it\n              # appears as if all arguments were already manually passed, so the scope change would do\n              # nothing.\n              callPackageWithScope newScope drv manualArgs;\n          };\n        # `drvScope` accepts the same arguments as `drv`\n        __functionArgs = drvFunctionArgs;\n      };\n    in\n    lib.makeOverridable drvScope (auto // manualArgs);\n\n  mkScope =\n    scope:\n    let\n      ps = pkgs.__splicedPackages;\n      scopeSpliced =\n        pkgs.splicePackages {\n          pkgsBuildBuild = scope.buildHaskellPackages.buildHaskellPackages;\n          pkgsBuildHost = scope.buildHaskellPackages;\n          pkgsBuildTarget = { };\n          pkgsHostHost = { };\n          pkgsHostTarget = scope;\n          pkgsTargetTarget = { };\n        }\n        // {\n          # Don't splice these\n          inherit (scope) ghc buildHaskellPackages;\n        };\n    in\n    ps // ps.gnome2 // { inherit stdenv; } // scopeSpliced;\n  defaultScope = mkScope self;\n  callPackage = drv: args: callPackageWithScope defaultScope drv args;\n\n  # Use cabal2nix to create a default.nix for the package sources found at 'src'.\n  haskellSrc2nix =\n    {\n      name,\n      src,\n      sha256 ? null,\n      extraCabal2nixOptions ? \"\",\n    }:\n    let\n      sha256Arg = if sha256 == null then \"--sha256=\" else ''--sha256=\"${sha256}\"'';\n    in\n    buildPackages.runCommand \"cabal2nix-${name}\"\n      {\n        nativeBuildInputs = [ buildPackages.cabal2nix-unwrapped ];\n        preferLocalBuild = true;\n        allowSubstitutes = false;\n        env = {\n          LANG = \"en_US.UTF-8\";\n        }\n        // lib.optionalAttrs (buildPlatform.libc == \"glibc\") {\n          LOCALE_ARCHIVE = \"${buildPackages.glibcLocales}/lib/locale/locale-archive\";\n        };\n      }\n      ''\n        export HOME=\"$TMP\"\n        mkdir -p \"$out\"\n        cabal2nix --compiler=${self.ghc.haskellCompilerName} --system=${hostPlatform.config} ${sha256Arg} \"${src}\" ${extraCabal2nixOptions} > \"$out/default.nix\"\n      '';\n\n  # Given a package name and version, e.g. name = \"async\", version = \"2.2.4\",\n  # gives its cabal file and hashes (JSON file) as discovered from the\n  # all-cabal-hashes value. If that's a directory, it will copy the relevant\n  # files to $out; if it's a tarball, it will extract and move them to $out.\n  all-cabal-hashes-component =\n    name: version:\n    buildPackages.runCommand \"all-cabal-hashes-component-${name}-${version}\" { } ''\n      mkdir -p $out\n      if [ -d ${all-cabal-hashes} ]\n      then\n        cp ${all-cabal-hashes}/${name}/${version}/${name}.json $out\n        cp ${all-cabal-hashes}/${name}/${version}/${name}.cabal $out\n      else\n        tar --wildcards -xzvf ${all-cabal-hashes} \\*/${name}/${version}/${name}.{json,cabal}\n        mv */${name}/${version}/${name}.{json,cabal} $out\n      fi\n    '';\n\n  hackage2nix =\n    name: version:\n    let\n      component = all-cabal-hashes-component name version;\n    in\n    self.haskellSrc2nix {\n      name = \"${name}-${version}\";\n      sha256 = ''$(sed -e 's/.*\"SHA256\":\"//' -e 's/\".*$//' \"${component}/${name}.json\")'';\n      src = \"${component}/${name}.cabal\";\n    };\n\n  # Adds a nix file derived from cabal2nix in the passthru of the derivation it\n  # produces. This is useful to debug callHackage / callCabal2nix by looking at\n  # the content of the nix file pointed by `cabal2nixDeriver`.\n  # However, it does not keep a reference to that file, which may be garbage\n  # collected, which may be an annoyance.\n  callPackageKeepDeriver =\n    src: args:\n    overrideCabal (orig: {\n      passthru = orig.passthru or { } // {\n        # When using callCabal2nix or callHackage, it is often useful\n        # to debug a failure by inspecting the Nix expression\n        # generated by cabal2nix. This can be accessed via this\n        # cabal2nixDeriver field.\n        cabal2nixDeriver = src;\n      };\n    }) (self.callPackage src args);\n\nin\npackage-set { inherit pkgs lib callPackage; } self\n// {\n\n  inherit\n    mkDerivation\n    callPackage\n    haskellSrc2nix\n    hackage2nix\n    buildHaskellPackages\n    ;\n\n  inherit (haskellLib) packageSourceOverrides;\n\n  # callHackage :: Text -> Text -> AttrSet -> HaskellPackage\n  #\n  # e.g., while overriding a package set:\n  #    '... foo = self.callHackage \"foo\" \"1.5.3\" {}; ...'\n  callHackage = name: version: callPackageKeepDeriver (self.hackage2nix name version);\n\n  # callHackageDirect\n  #   :: { pkg :: Text, ver :: Text, sha256 :: Text }\n  #   -> AttrSet\n  #   -> HaskellPackage\n  #\n  # This function does not depend on all-cabal-hashes and therefore will work\n  # for any version that has been released on hackage as opposed to only\n  # versions released before whatever version of all-cabal-hashes you happen\n  # to be currently using.\n  callHackageDirect =\n    {\n      pkg,\n      ver,\n      sha256,\n      candidate ? false,\n      rev ? {\n        revision = null;\n        sha256 = null;\n      },\n    }:\n    args:\n    let\n      pkgver = \"${pkg}-${ver}\";\n      firstRevision = self.callCabal2nix pkg (pkgs.fetchzip {\n        url =\n          if candidate then\n            \"mirror://hackage/${pkgver}/candidate/${pkgver}.tar.gz\"\n          else\n            \"mirror://hackage/${pkgver}/${pkgver}.tar.gz\";\n        inherit sha256;\n      }) args;\n    in\n    overrideCabal (orig: {\n      revision = rev.revision;\n      editedCabalFile = rev.sha256;\n    }) firstRevision;\n\n  # Creates a Haskell package from a source package by calling cabal2nix on the source.\n  callCabal2nixWithOptions =\n    name: src: opts: args:\n    let\n      extraCabal2nixOptions = if builtins.isString opts then opts else opts.extraCabal2nixOptions or \"\";\n      srcModifier = opts.srcModifier or null;\n      defaultFilter = path: type: pkgs.lib.hasSuffix \".cabal\" path || baseNameOf path == \"package.yaml\";\n      expr = self.haskellSrc2nix {\n        inherit name extraCabal2nixOptions;\n        src =\n          if srcModifier != null then\n            srcModifier src\n          else if pkgs.lib.canCleanSource src then\n            pkgs.lib.cleanSourceWith {\n              inherit src;\n              filter = defaultFilter;\n            }\n          else\n            src;\n      };\n    in\n    overrideCabal (orig: {\n      inherit src;\n    }) (callPackageKeepDeriver expr args);\n\n  callCabal2nix =\n    name: src: args:\n    self.callCabal2nixWithOptions name src \"\" args;\n\n  # : { root : Path\n  #   , name : Defaulted String\n  #   , source-overrides : Defaulted (Either Path VersionNumber)\n  #   , overrides : Defaulted (HaskellPackageOverrideSet)\n  #   , modifier : Defaulted\n  #   , returnShellEnv : Defaulted\n  #   , withHoogle : Defaulted\n  #   , cabal2nixOptions : Defaulted\n  #   } -> NixShellAwareDerivation\n  #\n  # Given a path to a haskell package directory, an optional package name\n  # which defaults to the base name of the path, an optional set of source\n  # overrides as appropriate for the 'packageSourceOverrides' function, an\n  # optional set of arbitrary overrides, and an optional haskell package\n  # modifier, return a derivation appropriate for nix-build or nix-shell to\n  # build that package.\n  #\n  # If 'returnShellEnv' is true this returns a derivation which will give you\n  # an environment suitable for developing the listed packages with an\n  # incremental tool like cabal-install.\n  #\n  # If 'withHoogle' is true (the default if a shell environment is requested)\n  # then 'ghcWithHoogle' is used to generate the derivation (instead of\n  # 'ghcWithPackages'), see the documentation there for more information.\n  #\n  # 'cabal2nixOptions' can contain extra command line arguments to pass to\n  # 'cabal2nix' when generating the package derivation, for example setting\n  # a cabal flag with '--flag=myflag'.\n  developPackage =\n    {\n      root,\n      name ? lib.optionalString (builtins.typeOf root == \"path\") (baseNameOf root),\n      source-overrides ? { },\n      overrides ? self: super: { },\n      modifier ? drv: drv,\n      returnShellEnv ? pkgs.lib.inNixShell,\n      withHoogle ? returnShellEnv,\n      cabal2nixOptions ? \"\",\n    }:\n    let\n      drv =\n        (extensible-self.extend (\n          pkgs.lib.composeExtensions (self.packageSourceOverrides source-overrides) overrides\n        )).callCabal2nixWithOptions\n          name\n          root\n          cabal2nixOptions\n          { };\n    in\n    if returnShellEnv then (modifier drv).envFunc { inherit withHoogle; } else modifier drv;\n\n  # This can be used to easily create a derivation containing GHC and the specified set of Haskell packages.\n  #\n  # Example:\n  #   $ nix-shell -p 'haskellPackages.ghcWithPackages (hpkgs: [ hpkgs.mtl hpkgs.lens ])'\n  #   $ ghci    # in the nix-shell\n  #   Prelude > import Control.Lens\n  #\n  # GHC is setup with a package database with all the specified Haskell packages.\n  #\n  # ghcWithPackages :: (HaskellPkgSet -> [ HaskellPkg ]) -> Derivation\n  ghcWithPackages = buildHaskellPackages.callPackage ./with-packages-wrapper.nix {\n    haskellPackages = self;\n    inherit (self) hoogleWithPackages;\n  };\n\n  # Put 'hoogle' into the derivation's PATH with a database containing all\n  # the package's dependencies; run 'hoogle server --local' in a shell to\n  # host a search engine for the dependencies.\n  #\n  # Example usage:\n  #  $ nix-shell -p 'haskellPackages.hoogleWithPackages (p: [ p.mtl p.lens ])'\n  #  [nix-shell] $ hoogle server\n  #\n  # hoogleWithPackages :: (HaskellPkgSet -> [ HaskellPkg ]) -> Derivation\n  #\n  # To reload the Hoogle server automatically on .cabal file changes try\n  # this:\n  # echo *.cabal | entr -r -- nix-shell --run 'hoogle server --local'\n  hoogleWithPackages = self.callPackage ./hoogle.nix {\n    haskellPackages = self;\n  };\n  hoogleLocal =\n    {\n      packages ? [ ],\n    }:\n    lib.warn \"hoogleLocal is deprecated, use hoogleWithPackages instead\" (\n      self.hoogleWithPackages (_: packages)\n    );\n  # This is like a combination of ghcWithPackages and hoogleWithPackages.\n  # It provides a derivation containing both GHC and Hoogle with an index of\n  # the given Haskell package database.\n  #\n  # Example:\n  #   $ nix-shell -p 'haskellPackages.ghcWithHoogle (hpkgs: [ hpkgs.conduit hpkgs.lens ])'\n  #\n  # ghcWithHoogle :: (HaskellPkgSet -> [ HaskellPkg ]) -> Derivation\n  ghcWithHoogle = self.ghcWithPackages.override {\n    withHoogle = true;\n  };\n\n  # Returns a derivation whose environment contains a GHC with only\n  # the dependencies of packages listed in `packages`, not the\n  # packages themselves. Using nix-shell on this derivation will\n  # give you an environment suitable for developing the listed\n  # packages with an incremental tool like cabal-install.\n  #\n  # In addition to the \"packages\" arg and \"withHoogle\" arg, anything that\n  # can be passed into stdenv.mkDerivation can be included in the input attrset\n  #\n  #     # default.nix\n  #     with import <nixpkgs> {};\n  #     haskellPackages.extend (haskell.lib.compose.packageSourceOverrides {\n  #       frontend = ./frontend;\n  #       backend = ./backend;\n  #       common = ./common;\n  #     })\n  #\n  #     # shell.nix\n  #     let pkgs = import <nixpkgs> {} in\n  #     (import ./.).shellFor {\n  #       packages = p: [p.frontend p.backend p.common];\n  #       withHoogle = true;\n  #       buildInputs = [ pkgs.python pkgs.cabal-install ];\n  #     }\n  #\n  #     -- cabal.project\n  #     packages:\n  #       frontend/\n  #       backend/\n  #       common/\n  #\n  #     bash$ nix-shell --run \"cabal new-build all\"\n  #     bash$ nix-shell --run \"python\"\n  shellFor =\n    {\n      # Packages to create this development shell for.  These are usually\n      # your local packages.\n      packages,\n      # Whether or not to generate a Hoogle database for all the\n      # dependencies.\n      withHoogle ? false,\n      # Whether or not to include benchmark dependencies of your local\n      # packages.  You should set this to true if you have benchmarks defined\n      # in your local packages that you want to be able to run with cabal benchmark\n      doBenchmark ? false,\n      # An optional function that can modify the generic builder arguments\n      # for the fake package that shellFor uses to construct its environment.\n      #\n      # Example:\n      #   let\n      #     # elided...\n      #     haskellPkgs = pkgs.haskell.packages.ghc884.override (hpArgs: {\n      #       overrides = pkgs.lib.composeExtensions (hpArgs.overrides or (_: _: { })) (\n      #         _hfinal: hprev: {\n      #           mkDerivation = args: hprev.mkDerivation ({\n      #             doCheck = false;\n      #             doBenchmark = false;\n      #             doHoogle = true;\n      #             doHaddock = true;\n      #             enableLibraryProfiling = false;\n      #             enableExecutableProfiling = false;\n      #           } // args);\n      #         }\n      #       );\n      #     });\n      #   in\n      #   haskellPkgs.shellFor {\n      #     packages = p: [ p.foo ];\n      #     genericBuilderArgsModifier = args: args // { doCheck = true; doBenchmark = true };\n      #   }\n      #\n      # This will disable tests and benchmarks for everything in \"haskellPkgs\"\n      # (which will invalidate the binary cache), and then re-enable them\n      # for the \"shellFor\" environment (ensuring that any test/benchmark\n      # dependencies for \"foo\" will be available within the nix-shell).\n      genericBuilderArgsModifier ? (args: args),\n\n      # Extra dependencies, in the form of cabal2nix build attributes.\n      #\n      # An example use case is when you have Haskell scripts that use\n      # libraries that don't occur in your packages' dependencies.\n      #\n      # Example:\n      #\n      #   extraDependencies = p: {\n      #     libraryHaskellDepends = [ p.releaser ];\n      #   };\n      extraDependencies ? p: { },\n      ...\n    }@args:\n    let\n      # A list of the packages we want to build a development shell for.\n      # This is a list of Haskell package derivations.\n      selected = packages self;\n\n      # This is a list of attribute sets, where each attribute set\n      # corresponds to the build inputs of one of the packages input to shellFor.\n      #\n      # Each attribute has keys like buildDepends, executableHaskellDepends,\n      # testPkgconfigDepends, etc.  The values for the keys of the attribute\n      # set are lists of dependencies.\n      #\n      # Example:\n      #   cabalDepsForSelected\n      #   => [\n      #        # This may be the attribute set corresponding to the `backend`\n      #        # package in the example above.\n      #        { buildDepends = [ gcc ... ];\n      #          libraryHaskellDepends = [ lens conduit ... ];\n      #          ...\n      #        }\n      #        # This may be the attribute set corresponding to the `common`\n      #        # package in the example above.\n      #        { testHaskellDepends = [ tasty hspec ... ];\n      #          libraryHaskellDepends = [ lens aeson ];\n      #          benchmarkHaskellDepends = [ criterion ... ];\n      #          ...\n      #        }\n      #        ...\n      #      ]\n      cabalDepsForSelected = map (p: p.getCabalDeps) selected;\n\n      # A predicate that takes a derivation as input, and tests whether it is\n      # the same as any of the `selected` packages.\n      #\n      # Returns true if the input derivation is not in the list of `selected`\n      # packages.\n      #\n      # isNotSelected :: Derivation -> Bool\n      #\n      # Example:\n      #\n      #   isNotSelected common [ frontend backend common ]\n      #   => false\n      #\n      #   isNotSelected lens [ frontend backend common ]\n      #   => true\n      isNotSelected = input: pkgs.lib.all (p: input.outPath or null != p.outPath) selected;\n\n      # A function that takes a list of list of derivations, filters out all\n      # the `selected` packages from each list, and concats the results.\n      #\n      #   zipperCombinedPkgs :: [[Derivation]] -> [Derivation]\n      #\n      # Example:\n      #   zipperCombinedPkgs [ [ lens conduit ] [ aeson frontend ] ]\n      #   => [ lens conduit aeson ]\n      #\n      # Note: The reason this isn't just the function `pkgs.lib.concat` is\n      # that we need to be careful to remove dependencies that are in the\n      # `selected` packages.\n      #\n      # For instance, in the above example, if `common` is a dependency of\n      # `backend`, then zipperCombinedPkgs needs to be careful to filter out\n      # `common`, because cabal will end up ignoring that built version,\n      # assuming new-style commands.\n      zipperCombinedPkgs = vals: pkgs.lib.concatMap (drvList: pkgs.lib.filter isNotSelected drvList) vals;\n\n      # Zip `cabalDepsForSelected` into a single attribute list, combining\n      # the derivations in all the individual attributes.\n      #\n      # Example:\n      #   packageInputs\n      #   => # Assuming the value of cabalDepsForSelected is the same as\n      #      # the example in cabalDepsForSelected:\n      #      { buildDepends = [ gcc ... ];\n      #        libraryHaskellDepends = [ lens conduit aeson ... ];\n      #        testHaskellDepends = [ tasty hspec ... ];\n      #        benchmarkHaskellDepends = [ criterion ... ];\n      #        ...\n      #      }\n      #\n      # See the Note in `zipperCombinedPkgs` for what gets filtered out from\n      # each of these dependency lists.\n      packageInputs = pkgs.lib.zipAttrsWith (_name: zipperCombinedPkgs) (\n        cabalDepsForSelected ++ [ (extraDependencies self) ]\n      );\n\n      # A attribute set to pass to `haskellPackages.mkDerivation`.\n      #\n      # The important thing to note here is that all the fields from\n      # packageInputs are set correctly.\n      genericBuilderArgs = {\n        pname = if pkgs.lib.length selected == 1 then (pkgs.lib.head selected).name else \"packages\";\n        version = \"0\";\n        license = null;\n      }\n      // packageInputs\n      // pkgs.lib.optionalAttrs doBenchmark {\n        # `doBenchmark` needs to explicitly be set here because haskellPackages.mkDerivation defaults it to `false`.  If the user wants benchmark dependencies included in their development shell, it has to be explicitly enabled here.\n        doBenchmark = true;\n      };\n\n      # This is a pseudo Haskell package derivation that contains all the\n      # dependencies for the packages in `selected`.\n      #\n      # This is a derivation created with `haskellPackages.mkDerivation`.\n      #\n      # pkgWithCombinedDeps :: HaskellDerivation\n      pkgWithCombinedDeps = self.mkDerivation (genericBuilderArgsModifier genericBuilderArgs);\n\n      # The derivation returned from `envFunc` for `pkgWithCombinedDeps`.\n      #\n      # This is a derivation that can be run with `nix-shell`.  It provides a\n      # GHC with a package database with all the dependencies of our\n      # `selected` packages.\n      #\n      # This is a derivation created with `stdenv.mkDerivation` (not\n      # `haskellPackages.mkDerivation`).\n      #\n      # pkgWithCombinedDepsDevDrv :: Derivation\n      pkgWithCombinedDepsDevDrv = pkgWithCombinedDeps.envFunc { inherit withHoogle; };\n\n      mkDerivationArgs = removeAttrs args [\n        \"genericBuilderArgsModifier\"\n        \"packages\"\n        \"withHoogle\"\n        \"doBenchmark\"\n        \"extraDependencies\"\n      ];\n\n    in\n    pkgWithCombinedDepsDevDrv.overrideAttrs (\n      old:\n      mkDerivationArgs\n      // {\n        nativeBuildInputs = old.nativeBuildInputs ++ mkDerivationArgs.nativeBuildInputs or [ ];\n        buildInputs = old.buildInputs ++ mkDerivationArgs.buildInputs or [ ];\n      }\n    );\n\n  ghc = ghc // {\n    withPackages = self.ghcWithPackages;\n    withHoogle = self.ghcWithHoogle;\n  };\n\n  wrapMhs = pkgs.callPackage ../compilers/microhs/wrapper.nix { };\n\n  /*\n    Run `cabal sdist` on a source.\n\n    Unlike `haskell.lib.sdistTarball`, this does not require any dependencies\n    to be present, as it uses `cabal-install` instead of building `Setup.hs`.\n    This makes `cabalSdist` faster than `sdistTarball`.\n  */\n  cabalSdist =\n    {\n      src,\n      name ? if src ? name then \"${src.name}-sdist.tar.gz\" else \"source.tar.gz\",\n    }:\n    pkgs.runCommandLocal name\n      {\n        inherit src;\n        nativeBuildInputs = [\n          buildHaskellPackages.cabal-install\n        ];\n        dontUnpack = false;\n      }\n      ''\n        unpackPhase\n        cd \"''${sourceRoot:-.}\"\n        patchPhase\n        mkdir out\n        HOME=$PWD cabal sdist --output-directory out\n        mv out/*.tar.gz $out\n      '';\n\n  /*\n    Like `haskell.lib.buildFromSdist`, but using `cabal sdist` instead of\n    building `./Setup`.\n\n    Unlike `haskell.lib.buildFromSdist`, this does not require any dependencies\n    to be present. This makes `buildFromCabalSdist` faster than `haskell.lib.buildFromSdist`.\n  */\n  buildFromCabalSdist =\n    pkg:\n    haskellLib.overrideCabal\n      (_: {\n        # Patches are already applied by srcOnly above, so clear them\n        # to avoid double-application.\n        patches = [ ];\n      })\n      (\n        haskellLib.overrideSrc {\n          src = self.cabalSdist { src = pkgs.srcOnly pkg; };\n          version = pkg.version;\n        } pkg\n      );\n\n  /*\n    Modify a Haskell package to add shell completion scripts for the\n    given executables produced by it. These completion scripts will be\n    picked up automatically if the resulting derivation is installed,\n    e.g. by `nix-env -i`.\n\n    This depends on the `--*-completion` flag `optparse-applicative` provides\n    automatically. Since we need to invoke installed executables, completions\n    are not generated if we are cross-compiling.\n\n     commands: names of the executables built by the derivation\n          pkg: Haskell package that builds the executables\n\n    Example:\n      generateOptparseApplicativeCompletions [ \"exec1\" \"exec2\" ] pkg\n\n     Type: [str] -> drv -> drv\n  */\n  generateOptparseApplicativeCompletions = self.callPackage (\n    { stdenv }:\n\n    commands: pkg:\n\n    if stdenv.buildPlatform.canExecute stdenv.hostPlatform then\n      lib.foldr haskellLib.__generateOptparseApplicativeCompletion pkg commands\n    else\n      pkg\n  ) { };\n\n  /*\n    Modify given Haskell package to force GHC to employ the LLVM\n    codegen backend when compiling. Useful when working around bugs\n    in a native codegen backend GHC defaults to.\n\n    Example:\n      forceLlvmCodegenBackend tls\n\n    Type: drv -> drv\n  */\n  forceLlvmCodegenBackend = overrideCabal (drv: {\n    configureFlags = drv.configureFlags or [ ] ++ [ \"--ghc-option=-fllvm\" ];\n    buildTools =\n      drv.buildTools or [ ]\n      ++ [ self.ghc.llvmPackages.llvm ]\n      # GHC >= 9.10 needs LLVM specific assembler, i.e. clang\n      # On Darwin clang is always required\n      ++ lib.optionals (lib.versionAtLeast self.ghc.version \"9.10\" || stdenv.hostPlatform.isDarwin) [\n        self.ghc.llvmPackages.clang\n      ];\n  });\n}","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/make-package-set.nix","line":4,"column":1},"path":["pkgs","haskell","lib","makePackageSet"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/make-package-set.nix","line":4,"column":1},"path":["pkgs","haskell","lib","makePackageSet"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.markBroken","path":["pkgs","haskell","lib","markBroken"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":191,"column":3},"attr_expr":"markBroken = compose.markBroken;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.markBrokenVersion","path":["pkgs","haskell","lib","markBrokenVersion"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":193,"column":3},"attr_expr":"markBrokenVersion = compose.markBrokenVersion;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":277,"column":5},"lambda_expr":"version: drv:\n    assert drv.version == version;\n    markBroken drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":277,"column":5},"path":["pkgs","haskell","lib","markBrokenVersion"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":277,"column":5},"path":["pkgs","haskell","lib","markBrokenVersion"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.markUnbroken","path":["pkgs","haskell","lib","markUnbroken"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":194,"column":3},"attr_expr":"markUnbroken = compose.markUnbroken;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.haskell.lib.overrideCabal","path":["pkgs","haskell","lib","overrideCabal"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":47,"column":3},"attr_expr":"overrideCabal = drv: f: compose.overrideCabal f drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":47,"column":19},"lambda_expr":"overrideCabal = drv: f: compose.overrideCabal f drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":47,"column":19},"path":["pkgs","haskell","lib","overrideCabal"],"pos_type":"Lambda"}},"content":{"content":"\nThe function overrideCabal lets you alter the arguments to the\nmkDerivation function.\n\nExample:\n\nFirst, note how the aeson package is constructed in hackage-packages.nix:\n\n    \"aeson\" = callPackage ({ mkDerivation, attoparsec, <snip>\n                           }:\n                             mkDerivation {\n                               pname = \"aeson\";\n                               <snip>\n                               homepage = \"https://github.com/bos/aeson\";\n                             })\n\nThe mkDerivation function of haskellPackages will take care of putting\nthe homepage in the right place, in meta.\n\n    > haskellPackages.aeson.meta.homepage\n    \"https://github.com/bos/aeson\"\n\n    > x = haskell.lib.overrideCabal haskellPackages.aeson (old: { homepage = old.homepage + \"#readme\"; })\n    > x.meta.homepage\n    \"https://github.com/bos/aeson#readme\"\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":47,"column":19},"path":["pkgs","haskell","lib","overrideCabal"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.overrideSrc","path":["pkgs","haskell","lib","overrideSrc"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":323,"column":3},"attr_expr":"overrideSrc = drv: src: compose.overrideSrc src drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":323,"column":17},"lambda_expr":"overrideSrc = drv: src: compose.overrideSrc src drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":323,"column":17},"path":["pkgs","haskell","lib","overrideSrc"],"pos_type":"Lambda"}},"content":{"content":"\nOverride the sources for the package and optionally the version.\nThis also takes of removing editedCabalFile.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":323,"column":17},"path":["pkgs","haskell","lib","overrideSrc"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.packageSourceOverrides","path":["pkgs","haskell","lib","packageSourceOverrides"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":53,"column":3},"attr_expr":"packageSourceOverrides = compose.packageSourceOverrides;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":57,"column":5},"lambda_expr":"packageSourceOverrides =\n    overrides: self: super:\n    pkgs.lib.mapAttrs (\n      name: src:\n      let\n        isPath = x: builtins.substring 0 1 (toString x) == \"/\";\n        generateExprs = if isPath src then self.callCabal2nix else self.callHackage;\n      in\n      generateExprs name src { }\n    ) overrides;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":57,"column":5},"path":["pkgs","haskell","lib","packageSourceOverrides"],"pos_type":"Lambda"}},"content":{"content":"the packages named in the input set to the corresponding versions","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":57,"column":5},"path":["pkgs","haskell","lib","packageSourceOverrides"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.packagesFromDirectory","path":["pkgs","haskell","lib","packagesFromDirectory"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":341,"column":3},"attr_expr":"packagesFromDirectory = compose.packagesFromDirectory;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":582,"column":5},"lambda_expr":"packagesFromDirectory =\n    { directory, ... }:\n\n    self: super:\n    let\n      haskellPaths = lib.filter (lib.hasSuffix \".nix\") (builtins.attrNames (builtins.readDir directory));\n\n      toKeyVal = file: {\n        name = builtins.replaceStrings [ \".nix\" ] [ \"\" ] file;\n\n        value = self.callPackage (directory + \"/${file}\") { };\n      };\n\n    in\n    builtins.listToAttrs (map toKeyVal haskellPaths);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":582,"column":5},"path":["pkgs","haskell","lib","packagesFromDirectory"],"pos_type":"Lambda"}},"content":{"content":"packagesFromDirectory : { directory : Directory, ... } -> HaskellPackageOverrideSet","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":582,"column":5},"path":["pkgs","haskell","lib","packagesFromDirectory"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.removeConfigureFlag","path":["pkgs","haskell","lib","removeConfigureFlag"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":168,"column":3},"attr_expr":"removeConfigureFlag = drv: x: compose.removeConfigureFlag x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":168,"column":25},"lambda_expr":"removeConfigureFlag = drv: x: compose.removeConfigureFlag x drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":168,"column":25},"path":["pkgs","haskell","lib","removeConfigureFlag"],"pos_type":"Lambda"}},"content":{"content":"\nremoveConfigureFlag drv x is a Haskell package like drv, but with\nall cabal configure arguments that are equal to x removed.\n\n    > haskell.lib.removeConfigureFlag haskellPackages.servant \"--verbose\"\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":168,"column":25},"path":["pkgs","haskell","lib","removeConfigureFlag"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.sdistTarball","path":["pkgs","haskell","lib","sdistTarball"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":258,"column":3},"attr_expr":"sdistTarball = compose.sdistTarball;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":408,"column":5},"lambda_expr":"sdistTarball =\n    pkg:\n    lib.overrideDerivation pkg (drv: {\n      name = \"${drv.pname}-source-${drv.version}\";\n      # Since we disable the haddock phase, we also need to override the\n      # outputs since the separate doc output will not be produced.\n      outputs = [ \"out\" ];\n      buildPhase = \"./Setup sdist\";\n      haddockPhase = \":\";\n      checkPhase = \":\";\n      installPhase = \"install -D dist/${drv.pname}-*.tar.gz $out/${drv.pname}-${drv.version}.tar.gz\";\n      fixupPhase = \":\";\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":408,"column":5},"path":["pkgs","haskell","lib","sdistTarball"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a source distribution tarball like those found on hackage,\ninstead of building the package.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":408,"column":5},"path":["pkgs","haskell","lib","sdistTarball"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.setBuildTarget","path":["pkgs","haskell","lib","setBuildTarget"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":229,"column":3},"attr_expr":"setBuildTarget = drv: x: compose.setBuildTarget x drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":229,"column":20},"lambda_expr":"drv: x: compose.setBuildTarget x drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":229,"column":20},"path":["pkgs","haskell","lib","setBuildTarget"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":229,"column":20},"path":["pkgs","haskell","lib","setBuildTarget"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.setBuildTargets","path":["pkgs","haskell","lib","setBuildTargets"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":228,"column":3},"attr_expr":"setBuildTargets = drv: xs: compose.setBuildTargets xs drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":228,"column":21},"lambda_expr":"setBuildTargets = drv: xs: compose.setBuildTargets xs drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":228,"column":21},"path":["pkgs","haskell","lib","setBuildTargets"],"pos_type":"Lambda"}},"content":{"content":"\nSet a specific build target instead of compiling all targets in the package.\nFor example, imagine we have a .cabal file with a library, and 2 executables \"dev\" and \"server\".\nWe can build only \"server\" and not wait on the compilation of \"dev\" by using setBuildTarget as follows:\n\n  setBuildTarget (callCabal2nix \"thePackageName\" thePackageSrc {}) \"server\"\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":228,"column":21},"path":["pkgs","haskell","lib","setBuildTargets"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.shellAware","path":["pkgs","haskell","lib","shellAware"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":335,"column":3},"attr_expr":"shellAware = compose.shellAware;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":575,"column":16},"lambda_expr":"shellAware = p: if lib.inNixShell then p.env else p;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":575,"column":16},"path":["pkgs","haskell","lib","shellAware"],"pos_type":"Lambda"}},"content":{"content":"nix-shell evaluation, return a nix-shell optimized environment.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":575,"column":16},"path":["pkgs","haskell","lib","shellAware"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.triggerRebuild","path":["pkgs","haskell","lib","triggerRebuild"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":317,"column":3},"attr_expr":"triggerRebuild = drv: i: compose.triggerRebuild i drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":317,"column":20},"lambda_expr":"triggerRebuild = drv: i: compose.triggerRebuild i drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":317,"column":20},"path":["pkgs","haskell","lib","triggerRebuild"],"pos_type":"Lambda"}},"content":{"content":"\nAdd a dummy command to trigger a build despite an equivalent\nearlier build that is present in the store or cache.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":317,"column":20},"path":["pkgs","haskell","lib","triggerRebuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.haskell.lib.unmarkBroken","path":["pkgs","haskell","lib","unmarkBroken"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/default.nix","line":192,"column":3},"attr_expr":"unmarkBroken = compose.unmarkBroken;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/haskell-modules/lib/compose.nix","line":40,"column":8},"lambda_expr":"drv:\n    (drv.override (\n      args:\n      args\n      // {\n        mkDerivation = drv: (args.mkDerivation drv).override f;\n      }\n    ))\n    // {\n      overrideScope = scope: overrideCabal f (drv.overrideScope scope);\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.add","path":["lib","add"],"aliases":[["builtins","add"],["lib","trivial","add"]],"signature":null,"is_primop":true,"primop_meta":{"name":"add","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":170,"column":9},"attr_expr":"add","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","add"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the sum of the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","add"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.addContextFrom","path":["lib","addContextFrom"],"aliases":[["lib","strings","addContextFrom"]],"signature":"addContextFrom :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":369,"column":9},"attr_expr":"addContextFrom","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1690,"column":20},"lambda_expr":"addContextFrom = src: target: substring 0 0 src + target;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1690,"column":3},"path":["lib","strings","addContextFrom"],"pos_type":"Attribute"}},"content":{"content":"\nAppends string context from string like object `src` to `target`.\n\n:::{.warning}\nThis is an implementation\ndetail of Nix and should be used carefully.\n:::\n\nStrings in Nix carry an invisible `context` which is a list of strings\nrepresenting store paths. If the string is later used in a derivation\nattribute, the derivation will properly populate the inputDrvs and\ninputSrcs.\n\n# Inputs\n\n`src`\n: The string to take the context from. If the argument is not a string,\n  it will be implicitly converted to a string.\n\n`target`\n: The string to append the context to. If the argument is not a string,\n  it will be implicitly converted to a string.\n\n# Type\n\n```\naddContextFrom :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.addContextFrom` usage example\n\n```nix\npkgs = import <nixpkgs> { };\naddContextFrom pkgs.coreutils \"bar\"\n=> \"bar\"\n```\n\nThe context can be displayed using the `toString` function:\n\n```nix\nnix-repl> builtins.getContext (lib.strings.addContextFrom pkgs.coreutils \"bar\")\n{\n  \"/nix/store/m1s1d2dk2dqqlw3j90jl3cjy2cykbdxz-coreutils-9.5.drv\" = { ... };\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1690,"column":3},"path":["lib","strings","addContextFrom"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.addDrvOutputDependencies","path":["lib","addDrvOutputDependencies"],"aliases":[["builtins","addDrvOutputDependencies"],["lib","derivations","addDrvOutputDependencies"]],"signature":null,"is_primop":true,"primop_meta":{"name":"addDrvOutputDependencies","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":426,"column":9},"attr_expr":"addDrvOutputDependencies","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","addDrvOutputDependencies"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a copy of the given string where a single\n[constant](@docroot@/language/string-context.md#string-context-element-constant)\nstring context element is turned into a\n[derivation deep](@docroot@/language/string-context.md#string-context-element-derivation-deep)\nstring context element.\n\nThe store path that is the constant string context element should point to a valid derivation, and end in `.drv`.\n\nThe original string context element must not be empty or have multiple elements, and it must not have any other type of element other than a constant or derivation deep element.\nThe latter is supported so this function is idempotent.\n\nThis is the opposite of [`builtins.unsafeDiscardOutputDependency`](#builtins-unsafeDiscardOutputDependency).\n","source":{"position":null,"path":["lib","addDrvOutputDependencies"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.addErrorContext","path":["lib","addErrorContext"],"aliases":[["builtins","addErrorContext"],["lib","debug","addErrorContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"addErrorContext","args":[],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":562,"column":9},"attr_expr":"addErrorContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","addErrorContext"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":null,"path":["lib","addErrorContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.addMetaAttrs","path":["lib","addMetaAttrs"],"aliases":[["lib","meta","addMetaAttrs"]],"signature":"addMetaAttrs :: AttrSet -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":431,"column":9},"attr_expr":"addMetaAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":58,"column":5},"lambda_expr":"addMetaAttrs =\n    newAttrs: drv:\n    if drv ? overrideAttrs then\n      drv.overrideAttrs (old: {\n        meta = (old.meta or { }) // newAttrs;\n      })\n    else\n      drv // { meta = (drv.meta or { }) // newAttrs; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":57,"column":3},"path":["lib","meta","addMetaAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nAdd to or override the meta attributes of the given\nderivation.\n\n# Inputs\n\n`newAttrs`\n\n: 1\\. Function argument\n\n`drv`\n\n: 2\\. Function argument\n\n# Type\n\n```\naddMetaAttrs :: AttrSet -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.meta.addMetaAttrs` usage example\n\n```nix\naddMetaAttrs {description = \"Bla blah\";} somePkg\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":57,"column":3},"path":["lib","meta","addMetaAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.all","path":["lib","all"],"aliases":[["builtins","all"],["lib","lists","all"]],"signature":"all :: (a -> Bool) -> [a] -> Bool\n","is_primop":true,"primop_meta":{"name":"all","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":278,"column":9},"attr_expr":"all","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":720,"column":3},"path":["lib","lists","all"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if function `pred` returns true for all elements of\n`list`.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\nall :: (a -> Bool) -> [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.all` usage example\n\n```nix\nall (x: x < 3) [ 1 2 ]\n=> true\nall (x: x < 3) [ 1 2 3 ]\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":720,"column":3},"path":["lib","lists","all"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.allUnique","path":["lib","allUnique"],"aliases":[["lib","lists","allUnique"]],"signature":"allUnique :: [a] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":305,"column":9},"attr_expr":"allUnique","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1968,"column":15},"lambda_expr":"allUnique = list: (length (unique list) == length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1968,"column":3},"path":["lib","lists","allUnique"],"pos_type":"Attribute"}},"content":{"content":"\nCheck if list contains only unique elements. O(n^2) complexity.\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\nallUnique :: [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.allUnique` usage example\n\n```nix\nallUnique [ 3 2 3 4 ]\n=> false\nallUnique [ 3 2 4 1 ]\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1968,"column":3},"path":["lib","lists","allUnique"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.and","path":["lib","and"],"aliases":[["lib","trivial","and"]],"signature":"and :: Bool -> Bool -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":132,"column":9},"attr_expr":"and","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":233,"column":9},"lambda_expr":"and = x: y: x && y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":233,"column":3},"path":["lib","trivial","and"],"pos_type":"Attribute"}},"content":{"content":"\nboolean “and”\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nand :: Bool -> Bool -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":233,"column":3},"path":["lib","trivial","and"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.any","path":["lib","any"],"aliases":[["builtins","any"],["lib","lists","any"]],"signature":"any :: (a -> Bool) -> [a] -> Bool\n","is_primop":true,"primop_meta":{"name":"any","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":277,"column":9},"attr_expr":"any","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":685,"column":3},"path":["lib","lists","any"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if function `pred` returns true for at least one\nelement of `list`.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\nany :: (a -> Bool) -> [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.any` usage example\n\n```nix\nany isString [ 1 \"a\" { } ]\n=> true\nany isString [ 1 { } ]\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":685,"column":3},"path":["lib","lists","any"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.appendContext","path":["lib","appendContext"],"aliases":[["builtins","appendContext"],["lib","strings","appendContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"appendContext","args":[],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":396,"column":9},"attr_expr":"appendContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","appendContext"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":null,"path":["lib","appendContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.appendToName","path":["lib","appendToName"],"aliases":[["lib","meta","appendToName"]],"signature":"appendToName :: String -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":435,"column":9},"attr_expr":"appendToName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":156,"column":5},"lambda_expr":"appendToName =\n    suffix:\n    updateName (\n      name:\n      let\n        x = builtins.parseDrvName name;\n      in\n      \"${x.name}-${suffix}-${x.version}\"\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":155,"column":3},"path":["lib","meta","appendToName"],"pos_type":"Attribute"}},"content":{"content":"\nAppend a suffix to the name of a package (before the version\npart).\n\n# Inputs\n\n`suffix`\n\n: 1\\. Function argument\n\n# Type\n\n```\nappendToName :: String -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":155,"column":3},"path":["lib","meta","appendToName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.applyModuleArgsIfFunction","path":["lib","applyModuleArgsIfFunction"],"aliases":[["lib","modules","applyModuleArgsIfFunction"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":478,"column":9},"attr_expr":"applyModuleArgsIfFunction","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":705,"column":5},"lambda_expr":"key: f: args@{ config, ... }: if isFunction f then applyModuleArgs key f args else f","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":705,"column":5},"path":["lib","applyModuleArgsIfFunction"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":705,"column":5},"path":["lib","applyModuleArgsIfFunction"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.assertMsg","path":["lib","assertMsg"],"aliases":[["lib","asserts","assertMsg"]],"signature":"assertMsg :: Bool -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":547,"column":9},"attr_expr":"assertMsg","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":50,"column":15},"lambda_expr":"assertMsg = pred: msg: pred || throw msg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":50,"column":3},"path":["lib","asserts","assertMsg"],"pos_type":"Attribute"}},"content":{"content":"\nThrow if `pred` is false, else return `pred`.\nIntended to be used to augment asserts with helpful error messages.\n\n# Inputs\n\n`pred`\n\n: Predicate that needs to succeed, otherwise `msg` is thrown\n\n`msg`\n\n: Message to throw in case `pred` fails\n\n# Type\n\n```\nassertMsg :: Bool -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.asserts.assertMsg` usage example\n\n```nix\nassertMsg false \"nope\"\nstderr> error: nope\nassert assertMsg (\"foo\" == \"bar\") \"foo is not bar, silly\"; \"\"\nstderr> error: foo is not bar, silly\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":50,"column":3},"path":["lib","asserts","assertMsg"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.assertOneOf","path":["lib","assertOneOf"],"aliases":[["lib","asserts","assertOneOf"]],"signature":"assertOneOf :: String -> ComparableVal -> [ComparableVal] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":548,"column":9},"attr_expr":"assertOneOf","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":92,"column":5},"lambda_expr":"assertOneOf =\n    name: val: xs:\n    assertMsg (lib.elem val xs) \"${name} must be one of ${lib.generators.toPretty { } xs}, but is: ${\n      lib.generators.toPretty { } val\n    }\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":91,"column":3},"path":["lib","asserts","assertOneOf"],"pos_type":"Attribute"}},"content":{"content":"\nSpecialized `assertMsg` for checking if `val` is one of the elements\nof the list `xs`. Useful for checking enums.\n\n# Inputs\n\n`name`\n\n: The name of the variable the user entered `val` into, for inclusion in the error message\n\n`val`\n\n: The value of what the user provided, to be compared against the values in `xs`\n\n`xs`\n\n: The list of valid values\n\n# Type\n\n```\nassertOneOf :: String -> ComparableVal -> [ComparableVal] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.asserts.assertOneOf` usage example\n\n```nix\nlet sslLibrary = \"libressl\";\nin assertOneOf \"sslLibrary\" sslLibrary [ \"openssl\" \"bearssl\" ]\nstderr> error: sslLibrary must be one of [\nstderr>   \"openssl\"\nstderr>   \"bearssl\"\nstderr> ], but is: \"libressl\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":91,"column":3},"path":["lib","asserts","assertOneOf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrByPath","path":["lib","attrByPath"],"aliases":[["lib","attrsets","attrByPath"]],"signature":"attrByPath :: [String] -> Any -> AttrSet -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":201,"column":9},"attr_expr":"attrByPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":88,"column":5},"lambda_expr":"attrByPath =\n    attrPath: default: set:\n    let\n      lenAttrPath = length attrPath;\n      attrByPath' =\n        n: s:\n        (\n          if n == lenAttrPath then\n            s\n          else\n            (\n              let\n                attr = elemAt attrPath n;\n              in\n              if s ? ${attr} then attrByPath' (n + 1) s.${attr} else default\n            )\n        );\n    in\n    attrByPath' 0 set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":87,"column":3},"path":["lib","attrsets","attrByPath"],"pos_type":"Attribute"}},"content":{"content":"\nReturns an attribute from nested attribute sets.\n\nNix has an [attribute selection operator `.`](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:\n\n```nix\n(x.a.b or 6) == attrByPath [\"a\" \"b\"] 6 x\n# and\n(x.${f p}.\"example.com\" or 6) == attrByPath [ (f p) \"example.com\" ] 6 x\n```\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to return from `set`\n\n`default`\n\n: Default value if `attrPath` does not resolve to an existing value\n\n`set`\n\n: The nested attribute set to select values from\n\n# Type\n\n```\nattrByPath :: [String] -> Any -> AttrSet -> Any\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrByPath` usage example\n\n```nix\nx = { a = { b = 3; }; }\n# [\"a\" \"b\"] is equivalent to x.a.b\n# 6 is a default value to return if the path does not exist in attrset\nattrByPath [\"a\" \"b\"] 6 x\n=> 3\nattrByPath [\"z\" \"z\"] 6 x\n=> 6\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":87,"column":3},"path":["lib","attrsets","attrByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrNames","path":["lib","attrNames"],"aliases":[["builtins","attrNames"],["lib","attrsets","attrNames"]],"signature":null,"is_primop":true,"primop_meta":{"name":"attrNames","args":["set"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":206,"column":9},"attr_expr":"attrNames","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrNames"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the names of the attributes in the set *set* in an\nalphabetically sorted list. For instance, `builtins.attrNames { y\n= 1; x = \"foo\"; }` evaluates to `[ \"x\" \"y\" ]`.\n","source":{"position":null,"path":["lib","attrNames"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrVals","path":["lib","attrVals"],"aliases":[["lib","attrsets","attrVals"]],"signature":"attrVals :: [String] -> { [String] :: a } -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":205,"column":9},"attr_expr":"attrVals","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":530,"column":14},"lambda_expr":"attrVals = nameList: set: map (x: set.${x}) nameList;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":530,"column":3},"path":["lib","attrsets","attrVals"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the specified attributes from a set.\n\n# Inputs\n\n`nameList`\n\n: The list of attributes to fetch from `set`. Each attribute name must exist on the attribute set\n\n`set`\n\n: The set to get attribute values from\n\n# Type\n\n```\nattrVals :: [String] -> { [String] :: a } -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrVals` usage example\n\n```nix\nattrVals [\"a\" \"b\" \"c\"] as\n=> [as.a as.b as.c]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":530,"column":3},"path":["lib","attrsets","attrVals"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrValues","path":["lib","attrValues"],"aliases":[["builtins","attrValues"],["lib","attrsets","attrValues"]],"signature":"attrValues :: { [String] :: a } -> [a]\n","is_primop":true,"primop_meta":{"name":"attrValues","args":["set"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":207,"column":9},"attr_expr":"attrValues","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":553,"column":3},"path":["lib","attrsets","attrValues"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the values of all attributes in the given set, sorted by\nattribute name.\n\n# Type\n\n```\nattrValues :: { [String] :: a } -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrValues` usage example\n\n```nix\nattrValues {c = 3; a = 1; b = 2;}\n=> [1 2 3]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":553,"column":3},"path":["lib","attrsets","attrValues"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsToList","path":["lib","attrsToList"],"aliases":[["lib","attrsets","attrsToList"]],"signature":"attrsToList :: { [String] :: a } -> [{ name :: String; value :: a; }]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":219,"column":9},"attr_expr":"attrsToList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":23},"lambda_expr":"attrs: attrValues (mapAttrs f attrs)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1129,"column":3},"path":["lib","attrsets","attrsToList"],"pos_type":"Attribute"}},"content":{"content":"\nDeconstruct an attrset to a list of name-value pairs as expected by [`builtins.listToAttrs`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-listToAttrs).\nEach element of the resulting list is an attribute set with these attributes:\n- `name` (string): The name of the attribute\n- `value` (any): The value of the attribute\n\nThe following is always true:\n```nix\nbuiltins.listToAttrs (attrsToList attrs) == attrs\n```\n\n:::{.warning}\nThe opposite is not always true. In general expect that\n```nix\nattrsToList (builtins.listToAttrs list) != list\n```\n\nThis is because the `listToAttrs` removes duplicate names and doesn't preserve the order of the list.\n:::\n\n# Inputs\n\n`set`\n\n: The attribute set to deconstruct.\n\n# Type\n\n```\nattrsToList :: { [String] :: a } -> [{ name :: String; value :: a; }]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrsToList` usage example\n\n```nix\nattrsToList { foo = 1; bar = \"asdf\"; }\n=> [ { name = \"bar\"; value = \"asdf\"; } { name = \"foo\"; value = 1; } ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1129,"column":3},"path":["lib","attrsets","attrsToList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.baseNameOf","path":["lib","baseNameOf"],"aliases":[["builtins","baseNameOf"],["lib","filesystem","baseNameOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"baseNameOf","args":["x"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":452,"column":9},"attr_expr":"baseNameOf","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","baseNameOf"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the *base name* of either a [path value](@docroot@/language/types.md#type-path) *x* or a string *x*, depending on which type is passed, and according to the following rules.\n\nFor a path value, the *base name* is considered to be the part of the path after the last directory separator, including any file extensions.\nThis is the simple case, as path values don't have trailing slashes.\n\nWhen the argument is a string, a more involved logic applies. If the string ends with a `/`, only this one final slash is removed.\n\nAfter this, the *base name* is returned as previously described, assuming `/` as the directory separator. (Note that evaluation must be platform independent.)\n\nThis is somewhat similar to the [GNU `basename`](https://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html) command, but GNU `basename` strips any number of trailing slashes.\n","source":{"position":null,"path":["lib","baseNameOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.bitAnd","path":["lib","bitAnd"],"aliases":[["builtins","bitAnd"],["lib","trivial","bitAnd"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitAnd","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":136,"column":9},"attr_expr":"bitAnd","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","bitAnd"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the bitwise AND of the integers *e1* and *e2*.\n","source":{"position":null,"path":["lib","bitAnd"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.bitNot","path":["lib","bitNot"],"aliases":[["lib","trivial","bitNot"]],"signature":"bitNot :: Number -> Number\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":139,"column":9},"attr_expr":"bitNot","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":267,"column":3},"path":["lib","trivial","bitNot"],"pos_type":"Attribute"}},"content":{"content":"\nbitwise “not”\n\n# Type\n\n```\nbitNot :: Number -> Number\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":267,"column":3},"path":["lib","trivial","bitNot"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.bitOr","path":["lib","bitOr"],"aliases":[["builtins","bitOr"],["lib","trivial","bitOr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitOr","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":137,"column":9},"attr_expr":"bitOr","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","bitOr"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the bitwise OR of the integers *e1* and *e2*.\n","source":{"position":null,"path":["lib","bitOr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.bitXor","path":["lib","bitXor"],"aliases":[["builtins","bitXor"],["lib","trivial","bitXor"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitXor","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":138,"column":9},"attr_expr":"bitXor","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","bitXor"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the bitwise XOR of the integers *e1* and *e2*.\n","source":{"position":null,"path":["lib","bitXor"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.boolToString","path":["lib","boolToString"],"aliases":[["lib","trivial","boolToString"]],"signature":"boolToString :: Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":140,"column":9},"attr_expr":"boolToString","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":288,"column":18},"lambda_expr":"boolToString = b: if b then \"true\" else \"false\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":288,"column":3},"path":["lib","trivial","boolToString"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a boolean to a string.\n\nThis function uses the strings \"true\" and \"false\" to represent\nboolean values. Calling `toString` on a bool instead returns \"1\"\nand \"\" (sic!).\n\n# Inputs\n\n`b`\n\n: 1\\. Function argument\n\n# Type\n\n```\nboolToString :: Bool -> String\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":288,"column":3},"path":["lib","trivial","boolToString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.boolToYesNo","path":["lib","boolToYesNo"],"aliases":[["lib","trivial","boolToYesNo"]],"signature":"boolToYesNo :: Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":141,"column":9},"attr_expr":"boolToYesNo","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":308,"column":17},"lambda_expr":"boolToYesNo = b: if b then \"yes\" else \"no\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":308,"column":3},"path":["lib","trivial","boolToYesNo"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a boolean to a string.\n\nThis function uses the strings \"yes\" and \"no\" to represent\nboolean values.\n\n# Inputs\n\n`b`\n\n: The boolean to convert\n\n# Type\n\n```\nboolToYesNo :: Bool -> String\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":308,"column":3},"path":["lib","trivial","boolToYesNo"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.callPackageWith","path":["lib","callPackageWith"],"aliases":[["lib","customisation","callPackageWith"]],"signature":"callPackageWith :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":410,"column":9},"attr_expr":"callPackageWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":5},"lambda_expr":"autoArgs: fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":266,"column":3},"path":["lib","customisation","callPackageWith"],"pos_type":"Attribute"}},"content":{"content":"\nCall the package function in the file `fn` with the required\narguments automatically.  The function is called with the\narguments `args`, but any missing arguments are obtained from\n`autoArgs`.  This function is intended to be partially\nparameterised, e.g.,\n\n  ```nix\n  callPackage = callPackageWith pkgs;\n  pkgs = {\n    libfoo = callPackage ./foo.nix { };\n    libbar = callPackage ./bar.nix { };\n  };\n  ```\n\nIf the `libbar` function expects an argument named `libfoo`, it is\nautomatically passed as an argument.  Overrides or missing\narguments can be supplied in `args`, e.g.\n\n  ```nix\n  libbar = callPackage ./bar.nix {\n    libfoo = null;\n    enableX11 = true;\n  };\n  ```\n\n<!-- TODO: Apply \"Example:\" tag to the examples above -->\n\n# Inputs\n\n`autoArgs`\n\n: 1\\. Function argument\n\n`fn`\n\n: 2\\. Function argument\n\n`args`\n\n: 3\\. Function argument\n\n# Type\n\n```\ncallPackageWith :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":266,"column":3},"path":["lib","customisation","callPackageWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.callPackagesWith","path":["lib","callPackagesWith"],"aliases":[["lib","customisation","callPackagesWith"]],"signature":"callPackagesWith :: AttrSet -> ((AttrSet -> AttrSet) | Path) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":411,"column":9},"attr_expr":"callPackagesWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":357,"column":5},"lambda_expr":"callPackagesWith =\n    autoArgs: fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      auto = intersectAttrs (functionArgs f) autoArgs;\n      mirrorArgs = mirrorFunctionArgs f;\n      origArgs = auto // args;\n      pkgs = f origArgs;\n      mkAttrOverridable = name: _: makeOverridable (mirrorArgs (newArgs: (f newArgs).${name})) origArgs;\n    in\n    if isDerivation pkgs then\n      throw (\n        \"function `callPackages` was called on a *single* derivation \"\n        + ''\"${pkgs.name or \"<unknown-name>\"}\";''\n        + \" did you mean to use `callPackage` instead?\"\n      )\n    else\n      mapAttrs mkAttrOverridable pkgs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":356,"column":3},"path":["lib","customisation","callPackagesWith"],"pos_type":"Attribute"}},"content":{"content":"\nLike `callPackage`, but for a function that returns an attribute\nset of derivations. The override function is added to the\nindividual attributes.\n\n# Inputs\n\n`autoArgs`\n\n: 1\\. Function argument\n\n`fn`\n\n: 2\\. Function argument\n\n`args`\n\n: 3\\. Function argument\n\n# Type\n\n```\ncallPackagesWith :: AttrSet -> ((AttrSet -> AttrSet) | Path) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":356,"column":3},"path":["lib","customisation","callPackagesWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.canCleanSource","path":["lib","canCleanSource"],"aliases":[["lib","sources","canCleanSource"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":468,"column":9},"attr_expr":"canCleanSource","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":385,"column":20},"lambda_expr":"src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":385,"column":20},"path":["lib","canCleanSource"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":385,"column":20},"path":["lib","canCleanSource"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.cartesianProduct","path":["lib","cartesianProduct"],"aliases":[["lib","attrsets","cartesianProduct"]],"signature":"cartesianProduct :: { [String] :: [a] } -> [{ [String] :: a }]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":250,"column":9},"attr_expr":"cartesianProduct","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":911,"column":5},"lambda_expr":"cartesianProduct =\n    attrsOfLists:\n    foldl' (\n      listOfAttrs: attrName:\n      concatMap (\n        attrs: map (listValue: attrs // { ${attrName} = listValue; }) attrsOfLists.${attrName}\n      ) listOfAttrs\n    ) [ { } ] (attrNames attrsOfLists);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":910,"column":3},"path":["lib","attrsets","cartesianProduct"],"pos_type":"Attribute"}},"content":{"content":"\nReturn the cartesian product of attribute set value combinations.\n\n# Inputs\n\n`attrsOfLists`\n\n: Attribute set with attributes that are lists of values\n\n# Type\n\n```\ncartesianProduct :: { [String] :: [a] } -> [{ [String] :: a }]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.cartesianProduct` usage example\n\n```nix\ncartesianProduct { a = [ 1 2 ]; b = [ 10 20 ]; }\n=> [\n     { a = 1; b = 10; }\n     { a = 1; b = 20; }\n     { a = 2; b = 10; }\n     { a = 2; b = 20; }\n   ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":910,"column":3},"path":["lib","attrsets","cartesianProduct"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.catAttrs","path":["lib","catAttrs"],"aliases":[["builtins","catAttrs"],["lib","attrsets","catAttrs"]],"signature":"catAttrs :: String -> [{ [String] :: a }] -> [a]\n","is_primop":true,"primop_meta":{"name":"catAttrs","args":["attr","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":209,"column":9},"attr_expr":"catAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":619,"column":3},"path":["lib","attrsets","catAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nCollect each attribute named `attr` from a list of attribute\nsets.  Sets that don't contain the named attribute are ignored.\n\n# Inputs\n\n`attr`\n\n: The attribute name to get out of the sets.\n\n`list`\n\n: The list of attribute sets to go through\n\n# Type\n\n```\ncatAttrs :: String -> [{ [String] :: a }] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.catAttrs` usage example\n\n```nix\ncatAttrs \"a\" [{a = 1;} {b = 0;} {a = 2;}]\n=> [1 2]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":619,"column":3},"path":["lib","attrsets","catAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.ceil","path":["lib","ceil"],"aliases":[["builtins","ceil"],["lib","trivial","ceil"]],"signature":null,"is_primop":true,"primop_meta":{"name":"ceil","args":["number"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":186,"column":9},"attr_expr":"ceil","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","ceil"],"pos_type":"Lambda"}},"content":{"content":"\nRounds and converts *number* to the next higher NixInt value if possible, i.e. `ceil *number* >= *number*` and\n`ceil *number* - *number* < 1`.\n\nAn evaluation error is thrown, if there exists no such NixInt value `ceil *number*`.\nDue to bugs in previous Nix versions an evaluation error might be thrown, if the datatype of *number* is\na NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.\n\nIf the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat\n(IEEE-754 double-precision floating-point number), an evaluation error is thrown.\n","source":{"position":null,"path":["lib","ceil"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.checkFlag","path":["lib","checkFlag"],"aliases":[["lib","misc","checkFlag"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":575,"column":9},"attr_expr":"checkFlag","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":85,"column":5},"lambda_expr":"checkFlag =\n    attrSet: name:\n    if name == \"true\" then\n      true\n    else if name == \"false\" then\n      false\n    else if (elem name (attrByPath [ \"flags\" ] [ ] attrSet)) then\n      true\n    else\n      attrByPath [ name ] false attrSet;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":85,"column":5},"path":["lib","checkFlag"],"pos_type":"Lambda"}},"content":{"content":"Returns true only if there is an attribute and it is true.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":85,"column":5},"path":["lib","checkFlag"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.checkListOfEnum","path":["lib","checkListOfEnum"],"aliases":[["lib","trivial","checkListOfEnum"]],"signature":"checkListOfEnum :: String -> [a] -> [a] -> ((b -> b) | Never)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":157,"column":9},"attr_expr":"checkListOfEnum","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1042,"column":5},"lambda_expr":"checkListOfEnum =\n    msg: valid: given:\n    let\n      unexpected = lib.subtractLists valid given;\n    in\n    lib.throwIfNot (unexpected == [ ])\n      \"${msg}: ${builtins.concatStringsSep \", \" (map toString unexpected)} unexpected; valid ones: ${builtins.concatStringsSep \", \" (map toString valid)}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1041,"column":3},"path":["lib","trivial","checkListOfEnum"],"pos_type":"Attribute"}},"content":{"content":"\nCheck if the elements in a list are valid values from a enum, returning the identity function, or throwing an error message otherwise.\n\n# Inputs\n\n`msg`\n\n: 1\\. Function argument\n\n`valid`\n\n: 2\\. Function argument\n\n`given`\n\n: 3\\. Function argument\n\n# Type\n\n```\ncheckListOfEnum :: String -> [a] -> [a] -> ((b -> b) | Never)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.checkListOfEnum` usage example\n\n```nix\nlet colorVariants = [\"bright\" \"dark\" \"black\"]\nin checkListOfEnum \"color variants\" [ \"standard\" \"light\" \"dark\" ] colorVariants;\n=>\nerror: color variants: bright, black unexpected; valid ones: standard, light, dark\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1041,"column":3},"path":["lib","trivial","checkListOfEnum"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.checkReqs","path":["lib","checkReqs"],"aliases":[["lib","misc","checkReqs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":577,"column":9},"attr_expr":"checkReqs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":114,"column":5},"lambda_expr":"checkReqs =\n    attrSet: argList: condList:\n    (foldr and true (\n      map (\n        x:\n        let\n          name = (head x);\n        in\n\n        (\n          (checkFlag attrSet name)\n          -> (foldr and true (\n            map (\n              y:\n              let\n                val = (getValue attrSet argList y);\n              in\n              (val != null) && (val != false)\n            ) (tail x)\n          ))\n        )\n      ) condList\n    ));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":114,"column":5},"path":["lib","checkReqs"],"pos_type":"Lambda"}},"content":{"content":"Output : are reqs satisfied? It's asserted.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":114,"column":5},"path":["lib","checkReqs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.chooseDevOutputs","path":["lib","chooseDevOutputs"],"aliases":[["lib","attrsets","chooseDevOutputs"]],"signature":"chooseDevOutputs :: [Derivation] -> [Derivation]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":247,"column":9},"attr_expr":"chooseDevOutputs","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2163,"column":3},"path":["lib","attrsets","chooseDevOutputs"],"pos_type":"Attribute"}},"content":{"content":"\nPick the outputs of packages to place in `buildInputs`\n\n# Inputs\n\n`pkgs`\n\n: List of packages.\n\n# Type\n\n```\nchooseDevOutputs :: [Derivation] -> [Derivation]\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2163,"column":3},"path":["lib","attrsets","chooseDevOutputs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cleanSource","path":["lib","cleanSource"],"aliases":[["lib","sources","cleanSource"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":462,"column":9},"attr_expr":"cleanSource","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":101,"column":5},"lambda_expr":"cleanSource =\n    src:\n    cleanSourceWith {\n      filter = cleanSourceFilter;\n      inherit src;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":101,"column":5},"path":["lib","cleanSource"],"pos_type":"Lambda"}},"content":{"content":"\nFilters a source tree removing version control files and directories using `cleanSourceFilter`.\n\n# Inputs\n\n`src`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `cleanSource` usage example\n\n```nix\ncleanSource ./.\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":101,"column":5},"path":["lib","cleanSource"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.cleanSourceFilter","path":["lib","cleanSourceFilter"],"aliases":[["lib","sources","cleanSourceFilter"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":461,"column":9},"attr_expr":"cleanSourceFilter","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":44,"column":5},"lambda_expr":"cleanSourceFilter =\n    name: type:\n    let\n      baseName = baseNameOf (toString name);\n    in\n    !(\n      # Filter out version control software files/directories\n      (\n        baseName == \".git\"\n        ||\n          type == \"directory\"\n          && (\n            baseName == \".svn\"\n            || baseName == \"CVS\"\n            || baseName == \".hg\"\n            || baseName == \".jj\"\n            || baseName == \".pijul\"\n            || baseName == \"_darcs\"\n          )\n      )\n      ||\n        # Filter out editor backup / swap files.\n        lib.hasSuffix \"~\" baseName\n      || match \"^\\\\.sw[a-z]$\" baseName != null\n      || match \"^\\\\..*\\\\.sw[a-z]$\" baseName != null\n      ||\n\n        # Filter out generates files.\n        lib.hasSuffix \".o\" baseName\n      || lib.hasSuffix \".so\" baseName\n      ||\n        # Filter out nix-build result symlinks\n        (type == \"symlink\" && lib.hasPrefix \"result\" baseName)\n      ||\n        # Filter out sockets and other types of files we can't have in the store.\n        (type == \"unknown\")\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":44,"column":5},"path":["lib","cleanSourceFilter"],"pos_type":"Lambda"}},"content":{"content":"\nA basic filter for `cleanSourceWith` that removes\ndirectories of version control system, backup files (`*~`)\nand some generated files.\n\n# Inputs\n\n`name`\n\n: 1\\. Function argument\n\n`type`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":44,"column":5},"path":["lib","cleanSourceFilter"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.cleanSourceWith","path":["lib","cleanSourceWith"],"aliases":[["lib","sources","cleanSourceWith"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":466,"column":9},"attr_expr":"cleanSourceWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":133,"column":5},"lambda_expr":"cleanSourceWith =\n    {\n      # A path or cleanSourceWith result to filter and/or rename.\n      src,\n      # Optional with default value: constant true (include everything)\n      # The function will be combined with the && operator such\n      # that src.filter is called lazily.\n      # For implementing a filter, see\n      # https://nixos.org/nix/manual/#builtin-filterSource\n      # Type: A function (Path -> Type -> Bool)\n      filter ? _path: _type: true,\n      # Optional name to use as part of the store path.\n      # This defaults to `src.name` or otherwise `\"source\"`.\n      name ? null,\n    }:\n    let\n      orig = toSourceAttributes src;\n    in\n    fromSourceAttributes {\n      inherit (orig) origSrc;\n      filter = path: type: filter path type && orig.filter path type;\n      name = if name != null then name else orig.name;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":133,"column":5},"path":["lib","cleanSourceWith"],"pos_type":"Lambda"}},"content":{"content":"\nLike `builtins.filterSource`, except it will compose with itself,\nallowing you to chain multiple calls together without any\nintermediate copies being put in the nix store.\n\n# Examples\n:::{.example}\n## `cleanSourceWith` usage example\n\n```nix\nlib.cleanSourceWith {\n  filter = f;\n  src = lib.cleanSourceWith {\n    filter = g;\n    src = ./.;\n  };\n}\n# Succeeds!\n\nbuiltins.filterSource f (builtins.filterSource g ./.)\n# Fails!\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":133,"column":5},"path":["lib","cleanSourceWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.closePropagation","path":["lib","closePropagation"],"aliases":[["lib","misc","closePropagation"],["lib","misc","closePropagationFast"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":585,"column":9},"attr_expr":"closePropagation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"lambda_expr":"closePropagationFast =\n    list:\n    map (x: x.val) (\n      builtins.genericClosure {\n        startSet = map (x: {\n          key = x.outPath;\n          val = x;\n        }) (builtins.filter (x: x != null) list);\n        operator =\n          item:\n          if !builtins.isAttrs item.val then\n            [ ]\n          else\n            builtins.concatMap (\n              x:\n              if x != null then\n                [\n                  {\n                    key = x.outPath;\n                    val = x;\n                  }\n                ]\n              else\n                [ ]\n            ) ((item.val.propagatedBuildInputs or [ ]) ++ (item.val.propagatedNativeBuildInputs or [ ]));\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"path":["lib","closePropagation"],"pos_type":"Lambda"}},"content":{"content":"See https://github.com/NixOS/nixpkgs/pull/194391 for details.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"path":["lib","closePropagation"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.cmakeBool","path":["lib","cmakeBool"],"aliases":[["lib","strings","cmakeBool"]],"signature":"cmakeBool :: String -> Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":381,"column":9},"attr_expr":"cmakeBool","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2188,"column":5},"lambda_expr":"cmakeBool =\n    condition: flag:\n    assert (lib.isString condition);\n    assert (lib.isBool flag);\n    cmakeOptionType \"bool\" condition (lib.toUpper (lib.boolToString flag));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2187,"column":3},"path":["lib","strings","cmakeBool"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<condition>={TRUE,FALSE}\"` string that can be passed to typical\nCMake invocations.\n\n# Inputs\n\n`condition`\n: The condition to be made true or false\n\n`flag`\n: The controlling flag of the condition\n\n# Type\n\n```\ncmakeBool :: String -> Bool -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.cmakeBool` usage example\n\n```nix\ncmakeBool \"ENABLE_STATIC_LIBS\" false\n=> \"-DENABLESTATIC_LIBS:BOOL=FALSE\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2187,"column":3},"path":["lib","strings","cmakeBool"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cmakeFeature","path":["lib","cmakeFeature"],"aliases":[["lib","strings","cmakeFeature"]],"signature":"cmakeFeature :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":382,"column":9},"attr_expr":"cmakeFeature","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2224,"column":5},"lambda_expr":"cmakeFeature =\n    feature: value:\n    assert (lib.isString feature);\n    assert (lib.isString value);\n    cmakeOptionType \"string\" feature value;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2223,"column":3},"path":["lib","strings","cmakeFeature"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>:STRING=<value>\"` string that can be passed to typical\nCMake invocations.\nThis is the most typical usage, so it deserves a special case.\n\n# Inputs\n\n`feature`\n: The feature to be set\n\n`value`\n: The desired value\n\n# Type\n\n```\ncmakeFeature :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.cmakeFeature` usage example\n\n```nix\ncmakeFeature \"MODULES\" \"badblock\"\n=> \"-DMODULES:STRING=badblock\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2223,"column":3},"path":["lib","strings","cmakeFeature"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cmakeOptionType","path":["lib","cmakeOptionType"],"aliases":[["lib","strings","cmakeOptionType"]],"signature":"cmakeOptionType :: String -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":380,"column":9},"attr_expr":"cmakeOptionType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2152,"column":5},"lambda_expr":"type: feature: value:\n    assert (elem (toUpper type) types);\n    assert (isString feature);\n    assert (isString value);\n    \"-D${feature}:${toUpper type}=${value}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2141,"column":3},"path":["lib","strings","cmakeOptionType"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>:<type>=<value>\"` string that can be passed to typical\nCMake invocations.\n\n# Inputs\n\n`type`\n: The type of the feature to be set, as described in\n  [the CMake set documentation](https://cmake.org/cmake/help/latest/command/set.html)\n  the possible values (case insensitive) are:\n  BOOL FILEPATH PATH STRING INTERNAL LIST\n\n`feature`\n: The feature to be set\n\n`feature`\n: The feature to be set\n\n`value`\n: The desired value\n\n# Type\n\n```\ncmakeOptionType :: String -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.cmakeOptionType` usage example\n\n```nix\ncmakeOptionType \"string\" \"ENGINE\" \"sdl2\"\n=> \"-DENGINE:STRING=sdl2\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2141,"column":3},"path":["lib","strings","cmakeOptionType"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.collect","path":["lib","collect"],"aliases":[["lib","attrsets","collect"]],"signature":"collect :: (AttrSet -> Bool) -> AttrSet -> [Any]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":214,"column":9},"attr_expr":"collect","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":871,"column":5},"lambda_expr":"collect =\n    pred: attrs:\n    if pred attrs then\n      [ attrs ]\n    else if isAttrs attrs then\n      concatMap (collect pred) (attrValues attrs)\n    else\n      [ ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":870,"column":3},"path":["lib","attrsets","collect"],"pos_type":"Attribute"}},"content":{"content":"\nRecursively collect sets that verify a given predicate named `pred`\nfrom the set `attrs`. The recursion is stopped when the predicate is\nverified.\n\n# Inputs\n\n`pred`\n\n: Given an attribute's value, determine if recursion should stop.\n\n`attrs`\n\n: The attribute set to recursively collect.\n\n# Type\n\n```\ncollect :: (AttrSet -> Bool) -> AttrSet -> [Any]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.collect` usage example\n\n```nix\ncollect isList { a = { b = [\"b\"]; }; c = [1]; }\n=> [[\"b\"] [1]]\n\ncollect (x: x ? outPath)\n   { a = { outPath = \"a/\"; }; b = { outPath = \"b/\"; }; }\n=> [{ outPath = \"a/\"; } { outPath = \"b/\"; }]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":870,"column":3},"path":["lib","attrsets","collect"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.commitIdFromGitRepo","path":["lib","commitIdFromGitRepo"],"aliases":[["lib","sources","commitIdFromGitRepo"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":465,"column":9},"attr_expr":"commitIdFromGitRepo","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":301,"column":5},"lambda_expr":"commitIdFromGitRepo =\n    path:\n    let\n      commitIdOrError = _commitIdFromGitRepoOrError path;\n    in\n    commitIdOrError.value or (throw commitIdOrError.error);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":301,"column":5},"path":["lib","commitIdFromGitRepo"],"pos_type":"Lambda"}},"content":{"content":"\nGet the commit id of a git repo.\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `commitIdFromGitRepo` usage example\n\n```nix\ncommitIdFromGitRepo <nixpkgs/.git>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":301,"column":5},"path":["lib","commitIdFromGitRepo"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.compare","path":["lib","compare"],"aliases":[["lib","trivial","compare"]],"signature":"compare :: a -> a -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":165,"column":9},"attr_expr":"compare","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":678,"column":5},"lambda_expr":"compare =\n    a: b:\n    if a < b then\n      -1\n    else if a > b then\n      1\n    else\n      0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":677,"column":3},"path":["lib","trivial","compare"],"pos_type":"Attribute"}},"content":{"content":"\nC-style comparisons\n\na < b,  compare a b => -1\na == b, compare a b => 0\na > b,  compare a b => 1\n\n# Inputs\n\n`a`\n\n: 1\\. Function argument\n\n`b`\n\n: 2\\. Function argument\n\n# Type\n\n```\ncompare :: a -> a -> Int\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":677,"column":3},"path":["lib","trivial","compare"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.compareLists","path":["lib","compareLists"],"aliases":[["lib","lists","compareLists"]],"signature":"compareLists :: (a -> a -> Int) -> [a] -> [a] -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":294,"column":9},"attr_expr":"compareLists","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1421,"column":5},"lambda_expr":"compareLists =\n    cmp: a: b:\n    if a == [ ] then\n      if b == [ ] then 0 else -1\n    else if b == [ ] then\n      1\n    else\n      let\n        rel = cmp (head a) (head b);\n      in\n      if rel == 0 then compareLists cmp (tail a) (tail b) else rel;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1420,"column":3},"path":["lib","lists","compareLists"],"pos_type":"Attribute"}},"content":{"content":"\nCompare two lists element-by-element with a comparison function `cmp`.\n\nList elements are compared pairwise in order by the provided comparison function `cmp`,\nthe first non-equal pair of elements determines the result.\n\n:::{.note}\nThe `<` operator can also be used to compare lists using a boolean condition. (e.g. `[1 2] < [1 3]` is `true`).\nSee also [language operators](https://nix.dev/manual/nix/stable/language/operators#comparison) for more information.\n:::\n\n# Inputs\n\n`cmp`\n\n: The comparison function `a: b: ...` must return:\n  - `0` if `a` and `b` are equal\n  - `1` if `a` is greater than `b`\n  - `-1` if `a` is less than `b`\n\n  See [lib.compare](#function-library-lib.trivial.compare) for a an example implementation.\n\n`a`\n\n: The first list\n\n`b`\n\n: The second list\n\n# Type\n\n```\ncompareLists :: (a -> a -> Int) -> [a] -> [a] -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.lists.compareLists` usage examples\n\n```nix\ncompareLists lib.compare [] []\n=> 0\ncompareLists lib.compare [] [ \"a\" ]\n=> -1\ncompareLists lib.compare [ \"a\" ] []\n=> 1\ncompareLists lib.compare [ \"a\" \"b\" ] [ \"a\" \"c\" ]\n=> -1\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1420,"column":3},"path":["lib","lists","compareLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.compareVersions","path":["lib","compareVersions"],"aliases":[["builtins","compareVersions"],["lib","strings","compareVersions"],["lib","versions","compareVersions"]],"signature":null,"is_primop":true,"primop_meta":{"name":"compareVersions","args":["s1","s2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":603,"column":9},"attr_expr":"compareVersions","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","compareVersions"],"pos_type":"Lambda"}},"content":{"content":"\nCompare two strings representing versions and return `-1` if\nversion *s1* is older than version *s2*, `0` if they are the same,\nand `1` if *s1* is newer than *s2*. The version comparison\nalgorithm is the same as the one used by [`nix-env\n-u`](../command-ref/nix-env.md#operation---upgrade).\n","source":{"position":null,"path":["lib","compareVersions"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.composeExtensions","path":["lib","composeExtensions"],"aliases":[["lib","fixedPoints","composeExtensions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":194,"column":9},"attr_expr":"composeExtensions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":341,"column":5},"lambda_expr":"composeExtensions =\n    f: g: final: prev:\n    let\n      fApplied = f final prev;\n      prev' = prev // fApplied;\n    in\n    fApplied // g final prev';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":340,"column":3},"path":["lib","fixedPoints","composeExtensions"],"pos_type":"Attribute"}},"content":{"content":"\nCompose two overlay functions and return a single overlay function that combines them.\nFor more details see: [`composeManyExtensions`](#function-library-lib.fixedPoints.composeManyExtensions).\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":340,"column":3},"path":["lib","fixedPoints","composeExtensions"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.composeManyExtensions","path":["lib","composeManyExtensions"],"aliases":[["lib","fixedPoints","composeManyExtensions"]],"signature":"# Pseudo code\nlet\n  #               final      prev\n  #                 ↓          ↓\n  OverlayFn = { ... } -> { ... } -> { ... };\nin\ncomposeManyExtensions :: [OverlayFn] -> OverlayFn\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":195,"column":9},"attr_expr":"composeManyExtensions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":138,"column":14},"lambda_expr":"list:\n    let\n      len = length list;\n      fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));\n    in\n    fold' 0","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":412,"column":3},"path":["lib","fixedPoints","composeManyExtensions"],"pos_type":"Attribute"}},"content":{"content":"\nComposes a list of [`overlays`](#chap-overlays) and returns a single overlay function that combines them.\n\n:::{.note}\nThe result is produced by using the update operator `//`.\nThis means nested values of previous overlays are not merged recursively.\nIn other words, previously defined attributes are replaced, ignoring the previous value, unless referenced by the overlay; for example `final: prev: { foo = final.foo + 1; }`.\n:::\n\n# Inputs\n\n`extensions`\n\n: A list of overlay functions\n  :::{.note}\n  The order of the overlays in the list is important.\n  :::\n\n: Each overlay function takes two arguments, by convention `final` and `prev`, and returns an attribute set.\n  - `final` is the result of the fixed-point function, with all overlays applied.\n  - `prev` is the result of the previous overlay function(s).\n\n# Type\n\n```\n# Pseudo code\nlet\n  #               final      prev\n  #                 ↓          ↓\n  OverlayFn = { ... } -> { ... } -> { ... };\nin\ncomposeManyExtensions :: [OverlayFn] -> OverlayFn\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.composeManyExtensions` usage example\n\n```nix\nlet\n  # The \"original function\" that is extended by the overlays.\n  # Note that it doesn't have prev: as argument since no overlay function precedes it.\n  original = final: { a = 1; };\n\n  # Each overlay function has 'final' and 'prev' as arguments.\n  overlayA = final: prev: { b = final.c; c = 3; };\n  overlayB = final: prev: { c = 10; x = prev.c or 5; };\n\n  extensions = composeManyExtensions [ overlayA overlayB ];\n\n  # Calculate the fixed point of all composed overlays.\n  fixedpoint = lib.fix (lib.extends extensions original );\n\nin fixedpoint\n=>\n{\n  a = 1;\n  b = 10;\n  c = 10;\n  x = 3;\n}\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":412,"column":3},"path":["lib","fixedPoints","composeManyExtensions"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concat","path":["lib","concat"],"aliases":[["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":130,"column":9},"attr_expr":"concat","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatAttrValues","path":["lib","concatAttrValues"],"aliases":[["lib","lists","concatAttrValues"]],"signature":"concatAttrValues :: { [String] :: [a] } -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":319,"column":9},"attr_expr":"concatAttrValues","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2087,"column":22},"lambda_expr":"concatAttrValues = set: concatLists (attrValues set);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2087,"column":3},"path":["lib","lists","concatAttrValues"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate all attributes of an attribute set.\nThis assumes that every attribute of the set is a list.\n\n# Inputs\n\n`set`\n\n: Attribute set with attributes that are lists\n\n# Type\n\n```\nconcatAttrValues :: { [String] :: [a] } -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.concatAttrValues` usage example\n\n```nix\nconcatAttrValues { a = [ 1 2 ]; b = [ 3 ]; }\n=> [ 1 2 3 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2087,"column":3},"path":["lib","lists","concatAttrValues"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatImapStrings","path":["lib","concatImapStrings"],"aliases":[["lib","strings","concatImapStrings"]],"signature":"concatImapStrings :: (Int -> a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":325,"column":9},"attr_expr":"concatImapStrings","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":156,"column":23},"lambda_expr":"concatImapStrings = f: list: concatStrings (lib.imap1 f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":156,"column":3},"path":["lib","strings","concatImapStrings"],"pos_type":"Attribute"}},"content":{"content":"\nLike `concatMapStrings` except that the function `f` also gets the\nposition as a parameter.\n\n# Inputs\n\n`f`\n: 1\\. Function argument\n\n`list`\n: 2\\. Function argument\n\n# Type\n\n```\nconcatImapStrings :: (Int -> a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatImapStrings` usage example\n\n```nix\nconcatImapStrings (pos: x: \"${toString pos}-${x}\") [\"foo\" \"bar\"]\n=> \"1-foo2-bar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":156,"column":3},"path":["lib","strings","concatImapStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatImapStringsSep","path":["lib","concatImapStringsSep"],"aliases":[["lib","strings","concatImapStringsSep"]],"signature":"concatIMapStringsSep :: String -> (Int -> a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":335,"column":9},"attr_expr":"concatImapStringsSep","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":298,"column":5},"lambda_expr":"concatImapStringsSep =\n    sep: f: list:\n    concatStringsSep sep (lib.imap1 f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":297,"column":3},"path":["lib","strings","concatImapStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nSame as `concatMapStringsSep`, but the mapping function\nadditionally receives the position of its argument.\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`f`\n: Function that receives elements and their positions\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatIMapStringsSep :: String -> (Int -> a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatImapStringsSep` usage example\n\n```nix\nconcatImapStringsSep \"-\" (pos: x: toString (x / pos)) [ 6 6 6 ]\n=> \"6-3-2\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":297,"column":3},"path":["lib","strings","concatImapStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatLines","path":["lib","concatLines"],"aliases":[["lib","strings","concatLines"]],"signature":"concatLines :: [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":336,"column":9},"attr_expr":"concatLines","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":363,"column":17},"lambda_expr":"concatLines = lines: optionalString (lines != [ ]) (concatStringsSep \"\\n\" lines + \"\\n\");","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":363,"column":3},"path":["lib","strings","concatLines"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings, adding a newline at the end of each one.\n\n# Inputs\n\n`list`\n: List of strings. Any element that is not a string will be implicitly converted to a string.\n\n# Type\n\n```\nconcatLines :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatLines` usage example\n\n```nix\nconcatLines [ \"foo\" \"bar\" ]\n=> \"foo\\nbar\\n\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":363,"column":3},"path":["lib","strings","concatLines"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatLists","path":["lib","concatLists"],"aliases":[["builtins","concatLists"],["lib","lists","concatLists"]],"signature":null,"is_primop":true,"primop_meta":{"name":"concatLists","args":["lists"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":311,"column":9},"attr_expr":"concatLists","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","concatLists"],"pos_type":"Lambda"}},"content":{"content":"\nConcatenate a list of lists into a single list.\n","source":{"position":null,"path":["lib","concatLists"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.concatMap","path":["lib","concatMap"],"aliases":[["builtins","concatMap"],["lib","lists","concatMap"]],"signature":"concatMap :: (a -> [b]) -> [a] -> [b]\n","is_primop":true,"primop_meta":{"name":"concatMap","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":272,"column":9},"attr_expr":"concatMap","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":414,"column":3},"path":["lib","lists","concatMap"],"pos_type":"Attribute"}},"content":{"content":"\nMap and concatenate the result.\n\n# Type\n\n```\nconcatMap :: (a -> [b]) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.concatMap` usage example\n\n```nix\nconcatMap (x: [x] ++ [\"z\"]) [\"a\" \"b\"]\n=> [ \"a\" \"z\" \"b\" \"z\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":414,"column":3},"path":["lib","lists","concatMap"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatMapAttrs","path":["lib","concatMapAttrs"],"aliases":[["lib","attrsets","concatMapAttrs"]],"signature":"concatMapAttrs :: (String -> Any -> AttrSet) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":220,"column":9},"attr_expr":"concatMapAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":373,"column":20},"lambda_expr":"concatMapAttrs = f: v: foldl' mergeAttrs { } (attrValues (mapAttrs f v));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":373,"column":3},"path":["lib","attrsets","concatMapAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMap each attribute in the given set and merge them into a new attribute set.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`v`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcatMapAttrs :: (String -> Any -> AttrSet) -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.concatMapAttrs` usage example\n\n```nix\nconcatMapAttrs\n  (name: value: {\n    ${name} = value;\n    ${name + value} = value;\n  })\n  { x = \"a\"; y = \"b\"; }\n=> { x = \"a\"; xa = \"a\"; y = \"b\"; yb = \"b\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":373,"column":3},"path":["lib","attrsets","concatMapAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatMapAttrsStringSep","path":["lib","concatMapAttrsStringSep"],"aliases":[["lib","strings","concatMapAttrsStringSep"]],"signature":"concatMapAttrsStringSep :: String -> (String -> a -> String) -> { [String] :: a } -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":334,"column":9},"attr_expr":"concatMapAttrsStringSep","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":335,"column":5},"lambda_expr":"concatMapAttrsStringSep =\n    sep: f: attrs:\n    concatStringsSep sep (lib.attrValues (lib.mapAttrs f attrs));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":334,"column":3},"path":["lib","strings","concatMapAttrsStringSep"],"pos_type":"Attribute"}},"content":{"content":"\nLike [`concatMapStringsSep`](#function-library-lib.strings.concatMapStringsSep)\nbut takes an attribute set instead of a list.\n\n# Inputs\n\n`sep`\n: Separator to add between item strings\n\n`f`\n: Function that takes each key and value and return a string\n\n`attrs`\n: Attribute set to map from\n\n# Type\n\n```\nconcatMapAttrsStringSep :: String -> (String -> a -> String) -> { [String] :: a } -> String\n```\n\n# Examples\n\n:::{.example}\n## `lib.strings.concatMapAttrsStringSep` usage example\n\n```nix\nconcatMapAttrsStringSep \"\\n\" (name: value: \"${name}: foo-${value}\") { a = \"0.1.0\"; b = \"0.2.0\"; }\n=> \"a: foo-0.1.0\\nb: foo-0.2.0\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":334,"column":3},"path":["lib","strings","concatMapAttrsStringSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatMapStrings","path":["lib","concatMapStrings"],"aliases":[["lib","strings","concatMapStrings"]],"signature":"concatMapStrings :: (a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":324,"column":9},"attr_expr":"concatMapStrings","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":125,"column":22},"lambda_expr":"concatMapStrings = f: list: concatStrings (map f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":125,"column":3},"path":["lib","strings","concatMapStrings"],"pos_type":"Attribute"}},"content":{"content":"\nMap a function over a list and concatenate the resulting strings.\n\n# Inputs\n\n`f`\n: 1\\. Function argument\n\n`list`\n: 2\\. Function argument\n\n# Type\n\n```\nconcatMapStrings :: (a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatMapStrings` usage example\n\n```nix\nconcatMapStrings (x: \"a\" + x) [\"foo\" \"bar\"]\n=> \"afooabar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":125,"column":3},"path":["lib","strings","concatMapStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatMapStringsSep","path":["lib","concatMapStringsSep"],"aliases":[["lib","strings","concatMapStringsSep"]],"signature":"concatMapStringsSep :: String -> (a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":333,"column":9},"attr_expr":"concatMapStringsSep","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":262,"column":5},"lambda_expr":"concatMapStringsSep =\n    sep: f: list:\n    concatStringsSep sep (map f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":261,"column":3},"path":["lib","strings","concatMapStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nMaps a function over a list of strings and then concatenates the\nresult with the specified separator interspersed between\nelements.\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`f`\n: Function to map over the list\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatMapStringsSep :: String -> (a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatMapStringsSep` usage example\n\n```nix\nconcatMapStringsSep \"-\" (x: toUpper x)  [\"foo\" \"bar\" \"baz\"]\n=> \"FOO-BAR-BAZ\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":261,"column":3},"path":["lib","strings","concatMapStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatStrings","path":["lib","concatStrings"],"aliases":[["lib","strings","concatStrings"]],"signature":"concatStrings :: [String] -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":323,"column":9},"attr_expr":"concatStrings","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":95,"column":3},"path":["lib","strings","concatStrings"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings.\n\n# Type\n\n```\nconcatStrings :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatStrings` usage example\n\n```nix\nconcatStrings [\"foo\" \"bar\"]\n=> \"foobar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":95,"column":3},"path":["lib","strings","concatStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.concatStringsSep","path":["lib","concatStringsSep"],"aliases":[["builtins","concatStringsSep"],["lib","join"],["lib","strings","concatStringsSep"],["lib","strings","join"]],"signature":"concatStringsSep :: String -> [String] -> String\n","is_primop":true,"primop_meta":{"name":"concatStringsSep","args":["separator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":332,"column":9},"attr_expr":"concatStringsSep","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings with a separator between each element\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatStringsSep :: String -> [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatStringsSep` usage example\n\n```nix\nconcatStringsSep \"/\" [\"usr\" \"local\" \"bin\"]\n=> \"usr/local/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.condConcat","path":["lib","condConcat"],"aliases":[["lib","misc","condConcat"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":580,"column":9},"attr_expr":"condConcat","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":179,"column":5},"lambda_expr":"name: list: checker:\n    if list == [ ] then\n      name\n    else if checker (head list) then\n      condConcat (name + (head (tail list))) (tail (tail list)) checker\n    else\n      condConcat name (tail (tail list)) checker","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":179,"column":5},"path":["lib","condConcat"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":179,"column":5},"path":["lib","condConcat"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.const","path":["lib","const"],"aliases":[["lib","trivial","const"]],"signature":"const :: a -> b -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":128,"column":9},"attr_expr":"const","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":98,"column":11},"lambda_expr":"const = x: y: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":98,"column":3},"path":["lib","trivial","const"],"pos_type":"Attribute"}},"content":{"content":"\nThe constant function\n\nIgnores the second argument. If called with only one argument,\nconstructs a function that always returns a static value.\n\n# Inputs\n\n`x`\n\n: Value to return\n\n`y`\n\n: Value to ignore\n\n# Type\n\n```\nconst :: a -> b -> a\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.const` usage example\n\n```nix\nlet f = const 5; in f 10\n=> 5\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":98,"column":3},"path":["lib","trivial","const"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.converge","path":["lib","converge"],"aliases":[["lib","fixedPoints","converge"]],"signature":"converge :: (a -> a) -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":192,"column":9},"attr_expr":"converge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":153,"column":5},"lambda_expr":"converge =\n    f: x:\n    let\n      x' = f x;\n    in\n    if x' == x then x else converge f x';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":152,"column":3},"path":["lib","fixedPoints","converge"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the fixpoint that `f` converges to when called iteratively, starting\nwith the input `x`.\n\n```\nnix-repl> converge (x: x / 2) 16\n0\n```\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`x`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconverge :: (a -> a) -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":152,"column":3},"path":["lib","fixedPoints","converge"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.convertHash","path":["lib","convertHash"],"aliases":[["builtins","convertHash"]],"signature":null,"is_primop":true,"primop_meta":{"name":"convertHash","args":["args"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":114,"column":9},"attr_expr":"convertHash","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","convertHash"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the specified representation of a hash string, based on the attributes presented in *args*:\n\n- `hash`\n\n  The hash to be converted.\n  The hash format is detected automatically.\n\n- `hashAlgo`\n\n  The algorithm used to create the hash. Must be one of\n  - `\"md5\"`\n  - `\"sha1\"`\n  - `\"sha256\"`\n  - `\"sha512\"`\n\n  The attribute may be omitted when `hash` is an [SRI hash](https://www.w3.org/TR/SRI/#the-integrity-attribute) or when the hash is prefixed with the hash algorithm name followed by a colon.\n  That `<hashAlgo>:<hashBody>` syntax is supported for backwards compatibility with existing tooling.\n\n- `toHashFormat`\n\n  The format of the resulting hash. Must be one of\n  - `\"base16\"`\n  - `\"nix32\"`\n  - `\"base32\"` (deprecated alias for `\"nix32\"`)\n  - `\"base64\"`\n  - `\"sri\"`\n\nThe result hash is the *toHashFormat* representation of the hash *hash*.\n\n> **Example**\n>\n>   Convert a SHA256 hash in Base16 to SRI:\n>\n> ```nix\n> builtins.convertHash {\n>   hash = \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n>   toHashFormat = \"sri\";\n>   hashAlgo = \"sha256\";\n> }\n> ```\n>\n>     \"sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\"\n\n> **Example**\n>\n>   Convert a SHA256 hash in SRI to Base16:\n>\n> ```nix\n> builtins.convertHash {\n>   hash = \"sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\";\n>   toHashFormat = \"base16\";\n> }\n> ```\n>\n>     \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n\n> **Example**\n>\n>   Convert a hash in the form `<hashAlgo>:<hashBody>` in Base16 to SRI:\n>\n> ```nix\n> builtins.convertHash {\n>   hash = \"sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n>   toHashFormat = \"sri\";\n> }\n> ```\n>\n>     \"sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=\"\n","source":{"position":null,"path":["lib","convertHash"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.count","path":["lib","count"],"aliases":[["lib","lists","count"]],"signature":"count :: (a -> Bool) -> [a] -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":279,"column":9},"attr_expr":"count","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":749,"column":11},"lambda_expr":"count = pred: foldl' (c: x: if pred x then c + 1 else c) 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":749,"column":3},"path":["lib","lists","count"],"pos_type":"Attribute"}},"content":{"content":"\nCount how many elements of `list` match the supplied predicate\nfunction.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n# Type\n\n```\ncount :: (a -> Bool) -> [a] -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.lists.count` usage example\n\n```nix\ncount (x: x == 3) [ 3 2 3 4 6 ]\n=> 2\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":749,"column":3},"path":["lib","lists","count"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.crossLists","path":["lib","crossLists"],"aliases":[["lib","lists","crossLists"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":302,"column":9},"attr_expr":"crossLists","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1869,"column":16},"lambda_expr":"crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [ f ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1869,"column":3},"path":["lib","lists","crossLists"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the image of the cross product of some lists by a function.\n\n# Examples\n:::{.example}\n## `lib.lists.crossLists` usage example\n\n```nix\ncrossLists (x: y: \"${toString x}${toString y}\") [[1 2] [3 4]]\n=> [ \"13\" \"14\" \"23\" \"24\" ]\n```\n\nIf you have an attrset already, consider mapCartesianProduct:\n\n```nix\nmapCartesianProduct (x: \"${toString x.a}${toString x.b}\") { a = [1 2]; b = [3 4]; }\n=> [ \"13\" \"14\" \"23\" \"24\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1869,"column":3},"path":["lib","lists","crossLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.deepSeq","path":["lib","deepSeq"],"aliases":[["builtins","deepSeq"],["lib","trivial","deepSeq"]],"signature":null,"is_primop":true,"primop_meta":{"name":"deepSeq","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":168,"column":9},"attr_expr":"deepSeq","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","deepSeq"],"pos_type":"Lambda"}},"content":{"content":"\nThis is like `seq e1 e2`, except that *e1* is evaluated *deeply*:\nif it’s a list or set, its elements or attributes are also\nevaluated recursively.\n","source":{"position":null,"path":["lib","deepSeq"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.defaultFunctor","path":["lib","defaultFunctor"],"aliases":[["lib","types","defaultFunctor"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":542,"column":9},"attr_expr":"defaultFunctor","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":213,"column":20},"lambda_expr":"defaultFunctor = name: {\n    inherit name;\n    type = lib.types.${name} or null;\n    wrapped = null;\n    payload = null;\n    binOp = a: b: null;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":213,"column":20},"path":["lib","defaultFunctor"],"pos_type":"Lambda"}},"content":{"content":"Default type functor","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":213,"column":20},"path":["lib","defaultFunctor"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.defaultMerge","path":["lib","defaultMerge"],"aliases":[["lib","misc","defaultMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":570,"column":9},"attr_expr":"defaultMerge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":37,"column":18},"lambda_expr":"x: y: x // (defaultMergeArg x y)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":37,"column":18},"path":["lib","defaultMerge"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":37,"column":18},"path":["lib","defaultMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.defaultMergeArg","path":["lib","defaultMergeArg"],"aliases":[["lib","misc","defaultMergeArg"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":569,"column":9},"attr_expr":"defaultMergeArg","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":36,"column":21},"lambda_expr":"x: y: if builtins.isAttrs y then y else (y x)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":36,"column":21},"path":["lib","defaultMergeArg"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":36,"column":21},"path":["lib","defaultMergeArg"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.defaultTo","path":["lib","defaultTo"],"aliases":[["lib","trivial","defaultTo"]],"signature":"defaultTo :: a -> (b | Null) -> (b | a)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":144,"column":9},"attr_expr":"defaultTo","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":414,"column":15},"lambda_expr":"defaultTo = default: maybeValue: if maybeValue != null then maybeValue else default;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":414,"column":3},"path":["lib","trivial","defaultTo"],"pos_type":"Attribute"}},"content":{"content":"\nReturns `maybeValue` if not null, otherwise return `default`.\n\n# Inputs\n\n`default`\n\n: 1\\. Function argument\n\n`maybeValue`\n\n: 2\\. Function argument\n\n# Type\n\n```\ndefaultTo :: a -> (b | Null) -> (b | a)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.defaultTo` usage example\n\n```nix\ndefaultTo \"default\" null\n=> \"default\"\ndefaultTo \"default\" \"foo\"\n=> \"foo\"\ndefaultTo \"default\" false\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":414,"column":3},"path":["lib","trivial","defaultTo"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.defaultTypeMerge","path":["lib","defaultTypeMerge"],"aliases":[["lib","types","defaultTypeMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":541,"column":9},"attr_expr":"defaultTypeMerge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":169,"column":5},"lambda_expr":"defaultTypeMerge =\n    f: f':\n    let\n      mergedWrapped = f.wrapped.typeMerge f'.wrapped.functor;\n      mergedPayload = f.binOp f.payload f'.payload;\n\n      hasPayload =\n        assert (f'.payload != null) == (f.payload != null);\n        f.payload != null;\n      hasWrapped =\n        let\n          hasWrappedNonNull = set: set ? \"wrapped\" && set.wrapped != null;\n        in\n        assert (hasWrappedNonNull f') == (hasWrappedNonNull f);\n        hasWrappedNonNull f;\n\n      typeFromPayload = if mergedPayload == null then null else f.type mergedPayload;\n      typeFromWrapped = if mergedWrapped == null then null else f.type mergedWrapped;\n    in\n    # Abort early: cannot merge different types\n    if f.name != f'.name then\n      null\n    else\n\n    if hasPayload then\n      # Just return the payload if returning wrapped is deprecated\n      if f ? wrappedDeprecationMessage then\n        typeFromPayload\n      else if hasWrapped then\n        # Has both wrapped and payload\n        throw ''\n          Type ${f.name} defines both `functor.payload` and `functor.wrapped` at the same time, which is not supported.\n\n          Use either `functor.payload` or `functor.wrapped` but not both.\n\n          If your code worked before remove either `functor.wrapped` or `functor.payload` from the type definition.\n        ''\n      else\n        typeFromPayload\n    else if hasWrapped then\n      typeFromWrapped\n    else\n      f.type;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":169,"column":5},"path":["lib","defaultTypeMerge"],"pos_type":"Lambda"}},"content":{"content":"takes two type functors and return the merged type","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":169,"column":5},"path":["lib","defaultTypeMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.dirOf","path":["lib","dirOf"],"aliases":[["builtins","dirOf"],["lib","filesystem","dirOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"dirOf","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":453,"column":9},"attr_expr":"dirOf","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","dirOf"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the directory part of the string *s*, that is, everything\nbefore the final slash in the string. This is similar to the GNU\n`dirname` command.\n","source":{"position":null,"path":["lib","dirOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.dischargeProperties","path":["lib","dischargeProperties"],"aliases":[["lib","modules","dischargeProperties"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":484,"column":9},"attr_expr":"dischargeProperties","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1396,"column":5},"lambda_expr":"dischargeProperties =\n    def:\n    if def._type or \"\" == \"merge\" then\n      concatMap dischargeProperties def.contents\n    else if def._type or \"\" == \"if\" then\n      if isBool def.condition then\n        if def.condition then dischargeProperties def.content else [ ]\n      else\n        throw \"‘mkIf’ called with a non-Boolean condition\"\n    else\n      [ def ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1396,"column":5},"path":["lib","dischargeProperties"],"pos_type":"Lambda"}},"content":{"content":"\nGiven a config value, expand mkMerge properties, and discharge\nany mkIf conditions.  That is, this is the place where mkIf\nconditions are actually evaluated.  The result is a list of\nconfig values.  For example, ‘mkIf false x’ yields ‘[]’,\n‘mkIf true x’ yields ‘[x]’, and\n\n  mkMerge [ 1 (mkIf true 2) (mkIf true (mkIf false 3)) ]\n\nyields ‘[ 1 2 ]’.\n\n# Inputs\n\n`def`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1396,"column":5},"path":["lib","dischargeProperties"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.div","path":["lib","div"],"aliases":[["builtins","div"],["lib","trivial","div"]],"signature":null,"is_primop":true,"primop_meta":{"name":"div","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":134,"column":9},"attr_expr":"div","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","div"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the quotient of the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","div"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.doRename","path":["lib","doRename"],"aliases":[["lib","modules","doRename"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":512,"column":9},"attr_expr":"doRename","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1980,"column":5},"lambda_expr":"doRename =\n    {\n      # List of strings representing the attribute path of the old option.\n      from,\n      # List of strings representing the attribute path of the new option.\n      to,\n      # Boolean, whether the old option is to be included in documentation.\n      visible,\n      # Whether to warn when a value is defined for the old option.\n      # NOTE: This requires the NixOS assertions module to be imported, so\n      #        - this generally does not work in submodules\n      #        - this may or may not work outside NixOS\n      warn,\n      # A function that is applied to the option value, to form the value\n      # of the old `from` option.\n      #\n      # For example, the identity function can be passed, to return the option value unchanged.\n      # ```nix\n      # use = x: x;\n      # ```\n      #\n      # To add a warning, you can pass the partially applied `warn` function.\n      # ```nix\n      # use = lib.warn \"Obsolete option `${opt.old}' is used. Use `${opt.to}' instead.\";\n      # ```\n      use,\n      # Legacy option, enabled by default: whether to preserve the priority of definitions in `old`.\n      withPriority ? true,\n      # A boolean that defines the `mkIf` condition for `to`.\n      # If the condition evaluates to `true`, and the `to` path points into an\n      # `attrsOf (submodule ...)`, then `doRename` would cause an empty module to\n      # be created, even if the `from` option is undefined.\n      # By setting this to an expression that may return `false`, you can inhibit\n      # this undesired behavior.\n      #\n      # Example:\n      #\n      # ```nix\n      # { config, lib, ... }:\n      # let\n      #   inherit (lib) mkOption mkEnableOption types doRename;\n      # in\n      # {\n      #   options = {\n      #\n      #     # Old service\n      #     services.foo.enable = mkEnableOption \"foo\";\n      #\n      #     # New multi-instance service\n      #     services.foos = mkOption {\n      #       type = types.attrsOf (types.submodule …);\n      #     };\n      #   };\n      #   imports = [\n      #     (doRename {\n      #       from = [ \"services\" \"foo\" \"bar\" ];\n      #       to = [ \"services\" \"foos\" \"\" \"bar\" ];\n      #       visible = true;\n      #       warn = false;\n      #       use = x: x;\n      #       withPriority = true;\n      #       # Only define services.foos.\"\" if needed. (It's not just about `bar`)\n      #       condition = config.services.foo.enable;\n      #     })\n      #   ];\n      # }\n      # ```\n      condition ? true,\n    }:\n    { config, options, ... }:\n    let\n      fromOpt = getAttrFromPath from options;\n      toOf = attrByPath to (abort \"Renaming error: option `${showOption to}' does not exist.\");\n      toType =\n        let\n          opt = attrByPath to { } options;\n        in\n        opt.type or (types.submodule { });\n    in\n    {\n      options = setAttrByPath from (\n        mkOption {\n          inherit visible;\n          description = \"Alias of {option}`${showOption to}`.\";\n          apply = x: use (toOf config);\n        }\n        // optionalAttrs (toType != null) {\n          type = toType;\n        }\n      );\n      config = mkIf condition (mkMerge [\n        (optionalAttrs (options ? warnings) {\n          warnings =\n            optional (warn && fromOpt.isDefined)\n              \"The option `${showOption from}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption to}'.\";\n        })\n        (\n          if withPriority then\n            mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt\n          else\n            mkAliasAndWrapDefinitions (setAttrByPath to) fromOpt\n        )\n      ]);\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1980,"column":5},"path":["lib","doRename"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that help declares an option that has been renamed.\nWhen a value is defined for the old option, it is forwarded to the `to` option.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1980,"column":5},"path":["lib","doRename"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.dontDistribute","path":["lib","dontDistribute"],"aliases":[["lib","meta","dontDistribute"]],"signature":"dontDistribute :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":432,"column":9},"attr_expr":"dontDistribute","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":81,"column":20},"lambda_expr":"dontDistribute = drv: addMetaAttrs { hydraPlatforms = [ ]; } drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":81,"column":3},"path":["lib","meta","dontDistribute"],"pos_type":"Attribute"}},"content":{"content":"\nDisable Hydra builds of given derivation.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\ndontDistribute :: Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":81,"column":3},"path":["lib","meta","dontDistribute"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.dontRecurseIntoAttrs","path":["lib","dontRecurseIntoAttrs"],"aliases":[["lib","attrsets","dontRecurseIntoAttrs"]],"signature":"dontRecurseIntoAttrs :: AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":249,"column":9},"attr_expr":"dontRecurseIntoAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2216,"column":26},"lambda_expr":"dontRecurseIntoAttrs = attrs: attrs // { recurseForDerivations = false; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2216,"column":3},"path":["lib","attrsets","dontRecurseIntoAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nUndo the effect of `recurseIntoAttrs`.\n\n# Inputs\n\n`attrs`\n\n: An attribute set to not scan for derivations.\n\n# Type\n\n```\ndontRecurseIntoAttrs :: AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2216,"column":3},"path":["lib","attrsets","dontRecurseIntoAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.drop","path":["lib","drop"],"aliases":[["lib","lists","drop"]],"signature":"drop :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":297,"column":9},"attr_expr":"drop","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1575,"column":10},"lambda_expr":"drop = count: list: sublist count (length list) list;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1575,"column":3},"path":["lib","lists","drop"],"pos_type":"Attribute"}},"content":{"content":"\nRemove the first (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Number of elements to drop\n\n`list`\n\n: Input list\n\n# Type\n\n```\ndrop :: Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.drop` usage example\n\n```nix\ndrop 2 [ \"a\" \"b\" \"c\" \"d\" ]\n=> [ \"c\" \"d\" ]\ndrop 2 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1575,"column":3},"path":["lib","lists","drop"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.dropEnd","path":["lib","dropEnd"],"aliases":[["lib","lists","dropEnd"]],"signature":"dropEnd :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":298,"column":9},"attr_expr":"dropEnd","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1609,"column":13},"lambda_expr":"dropEnd = n: xs: take (max 0 (length xs - n)) xs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1609,"column":3},"path":["lib","lists","dropEnd"],"pos_type":"Attribute"}},"content":{"content":"\nRemove the last (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Number of elements to drop\n\n`list`\n\n: Input list\n\n# Type\n\n```\ndropEnd :: Int -> [a] -> [a]\n```\n\n# Examples\n\n:::{.example}\n## `lib.lists.dropEnd` usage example\n\n```nix\n  dropEnd 2 [ \"a\" \"b\" \"c\" \"d\" ]\n  => [ \"a\" \"b\" ]\n  dropEnd 2 [ ]\n  => [ ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1609,"column":3},"path":["lib","lists","dropEnd"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.elem","path":["lib","elem"],"aliases":[["builtins","elem"],["lib","lists","elem"],["lib","strings","elem"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elem","args":["x","xs"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":316,"column":9},"attr_expr":"elem","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","elem"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if a value equal to *x* occurs in the list *xs*, and\n`false` otherwise.\n","source":{"position":null,"path":["lib","elem"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.elemAt","path":["lib","elemAt"],"aliases":[["builtins","elemAt"],["lib","lists","elemAt"],["lib","strings","elemAt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elemAt","args":["xs","n"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":317,"column":9},"attr_expr":"elemAt","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","elemAt"],"pos_type":"Lambda"}},"content":{"content":"\nReturn element *n* from the list *xs*. Elements are counted starting\nfrom 0. A fatal error occurs if the index is out of bounds.\n","source":{"position":null,"path":["lib","elemAt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.enableFeature","path":["lib","enableFeature"],"aliases":[["lib","strings","enableFeature"]],"signature":"enableFeature :: Bool -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":387,"column":9},"attr_expr":"enableFeature","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2370,"column":5},"lambda_expr":"enableFeature =\n    flag: feature:\n    assert lib.isBool flag;\n    assert lib.isString feature; # e.g. passing openssl instead of \"openssl\"\n    \"--${if flag then \"enable\" else \"disable\"}-${feature}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2369,"column":3},"path":["lib","strings","enableFeature"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{enable,disable}-<feature>\"` string that can be passed to\nstandard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n# Type\n\n```\nenableFeature :: Bool -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.enableFeature` usage example\n\n```nix\nenableFeature true \"shared\"\n=> \"--enable-shared\"\nenableFeature false \"shared\"\n=> \"--disable-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2369,"column":3},"path":["lib","strings","enableFeature"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.enableFeatureAs","path":["lib","enableFeatureAs"],"aliases":[["lib","strings","enableFeatureAs"]],"signature":"enableFeatureAs :: Bool -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":388,"column":9},"attr_expr":"enableFeatureAs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2410,"column":5},"lambda_expr":"enableFeatureAs =\n    flag: feature: value:\n    enableFeature flag feature + optionalString flag \"=${value}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2409,"column":3},"path":["lib","strings","enableFeatureAs"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{enable-<feature>=<value>,disable-<feature>}\"` string that\ncan be passed to standard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n`value`\n: 3\\. Function argument\n\n# Type\n\n```\nenableFeatureAs :: Bool -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.enableFeatureAs` usage example\n\n```nix\nenableFeatureAs true \"shared\" \"foo\"\n=> \"--enable-shared=foo\"\nenableFeatureAs false \"shared\" (throw \"ignored\")\n=> \"--disable-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2409,"column":3},"path":["lib","strings","enableFeatureAs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.escape","path":["lib","escape"],"aliases":[["lib","strings","escape"]],"signature":"escape :: [String] -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":349,"column":9},"attr_expr":"escape","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1034,"column":12},"lambda_expr":"escape = list: replaceStrings list (map (c: \"\\\\${c}\") list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1034,"column":3},"path":["lib","strings","escape"],"pos_type":"Attribute"}},"content":{"content":"\nEscape occurrence of the elements of `list` in `string` by\nprefixing it with a backslash.\n\n# Inputs\n\n`list`\n: 1\\. Function argument\n\n`string`\n: 2\\. Function argument\n\n# Type\n\n```\nescape :: [String] -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escape` usage example\n\n```nix\nescape [\"(\" \")\"] \"(foo)\"\n=> \"\\\\(foo\\\\)\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1034,"column":3},"path":["lib","strings","escape"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.escapeRegex","path":["lib","escapeRegex"],"aliases":[["lib","strings","escapeRegex"]],"signature":"escapeRegex :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":359,"column":9},"attr_expr":"escapeRegex","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1405,"column":3},"path":["lib","strings","escapeRegex"],"pos_type":"Attribute"}},"content":{"content":"\nTurn a string `s` into an exact regular expression\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeRegex :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeRegex` usage example\n\n```nix\nescapeRegex \"[^a-z]*\"\n=> \"\\\\[\\\\^a-z]\\\\*\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1405,"column":3},"path":["lib","strings","escapeRegex"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.escapeShellArg","path":["lib","escapeShellArg"],"aliases":[["lib","strings","escapeShellArg"]],"signature":"escapeShellArg :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":350,"column":9},"attr_expr":"escapeShellArg","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1201,"column":5},"lambda_expr":"escapeShellArg =\n    arg:\n    let\n      string = toString arg;\n    in\n    if match \"[[:alnum:],._+:@%/-]+\" string == null then\n      \"'${replaceString \"'\" \"'\\\\''\" string}'\"\n    else\n      string;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1200,"column":3},"path":["lib","strings","escapeShellArg"],"pos_type":"Attribute"}},"content":{"content":"\nQuote `string` to be used safely within the Bourne shell if it has any\nspecial characters.\n\n# Inputs\n\n`string`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeShellArg :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeShellArg` usage example\n\n```nix\nescapeShellArg \"esc'ape\\nme\"\n=> \"'esc'\\\\''ape\\nme'\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1200,"column":3},"path":["lib","strings","escapeShellArg"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.escapeShellArgs","path":["lib","escapeShellArgs"],"aliases":[["lib","strings","escapeShellArgs"]],"signature":"escapeShellArgs :: [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":351,"column":9},"attr_expr":"escapeShellArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":262,"column":13},"lambda_expr":"list:\n    concatStringsSep sep (map f list)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1236,"column":3},"path":["lib","strings","escapeShellArgs"],"pos_type":"Attribute"}},"content":{"content":"\nQuote all arguments that have special characters to be safely passed to the\nBourne shell.\n\n# Inputs\n\n`args`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeShellArgs :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeShellArgs` usage example\n\n```nix\nescapeShellArgs [\"one\" \"two three\" \"four'five\"]\n=> \"one 'two three' 'four'\\\\''five'\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1236,"column":3},"path":["lib","strings","escapeShellArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.escapeURL","path":["lib","escapeURL"],"aliases":[["lib","strings","escapeURL"]],"signature":"escapeURL :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":360,"column":9},"attr_expr":"escapeURL","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1098,"column":3},"path":["lib","strings","escapeURL"],"pos_type":"Attribute"}},"content":{"content":"\nEscape the `string` so it can be safely placed inside a URL\nquery.\n\n# Inputs\n\n`string`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeURL :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeURL` usage example\n\n```nix\nescapeURL \"foo/bar baz\"\n=> \"foo%2Fbar%20baz\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1098,"column":3},"path":["lib","strings","escapeURL"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.escapeXML","path":["lib","escapeXML"],"aliases":[["lib","strings","escapeXML"]],"signature":"escapeXML :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":361,"column":9},"attr_expr":"escapeXML","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1483,"column":3},"path":["lib","strings","escapeXML"],"pos_type":"Attribute"}},"content":{"content":"\nEscapes a string `s` such that it is safe to include verbatim in an XML\ndocument.\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeXML :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeXML` usage example\n\n```nix\nescapeXML ''\"test\" 'test' < & >''\n=> \"&quot;test&quot; &apos;test&apos; &lt; &amp; &gt;\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1483,"column":3},"path":["lib","strings","escapeXML"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.evalModules","path":["lib","evalModules"],"aliases":[["lib","modules","evalModules"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":475,"column":9},"attr_expr":"evalModules","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":93,"column":5},"lambda_expr":"evalModules =\n    evalModulesArgs@{\n      modules,\n      prefix ? [ ],\n      # This should only be used for special arguments that need to be evaluated\n      # when resolving module structure (like in imports). For everything else,\n      # there's _module.args. If specialArgs.modulesPath is defined it will be\n      # used as the base path for disabledModules.\n      specialArgs ? { },\n      # `class`:\n      # A nominal type for modules. When set and non-null, this adds a check to\n      # make sure that only compatible modules are imported.\n      class ? null,\n      # This would be remove in the future, Prefer _module.args option instead.\n      args ? { },\n      # This would be remove in the future, Prefer _module.check option instead.\n      check ? true,\n    }:\n    let\n      withWarnings =\n        x:\n        warnIf (evalModulesArgs ? args)\n          \"The args argument to evalModules is deprecated. Please set config._module.args instead.\"\n          warnIf\n          (evalModulesArgs ? check)\n          \"The check argument to evalModules is deprecated. Please set config._module.check instead.\"\n          x;\n\n      legacyModules =\n        optional (evalModulesArgs ? args) {\n          config = {\n            _module.args = args;\n          };\n        }\n        ++ optional (evalModulesArgs ? check) {\n          config = {\n            _module.check = mkDefault check;\n          };\n        };\n      regularModules = modules ++ legacyModules;\n\n      # This internal module declare internal options under the `_module'\n      # attribute.  These options are fragile, as they are used by the\n      # module system to change the interpretation of modules.\n      #\n      # When extended with extendModules or moduleType, a fresh instance of\n      # this module is used, to avoid conflicts and allow chaining of\n      # extendModules.\n      internalModule = rec {\n        _file = \"lib/modules.nix\";\n\n        key = _file;\n\n        options = {\n          _module.args = mkOption {\n            # Because things like `mkIf` are entirely useless for\n            # `_module.args` (because there's no way modules can check which\n            # arguments were passed), we'll use `lazyAttrsOf` which drops\n            # support for that, in turn it's lazy in its values. This means e.g.\n            # a `_module.args.pkgs = import (fetchTarball { ... }) {}` won't\n            # start a download when `pkgs` wasn't evaluated.\n            type = types.lazyAttrsOf types.raw;\n            # Only render documentation once at the root of the option tree,\n            # not for all individual submodules.\n            # Allow merging option decls to make this internal regardless.\n            ${\n              if prefix == [ ] then\n                null # unset => visible\n              else\n                \"internal\"\n            } =\n              true;\n            # TODO: Change the type of this option to a submodule with a\n            # freeformType, so that individual arguments can be documented\n            # separately\n            description = ''\n              Additional arguments passed to each module in addition to ones\n              like `lib`, `config`,\n              and `pkgs`, `modulesPath`.\n\n              This option is also available to all submodules. Submodules do not\n              inherit args from their parent module, nor do they provide args to\n              their parent module or sibling submodules. The sole exception to\n              this is the argument `name` which is provided by\n              parent modules to a submodule and contains the attribute name\n              the submodule is bound to, or a unique generated name if it is\n              not bound to an attribute.\n\n              Some arguments are already passed by default, of which the\n              following *cannot* be changed with this option:\n              - {var}`lib`: The nixpkgs library.\n              - {var}`config`: The results of all options after merging the values from all modules together.\n              - {var}`options`: The options declared in all modules.\n              - {var}`specialArgs`: The `specialArgs` argument passed to `evalModules`.\n              - All attributes of {var}`specialArgs`\n\n                Whereas option values can generally depend on other option values\n                thanks to laziness, this does not apply to `imports`, which\n                must be computed statically before anything else.\n\n                For this reason, callers of the module system can provide `specialArgs`\n                which are available during import resolution.\n\n                For NixOS, `specialArgs` includes\n                {var}`modulesPath`, which allows you to import\n                extra modules from the nixpkgs package tree without having to\n                somehow make the module aware of the location of the\n                `nixpkgs` or NixOS directories.\n                ```\n                { modulesPath, ... }: {\n                  imports = [\n                    (modulesPath + \"/profiles/minimal.nix\")\n                  ];\n                }\n                ```\n\n              For NixOS, the default value for this option includes at least this argument:\n              - {var}`pkgs`: The nixpkgs package set according to\n                the {option}`nixpkgs.pkgs` option.\n            '';\n          };\n\n          _module.check = mkOption {\n            type = types.bool;\n            internal = true;\n            default = true;\n            description = \"Whether to check whether all option definitions have matching declarations.\";\n          };\n\n          _module.freeformType = mkOption {\n            type = types.nullOr types.optionType;\n            internal = true;\n            default = null;\n            description = ''\n              If set, merge all definitions that don't have an associated option\n              together using this type. The result then gets combined with the\n              values of all declared options to produce the final `\n              config` value.\n\n              If this is `null`, definitions without an option\n              will throw an error unless {option}`_module.check` is\n              turned off.\n            '';\n          };\n\n          _module.specialArgs = mkOption {\n            readOnly = true;\n            internal = true;\n            description = ''\n              Externally provided module arguments that can't be modified from\n              within a configuration, but can be used in module imports.\n            '';\n          };\n        };\n\n        config = {\n          _module.args = {\n            inherit extendModules;\n            moduleType = type;\n          };\n          _module.specialArgs = specialArgs;\n        };\n      };\n\n      # This function takes an empty attrset as an argument.\n      # It could theoretically be replaced with its body,\n      # but such a binding is avoided to allow for earlier grabage collection.\n      doCollect =\n        { }:\n        collectModules class (specialArgs.modulesPath or \"\") (regularModules ++ [ internalModule ]) (\n          {\n            inherit\n              lib\n              options\n              specialArgs\n              ;\n            _class = class;\n            _prefix = prefix;\n            config = addErrorContext \"if you get an infinite recursion here, you probably reference `config` in `imports`. If you are trying to achieve a conditional import behavior dependent on `config`, consider importing unconditionally, and using `mkEnableOption` and `mkIf` to control its effect.\" config;\n          }\n          // specialArgs\n        );\n\n      merged = mergeModules prefix (reverseList (doCollect { }).modules);\n\n      options = merged.matchedOptions;\n\n      config =\n        let\n\n          # For definitions that have an associated option\n          declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;\n\n          # If freeformType is set, this is for definitions that don't have an associated option\n          freeformConfig =\n            let\n              defs = map (def: {\n                file = def.file;\n                value = setAttrByPath def.prefix def.value;\n              }) merged.unmatchedDefns;\n            in\n            if defs == [ ] then { } else declaredConfig._module.freeformType.merge prefix defs;\n\n        in\n        if declaredConfig._module.freeformType == null then\n          declaredConfig\n        # Because all definitions that had an associated option ended in\n        # declaredConfig, freeformConfig can only contain the non-option\n        # paths, meaning recursiveUpdate will never override any value\n        else\n          recursiveUpdate freeformConfig declaredConfig;\n\n      checkUnmatched =\n        if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [ ] then\n          let\n            firstDef = head merged.unmatchedDefns;\n            baseMsg =\n              let\n                optText = showOption (prefix ++ firstDef.prefix);\n                defText =\n                  addErrorContext\n                    \"while evaluating the error message for definitions for `${optText}', which is an option that does not exist\"\n                    (addErrorContext \"while evaluating a definition from `${firstDef.file}'\" (showDefs [ firstDef ]));\n\n                # absInvalidOptionParent is absolute; other variables are relative to the submodule prefix\n                absInvalidOptionParent = init (prefix ++ firstDef.prefix);\n                invalidOptionParent = init firstDef.prefix;\n                siblingOptionNames = attrNames (attrByPath invalidOptionParent { } options);\n                candidateNames =\n                  if invalidOptionParent == [ ] then remove \"_module\" siblingOptionNames else siblingOptionNames;\n                invalidOptionName = last firstDef.prefix;\n                # For small option sets, check all; for large sets, only check distance ≤ 2\n                suggestions =\n                  if length candidateNames < 100 then\n                    pipe candidateNames [\n                      (sortOn (levenshtein invalidOptionName))\n                      (take 3)\n                    ]\n                  else\n                    pipe candidateNames [\n                      # levenshteinAtMost is only fast for distance ≤ 2\n                      (filter (levenshteinAtMost 2 invalidOptionName))\n                      (sortOn (levenshtein invalidOptionName))\n                      (take 3)\n                    ];\n                suggestion =\n                  if suggestions == [ ] then\n                    \"\"\n                  else if length suggestions == 1 then\n                    \"\\n\\nDid you mean `${showOption (absInvalidOptionParent ++ [ (head suggestions) ])}'?\"\n                  else\n                    \"\\n\\nDid you mean ${\n                      concatStringsSep \", \" (\n                        map (s: \"`${showOption (absInvalidOptionParent ++ [ s ])}'\") (init suggestions)\n                      )\n                    } or `${showOption (absInvalidOptionParent ++ [ (last suggestions) ])}'?\";\n              in\n              \"The option `${optText}' does not exist. Definition values:${defText}${suggestion}\";\n          in\n          if\n            attrNames options == [ \"_module\" ]\n          # No options were declared at all (`_module` is built in)\n          # but we do have unmatched definitions, and no freeformType (earlier conditions)\n          then\n            let\n              optionName = showOption prefix;\n            in\n            if optionName == \"\" then\n              throw ''\n                ${baseMsg}\n\n                It seems as if you're trying to declare an option by placing it into `config' rather than `options'!\n              ''\n            else\n              throw ''\n                ${baseMsg}\n\n                However there are no options defined in `${showOption prefix}'. Are you sure you've\n                declared your options properly? This can happen if you e.g. declared your options in `types.submodule'\n                under `config' rather than `options'.\n              ''\n          else\n            throw baseMsg\n        else\n          null;\n\n      checked = seq checkUnmatched;\n\n      extendModules =\n        extendArgs@{\n          modules ? [ ],\n          specialArgs ? { },\n          prefix ? [ ],\n        }:\n        evalModules (\n          evalModulesArgs\n          // {\n            modules = regularModules ++ modules;\n            specialArgs = evalModulesArgs.specialArgs or { } // specialArgs;\n            prefix = extendArgs.prefix or evalModulesArgs.prefix or [ ];\n          }\n        );\n\n      type = types.submoduleWith {\n        inherit modules specialArgs class;\n      };\n\n      result = withWarnings {\n        _type = \"configuration\";\n        options = checked options;\n        config = checked (removeAttrs config [ \"_module\" ]);\n        _module = checked (config._module);\n        inherit (doCollect { }) graph;\n        inherit extendModules type class;\n      };\n    in\n    result;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":93,"column":5},"path":["lib","evalModules"],"pos_type":"Lambda"}},"content":{"content":"\nSee https://nixos.org/manual/nixpkgs/unstable/#module-system-lib-evalModules\nor file://./../doc/module-system/module-system.chapter.md\n\n!!! Please think twice before adding to this argument list! The more\nthat is specified here instead of in the modules themselves the harder\nit is to transparently move a set of modules to be a submodule of another\nconfig (as the proper arguments need to be replicated at each call to\nevalModules) and the less declarative the module set is.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":93,"column":5},"path":["lib","evalModules"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.evalOptionValue","path":["lib","evalOptionValue"],"aliases":[["lib","modules","evalOptionValue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":515,"column":7},"attr_expr":"evalOptionValue = lib.warn \"External use of `lib.evalOptionValue` is deprecated. If your use case isn't covered by non-deprecated functions, we'd like to know more and perhaps support your use case well, instead of providing access to these low level functions. In this case please open an issue in https://github.com/nixos/nixpkgs/issues/.\" self.modules.evalOptionValue;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1123,"column":5},"lambda_expr":"evalOptionValue =\n    loc: opt: defs:\n    let\n      # Add in the default value for this option, if any.\n      defs' =\n        if opt ? default then\n          [\n            {\n              file = head opt.declarations;\n              value = mkOptionDefault opt.default;\n            }\n          ]\n          ++ defs\n        else\n          defs;\n\n      # Handle properties, check types, and merge everything together.\n      res =\n        if opt.readOnly or false && length defs' > 1 then\n          let\n            # For a better error message, evaluate all readOnly definitions as\n            # if they were the only definition.\n            separateDefs = map (\n              def:\n              def\n              // {\n                value = (mergeDefinitions loc opt.type [ def ]).mergedValue;\n              }\n            ) defs';\n          in\n          throw \"The option `${showOption loc}' is read-only, but it's set multiple times. Definition values:${showDefs separateDefs}\"\n        else\n          mergeDefinitions loc opt.type defs';\n\n      # Apply the 'apply' function to the merged value. This allows options to\n      # yield a value computed from the definitions\n      value = if opt ? apply then opt.apply res.mergedValue else res.mergedValue;\n\n      warnDeprecation =\n        warnIf (opt.type.deprecationMessage != null)\n          \"The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}\";\n\n    in\n    warnDeprecation opt\n    // {\n      value = addErrorContext \"while evaluating the option `${showOption loc}':\" value;\n      inherit (res.defsFinal') highestPrio;\n      definitions = map (def: def.value) res.defsFinal;\n      files = map (def: def.file) res.defsFinal;\n      definitionsWithLocations = res.defsFinal;\n      inherit (res) isDefined;\n      inherit (res.checkedAndMerged) valueMeta;\n      # This allows options to be correctly displayed using `${options.path.to.it}`\n      __toString = _: showOption loc;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1123,"column":5},"path":["lib","evalOptionValue"],"pos_type":"Lambda"}},"content":{"content":"\nMerge all the definitions of an option to produce the final\nconfig value.\n\n# Inputs\n\n`loc`\n\n: 1\\. Function argument\n\n`opt`\n\n: 2\\. Function argument\n\n`defs`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1123,"column":5},"path":["lib","evalOptionValue"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.extend","path":["lib","extend"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":40,"column":9},"attr_expr":"extend = f: lib.makeExtensible (lib.extends f rattrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":40,"column":18},"lambda_expr":"extend = f: lib.makeExtensible (lib.extends f rattrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":40,"column":9},"path":["lib","extend"],"pos_type":"Attribute"}},"content":{"content":"\nPatch the Nixpkgs library\n\nA function that applies patches onto the nixpkgs library.\nUsage is discouraged for most scenarios.\n\n:::{.note}\nThe name `extends` is a bit misleading, as it doesn't actually extend the library, but rather patches it.\nIt is merely a consequence of being implemented by `makeExtensible`.\n:::\n\n# Inputs\n\n- An \"extension function\" `f` that returns attributes that will be updated in the returned Nixpkgs library.\n\n# Output\n\nA patched Nixpkgs library.\n\n:::{.warning}\nThis functionality is intended as an escape hatch for when the provided version of the Nixpkgs library has a flaw.\n\nIf you were to use it to add new functionality, you will run into compatibility and interoperability issues.\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":40,"column":9},"path":["lib","extend"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.extendDerivation","path":["lib","extendDerivation"],"aliases":[["lib","customisation","extendDerivation"]],"signature":"extendDerivation :: Bool -> Any -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":412,"column":9},"attr_expr":"extendDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":400,"column":5},"lambda_expr":"extendDerivation =\n    condition: passthru: drv:\n    let\n      commonAttrs =\n        drv\n        // listToAttrs (\n          outputsList\n          ++ [\n            {\n              name = \"all\";\n              value = map (x: x.value) outputsList;\n            }\n          ]\n        )\n        // passthru\n        // {\n          drvPath =\n            assert condition;\n            drv.drvPath;\n          outPath =\n            assert condition;\n            drv.outPath;\n        };\n\n      outputsList = map (outputName: {\n        name = outputName;\n        value = commonAttrs // {\n          inherit (drv.${outputName}) type outputName;\n          outputSpecified = true;\n          drvPath =\n            assert condition;\n            drv.${outputName}.drvPath;\n          outPath =\n            assert condition;\n            drv.${outputName}.outPath;\n          # TODO: give the derivation control over the outputs.\n          #       `overrideAttrs` may not be the only attribute that needs\n          #       updating when switching outputs.\n          # TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.\n          ${if passthru ? overrideAttrs then \"overrideAttrs\" else null} =\n            f: (passthru.overrideAttrs f).${outputName};\n        };\n      }) (drv.outputs or [ \"out\" ]);\n    in\n    commonAttrs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":399,"column":3},"path":["lib","customisation","extendDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nAdd attributes to each output of a derivation without changing\nthe derivation itself and check a given condition when evaluating.\n\n# Inputs\n\n`condition`\n\n: 1\\. Function argument\n\n`passthru`\n\n: 2\\. Function argument\n\n`drv`\n\n: 3\\. Function argument\n\n# Type\n\n```\nextendDerivation :: Bool -> Any -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":399,"column":3},"path":["lib","customisation","extendDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.extendMkDerivation","path":["lib","extendMkDerivation"],"aliases":[["lib","customisation","extendMkDerivation"]],"signature":"extendMkDerivation ::\n  {\n    constructDrv :: (FixedPointArgs | AttrSet) -> Derivation;\n    excludeDrvArgNames :: [String];\n    excludeFunctionArgNames :: [String];\n    extendDrvArgs :: AttrSet -> AttrSet -> AttrSet;\n    inheritFunctionArgs :: Bool;\n    transformDrv :: Derivation -> Derivation;\n  }\n  -> ((FixedPointArgs | AttrSet) -> Derivation)\n\nFixedPointArgs :: AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":417,"column":9},"attr_expr":"extendMkDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":854,"column":5},"lambda_expr":"extendMkDerivation =\n    {\n      constructDrv,\n      excludeDrvArgNames ? [ ],\n      excludeFunctionArgNames ? [ ],\n      extendDrvArgs,\n      inheritFunctionArgs ? true,\n      transformDrv ? id,\n    }:\n    {\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":853,"column":3},"path":["lib","customisation","extendMkDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nDefine a `mkDerivation`-like function based on another `mkDerivation`-like function.\n\n[`stdenv.mkDerivation`](#part-stdenv) gives access to\nits final set of derivation attributes when it is passed a function,\nor when it is passed an overlay-style function in `overrideAttrs`.\n\nInstead of composing new `stdenv.mkDerivation`-like build helpers\nusing normal function composition,\n`extendMkDerivation` makes sure that the returned build helper\nsupports such first class recursion like `mkDerivation` does.\n\n`extendMkDerivation` takes an extra attribute set to configure its behaviour.\nOne can optionally specify\n`transformDrv` to specify a function to apply to the result derivation,\nor `inheritFunctionArgs` to decide whether to inherit the `__functionArgs`\nfrom the base build helper.\n\n# Inputs\n\n`extendMkDerivation`-specific configurations\n: `constructDrv` (required)\n  : Base build helper, the `mkDerivation`-like build helper to extend.\n\n  `excludeDrvArgNames` (default to `[ ]`)\n  : Argument names not to pass from the input fixed-point arguments to `constructDrv`.\n    It doesn't apply to the updating arguments returned by `extendDrvArgs`.\n\n  `excludeFunctionArgNames` (default to `[ ]`)\n  : `__functionArgs` attribute names to remove from the result build helper.\n    `excludeFunctionArgNames` is useful for argument deprecation while avoiding ellipses.\n\n  `extendDrvArgs` (required)\n  : An extension (overlay) of the argument set, like the one taken by [`overrideAttrs`](#sec-pkg-overrideAttrs) but applied before passing to `constructDrv`.\n\n  `inheritFunctionArgs` (default to `true`)\n  : Whether to inherit `__functionArgs` from the base build helper.\n    Set `inheritFunctionArgs` to `false` when `extendDrvArgs`'s `args` set pattern does not contain an ellipsis.\n\n  `transformDrv` (default to `lib.id`)\n  : Function to apply to the result derivation.\n\n# Type\n\n```\nextendMkDerivation ::\n  {\n    constructDrv :: (FixedPointArgs | AttrSet) -> Derivation;\n    excludeDrvArgNames :: [String];\n    excludeFunctionArgNames :: [String];\n    extendDrvArgs :: AttrSet -> AttrSet -> AttrSet;\n    inheritFunctionArgs :: Bool;\n    transformDrv :: Derivation -> Derivation;\n  }\n  -> ((FixedPointArgs | AttrSet) -> Derivation)\n\nFixedPointArgs :: AttrSet -> AttrSet\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.extendMkDerivation` usage example\n```nix-repl\nmkLocalDerivation = lib.extendMkDerivation {\n  constructDrv = pkgs.stdenv.mkDerivation;\n  excludeDrvArgNames = [ \"specialArg\" ];\n  extendDrvArgs =\n    finalAttrs: args@{ preferLocalBuild ? true, allowSubstitute ? false, specialArg ? (_: false), ... }:\n    { inherit preferLocalBuild allowSubstitute; passthru = { inherit specialArg; } // args.passthru or { }; };\n}\n\nmkLocalDerivation.__functionArgs\n=> { allowSubstitute = true; preferLocalBuild = true; specialArg = true; }\n\nmkLocalDerivation { inherit (pkgs.hello) pname version src; specialArg = _: false; }\n=> «derivation /nix/store/xirl67m60ahg6jmzicx43a81g635g8z8-hello-2.12.1.drv»\n\nmkLocalDerivation (finalAttrs: { inherit (pkgs.hello) pname version src; specialArg = _: false; })\n=> «derivation /nix/store/xirl67m60ahg6jmzicx43a81g635g8z8-hello-2.12.1.drv»\n\n(mkLocalDerivation (finalAttrs: { inherit (pkgs.hello) pname version src; passthru = { foo = \"a\"; bar = \"${finalAttrs.passthru.foo}b\"; }; })).bar\n=> \"ab\"\n```\n:::\n\n:::{.note}\nIf `transformDrv` is specified,\nit should take care of existing attributes that perform overriding\n(e.g., [`overrideAttrs`](#sec-pkg-overrideAttrs))\nto ensure that the overriding functionality of the result derivation\nwork as expected.\nModifications that breaks the overriding include\ndirect [attribute set update](https://nixos.org/manual/nix/stable/language/operators#update)\nand [`lib.extendDerivation`](#function-library-lib.customisation.extendDerivation).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":853,"column":3},"path":["lib","customisation","extendMkDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.extends","path":["lib","extends"],"aliases":[["lib","fixedPoints","extends"]],"signature":"extends :: (AttrSet -> AttrSet -> AttrSet) # The overlay to apply to the fixed-point function\n        -> (AttrSet -> AttrSet) # A fixed-point function\n        -> (AttrSet -> AttrSet) # The resulting fixed-point function\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":193,"column":9},"attr_expr":"extends","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":326,"column":5},"lambda_expr":"extends =\n    overlay: f:\n    # The result should be thought of as a function, the argument of that function is not an argument to `extends` itself\n    (\n      final:\n      let\n        prev = f final;\n      in\n      prev // overlay final prev\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":325,"column":3},"path":["lib","fixedPoints","extends"],"pos_type":"Attribute"}},"content":{"content":"\nExtend a function using an overlay.\n\nOverlays allow modifying and extending fixed-point functions, specifically ones returning attribute sets.\nA fixed-point function is a function which is intended to be evaluated by passing the result of itself as the argument.\nThis is possible due to Nix's lazy evaluation.\n\nA fixed-point function returning an attribute set has the form\n\n```nix\nfinal: {\n  # attributes\n}\n```\n\nwhere `final` refers to the lazily evaluated attribute set returned by the fixed-point function.\n\nAn overlay to such a fixed-point function has the form\n\n```nix\nfinal: prev: {\n  # attributes\n}\n```\n\nwhere `prev` refers to the result of the original function to `final`, and `final` is the result of the composition of the overlay and the original function.\n\nApplying an overlay is done with `extends`:\n\n```nix\nlet\n  f = final: {\n    # attributes\n  };\n  overlay = final: prev: {\n    # attributes\n  };\nin extends overlay f;\n```\n\nTo get the value of `final`, use `lib.fix`:\n\n```nix\nlet\n  f = final: {\n    # attributes\n  };\n  overlay = final: prev: {\n    # attributes\n  };\n  g = extends overlay f;\nin fix g\n```\n\n:::{.note}\nThe argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function.\n\nThe given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`.\n:::\n\n:::{.example}\n\n# Extend a fixed-point function with an overlay\n\nDefine a fixed-point function `f` that expects its own output as the argument `final`:\n\n```nix-repl\nf = final: {\n  # Constant value a\n  a = 1;\n\n  # b depends on the final value of a, available as final.a\n  b = final.a + 2;\n}\n```\n\nEvaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) to get the final result:\n\n```nix-repl\nfix f\n=> { a = 1; b = 3; }\n```\n\nAn overlay represents a modification or extension of such a fixed-point function.\nHere's an example of an overlay:\n\n```nix-repl\noverlay = final: prev: {\n  # Modify the previous value of a, available as prev.a\n  a = prev.a + 10;\n\n  # Extend the attribute set with c, letting it depend on the final values of a and b\n  c = final.a + final.b;\n}\n```\n\nUse `extends overlay f` to apply the overlay to the fixed-point function `f`.\nThis produces a new fixed-point function `g` with the combined behavior of `f` and `overlay`:\n\n```nix-repl\ng = extends overlay f\n```\n\nThe result is a function, so we can't print it directly, but it's the same as:\n\n```nix-repl\ng' = final: {\n  # The constant from f, but changed with the overlay\n  a = 1 + 10;\n\n  # Unchanged from f\n  b = final.a + 2;\n\n  # Extended in the overlay\n  c = final.a + final.b;\n}\n```\n\nEvaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) again to get the final result:\n\n```nix-repl\nfix g\n=> { a = 11; b = 13; c = 24; }\n```\n:::\n\n# Inputs\n\n`overlay`\n\n: The overlay to apply to the fixed-point function\n\n`f`\n\n: The fixed-point function\n\n# Type\n\n```\nextends :: (AttrSet -> AttrSet -> AttrSet) # The overlay to apply to the fixed-point function\n        -> (AttrSet -> AttrSet) # A fixed-point function\n        -> (AttrSet -> AttrSet) # The resulting fixed-point function\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.extends` usage example\n\n```nix\nf = final: { a = 1; b = final.a + 2; }\n\nfix f\n=> { a = 1; b = 3; }\n\nfix (extends (final: prev: { a = prev.a + 10; }) f)\n=> { a = 11; b = 13; }\n\nfix (extends (final: prev: { b = final.a + 5; }) f)\n=> { a = 1; b = 6; }\n\nfix (extends (final: prev: { c = final.a + final.b; }) f)\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":325,"column":3},"path":["lib","fixedPoints","extends"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileContents","path":["lib","fileContents"],"aliases":[["lib","strings","fileContents"]],"signature":"fileContents :: Path -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":395,"column":9},"attr_expr":"fileContents","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2866,"column":18},"lambda_expr":"fileContents = file: removeSuffix \"\\n\" (readFile file);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2866,"column":3},"path":["lib","strings","fileContents"],"pos_type":"Attribute"}},"content":{"content":"\nRead the contents of a file removing the trailing \\n\n\n# Inputs\n\n`file`\n: 1\\. Function argument\n\n# Type\n\n```\nfileContents :: Path -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.fileContents` usage example\n\n```nix\n$ echo \"1.0\" > ./version\n\nfileContents ./version\n=> \"1.0\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2866,"column":3},"path":["lib","strings","fileContents"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filter","path":["lib","filter"],"aliases":[["builtins","filter"],["lib","lists","filter"],["lib","strings","filter"]],"signature":null,"is_primop":true,"primop_meta":{"name":"filter","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":270,"column":9},"attr_expr":"filter","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","filter"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a list consisting of the elements of *list* for which the\nfunction *f* returns `true`.\n","source":{"position":null,"path":["lib","filter"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.filterAttrs","path":["lib","filterAttrs"],"aliases":[["lib","attrsets","filterAttrs"]],"signature":"filterAttrs :: (String -> a -> Bool) -> { [String] :: a } -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":210,"column":9},"attr_expr":"filterAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":662,"column":17},"lambda_expr":"filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":662,"column":3},"path":["lib","attrsets","filterAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nFilter an attribute set by removing all attributes for which the\ngiven predicate return false.\n\n# Inputs\n\n`pred`\n\n: Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.\n\n  <!-- TIP -->\n  If possible, decide on `name` first and on `value` only if necessary.\n  This avoids evaluating the value if the name is already enough, making it possible, potentially, to have the argument reference the return value.\n  (Depending on context, that could still be considered a self reference by users; a common pattern in Nix.)\n\n  <!-- TIP -->\n  `filterAttrs` is occasionally the cause of infinite recursion in configuration systems that allow self-references.\n  To support the widest range of user-provided logic, perform the `filterAttrs` call as late as possible.\n  Typically that's right before using it in a derivation, as opposed to an implicit conversion whose result is accessible to the user's expressions.\n\n`set`\n\n: The attribute set to filter\n\n# Type\n\n```\nfilterAttrs :: (String -> a -> Bool) -> { [String] :: a } -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.filterAttrs` usage example\n\n```nix\nfilterAttrs (n: v: n == \"foo\") { foo = 1; bar = 2; }\n=> { foo = 1; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":662,"column":3},"path":["lib","attrsets","filterAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filterAttrsRecursive","path":["lib","filterAttrsRecursive"],"aliases":[["lib","attrsets","filterAttrsRecursive"]],"signature":"filterAttrsRecursive :: (String -> Any -> Bool) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":211,"column":9},"attr_expr":"filterAttrsRecursive","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":696,"column":5},"lambda_expr":"filterAttrsRecursive =\n    pred: set:\n    listToAttrs (\n      concatMap (\n        name:\n        let\n          v = set.${name};\n        in\n        if pred name v then\n          [\n            (nameValuePair name (if isAttrs v then filterAttrsRecursive pred v else v))\n          ]\n        else\n          [ ]\n      ) (attrNames set)\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":695,"column":3},"path":["lib","attrsets","filterAttrsRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nFilter an attribute set recursively by removing all attributes for\nwhich the given predicate return false.\n\n# Inputs\n\n`pred`\n\n: Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.\n\n`set`\n\n: The attribute set to filter\n\n# Type\n\n```\nfilterAttrsRecursive :: (String -> Any -> Bool) -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.filterAttrsRecursive` usage example\n\n```nix\nfilterAttrsRecursive (n: v: v != null) { foo = { bar = null; }; }\n=> { foo = {}; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":695,"column":3},"path":["lib","attrsets","filterAttrsRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filterOverrides","path":["lib","filterOverrides"],"aliases":[["lib","modules","filterOverrides"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":485,"column":9},"attr_expr":"filterOverrides","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1433,"column":21},"lambda_expr":"filterOverrides = defs: (filterOverrides' defs).values;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1433,"column":21},"path":["lib","filterOverrides"],"pos_type":"Lambda"}},"content":{"content":"\nGiven a list of config values, process the mkOverride properties,\nthat is, return the values that have the highest (that is,\nnumerically lowest) priority, and strip the mkOverride\nproperties.  For example,\n\n  [ { file = \"/1\"; value = mkOverride 10 \"a\"; }\n    { file = \"/2\"; value = mkOverride 20 \"b\"; }\n    { file = \"/3\"; value = \"z\"; }\n    { file = \"/4\"; value = mkOverride 10 \"d\"; }\n  ]\n\nyields\n\n  [ { file = \"/1\"; value = \"a\"; }\n    { file = \"/4\"; value = \"d\"; }\n  ]\n\nNote that \"z\" has the default priority 100.\n\n# Inputs\n\n`defs`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1433,"column":21},"path":["lib","filterOverrides"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.filterSource","path":["lib","filterSource"],"aliases":[["builtins","filterSource"],["lib","sources","filterSource"]],"signature":null,"is_primop":true,"primop_meta":{"name":"filterSource","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":472,"column":9},"attr_expr":"filterSource","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","filterSource"],"pos_type":"Lambda"}},"content":{"content":"\n> **Warning**\n>\n> `filterSource` should not be used to filter store paths. Since\n> `filterSource` uses the name of the input directory while naming\n> the output directory, doing so produces a directory name in\n> the form of `<hash2>-<hash>-<name>`, where `<hash>-<name>` is\n> the name of the input directory. Since `<hash>` depends on the\n> unfiltered directory, the name of the output directory\n> indirectly depends on files that are filtered out by the\n> function. This triggers a rebuild even when a filtered out\n> file is changed. Use `builtins.path` instead, which allows\n> specifying the name of the output directory.\n\nThis function allows you to copy sources into the Nix store while\nfiltering certain files. For instance, suppose that you want to use\nthe directory `source-dir` as an input to a Nix expression, e.g.\n\n```nix\nstdenv.mkDerivation {\n  ...\n  src = ./source-dir;\n}\n```\n\nHowever, if `source-dir` is a Subversion working copy, then all of\nthose annoying `.svn` subdirectories are also copied to the\nstore. Worse, the contents of those directories may change a lot,\ncausing lots of spurious rebuilds. With `filterSource` you can\nfilter out the `.svn` directories:\n\n```nix\nsrc = builtins.filterSource\n  (path: type: type != \"directory\" || baseNameOf path != \".svn\")\n  ./source-dir;\n```\n\nThus, the first argument *e1* must be a predicate function that is\ncalled for each regular file, directory or symlink in the source\ntree *e2*. If the function returns `true`, the file is copied to the\nNix store, otherwise it is omitted. The function is called with two\narguments. The first is the full path of the file. The second is a\nstring that identifies the type of the file, which is either\n`\"regular\"`, `\"directory\"`, `\"symlink\"` or `\"unknown\"` (for other\nkinds of files such as device nodes or fifos — but note that those\ncannot be copied to the Nix store, so if the predicate returns\n`true` for them, the copy fails). If you exclude a directory,\nthe entire corresponding subtree of *e2* is excluded.\n","source":{"position":null,"path":["lib","filterSource"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.findFirst","path":["lib","findFirst"],"aliases":[["lib","lists","findFirst"]],"signature":"findFirst :: (a -> Bool) -> a -> [a] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":276,"column":9},"attr_expr":"findFirst","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":646,"column":5},"lambda_expr":"findFirst =\n    pred: default: list:\n    let\n      index = findFirstIndex pred null list;\n    in\n    if index == null then default else elemAt list index;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":645,"column":3},"path":["lib","lists","findFirst"],"pos_type":"Attribute"}},"content":{"content":"\nFind the first element in the list matching the specified\npredicate or return `default` if no such element exists.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`default`\n\n: Default value to return\n\n`list`\n\n: Input list\n\n# Type\n\n```\nfindFirst :: (a -> Bool) -> a -> [a] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.findFirst` usage example\n\n```nix\nfindFirst (x: x > 3) 7 [ 1 6 4 ]\n=> 6\nfindFirst (x: x > 9) 7 [ 1 6 4 ]\n=> 7\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":645,"column":3},"path":["lib","lists","findFirst"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.findSingle","path":["lib","findSingle"],"aliases":[["lib","lists","findSingle"]],"signature":"findSingle :: (a -> Bool) -> a -> a -> [a] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":275,"column":9},"attr_expr":"findSingle","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":526,"column":5},"lambda_expr":"findSingle =\n    pred: default: multiple: list:\n    let\n      found = filter pred list;\n      len = length found;\n    in\n    if len == 0 then\n      default\n    else if len != 1 then\n      multiple\n    else\n      head found;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":525,"column":3},"path":["lib","lists","findSingle"],"pos_type":"Attribute"}},"content":{"content":"\nFind the sole element in the list matching the specified\npredicate.\n\nReturns `default` if no such element exists, or\n`multiple` if there are multiple matching elements.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`default`\n\n: Default value to return if element was not found.\n\n`multiple`\n\n: Default value to return if more than one element was found\n\n`list`\n\n: Input list\n\n# Type\n\n```\nfindSingle :: (a -> Bool) -> a -> a -> [a] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.findSingle` usage example\n\n```nix\nfindSingle (x: x == 3) \"none\" \"multiple\" [ 1 3 3 ]\n=> \"multiple\"\nfindSingle (x: x == 3) \"none\" \"multiple\" [ 1 3 ]\n=> 3\nfindSingle (x: x == 3) \"none\" \"multiple\" [ 1 9 ]\n=> \"none\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":525,"column":3},"path":["lib","lists","findSingle"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fix","path":["lib","fix"],"aliases":[["lib","fixedPoints","fix"]],"signature":"fix :: (a -> a) -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":190,"column":9},"attr_expr":"fix","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":93,"column":5},"lambda_expr":"fix =\n    f:\n    let\n      x = f x;\n    in\n    x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":92,"column":3},"path":["lib","fixedPoints","fix"],"pos_type":"Attribute"}},"content":{"content":"\n`fix f` computes the fixed point of the given function `f`. In other words, the return value is `x` in `x = f x`.\n\n`f` must be a lazy function.\nThis means that `x` must be a value that can be partially evaluated,\nsuch as an attribute set, a list, or a function.\nThis way, `f` can use one part of `x` to compute another part.\n\n**Relation to syntactic recursion**\n\nThis section explains `fix` by refactoring from syntactic recursion to a call of `fix` instead.\n\nFor context, Nix lets you define attributes in terms of other attributes syntactically using the [`rec { }` syntax](https://nixos.org/manual/nix/stable/language/constructs.html#recursive-sets).\n\n```nix\nnix-repl> rec {\n  foo = \"foo\";\n  bar = \"bar\";\n  foobar = foo + bar;\n}\n{ bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n```\n\nThis is convenient when constructing a value to pass to a function for example,\nbut an equivalent effect can be achieved with the `let` binding syntax:\n\n```nix\nnix-repl> let self = {\n  foo = \"foo\";\n  bar = \"bar\";\n  foobar = self.foo + self.bar;\n}; in self\n{ bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n```\n\nBut in general you can get more reuse out of `let` bindings by refactoring them to a function.\n\n```nix\nnix-repl> f = self: {\n  foo = \"foo\";\n  bar = \"bar\";\n  foobar = self.foo + self.bar;\n}\n```\n\nThis is where `fix` comes in, it contains the syntactic recursion that's not in `f` anymore.\n\n```nix\nnix-repl> fix = f:\n  let self = f self; in self;\n```\n\nBy applying `fix` we get the final result.\n\n```nix\nnix-repl> fix f\n{ bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n```\n\nSuch a refactored `f` using `fix` is not useful by itself.\nSee [`extends`](#function-library-lib.fixedPoints.extends) for an example use case.\nThere `self` is also often called `final`.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nfix :: (a -> a) -> a\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.fix` usage example\n\n```nix\nfix (self: { foo = \"foo\"; bar = \"bar\"; foobar = self.foo + self.bar; })\n=> { bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n\nfix (self: [ 1 2 (elemAt self 0 + elemAt self 1) ])\n=> [ 1 2 3 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":92,"column":3},"path":["lib","fixedPoints","fix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fix' (Prime)","path":["lib","fix'"],"aliases":[["lib","fixedPoints","fix'"]],"signature":"fix' :: (a -> a) -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":191,"column":9},"attr_expr":"fix'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":119,"column":5},"lambda_expr":"fix' =\n    f:\n    let\n      x = f x // {\n        __unfix__ = f;\n      };\n    in\n    x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":118,"column":3},"path":["lib","fixedPoints","fix'"],"pos_type":"Attribute"}},"content":{"content":"\nA variant of `fix` that records the original recursive attribute set in the\nresult, in an attribute named `__unfix__`.\n\nThis is useful in combination with the `extends` function to\nimplement deep overriding.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nfix' :: (a -> a) -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":118,"column":3},"path":["lib","fixedPoints","fix'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixMergeModules","path":["lib","fixMergeModules"],"aliases":[["lib","modules","fixMergeModules"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":504,"column":9},"attr_expr":"fixMergeModules","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1679,"column":5},"lambda_expr":"fixMergeModules =\n    modules: args:\n    evalModules {\n      inherit modules args;\n      check = false;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1679,"column":5},"path":["lib","fixMergeModules"],"pos_type":"Lambda"}},"content":{"content":"\nCompatibility.\n\n# Inputs\n\n`modules`\n\n: 1\\. Function argument\n\n`args`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1679,"column":5},"path":["lib","fixMergeModules"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.fixedWidthNumber","path":["lib","fixedWidthNumber"],"aliases":[["lib","strings","fixedWidthNumber"]],"signature":"fixedWidthNumber :: Int -> Int -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":392,"column":9},"attr_expr":"fixedWidthNumber","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2560,"column":22},"lambda_expr":"fixedWidthNumber = width: n: fixedWidthString width \"0\" (toString n);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2560,"column":3},"path":["lib","strings","fixedWidthNumber"],"pos_type":"Attribute"}},"content":{"content":"\nFormat a number adding leading zeroes up to fixed width.\n\n# Inputs\n\n`width`\n: 1\\. Function argument\n\n`n`\n: 2\\. Function argument\n\n# Type\n\n```\nfixedWidthNumber :: Int -> Int -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.fixedWidthNumber` usage example\n\n```nix\nfixedWidthNumber 5 15\n=> \"00015\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2560,"column":3},"path":["lib","strings","fixedWidthNumber"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedWidthString","path":["lib","fixedWidthString"],"aliases":[["lib","strings","fixedWidthString"]],"signature":"fixedWidthString :: Int -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":391,"column":9},"attr_expr":"fixedWidthString","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2523,"column":5},"lambda_expr":"fixedWidthString =\n    width: filler: str:\n    let\n      strw = lib.stringLength str;\n      reqWidth = width - (lib.stringLength filler);\n    in\n    assert lib.assertMsg (strw <= width)\n      \"fixedWidthString: requested string length (${toString width}) must not be shorter than actual length (${toString strw})\";\n    if strw == width then str else filler + fixedWidthString reqWidth filler str;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2522,"column":3},"path":["lib","strings","fixedWidthString"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a fixed width string with additional prefix to match\nrequired width.\n\nThis function will fail if the input string is longer than the\nrequested length.\n\n# Inputs\n\n`width`\n: 1\\. Function argument\n\n`filler`\n: 2\\. Function argument\n\n`str`\n: 3\\. Function argument\n\n# Type\n\n```\nfixedWidthString :: Int -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.fixedWidthString` usage example\n\n```nix\nfixedWidthString 5 \"0\" (toString 15)\n=> \"00015\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2522,"column":3},"path":["lib","strings","fixedWidthString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixupOptionType","path":["lib","fixupOptionType"],"aliases":[["lib","modules","fixupOptionType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":487,"column":9},"attr_expr":"fixupOptionType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1491,"column":5},"lambda_expr":"fixupOptionType =\n    loc: opt:\n    if opt.type.getSubModules or null == null then\n      opt // { type = opt.type or types.unspecified; }\n    else\n      opt\n      // {\n        type = opt.type.substSubModules opt.options;\n        options = [ ];\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1491,"column":5},"path":["lib","fixupOptionType"],"pos_type":"Lambda"}},"content":{"content":"TODO: Merge this into mergeOptionDecls","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1491,"column":5},"path":["lib","fixupOptionType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.flakeRefToString","path":["lib","flakeRefToString"],"aliases":[["builtins","flakeRefToString"],["lib","flakes","flakeRefToString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"flakeRefToString","args":["attrs"],"experimental":true,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":611,"column":9},"attr_expr":"flakeRefToString","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","flakeRefToString"],"pos_type":"Lambda"}},"content":{"content":"\nConvert a flake reference from attribute set format to URL format.\n\nFor example:\n\n```nix\nbuiltins.flakeRefToString {\n  dir = \"lib\"; owner = \"NixOS\"; ref = \"23.05\"; repo = \"nixpkgs\"; type = \"github\";\n}\n```\n\nevaluates to\n\n```nix\n\"github:NixOS/nixpkgs/23.05?dir=lib\"\n```\n","source":{"position":null,"path":["lib","flakeRefToString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.flatten","path":["lib","flatten"],"aliases":[["lib","lists","flatten"]],"signature":"flatten :: [a | [a | [a | ...]]] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":273,"column":9},"attr_expr":"flatten","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":445,"column":13},"lambda_expr":"flatten = x: if isList x then concatMap (y: flatten y) x else [ x ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":445,"column":3},"path":["lib","lists","flatten"],"pos_type":"Attribute"}},"content":{"content":"\nFlatten the argument into a single list; that is, nested lists are\nspliced into the top-level lists.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\nflatten :: [a | [a | [a | ...]]] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.flatten` usage example\n\n```nix\nflatten [1 [2 [3] 4] 5]\n=> [1 2 3 4 5]\nflatten 1\n=> [1]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":445,"column":3},"path":["lib","lists","flatten"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.flip","path":["lib","flip"],"aliases":[["lib","trivial","flip"]],"signature":"flip :: (a -> b -> c) -> (b -> a -> c)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":143,"column":9},"attr_expr":"flip","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":377,"column":5},"lambda_expr":"flip =\n    f: a: b:\n    f b a;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":376,"column":3},"path":["lib","trivial","flip"],"pos_type":"Attribute"}},"content":{"content":"\nFlip the order of the arguments of a binary function.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`a`\n\n: 2\\. Function argument\n\n`b`\n\n: 3\\. Function argument\n\n# Type\n\n```\nflip :: (a -> b -> c) -> (b -> a -> c)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.flip` usage example\n\n```nix\nflip concat [1] [2]\n=> [ 2 1 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":376,"column":3},"path":["lib","trivial","flip"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.floor","path":["lib","floor"],"aliases":[["builtins","floor"],["lib","trivial","floor"]],"signature":null,"is_primop":true,"primop_meta":{"name":"floor","args":["number"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":187,"column":9},"attr_expr":"floor","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","floor"],"pos_type":"Lambda"}},"content":{"content":"\nRounds and converts *number* to the next lower NixInt value if possible, i.e. `floor *number* <= *number*` and\n`*number* - floor *number* < 1`.\n\nAn evaluation error is thrown, if there exists no such NixInt value `floor *number*`.\nDue to bugs in previous Nix versions an evaluation error might be thrown, if the datatype of *number* is\na NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.\n\nIf the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat\n(IEEE-754 double-precision floating-point number), an evaluation error will be thrown.\n","source":{"position":null,"path":["lib","floor"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.fold","path":["lib","fold"],"aliases":[["lib","foldr"],["lib","lists","fold"],["lib","lists","foldr"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":265,"column":9},"attr_expr":"fold","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":138,"column":5},"lambda_expr":"foldr =\n    op: nul: list:\n    let\n      len = length list;\n      fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));\n    in\n    fold' 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":152,"column":3},"path":["lib","lists","fold"],"pos_type":"Attribute"}},"content":{"content":"\n`fold` is an alias of `foldr` for historic reasons.\n\n::: {.warning}\nThis function will be removed in 26.05.\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":152,"column":3},"path":["lib","lists","fold"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.foldArgs","path":["lib","foldArgs"],"aliases":[["lib","misc","foldArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":571,"column":9},"attr_expr":"foldArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":39,"column":5},"lambda_expr":"merger: f: init: x:\n    let\n      arg = (merger init (defaultMergeArg init x));\n      # now add the function with composed args already applied to the final attrs\n      base = (\n        setAttrMerge \"passthru\" { } (f arg) (\n          z:\n          z\n          // {\n            function = foldArgs merger f arg;\n            args = (attrByPath [ \"passthru\" \"args\" ] { } z) // x;\n          }\n        )\n      );\n      withStdOverrides = base // {\n        override = base.passthru.function;\n      };\n    in\n    withStdOverrides","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":39,"column":5},"path":["lib","foldArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":39,"column":5},"path":["lib","foldArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.foldAttrs","path":["lib","foldAttrs"],"aliases":[["lib","attrsets","foldAttrs"]],"signature":"foldAttrs :: (a -> b -> b) -> b -> [{ [String] :: a }] -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":213,"column":9},"attr_expr":"foldAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":829,"column":5},"lambda_expr":"foldAttrs =\n    op: nul: list_of_attrs:\n    foldr (\n      n: a: foldr (name: o: o // { ${name} = op n.${name} (a.${name} or nul); }) a (attrNames n)\n    ) { } list_of_attrs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":828,"column":3},"path":["lib","attrsets","foldAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nApply fold functions to values grouped by key.\n\n# Inputs\n\n`op`\n\n: A function, given a value and a collector combines the two.\n\n`nul`\n\n: The starting value.\n\n`list_of_attrs`\n\n: A list of attribute sets to fold together by key.\n\n# Type\n\n```\nfoldAttrs :: (a -> b -> b) -> b -> [{ [String] :: a }] -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.foldAttrs` usage example\n\n```nix\nfoldAttrs (item: acc: [item] ++ acc) [] [{ a = 2; } { a = 3; }]\n=> { a = [ 2 3 ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":828,"column":3},"path":["lib","attrsets","foldAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.foldl","path":["lib","foldl"],"aliases":[["lib","lists","foldl"]],"signature":"foldl :: (b -> a -> b) -> b -> [a] -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":266,"column":9},"attr_expr":"foldl","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":196,"column":5},"lambda_expr":"foldl =\n    op: nul: list:\n    let\n      foldl' = n: if n == -1 then nul else op (foldl' (n - 1)) (elemAt list n);\n    in\n    foldl' (length list - 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":195,"column":3},"path":["lib","lists","foldl"],"pos_type":"Attribute"}},"content":{"content":"\n“left fold”, like `foldr`, but from the left:\n\n`foldl op nul [x_1 x_2 ... x_n] == op (... (op (op nul x_1) x_2) ... x_n)`.\n\n# Inputs\n\n`op`\n\n: 1\\. Function argument\n\n`nul`\n\n: 2\\. Function argument\n\n`list`\n\n: 3\\. Function argument\n\n# Type\n\n```\nfoldl :: (b -> a -> b) -> b -> [a] -> b\n```\n\n# Examples\n:::{.example}\n## `lib.lists.foldl` usage example\n\n```nix\nlconcat = foldl (a: b: a + b) \"z\"\nlconcat [ \"a\" \"b\" \"c\" ]\n=> \"zabc\"\n# different types\nlstrange = foldl (str: int: str + toString (int + 1)) \"a\"\nlstrange [ 1 2 3 4 ]\n=> \"a2345\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":195,"column":3},"path":["lib","lists","foldl"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.foldl' (Prime)","path":["lib","foldl'"],"aliases":[["lib","lists","foldl'"]],"signature":"foldl' :: (a -> b -> a) -> a -> [b] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":267,"column":9},"attr_expr":"foldl'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":279,"column":5},"lambda_expr":"foldl' =\n    op: acc:\n    # The builtin `foldl'` is a bit lazier than one might expect.\n    # See https://github.com/NixOS/nix/pull/7158.\n    # In particular, the initial accumulator value is not forced before the first iteration starts.\n    builtins.seq acc (builtins.foldl' op acc);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":278,"column":3},"path":["lib","lists","foldl'"],"pos_type":"Attribute"}},"content":{"content":"\nReduce a list by applying a binary operator from left to right,\nstarting with an initial accumulator.\n\nBefore each application of the operator, the accumulator value is evaluated.\nThis behavior makes this function stricter than [`foldl`](#function-library-lib.lists.foldl).\n\nUnlike [`builtins.foldl'`](https://nixos.org/manual/nix/unstable/language/builtins.html#builtins-foldl'),\nthe initial accumulator argument is evaluated before the first iteration.\n\nA call like\n\n```nix\nfoldl' op acc₀ [ x₀ x₁ x₂ ... xₙ₋₁ xₙ ]\n```\n\nis (denotationally) equivalent to the following,\nbut with the added benefit that `foldl'` itself will never overflow the stack.\n\n```nix\nlet\n  acc₁   = builtins.seq acc₀   (op acc₀   x₀  );\n  acc₂   = builtins.seq acc₁   (op acc₁   x₁  );\n  acc₃   = builtins.seq acc₂   (op acc₂   x₂  );\n  ...\n  accₙ   = builtins.seq accₙ₋₁ (op accₙ₋₁ xₙ₋₁);\n  accₙ₊₁ = builtins.seq accₙ   (op accₙ   xₙ  );\nin\naccₙ₊₁\n\n# Or ignoring builtins.seq\nop (op (... (op (op (op acc₀ x₀) x₁) x₂) ...) xₙ₋₁) xₙ\n```\n\n# Inputs\n\n`op`\n\n: The binary operation to run, where the two arguments are:\n\n1. `acc`: The current accumulator value: Either the initial one for the first iteration, or the result of the previous iteration\n2. `x`: The corresponding list element for this iteration\n\n`acc`\n\n: The initial accumulator value.\n\n  The accumulator value is evaluated in any case before the first iteration starts.\n\n  To avoid evaluation even before the `list` argument is given an eta expansion can be used:\n\n  ```nix\n  list: lib.foldl' op acc list\n  ```\n\n`list`\n\n: The list to fold\n\n# Type\n\n```\nfoldl' :: (a -> b -> a) -> a -> [b] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.foldl'` usage example\n\n```nix\nfoldl' (acc: x: acc + x) 0 [1 2 3]\n=> 6\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":278,"column":3},"path":["lib","lists","foldl'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.foldlAttrs","path":["lib","foldlAttrs"],"aliases":[["lib","attrsets","foldlAttrs"]],"signature":"foldlAttrs :: ( a -> String -> b -> a ) -> a -> { [String] :: b } -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":212,"column":9},"attr_expr":"foldlAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":791,"column":5},"lambda_expr":"foldlAttrs =\n    f: init: set:\n    foldl' (acc: name: f acc name set.${name}) init (attrNames set);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":790,"column":3},"path":["lib","attrsets","foldlAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nLike [`lib.lists.foldl'`](#function-library-lib.lists.foldl-prime) but for attribute sets.\nIterates over every name-value pair in the given attribute set.\nThe 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`.\n\n::: {.note}\nThere is a completely different function `lib.foldAttrs`\nwhich has nothing to do with this function, despite the similar name.\n:::\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`init`\n\n: 2\\. Function argument\n\n`set`\n\n: 3\\. Function argument\n\n# Type\n\n```\nfoldlAttrs :: ( a -> String -> b -> a ) -> a -> { [String] :: b } -> a\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.foldlAttrs` usage example\n\n```nix\nfoldlAttrs\n  (acc: name: value: {\n    sum = acc.sum + value;\n    names = acc.names ++ [name];\n  })\n  { sum = 0; names = []; }\n  {\n    foo = 1;\n    bar = 10;\n  }\n->\n  {\n    sum = 11;\n    names = [\"bar\" \"foo\"];\n  }\n\nfoldlAttrs\n  (throw \"function not needed\")\n  123\n  {};\n->\n  123\n\nfoldlAttrs\n  (acc: _: _: acc)\n  3\n  { z = throw \"value not needed\"; a = throw \"value not needed\"; };\n->\n  3\n\nThe accumulator doesn't have to be an attrset.\nIt can be as simple as a number or string.\n\nfoldlAttrs\n  (acc: _: v: acc * 10 + v)\n  1\n  { z = 1; a = 2; };\n->\n  121\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":790,"column":3},"path":["lib","attrsets","foldlAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.foldr","path":["lib","foldr"],"aliases":[["lib","fold"],["lib","lists","fold"],["lib","lists","foldr"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":264,"column":9},"attr_expr":"foldr","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":138,"column":5},"lambda_expr":"foldr =\n    op: nul: list:\n    let\n      len = length list;\n      fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));\n    in\n    fold' 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":152,"column":3},"path":["lib","lists","fold"],"pos_type":"Attribute"}},"content":{"content":"\n`fold` is an alias of `foldr` for historic reasons.\n\n::: {.warning}\nThis function will be removed in 26.05.\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":152,"column":3},"path":["lib","lists","fold"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.forEach","path":["lib","forEach"],"aliases":[["lib","lists","forEach"]],"signature":"forEach :: [a] -> (a -> b) -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":262,"column":9},"attr_expr":"forEach","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":94,"column":13},"lambda_expr":"forEach = xs: f: map f xs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":94,"column":3},"path":["lib","lists","forEach"],"pos_type":"Attribute"}},"content":{"content":"\nApply the function to each element in the list.\nSame as `map`, but arguments flipped.\n\n# Inputs\n\n`xs`\n\n: 1\\. Function argument\n\n`f`\n\n: 2\\. Function argument\n\n# Type\n\n```\nforEach :: [a] -> (a -> b) -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.forEach` usage example\n\n```nix\nforEach [ 1 2 ] (x:\n  toString x\n)\n=> [ \"1\" \"2\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":94,"column":3},"path":["lib","lists","forEach"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fromHexString","path":["lib","fromHexString"],"aliases":[["lib","trivial","fromHexString"]],"signature":"fromHexString :: String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":177,"column":9},"attr_expr":"fromHexString","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1235,"column":5},"lambda_expr":"fromHexString =\n    str:\n    let\n      match = builtins.match \"(0x)?([0-7]?[0-9A-Fa-f]{1,15})\" str;\n    in\n    if match != null then\n      (fromTOML \"v=0x${builtins.elemAt match 1}\").v\n    else\n      # TODO: Turn this into a `throw` in 26.05.\n      assert lib.warn \"fromHexString: ${\n        lib.generators.toPretty { } str\n      } is not a valid input and will be rejected in 26.05\" true;\n      let\n        noPrefix = lib.strings.removePrefix \"0x\" (lib.strings.toLower str);\n      in\n      (fromTOML \"v=0x${noPrefix}\").v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1234,"column":3},"path":["lib","trivial","fromHexString"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a hexadecimal string to it's integer representation.\n\n# Type\n\n```\nfromHexString :: String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.fromHexString` usage examples\n```nix\nfromHexString \"FF\"\n=> 255\n\nfromHexString \"0x7fffffffffffffff\"\n=> 9223372036854775807\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1234,"column":3},"path":["lib","trivial","fromHexString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fromJSON","path":["lib","fromJSON"],"aliases":[["builtins","fromJSON"],["lib","strings","fromJSON"]],"signature":null,"is_primop":true,"primop_meta":{"name":"fromJSON","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":118,"column":9},"attr_expr":"fromJSON","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","fromJSON"],"pos_type":"Lambda"}},"content":{"content":"\nConvert a JSON string to a Nix value. For example,\n\n```nix\nbuiltins.fromJSON ''{\"x\": [1, 2, 3], \"y\": null}''\n```\n\nreturns the value `{ x = [ 1 2 3 ]; y = null; }`.\n","source":{"position":null,"path":["lib","fromJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.fromTOML","path":["lib","fromTOML"],"aliases":[["builtins","fromTOML"]],"signature":null,"is_primop":true,"primop_meta":{"name":"fromTOML","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":119,"column":9},"attr_expr":"fromTOML","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","fromTOML"],"pos_type":"Lambda"}},"content":{"content":"\nConvert a TOML string to a Nix value. For example,\n\n```nix\nbuiltins.fromTOML ''\n  x=1\n  s=\"a\"\n  [table]\n  y=2\n''\n```\n\nreturns the value `{ s = \"a\"; table = { y = 2; }; x = 1; }`.\n","source":{"position":null,"path":["lib","fromTOML"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.fullDepEntry","path":["lib","fullDepEntry"],"aliases":[["lib","stringsWithDeps","fullDepEntry"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":403,"column":9},"attr_expr":"fullDepEntry","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":175,"column":18},"lambda_expr":"text: deps: { inherit text deps; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":175,"column":18},"path":["lib","fullDepEntry"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":175,"column":18},"path":["lib","fullDepEntry"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.functionArgs","path":["lib","functionArgs"],"aliases":[["lib","trivial","functionArgs"]],"signature":"functionArgs : (a -> b) -> { [String] :: Bool }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":172,"column":9},"attr_expr":"functionArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1109,"column":5},"lambda_expr":"f: if f ? __functor then f.__functionArgs or (functionArgs (f.__functor f)) else functionArgs f","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1105,"column":3},"path":["lib","trivial","functionArgs"],"pos_type":"Attribute"}},"content":{"content":"\nExtract the expected function arguments from a function.\nThis works both with nix-native `{ a, b ? foo, ... }:` style\nfunctions and functions with args set with `setFunctionArgs`. It\nhas the same return type and semantics as `builtins.functionArgs`.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nfunctionArgs : (a -> b) -> { [String] :: Bool }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1105,"column":3},"path":["lib","trivial","functionArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.genAttrs","path":["lib","genAttrs"],"aliases":[["lib","attrsets","genAttrs"]],"signature":"genAttrs :: [String] -> (String -> a) -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":225,"column":9},"attr_expr":"genAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1343,"column":14},"lambda_expr":"genAttrs = names: f: genAttrs' names (n: nameValuePair n (f n));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1343,"column":3},"path":["lib","attrsets","genAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate an attribute set by mapping a function over a list of\nattribute names.\n\n# Inputs\n\n`names`\n\n: Names of values in the resulting attribute set.\n\n`f`\n\n: A function, given the name of the attribute, returns the attribute's value.\n\n# Type\n\n```\ngenAttrs :: [String] -> (String -> a) -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.genAttrs` usage example\n\n```nix\ngenAttrs [ \"foo\" \"bar\" ] (name: \"x_\" + name)\n=> { foo = \"x_foo\"; bar = \"x_bar\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1343,"column":3},"path":["lib","attrsets","genAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.genAttrs' (Prime)","path":["lib","genAttrs'"],"aliases":[["lib","attrsets","genAttrs'"]],"signature":"genAttrs' :: [a] -> (a -> { name :: String; value :: b; }) -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":226,"column":9},"attr_expr":"genAttrs'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1380,"column":15},"lambda_expr":"genAttrs' = xs: f: listToAttrs (map f xs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1380,"column":3},"path":["lib","attrsets","genAttrs'"],"pos_type":"Attribute"}},"content":{"content":"\nLike `genAttrs`, but allows the name of each attribute to be specified in addition to the value.\nThe applied function should return both the new name and value as a `nameValuePair`.\n::: {.warning}\nIn case of attribute name collision the first entry determines the value,\nall subsequent conflicting entries for the same name are silently ignored.\n:::\n\n# Inputs\n\n`xs`\n\n: A list of strings `s` used as generator.\n\n`f`\n\n: A function, given a string `s` from the list `xs`, returns a new `nameValuePair`.\n\n# Type\n\n```\ngenAttrs' :: [a] -> (a -> { name :: String; value :: b; }) -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.genAttrs'` usage example\n\n```nix\ngenAttrs' [ \"foo\" \"bar\" ] (s: nameValuePair (\"x_\" + s) (\"y_\" + s))\n=> { x_foo = \"y_foo\"; x_bar = \"y_bar\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1380,"column":3},"path":["lib","attrsets","genAttrs'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.genList","path":["lib","genList"],"aliases":[["builtins","genList"],["lib","lists","genList"],["lib","strings","genList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"genList","args":["generator","length"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":312,"column":9},"attr_expr":"genList","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","genList"],"pos_type":"Lambda"}},"content":{"content":"\nGenerate list of size *length*, with each element *i* equal to the\nvalue returned by *generator* `i`. For example,\n\n```nix\nbuiltins.genList (x: x * x) 5\n```\n\nreturns the list `[ 0 1 4 9 16 ]`.\n","source":{"position":null,"path":["lib","genList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.genericClosure","path":["lib","genericClosure"],"aliases":[["builtins","genericClosure"],["lib","trivial","genericClosure"]],"signature":null,"is_primop":true,"primop_meta":{"name":"genericClosure","args":["attrset"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":184,"column":9},"attr_expr":"genericClosure","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","genericClosure"],"pos_type":"Lambda"}},"content":{"content":"\n`builtins.genericClosure` iteratively computes the transitive closure over an arbitrary relation defined by a function.\n\nIt takes *attrset* with two attributes named `startSet` and `operator`, and returns a list of attribute sets:\n\n- `startSet`:\n  The initial list of attribute sets.\n\n- `operator`:\n  A function that takes an attribute set and returns a list of attribute sets.\n  It defines how each item in the current set is processed and expanded into more items.\n\nEach attribute set in the list `startSet` and the list returned by `operator` must have an attribute `key`, which must support equality comparison.\nThe value of `key` can be one of the following types:\n\n- [Int](@docroot@/language/types.md#type-int)\n- [Float](@docroot@/language/types.md#type-float)\n- [Boolean](@docroot@/language/types.md#type-boolean)\n- [String](@docroot@/language/types.md#type-string)\n- [Path](@docroot@/language/types.md#type-path)\n- [List](@docroot@/language/types.md#list)\n\nThe result is produced by calling the `operator` on each `item` that has not been called yet, including newly added items, until no new items are added.\nItems are compared by their `key` attribute.\n\nCommon usages are:\n\n- Generating unique collections of items, such as dependency graphs.\n- Traversing through structures that may contain cycles or loops.\n- Processing data structures with complex internal relationships.\n\n> **Example**\n>\n> ```nix\n> builtins.genericClosure {\n>   startSet = [ {key = 5;} ];\n>   operator = item: [{\n>     key = if (item.key / 2 ) * 2 == item.key\n>          then item.key / 2\n>          else 3 * item.key + 1;\n>   }];\n> }\n> ```\n>\n> evaluates to\n>\n> ```nix\n> [ { key = 5; } { key = 16; } { key = 8; } { key = 4; } { key = 2; } { key = 1; } ]\n> ```\n","source":{"position":null,"path":["lib","genericClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.getAttr","path":["lib","getAttr"],"aliases":[["builtins","getAttr"],["lib","attrsets","getAttr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"getAttr","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":255,"column":9},"attr_expr":"getAttr","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","getAttr"],"pos_type":"Lambda"}},"content":{"content":"\n`getAttr` returns the attribute named *s* from *set*. Evaluation\naborts if the attribute doesn’t exist. This is a dynamic version of\nthe `.` operator, since *s* is an expression rather than an\nidentifier.\n","source":{"position":null,"path":["lib","getAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.getAttrFromPath","path":["lib","getAttrFromPath"],"aliases":[["lib","attrsets","getAttrFromPath"]],"signature":"getAttrFromPath :: [String] -> AttrSet -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":204,"column":9},"attr_expr":"getAttrFromPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":335,"column":5},"lambda_expr":"getAttrFromPath =\n    attrPath: set:\n    attrByPath attrPath (abort (\"cannot find attribute '\" + concatStringsSep \".\" attrPath + \"'\")) set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":334,"column":3},"path":["lib","attrsets","getAttrFromPath"],"pos_type":"Attribute"}},"content":{"content":"\nLike `attrByPath`, but without a default value. If it doesn't find the\npath it will throw an error.\n\nNix has an [attribute selection operator](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:\n\n```nix\nx.a.b == getAttrFromPath [\"a\" \"b\"] x\n# and\nx.${f p}.\"example.com\" == getAttrFromPath [ (f p) \"example.com\" ] x\n```\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to get from `set`\n\n`set`\n\n: The nested attribute set to find the value in.\n\n# Type\n\n```\ngetAttrFromPath :: [String] -> AttrSet -> Any\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getAttrFromPath` usage example\n\n```nix\nx = { a = { b = 3; }; }\ngetAttrFromPath [\"a\" \"b\"] x\n=> 3\ngetAttrFromPath [\"z\" \"z\"] x\n=> error: cannot find attribute `z.z'\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":334,"column":3},"path":["lib","attrsets","getAttrFromPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getAttrs","path":["lib","getAttrs"],"aliases":[["lib","attrsets","getAttrs"]],"signature":"getAttrs :: [String] -> { [String] :: a } -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":208,"column":9},"attr_expr":"getAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":586,"column":14},"lambda_expr":"getAttrs = names: attrs: genAttrs names (name: attrs.${name});","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":586,"column":3},"path":["lib","attrsets","getAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nGiven a set of attribute names, return the set of the corresponding\nattributes from the given set.\n\n# Inputs\n\n`names`\n\n: A list of attribute names to get out of `set`\n\n`set`\n\n: The set to get the named attributes from\n\n# Type\n\n```\ngetAttrs :: [String] -> { [String] :: a } -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getAttrs` usage example\n\n```nix\ngetAttrs [ \"a\" \"b\" ] { a = 1; b = 2; c = 3; }\n=> { a = 1; b = 2; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":586,"column":3},"path":["lib","attrsets","getAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getBin","path":["lib","getBin"],"aliases":[["lib","attrsets","getBin"]],"signature":"getBin :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":241,"column":9},"attr_expr":"getBin","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1993,"column":3},"path":["lib","attrsets","getBin"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `bin` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `bin` output will be retrieved.\n\n# Type\n\n```\ngetBin :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getBin` usage example\n\n```nix\n\"${getBin pkgs.openssl}\"\n=> \"/nix/store/00000000000000000000000000000000-openssl-1.0.1r\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1993,"column":3},"path":["lib","attrsets","getBin"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getContext","path":["lib","getContext"],"aliases":[["builtins","getContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"getContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":112,"column":9},"attr_expr":"getContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","getContext"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the string context of *s*.\n\nThe string context tracks references to derivations within a string.\nIt is represented as an attribute set of [store derivation](@docroot@/glossary.md#gloss-store-derivation) paths mapping to output names.\n\nUsing [string interpolation](@docroot@/language/string-interpolation.md) on a derivation adds that derivation to the string context.\nFor example,\n\n```nix\nbuiltins.getContext \"${derivation { name = \"a\"; builder = \"b\"; system = \"c\"; }}\"\n```\n\nevaluates to\n\n```\n{ \"/nix/store/arhvjaf6zmlyn8vh8fgn55rpwnxq0n7l-a.drv\" = { outputs = [ \"out\" ]; }; }\n```\n","source":{"position":null,"path":["lib","getContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.getDev","path":["lib","getDev"],"aliases":[["lib","attrsets","getDev"]],"signature":"getDev :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":244,"column":9},"attr_expr":"getDev","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2084,"column":3},"path":["lib","attrsets","getDev"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `dev` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `dev` output will be retrieved.\n\n# Type\n\n```\ngetDev :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getDev` usage example\n\n```nix\n\"${getDev pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2084,"column":3},"path":["lib","attrsets","getDev"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getExe","path":["lib","getExe"],"aliases":[["lib","meta","getExe"]],"signature":"getExe :: Derivation -> StorePath\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":445,"column":9},"attr_expr":"getExe","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":527,"column":5},"lambda_expr":"getExe =\n    x:\n    getExe' x (\n      x.meta.mainProgram or (\n        # This could be turned into an error when 23.05 is at end of life\n        lib.warn\n          \"getExe: Package ${\n            lib.strings.escapeNixIdentifier x.meta.name or x.pname or x.name\n          } does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo \\\"bar\\\".\"\n          lib.getName\n          x\n      )\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":526,"column":3},"path":["lib","meta","getExe"],"pos_type":"Attribute"}},"content":{"content":"\nGet the path to the main program of a package based on `meta.mainProgram`\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\ngetExe :: Derivation -> StorePath\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getExe` usage example\n\n```nix\ngetExe pkgs.hello\n=> \"/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello\"\ngetExe pkgs.mustache-go\n=> \"/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":526,"column":3},"path":["lib","meta","getExe"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getExe' (Prime)","path":["lib","getExe'"],"aliases":[["lib","meta","getExe'"]],"signature":"getExe' :: Derivation -> String -> StorePath\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":446,"column":9},"attr_expr":"getExe'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":573,"column":5},"lambda_expr":"getExe' =\n    x: y:\n    assert assertMsg (isDerivation x)\n      \"lib.meta.getExe': The first argument is of type ${typeOf x}, but it should be a derivation instead.\";\n    assert assertMsg (isString y)\n      \"lib.meta.getExe': The second argument is of type ${typeOf y}, but it should be a string instead.\";\n    assert assertMsg (match \".*/.*\" y == null)\n      \"lib.meta.getExe': The second argument \\\"${y}\\\" is a nested path with a \\\"/\\\" character, but it should just be the name of the executable instead.\";\n    \"${getBin x}/bin/${y}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":572,"column":3},"path":["lib","meta","getExe'"],"pos_type":"Attribute"}},"content":{"content":"\nGet the path of a program of a derivation.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\ngetExe' :: Derivation -> String -> StorePath\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getExe'` usage example\n\n```nix\ngetExe' pkgs.hello \"hello\"\n=> \"/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello\"\ngetExe' pkgs.imagemagick \"convert\"\n=> \"/nix/store/5rs48jamq7k6sal98ymj9l4k2bnwq515-imagemagick-7.1.1-15/bin/convert\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":572,"column":3},"path":["lib","meta","getExe'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getFiles","path":["lib","getFiles"],"aliases":[["lib","options","getFiles"]],"signature":"getFiles :: [{ file :: a; ... }] -> [a]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":525,"column":9},"attr_expr":"getFiles","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":564,"column":3},"path":["lib","options","getFiles"],"pos_type":"Attribute"}},"content":{"content":"\nExtracts values of all `file` keys of the given list\n\n# Type\n\n```\ngetFiles :: [{ file :: a; ... }] -> [a]\n```\n\n# Examples\n:::{.example}\n## `getFiles` usage example\n\n```nix\ngetFiles [ { file = \"file1\"; } { file = \"file2\"; } ] // => [ \"file1\" \"file2\" ]\ngetFiles [ ]                                         // => [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":564,"column":3},"path":["lib","options","getFiles"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getFirstOutput","path":["lib","getFirstOutput"],"aliases":[["lib","attrsets","getFirstOutput"]],"signature":"getFirstOutput :: [String] -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":240,"column":9},"attr_expr":"getFirstOutput","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1959,"column":5},"lambda_expr":"getFirstOutput =\n    candidates: pkg:\n    let\n      outputs = builtins.filter (name: hasAttr name pkg) candidates;\n      output = builtins.head outputs;\n    in\n    if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output};","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1958,"column":3},"path":["lib","attrsets","getFirstOutput"],"pos_type":"Attribute"}},"content":{"content":"\nGet the first of the `outputs` provided by the package, or the default.\nThis function is aligned with `_overrideFirst()` from the `multiple-outputs.sh` setup hook.\nLike `getOutput`, the function is idempotent.\n\n# Inputs\n\n`outputs`\n\n: 1\\. Function argument\n\n`pkg`\n\n: 2\\. Function argument\n\n# Type\n\n```\ngetFirstOutput :: [String] -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getFirstOutput` usage example\n\n```nix\n\"${getFirstOutput [ \"include\" \"dev\" ] pkgs.openssl}\"\n=> \"/nix/store/00000000000000000000000000000000-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1958,"column":3},"path":["lib","attrsets","getFirstOutput"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getInclude","path":["lib","getInclude"],"aliases":[["lib","attrsets","getInclude"]],"signature":"getInclude :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":245,"column":9},"attr_expr":"getInclude","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1959,"column":17},"lambda_expr":"pkg:\n    let\n      outputs = builtins.filter (name: hasAttr name pkg) candidates;\n      output = builtins.head outputs;\n    in\n    if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2113,"column":3},"path":["lib","attrsets","getInclude"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `include` output.\nIf the output does not exist, fallback to `.dev`, then to `.out`, and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `include` output will be retrieved.\n\n# Type\n\n```\ngetInclude :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getInclude` usage example\n\n```nix\n\"${getInclude pkgs.openssl}\"\n=> \"/nix/store/00000000000000000000000000000000-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2113,"column":3},"path":["lib","attrsets","getInclude"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getLib","path":["lib","getLib"],"aliases":[["lib","attrsets","getLib"]],"signature":"getLib :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":242,"column":9},"attr_expr":"getLib","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2022,"column":3},"path":["lib","attrsets","getLib"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `lib` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `lib` output will be retrieved.\n\n# Type\n\n```\ngetLib :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getLib` usage example\n\n```nix\n\"${getLib pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-lib\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2022,"column":3},"path":["lib","attrsets","getLib"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getLicenseFromSpdxId","path":["lib","getLicenseFromSpdxId"],"aliases":[["lib","meta","getLicenseFromSpdxId"]],"signature":"getLicenseFromSpdxId :: String -> {\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n}\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":443,"column":9},"attr_expr":"getLicenseFromSpdxId","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":434,"column":5},"lambda_expr":"getLicenseFromSpdxId =\n    licstr:\n    getLicenseFromSpdxIdOr licstr (\n      lib.warn \"getLicenseFromSpdxId: No license with the given SPDX ID found: ${licstr}\" {\n        shortName = licstr;\n        spdxId = licstr;\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":433,"column":3},"path":["lib","meta","getLicenseFromSpdxId"],"pos_type":"Attribute"}},"content":{"content":"\nGet the corresponding attribute in lib.licenses from the SPDX ID\nor warn and fallback to `{ shortName = <license string>; }`.\n\nFor SPDX IDs, see https://spdx.org/licenses.\nNote that some SPDX licenses might be missing.\n\n# Type\n\n```\ngetLicenseFromSpdxId :: String -> {\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n}\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getLicenseFromSpdxId` usage example\n\n```nix\nlib.getLicenseFromSpdxId \"MIT\" == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxId \"mIt\" == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxId \"MY LICENSE\"\n=> trace: warning: getLicenseFromSpdxId: No license matches the given SPDX ID: MY LICENSE\n=> { shortName = \"MY LICENSE\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":433,"column":3},"path":["lib","meta","getLicenseFromSpdxId"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getLicenseFromSpdxIdOr","path":["lib","getLicenseFromSpdxIdOr"],"aliases":[["lib","meta","getLicenseFromSpdxIdOr"]],"signature":"getLicenseFromSpdxIdOr :: String -> a -> ({\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n} | a)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":444,"column":9},"attr_expr":"getLicenseFromSpdxIdOr","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":496,"column":5},"lambda_expr":"licstr: default: lowercaseLicenses.${lib.toLower licstr} or default","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":489,"column":3},"path":["lib","meta","getLicenseFromSpdxIdOr"],"pos_type":"Attribute"}},"content":{"content":"\nGet the corresponding attribute in lib.licenses from the SPDX ID\nor fallback to the given default value.\n\nFor SPDX IDs, see https://spdx.org/licenses.\nNote that some SPDX licenses might be missing.\n\n# Inputs\n\n`licstr`\n: 1\\. SPDX ID string to find a matching license\n\n`default`\n: 2\\. Fallback value when a match is not found\n\n# Type\n\n```\ngetLicenseFromSpdxIdOr :: String -> a -> ({\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n} | a)\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getLicenseFromSpdxIdOr` usage example\n\n```nix\nlib.getLicenseFromSpdxIdOr \"MIT\" null == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxId \"mIt\" null == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxIdOr \"MY LICENSE\" lib.licenses.free == lib.licenses.free\n=> true\nlib.getLicenseFromSpdxIdOr \"MY LICENSE\" null\n=> null\nlib.getLicenseFromSpdxIdOr \"MY LICENSE\" (throw \"No SPDX ID matches MY LICENSE\")\n=> error: No SPDX ID matches MY LICENSE\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":489,"column":3},"path":["lib","meta","getLicenseFromSpdxIdOr"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getMan","path":["lib","getMan"],"aliases":[["lib","attrsets","getMan"]],"signature":"getMan :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":246,"column":9},"attr_expr":"getMan","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2146,"column":3},"path":["lib","attrsets","getMan"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `man` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `man` output will be retrieved.\n\n# Type\n\n```\ngetMan :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getMan` usage example\n\n```nix\n\"${getMan pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-man\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2146,"column":3},"path":["lib","attrsets","getMan"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getName","path":["lib","getName"],"aliases":[["lib","strings","getName"]],"signature":"getName :: String | Derivation -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":376,"column":9},"attr_expr":"getName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2024,"column":5},"lambda_expr":"x: if isString x then parse x else x.pname or (parse x.name)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2020,"column":3},"path":["lib","strings","getName"],"pos_type":"Attribute"}},"content":{"content":"\nThis function takes an argument `x` that's either a derivation or a\nderivation's \"name\" attribute and extracts the name part from that\nargument.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\ngetName :: String | Derivation -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.getName` usage example\n\n```nix\ngetName \"youtube-dl-2016.01.01\"\n=> \"youtube-dl\"\ngetName pkgs.youtube-dl\n=> \"youtube-dl\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2020,"column":3},"path":["lib","strings","getName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getOutput","path":["lib","getOutput"],"aliases":[["lib","attrsets","getOutput"]],"signature":"getOutput :: String -> :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":239,"column":9},"attr_expr":"getOutput","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":5},"lambda_expr":"getOutput =\n    output: pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1922,"column":3},"path":["lib","attrsets","getOutput"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package output.\nIf no output is found, fallback to `.out` and then to the default.\nThe function is idempotent: `getOutput \"b\" (getOutput \"a\" p) == getOutput \"a\" p`.\n\n# Inputs\n\n`output`\n\n: 1\\. Function argument\n\n`pkg`\n\n: 2\\. Function argument\n\n# Type\n\n```\ngetOutput :: String -> :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getOutput` usage example\n\n```nix\n\"${getOutput \"dev\" pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1922,"column":3},"path":["lib","attrsets","getOutput"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getStatic","path":["lib","getStatic"],"aliases":[["lib","attrsets","getStatic"]],"signature":"getStatic :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":243,"column":9},"attr_expr":"getStatic","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1959,"column":17},"lambda_expr":"pkg:\n    let\n      outputs = builtins.filter (name: hasAttr name pkg) candidates;\n      output = builtins.head outputs;\n    in\n    if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2051,"column":3},"path":["lib","attrsets","getStatic"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `static` output.\nIf the output does not exist, fallback to `.lib`, then to `.out`, and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `static` output will be retrieved.\n\n# Type\n\n```\ngetStatic :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getStatic` usage example\n\n```nix\n\"${lib.getStatic pkgs.glibc}\"\n=> \"/nix/store/00000000000000000000000000000000-glibc-2.39-52-static\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2051,"column":3},"path":["lib","attrsets","getStatic"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getValue","path":["lib","getValue"],"aliases":[["lib","misc","getValue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":576,"column":9},"attr_expr":"getValue","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":98,"column":5},"lambda_expr":"getValue =\n    attrSet: argList: name:\n    (attrByPath [ name ] (\n      if checkFlag attrSet name then\n        true\n      else if argList == [ ] then\n        null\n      else\n        let\n          x = builtins.head argList;\n        in\n        if (head x) == name then (head (tail x)) else (getValue attrSet (tail argList) name)\n    ) attrSet);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":98,"column":5},"path":["lib","getValue"],"pos_type":"Lambda"}},"content":{"content":"Output : its value or default.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":98,"column":5},"path":["lib","getValue"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.getValues","path":["lib","getValues"],"aliases":[["lib","options","getValues"]],"signature":"getValues :: [{ value :: a; ... }] -> [a]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":524,"column":9},"attr_expr":"getValues","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":542,"column":3},"path":["lib","options","getValues"],"pos_type":"Attribute"}},"content":{"content":"\nExtracts values of all `value` keys of the given list.\n\n# Type\n\n```\ngetValues :: [{ value :: a; ... }] -> [a]\n```\n\n# Examples\n:::{.example}\n## `getValues` usage example\n\n```nix\ngetValues [ { value = 1; } { value = 2; } ] // => [ 1 2 ]\ngetValues [ ]                               // => [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":542,"column":3},"path":["lib","options","getValues"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.getVersion","path":["lib","getVersion"],"aliases":[["lib","strings","getVersion"]],"signature":"getVersion :: String | Derivation -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":377,"column":9},"attr_expr":"getVersion","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2059,"column":5},"lambda_expr":"x: if isString x then parse x else x.version or (parse x.name)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2055,"column":3},"path":["lib","strings","getVersion"],"pos_type":"Attribute"}},"content":{"content":"\nThis function takes an argument `x` that's either a derivation or a\nderivation's \"name\" attribute and extracts the version part from that\nargument.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\ngetVersion :: String | Derivation -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.getVersion` usage example\n\n```nix\ngetVersion \"youtube-dl-2016.01.01\"\n=> \"2016.01.01\"\ngetVersion pkgs.youtube-dl\n=> \"2016.01.01\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2055,"column":3},"path":["lib","strings","getVersion"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.groupBy","path":["lib","groupBy"],"aliases":[["builtins","groupBy"],["lib","lists","groupBy"]],"signature":null,"is_primop":true,"primop_meta":{"name":"groupBy","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":309,"column":9},"attr_expr":"groupBy","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","groupBy"],"pos_type":"Lambda"}},"content":{"content":"\nGroups elements of *list* together by the string returned from the\nfunction *f* called on each element. It returns an attribute set\nwhere each attribute value contains the elements of *list* that are\nmapped to the same corresponding attribute name returned by *f*.\n\nFor example,\n\n```nix\nbuiltins.groupBy (builtins.substring 0 1) [\"foo\" \"bar\" \"baz\"]\n```\n\nevaluates to\n\n```nix\n{ b = [ \"bar\" \"baz\" ]; f = [ \"foo\" ]; }\n```\n","source":{"position":null,"path":["lib","groupBy"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.groupBy' (Prime)","path":["lib","groupBy'"],"aliases":[["lib","lists","groupBy'"]],"signature":"groupBy' :: (a -> b -> a) -> a -> (b -> String) -> [b] -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":310,"column":9},"attr_expr":"groupBy'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1008,"column":5},"lambda_expr":"groupBy' =\n    op: nul: pred: lst:\n    mapAttrs (name: foldl op nul) (groupBy pred lst);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1007,"column":3},"path":["lib","lists","groupBy'"],"pos_type":"Attribute"}},"content":{"content":"\nSplits the elements of a list into many lists, using the return value of a predicate.\nPredicate should return a string which becomes keys of attrset `groupBy` returns.\n`groupBy'` allows to customise the combining function and initial value\n\n# Inputs\n\n`op`\n\n: 1\\. Function argument\n\n`nul`\n\n: 2\\. Function argument\n\n`pred`\n\n: 3\\. Function argument\n\n`lst`\n\n: 4\\. Function argument\n\n# Type\n\n```\ngroupBy' :: (a -> b -> a) -> a -> (b -> String) -> [b] -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.lists.groupBy'` usage example\n\n```nix\ngroupBy (x: boolToString (x > 2)) [ 5 1 2 3 4 ]\n=> { true = [ 5 3 4 ]; false = [ 1 2 ]; }\ngroupBy (x: x.name) [ {name = \"icewm\"; script = \"icewm &\";}\n                      {name = \"xfce\";  script = \"xfce4-session &\";}\n                      {name = \"icewm\"; script = \"icewmbg &\";}\n                      {name = \"mate\";  script = \"gnome-session &\";}\n                    ]\n=> { icewm = [ { name = \"icewm\"; script = \"icewm &\"; }\n               { name = \"icewm\"; script = \"icewmbg &\"; } ];\n     mate  = [ { name = \"mate\";  script = \"gnome-session &\"; } ];\n     xfce  = [ { name = \"xfce\";  script = \"xfce4-session &\"; } ];\n   }\n\ngroupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ]\n=> { true = 12; false = 3; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1007,"column":3},"path":["lib","lists","groupBy'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.hasAttr","path":["lib","hasAttr"],"aliases":[["builtins","hasAttr"],["lib","attrsets","hasAttr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hasAttr","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":254,"column":9},"attr_expr":"hasAttr","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","hasAttr"],"pos_type":"Lambda"}},"content":{"content":"\n`hasAttr` returns `true` if *set* has an attribute named *s*, and\n`false` otherwise. This is a dynamic version of the `?` operator,\nsince *s* is an expression rather than an identifier.\n","source":{"position":null,"path":["lib","hasAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.hasAttrByPath","path":["lib","hasAttrByPath"],"aliases":[["lib","attrsets","hasAttrByPath"]],"signature":"hasAttrByPath :: [String] -> AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":202,"column":9},"attr_expr":"hasAttrByPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":156,"column":5},"lambda_expr":"hasAttrByPath =\n    attrPath: e:\n    let\n      lenAttrPath = length attrPath;\n      hasAttrByPath' =\n        n: s:\n        (\n          n == lenAttrPath\n          || (\n            let\n              attr = elemAt attrPath n;\n            in\n            if s ? ${attr} then hasAttrByPath' (n + 1) s.${attr} else false\n          )\n        );\n    in\n    hasAttrByPath' 0 e;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":155,"column":3},"path":["lib","attrsets","hasAttrByPath"],"pos_type":"Attribute"}},"content":{"content":"\nReturns if an attribute from nested attribute set exists.\n\nNix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:\n\n```nix\n(x?a.b) == hasAttrByPath [\"a\" \"b\"] x\n# and\n(x?${f p}.\"example.com\") == hasAttrByPath [ (f p) \"example.com\" ] x\n```\n\n**Laws**:\n 1.  ```nix\n     hasAttrByPath [] x == true\n     ```\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to check from `set`\n\n`set`\n\n: The nested attribute set to check\n\n# Type\n\n```\nhasAttrByPath :: [String] -> AttrSet -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.hasAttrByPath` usage example\n\n```nix\nx = { a = { b = 3; }; }\nhasAttrByPath [\"a\" \"b\"] x\n=> true\nhasAttrByPath [\"z\" \"z\"] x\n=> false\nhasAttrByPath [] (throw \"no need\")\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":155,"column":3},"path":["lib","attrsets","hasAttrByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.hasContext","path":["lib","hasContext"],"aliases":[["builtins","hasContext"],["lib","pathHasContext"],["lib","sources","pathHasContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hasContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":113,"column":9},"attr_expr":"hasContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","hasContext"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if string *s* has a non-empty context.\nThe context can be obtained with\n[`getContext`](#builtins-getContext).\n\n> **Example**\n>\n> Many operations require a string context to be empty because they are intended only to work with \"regular\" strings, and also to help users avoid unintentionally loosing track of string context elements.\n> `builtins.hasContext` can help create better domain-specific errors in those case.\n>\n> ```nix\n> name: meta:\n>\n> if builtins.hasContext name\n> then throw \"package name cannot contain string context\"\n> else { ${name} = meta; }\n> ```\n","source":{"position":null,"path":["lib","hasContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.hasInfix","path":["lib","hasInfix"],"aliases":[["lib","strings","hasInfix"]],"signature":"hasInfix :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":343,"column":9},"attr_expr":"hasInfix","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":892,"column":5},"lambda_expr":"hasInfix =\n    infix: content:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath infix)\n      ''\n        lib.strings.hasInfix: The first argument (${toString infix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (builtins.match \".*${escapeRegex infix}.*\" \"${content}\" != null);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":891,"column":3},"path":["lib","strings","hasInfix"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine whether a string contains the given infix\n\n# Inputs\n\n`infix`\n: 1\\. Function argument\n\n`content`\n: 2\\. Function argument\n\n# Type\n\n```\nhasInfix :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.hasInfix` usage example\n\n```nix\nhasInfix \"bc\" \"abcd\"\n=> true\nhasInfix \"ab\" \"abcd\"\n=> true\nhasInfix \"cd\" \"abcd\"\n=> true\nhasInfix \"foo\" \"abcd\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":891,"column":3},"path":["lib","strings","hasInfix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.hasPrefix","path":["lib","hasPrefix"],"aliases":[["lib","strings","hasPrefix"]],"signature":"hasPrefix :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":344,"column":9},"attr_expr":"hasPrefix","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":799,"column":5},"lambda_expr":"hasPrefix =\n    pref: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath pref)\n      ''\n        lib.strings.hasPrefix: The first argument (${toString pref}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.\n            You might want to use `lib.path.hasPrefix` instead, which correctly supports paths.''\n      (substring 0 (stringLength pref) str == pref);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":798,"column":3},"path":["lib","strings","hasPrefix"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine whether a string has given prefix.\n\n# Inputs\n\n`pref`\n: Prefix to check for\n\n`str`\n: Input string\n\n# Type\n\n```\nhasPrefix :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.hasPrefix` usage example\n\n```nix\nhasPrefix \"foo\" \"foobar\"\n=> true\nhasPrefix \"foo\" \"barfoo\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":798,"column":3},"path":["lib","strings","hasPrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.hasSuffix","path":["lib","hasSuffix"],"aliases":[["lib","strings","hasSuffix"]],"signature":"hasSuffix :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":345,"column":9},"attr_expr":"hasSuffix","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":842,"column":5},"lambda_expr":"hasSuffix =\n    suffix: content:\n    let\n      lenContent = stringLength content;\n      lenSuffix = stringLength suffix;\n    in\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath suffix)\n      ''\n        lib.strings.hasSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (lenContent >= lenSuffix && substring (lenContent - lenSuffix) lenContent content == suffix);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":841,"column":3},"path":["lib","strings","hasSuffix"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine whether a string has given suffix.\n\n# Inputs\n\n`suffix`\n: Suffix to check for\n\n`content`\n: Input string\n\n# Type\n\n```\nhasSuffix :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.hasSuffix` usage example\n\n```nix\nhasSuffix \"foo\" \"foobar\"\n=> false\nhasSuffix \"foo\" \"barfoo\"\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":841,"column":3},"path":["lib","strings","hasSuffix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.hashFile","path":["lib","hashFile"],"aliases":[["builtins","hashFile"],["lib","filesystem","hashFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hashFile","args":["type","p"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":456,"column":9},"attr_expr":"hashFile","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","hashFile"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a base-16 representation of the cryptographic hash of the\nfile at path *p*. The hash algorithm specified by *type* must be one\nof `\"md5\"`, `\"sha1\"`, `\"sha256\"` or `\"sha512\"`.\n","source":{"position":null,"path":["lib","hashFile"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.hashString","path":["lib","hashString"],"aliases":[["builtins","hashString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hashString","args":["type","s"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":115,"column":9},"attr_expr":"hashString","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","hashString"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a base-16 representation of the cryptographic hash of string\n*s*. The hash algorithm specified by *type* must be one of `\"md5\"`,\n`\"sha1\"`, `\"sha256\"` or `\"sha512\"`.\n","source":{"position":null,"path":["lib","hashString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.head","path":["lib","head"],"aliases":[["builtins","head"],["lib","lists","head"],["lib","strings","head"]],"signature":null,"is_primop":true,"primop_meta":{"name":"head","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":314,"column":9},"attr_expr":"head","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","head"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the first element of a list; abort evaluation if the argument\nisn’t a list or is an empty list. You can test whether a list is\nempty by comparing it with `[]`.\n","source":{"position":null,"path":["lib","head"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.hiPrio","path":["lib","hiPrio"],"aliases":[["lib","meta","hiPrio"]],"signature":"hiPrio :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":440,"column":9},"attr_expr":"hiPrio","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":58,"column":15},"lambda_expr":"drv:\n    if drv ? overrideAttrs then\n      drv.overrideAttrs (old: {\n        meta = (old.meta or { }) // newAttrs;\n      })\n    else\n      drv // { meta = (drv.meta or { }) // newAttrs; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":262,"column":3},"path":["lib","meta","hiPrio"],"pos_type":"Attribute"}},"content":{"content":"\nIncrease the nix-env priority of the package, i.e., this\nversion/variant of the package will be preferred.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhiPrio :: Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":262,"column":3},"path":["lib","meta","hiPrio"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.hiPrioSet","path":["lib","hiPrioSet"],"aliases":[["lib","meta","hiPrioSet"]],"signature":"hiPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":441,"column":9},"attr_expr":"hiPrioSet","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":279,"column":15},"lambda_expr":"hiPrioSet = set: mapDerivationAttrset hiPrio set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":279,"column":3},"path":["lib","meta","hiPrioSet"],"pos_type":"Attribute"}},"content":{"content":"\nApply `hiPrio` to an attrset with derivations.\n\n# Inputs\n\n`set`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhiPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":279,"column":3},"path":["lib","meta","hiPrioSet"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.hydraJob","path":["lib","hydraJob"],"aliases":[["lib","customisation","hydraJob"]],"signature":"hydraJob :: (Derivation | Null) -> (Derivation | Null)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":413,"column":9},"attr_expr":"hydraJob","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":464,"column":5},"lambda_expr":"hydraJob =\n    drv:\n    let\n      outputs = drv.outputs or [ \"out\" ];\n\n      commonAttrs = {\n        inherit (drv) name system meta;\n        inherit outputs;\n      }\n      // optionalAttrs (drv._hydraAggregate or false) {\n        _hydraAggregate = true;\n        constituents = map hydraJob (flatten drv.constituents);\n      }\n      // (listToAttrs outputsList);\n\n      makeOutput =\n        outputName:\n        let\n          output = drv.${outputName};\n        in\n        {\n          name = outputName;\n          value = commonAttrs // {\n            outPath = output.outPath;\n            drvPath = output.drvPath;\n            type = \"derivation\";\n            inherit outputName;\n          };\n        };\n\n      outputsList = map makeOutput outputs;\n\n      drv' = (head outputsList).value;\n    in\n    if drv == null then null else deepSeq drv' drv';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":463,"column":3},"path":["lib","customisation","hydraJob"],"pos_type":"Attribute"}},"content":{"content":"\nStrip a derivation of all non-essential attributes, returning\nonly those needed by hydra-eval-jobs. Also strictly evaluate the\nresult to ensure that there are no thunks kept alive to prevent\ngarbage collection.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhydraJob :: (Derivation | Null) -> (Derivation | Null)\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":463,"column":3},"path":["lib","customisation","hydraJob"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.id","path":["lib","id"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":127,"column":9},"attr_expr":"id","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.ifEnable","path":["lib","ifEnable"],"aliases":[["lib","misc","ifEnable"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":574,"column":9},"attr_expr":"ifEnable","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":70,"column":5},"lambda_expr":"ifEnable =\n    cond: val:\n    if cond then\n      val\n    else if builtins.isList val then\n      [ ]\n    else if builtins.isAttrs val then\n      { }\n    # else if builtins.isString val then \"\"\n    else if val == true || val == false then\n      false\n    else\n      null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":70,"column":5},"path":["lib","ifEnable"],"pos_type":"Lambda"}},"content":{"content":"of the second argument.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":70,"column":5},"path":["lib","ifEnable"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.ifilter0","path":["lib","ifilter0"],"aliases":[["lib","lists","ifilter0"]],"signature":"ifilter0 :: (Int -> a -> Bool) -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":271,"column":9},"attr_expr":"ifilter0","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":389,"column":5},"lambda_expr":"ifilter0 =\n    ipred: input:\n    map (idx: elemAt input idx) (\n      filter (idx: ipred idx (elemAt input idx)) (genList (x: x) (length input))\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":388,"column":3},"path":["lib","lists","ifilter0"],"pos_type":"Attribute"}},"content":{"content":"\nFilter a list for elements that satisfy a predicate function.\nThe predicate function is called with both the index and value for each element.\nIt must return `true`/`false` to include/exclude a given element in the result.\nThis function is strict in the result of the predicate function for each element.\nThis function has O(n) complexity.\n\nAlso see [`builtins.filter`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-filter) (available as `lib.lists.filter`),\nwhich can be used instead when the index isn't needed.\n\n# Inputs\n\n`ipred`\n\n: The predicate function, it takes two arguments:\n  - 1. (int): the index of the element.\n  - 2. (a): the value of the element.\n\n  It must return `true`/`false` to include/exclude a given element from the result.\n\n`list`\n\n: The list to filter using the predicate.\n\n# Type\n```\nifilter0 :: (Int -> a -> Bool) -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.ifilter0` usage example\n\n```nix\nifilter0 (i: v: i == 0 || v > 2) [ 1 2 3 ]\n=> [ 1 3 ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":388,"column":3},"path":["lib","lists","ifilter0"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.imap","path":["lib","imap"],"aliases":[["lib","imap1"],["lib","lists","imap1"],["lib","misc","imap"]],"signature":"imap1 :: (Int -> a -> b) -> [a] -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":600,"column":9},"attr_expr":"imap","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":11},"lambda_expr":"imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}},"content":{"content":"\nMap with index starting from 1\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nimap1 :: (Int -> a -> b) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.imap1` usage example\n\n```nix\nimap1 (i: v: \"${v}-${toString i}\") [\"a\" \"b\"]\n=> [ \"a-1\" \"b-2\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.imap0","path":["lib","imap0"],"aliases":[["lib","lists","imap0"]],"signature":"imap0 :: (Int -> a -> b) -> [a] -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":268,"column":9},"attr_expr":"imap0","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":315,"column":11},"lambda_expr":"imap0 = f: list: genList (n: f n (elemAt list n)) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":315,"column":3},"path":["lib","lists","imap0"],"pos_type":"Attribute"}},"content":{"content":"\nMap with index starting from 0\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nimap0 :: (Int -> a -> b) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.imap0` usage example\n\n```nix\nimap0 (i: v: \"${v}-${toString i}\") [\"a\" \"b\"]\n=> [ \"a-0\" \"b-1\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":315,"column":3},"path":["lib","lists","imap0"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.imap1","path":["lib","imap1"],"aliases":[["lib","imap"],["lib","lists","imap1"],["lib","misc","imap"]],"signature":"imap1 :: (Int -> a -> b) -> [a] -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":269,"column":9},"attr_expr":"imap1","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":11},"lambda_expr":"imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}},"content":{"content":"\nMap with index starting from 1\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nimap1 :: (Int -> a -> b) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.imap1` usage example\n\n```nix\nimap1 (i: v: \"${v}-${toString i}\") [\"a\" \"b\"]\n=> [ \"a-1\" \"b-2\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.importJSON","path":["lib","importJSON"],"aliases":[["lib","trivial","importJSON"]],"signature":"importJSON :: Path -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":150,"column":9},"attr_expr":"importJSON","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":794,"column":16},"lambda_expr":"importJSON = path: fromJSON (readFile path);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":794,"column":3},"path":["lib","trivial","importJSON"],"pos_type":"Attribute"}},"content":{"content":"\nReads a JSON file.\n\n# Examples\n:::{.example}\n## `lib.trivial.importJSON` usage example\n\nexample.json\n```json\n{\n  \"title\": \"Example JSON\",\n  \"hello\": {\n    \"world\": \"foo\",\n    \"bar\": {\n      \"foobar\": true\n    }\n  }\n}\n```\n\n```nix\nimportJSON ./example.json\n=> {\n  title = \"Example JSON\";\n  hello = {\n    world = \"foo\";\n    bar = {\n      foobar = true;\n    };\n  };\n}\n```\n\n:::\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\nimportJSON :: Path -> Any\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":794,"column":3},"path":["lib","trivial","importJSON"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.importTOML","path":["lib","importTOML"],"aliases":[["lib","trivial","importTOML"]],"signature":"importTOML :: Path -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":151,"column":9},"attr_expr":"importTOML","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":841,"column":16},"lambda_expr":"importTOML = path: fromTOML (readFile path);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":841,"column":3},"path":["lib","trivial","importTOML"],"pos_type":"Attribute"}},"content":{"content":"\nReads a TOML file.\n\n# Examples\n:::{.example}\n## `lib.trivial.importTOML` usage example\n\nexample.toml\n```toml\ntitle = \"TOML Example\"\n\n[hello]\nworld = \"foo\"\n\n[hello.bar]\nfoobar = true\n```\n\n```nix\nimportTOML ./example.toml\n=> {\n  title = \"TOML Example\";\n  hello = {\n    world = \"foo\";\n    bar = {\n      foobar = true;\n    };\n  };\n}\n```\n\n:::\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\nimportTOML :: Path -> Any\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":841,"column":3},"path":["lib","trivial","importTOML"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.info","path":["lib","info"],"aliases":[["lib","trivial","info"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":158,"column":9},"attr_expr":"info","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1049,"column":10},"lambda_expr":"msg: builtins.trace \"INFO: ${msg}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1049,"column":10},"path":["lib","info"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1049,"column":10},"path":["lib","info"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.init","path":["lib","init"],"aliases":[["lib","lists","init"]],"signature":"init :: [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":301,"column":9},"attr_expr":"init","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1845,"column":5},"lambda_expr":"init =\n    list:\n    assert lib.assertMsg (list != [ ]) \"lists.init: list must not be empty!\";\n    take (length list - 1) list;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1844,"column":3},"path":["lib","lists","init"],"pos_type":"Attribute"}},"content":{"content":"\nReturns all elements but the last.\n\nThis function throws an error if the list is empty.\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\ninit :: [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.init` usage example\n\n```nix\ninit [ 1 2 3 ]\n=> [ 1 2 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1844,"column":3},"path":["lib","lists","init"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.innerClosePropagation","path":["lib","innerClosePropagation"],"aliases":[["lib","misc","innerClosePropagation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":584,"column":9},"attr_expr":"innerClosePropagation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":212,"column":5},"lambda_expr":"acc: xs:\n    if xs == [ ] then\n      acc\n    else\n      let\n        y = head xs;\n        ys = tail xs;\n      in\n      if !isAttrs y then\n        innerClosePropagation acc ys\n      else\n        let\n          acc' = [ y ] ++ acc;\n        in\n        innerClosePropagation acc' (uniqList {\n          inputList =\n            (maybeAttrNullable \"propagatedBuildInputs\" [ ] y)\n            ++ (maybeAttrNullable \"propagatedNativeBuildInputs\" [ ] y)\n            ++ ys;\n          acc = acc';\n        })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":212,"column":5},"path":["lib","innerClosePropagation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":212,"column":5},"path":["lib","innerClosePropagation"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.innerModifySumArgs","path":["lib","innerModifySumArgs"],"aliases":[["lib","misc","innerModifySumArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":582,"column":9},"attr_expr":"innerModifySumArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":207,"column":5},"lambda_expr":"f: x: a: b:\n    if b == null then (f a b) // x else innerModifySumArgs f x (a // b)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":207,"column":5},"path":["lib","innerModifySumArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":207,"column":5},"path":["lib","innerModifySumArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.intersectAttrs","path":["lib","intersectAttrs"],"aliases":[["builtins","intersectAttrs"],["lib","attrsets","intersectAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"intersectAttrs","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":257,"column":9},"attr_expr":"intersectAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","intersectAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a set consisting of the attributes in the set *e2* which have the\nsame name as some attribute in *e1*.\n\nPerforms in O(*n* log *m*) where *n* is the size of the smaller set and *m* the larger set's size.\n","source":{"position":null,"path":["lib","intersectAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.intersectLists","path":["lib","intersectLists"],"aliases":[["lib","lists","intersectLists"]],"signature":"intersectLists :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":306,"column":9},"attr_expr":"intersectLists","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2002,"column":20},"lambda_expr":"intersectLists = e: filter (x: elem x e);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2002,"column":3},"path":["lib","lists","intersectLists"],"pos_type":"Attribute"}},"content":{"content":"\nIntersects list `list1` and another list (`list2`).\n\nO(nm) complexity.\n\n# Inputs\n\n`list1`\n\n: First list\n\n`list2`\n\n: Second list\n\n# Type\n\n```\nintersectLists :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.intersectLists` usage example\n\n```nix\nintersectLists [ 1 2 3 ] [ 6 3 2 ]\n=> [ 3 2 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2002,"column":3},"path":["lib","lists","intersectLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.intersperse","path":["lib","intersperse"],"aliases":[["lib","strings","intersperse"]],"signature":"intersperse :: a -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":331,"column":9},"attr_expr":"intersperse","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":187,"column":5},"lambda_expr":"intersperse =\n    separator: list:\n    if list == [ ] || length list == 1 then\n      list\n    else\n      tail (\n        lib.concatMap (x: [\n          separator\n          x\n        ]) list\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":186,"column":3},"path":["lib","strings","intersperse"],"pos_type":"Attribute"}},"content":{"content":"\nPlace an element between each element of a list\n\n# Inputs\n\n`separator`\n: Separator to add between elements\n\n`list`\n: Input list\n\n# Type\n\n```\nintersperse :: a -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.intersperse` usage example\n\n```nix\nintersperse \"/\" [\"usr\" \"local\" \"bin\"]\n=> [\"usr\" \"/\" \"local\" \"/\" \"bin\"].\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":186,"column":3},"path":["lib","strings","intersperse"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.isAttrs","path":["lib","isAttrs"],"aliases":[["builtins","isAttrs"],["lib","attrsets","isAttrs"],["lib","strings","isAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isAttrs","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":256,"column":9},"attr_expr":"isAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","isAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a set, and `false` otherwise.\n","source":{"position":null,"path":["lib","isAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isBool","path":["lib","isBool"],"aliases":[["builtins","isBool"],["lib","trivial","isBool"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isBool","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":181,"column":9},"attr_expr":"isBool","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","isBool"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a bool, and `false` otherwise.\n","source":{"position":null,"path":["lib","isBool"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isDerivation","path":["lib","isDerivation"],"aliases":[["lib","attrsets","isDerivation"]],"signature":"isDerivation :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":227,"column":9},"attr_expr":"isDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1412,"column":18},"lambda_expr":"isDerivation = value: value.type or null == \"derivation\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1412,"column":3},"path":["lib","attrsets","isDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether the argument is a derivation. Any set with\n`{ type = \"derivation\"; }` counts as a derivation.\n\n# Inputs\n\n`value`\n\n: Value to check.\n\n# Type\n\n```\nisDerivation :: Any -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.isDerivation` usage example\n\n```nix\nnixpkgs = import <nixpkgs> {}\nisDerivation nixpkgs.ruby\n=> true\nisDerivation \"foobar\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1412,"column":3},"path":["lib","attrsets","isDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.isFloat","path":["lib","isFloat"],"aliases":[["builtins","isFloat"],["lib","trivial","isFloat"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isFloat","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":147,"column":9},"attr_expr":"isFloat","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","isFloat"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a float, and `false` otherwise.\n","source":{"position":null,"path":["lib","isFloat"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isFunction","path":["lib","isFunction"],"aliases":[["lib","trivial","isFunction"]],"signature":"isFunction : Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":174,"column":9},"attr_expr":"isFunction","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1131,"column":5},"lambda_expr":"f: isFunction f || (f ? __functor && isFunction (f.__functor f))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1127,"column":3},"path":["lib","trivial","isFunction"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether something is a function or something\nannotated with function args.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nisFunction : Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1127,"column":3},"path":["lib","trivial","isFunction"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.isInOldestRelease","path":["lib","isInOldestRelease"],"aliases":[["lib","oldestSupportedReleaseIsAtLeast"],["lib","trivial","isInOldestRelease"],["lib","trivial","oldestSupportedReleaseIsAtLeast"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":162,"column":9},"attr_expr":"isInOldestRelease","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":499,"column":37},"lambda_expr":"oldestSupportedReleaseIsAtLeast = release: release <= lib.trivial.oldestSupportedRelease;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":490,"column":3},"path":["lib","trivial","isInOldestRelease"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a feature is supported in all supported releases (at the time of\nrelease branch-off, if applicable). See `oldestSupportedRelease`.\n\n# Inputs\n\n`release`\n\n: Release number of feature introduction as an integer, e.g. 2111 for 21.11.\nSet it to the upcoming release, matching the nixpkgs/.version file.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":490,"column":3},"path":["lib","trivial","isInOldestRelease"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.isInt","path":["lib","isInt"],"aliases":[["builtins","isInt"],["lib","strings","isInt"],["lib","trivial","isInt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isInt","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":182,"column":9},"attr_expr":"isInt","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","isInt"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to an integer, and `false` otherwise.\n","source":{"position":null,"path":["lib","isInt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isList","path":["lib","isList"],"aliases":[["builtins","isList"],["lib","lists","isList"],["lib","strings","isList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isList","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":318,"column":9},"attr_expr":"isList","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","isList"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a list, and `false` otherwise.\n","source":{"position":null,"path":["lib","isList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isOption","path":["lib","isOption"],"aliases":[["lib","options","isOption"]],"signature":"isOption :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":517,"column":9},"attr_expr":"isOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":18},"lambda_expr":"x: (x._type or \"\") == type","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":77,"column":3},"path":["lib","options","isOption"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true when the given argument `a` is an option\n\n# Inputs\n\n`a`\n: Any value to check whether it is an option\n\n# Examples\n:::{.example}\n## `lib.options.isOption` usage example\n\n```nix\nisOption 1             // => false\nisOption (mkOption {}) // => true\n```\n\n:::\n\n# Type\n\n```\nisOption :: Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":77,"column":3},"path":["lib","options","isOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.isOptionType","path":["lib","isOptionType"],"aliases":[["lib","types","isOptionType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":543,"column":9},"attr_expr":"isOptionType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":18},"lambda_expr":"x: (x._type or \"\") == type","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.isPath","path":["lib","isPath"],"aliases":[["builtins","isPath"],["lib","filesystem","isPath"],["lib","strings","isPath"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isPath","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":454,"column":9},"attr_expr":"isPath","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","isPath"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a path, and `false` otherwise.\n","source":{"position":null,"path":["lib","isPath"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isStorePath","path":["lib","isStorePath"],"aliases":[["lib","strings","isStorePath"]],"signature":"isStorePath :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":352,"column":9},"attr_expr":"isStorePath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2679,"column":5},"lambda_expr":"isStorePath =\n    x:\n    if isStringLike x then\n      let\n        str = toString x;\n      in\n      substring 0 1 str == \"/\"\n      && (\n        dirOf str == storeDir\n        # Match content‐addressed derivations, which _currently_ do not have a\n        # store directory prefix.\n        # This is a workaround for https://github.com/NixOS/nix/issues/12361\n        # which was needed during the experimental phase of ca-derivations and\n        # should be removed once the issue has been resolved.\n        || builtins.match \"/[0-9a-z]{52}\" str != null\n      )\n    else\n      false;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2678,"column":3},"path":["lib","strings","isStorePath"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether a value `x` is a store path.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\nisStorePath :: Any -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.isStorePath` usage example\n\n```nix\nisStorePath \"/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/bin/python\"\n=> false\nisStorePath \"/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11\"\n=> true\nisStorePath pkgs.python\n=> true\nisStorePath [] || isStorePath 42 || isStorePath {} || …\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2678,"column":3},"path":["lib","strings","isStorePath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.isString","path":["lib","isString"],"aliases":[["builtins","isString"],["lib","strings","isString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isString","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":328,"column":9},"attr_expr":"isString","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","isString"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a string, and `false` otherwise.\n","source":{"position":null,"path":["lib","isString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isStringLike","path":["lib","isStringLike"],"aliases":[["lib","strings","isStringLike"]],"signature":"isStringLike :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":353,"column":9},"attr_expr":"isStringLike","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2645,"column":18},"lambda_expr":"isStringLike = x: isString x || isPath x || x ? outPath || x ? __toString;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2645,"column":3},"path":["lib","strings","isStringLike"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether a value can be coerced to a string.\nThe value must be a string, path, or attribute set.\n\nString-like values can be used without explicit conversion in\nstring interpolations and in most functions that expect a string.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\nisStringLike :: Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2645,"column":3},"path":["lib","strings","isStringLike"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.isType","path":["lib","isType"],"aliases":[["lib","types","isType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":539,"column":9},"attr_expr":"isType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":12},"lambda_expr":"type: x: (x._type or \"\") == type","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":12},"path":["lib","isType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":12},"path":["lib","isType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.isValidPosixName","path":["lib","isValidPosixName"],"aliases":[["lib","strings","isValidPosixName"]],"signature":"isValidPosixName :: String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":354,"column":9},"attr_expr":"isValidPosixName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1265,"column":22},"lambda_expr":"isValidPosixName = name: match \"[a-zA-Z_][a-zA-Z0-9_]*\" name != null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1265,"column":3},"path":["lib","strings","isValidPosixName"],"pos_type":"Attribute"}},"content":{"content":"\nTest whether the given `name` is a valid POSIX shell variable name.\n\n# Inputs\n\n`name`\n: 1\\. Function argument\n\n# Type\n\n```\nisValidPosixName :: String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.isValidPosixName` usage example\n\n```nix\nisValidPosixName \"foo_bar000\"\n=> true\nisValidPosixName \"0-bad.jpg\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1265,"column":3},"path":["lib","strings","isValidPosixName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.join","path":["lib","join"],"aliases":[["builtins","concatStringsSep"],["lib","concatStringsSep"],["lib","strings","concatStringsSep"],["lib","strings","join"]],"signature":"concatStringsSep :: String -> [String] -> String\n","is_primop":true,"primop_meta":{"name":"concatStringsSep","args":["separator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":346,"column":9},"attr_expr":"join","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings with a separator between each element\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatStringsSep :: String -> [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatStringsSep` usage example\n\n```nix\nconcatStringsSep \"/\" [\"usr\" \"local\" \"bin\"]\n=> \"usr/local/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.last","path":["lib","last"],"aliases":[["lib","lists","last"]],"signature":"last :: [a] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":300,"column":9},"attr_expr":"last","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1812,"column":5},"lambda_expr":"last =\n    list:\n    assert lib.assertMsg (list != [ ]) \"lists.last: list must not be empty!\";\n    elemAt list (length list - 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1811,"column":3},"path":["lib","lists","last"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the last element of a list.\n\nThis function throws an error if the list is empty.\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\nlast :: [a] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.last` usage example\n\n```nix\nlast [ 1 2 3 ]\n=> 3\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1811,"column":3},"path":["lib","lists","last"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lazyDerivation","path":["lib","lazyDerivation"],"aliases":[["lib","derivations","lazyDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":423,"column":9},"attr_expr":"lazyDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":100,"column":5},"lambda_expr":"lazyDerivation =\n    args@{\n      derivation,\n      meta ? null,\n      passthru ? { },\n      outputs ? [ \"out\" ],\n    }:\n    let\n      # These checks are strict in `drv` and some `drv` attributes, but the\n      # attrset spine returned by lazyDerivation does not depend on it.\n      # Instead, the individual derivation attributes do depend on it.\n      checked =\n        throwIfNot (derivation.type or null == \"derivation\") \"lazyDerivation: input must be a derivation.\"\n          throwIfNot\n          # NOTE: Technically we could require our outputs to be a subset of the\n          # actual ones, or even leave them unchecked and fail on a lazy basis.\n          # However, consider the case where an output is added in the underlying\n          # derivation, such as dev. lazyDerivation would remove it and cause it\n          # to fail as a buildInputs item, without any indication as to what\n          # happened. Hence the more stringent condition. We could consider\n          # adding a flag to control this behavior if there's a valid case for it,\n          # but the documentation must have a note like this.\n          (derivation.outputs == outputs)\n          ''\n            lib.lazyDerivation: The derivation ${derivation.name or \"<unknown>\"} has outputs that don't match the assumed outputs.\n\n            Assumed outputs passed to lazyDerivation${showMaybeAttrPosPre \",\\n    at \" \"outputs\" args}:\n                ${lib.generators.toPretty { multiline = false; } outputs};\n\n            Actual outputs of the derivation${showMaybePackagePosPre \",\\n    defined at \" derivation}:\n                ${lib.generators.toPretty { multiline = false; } derivation.outputs}\n\n            If the outputs are known ahead of evaluating the derivation,\n            then update the lazyDerivation call to match the actual outputs, in the same order.\n            If lazyDerivation is passed a literal value, just change it to the actual outputs.\n            As a result it will work as before / as intended.\n\n            Otherwise, when the outputs are dynamic and can't be known ahead of time, it won't\n            be possible to add laziness, but lib.lazyDerivation may still be useful for trimming\n            the attributes.\n            If you want to keep trimming the attributes, make sure that the package is in a\n            variable (don't evaluate it twice!) and pass the variable and its outputs attribute\n            to lib.lazyDerivation. This largely defeats laziness, but keeps the trimming.\n            If none of the above works for you, replace the lib.lazyDerivation call by the\n            expression in the derivation argument.\n          ''\n          derivation;\n    in\n    {\n      # Hardcoded `type`\n      #\n      # `lazyDerivation` requires its `derivation` argument to be a derivation,\n      # so if it is not, that is a programming error by the caller and not\n      # something that `lazyDerivation` consumers should be able to correct\n      # for after the fact.\n      # So, to improve laziness, we assume correctness here and check it only\n      # when actual derivation values are accessed later.\n      type = \"derivation\";\n\n      # A fixed set of derivation values, so that `lazyDerivation` can return\n      # its attrset before evaluating `derivation`.\n      # This must only list attributes that are available on _all_ derivations.\n      inherit (checked)\n        outPath\n        outputName\n        drvPath\n        name\n        system\n        ;\n      inherit outputs;\n\n      # The meta attribute can either be taken from the derivation, or if the\n      # `lazyDerivation` caller knew a shortcut, be taken from there.\n      meta = args.meta or checked.meta;\n    }\n    // genAttrs outputs (outputName: checked.${outputName})\n    // passthru;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":99,"column":3},"path":["lib","derivations","lazyDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nRestrict a derivation to a predictable set of attribute names, so\nthat the returned attrset is not strict in the actual derivation,\nsaving a lot of computation when the derivation is non-trivial.\n\nThis is useful in situations where a derivation might only be used for its\npassthru attributes, improving evaluation performance.\n\nThe returned attribute set is lazy in `derivation`. Specifically, this\nmeans that the derivation will not be evaluated in at least the\nsituations below.\n\nFor illustration and/or testing, we define derivation such that its\nevaluation is very noticeable.\n\n    let derivation = throw \"This won't be evaluated.\";\n\nIn the following expressions, `derivation` will _not_ be evaluated:\n\n    (lazyDerivation { inherit derivation; }).type\n\n    attrNames (lazyDerivation { inherit derivation; })\n\n    (lazyDerivation { inherit derivation; } // { foo = true; }).foo\n\n    (lazyDerivation { inherit derivation; meta.foo = true; }).meta\n\nIn these expressions, `derivation` _will_ be evaluated:\n\n    \"${lazyDerivation { inherit derivation }}\"\n\n    (lazyDerivation { inherit derivation }).outPath\n\n    (lazyDerivation { inherit derivation }).meta\n\nAnd the following expressions are not valid, because the refer to\nimplementation details and/or attributes that may not be present on\nsome derivations:\n\n    (lazyDerivation { inherit derivation }).buildInputs\n\n    (lazyDerivation { inherit derivation }).passthru\n\n    (lazyDerivation { inherit derivation }).pythonPath\n\n# Inputs\n\nTakes an attribute set with the following attributes\n\n`derivation`\n: The derivation to be wrapped.\n\n`meta`\n: Optional meta attribute.\n\n  While this function is primarily about derivations, it can improve\n  the `meta` package attribute, which is usually specified through\n  `mkDerivation`.\n\n`passthru`\n: Optional extra values to add to the returned attrset.\n\n  This can be used for adding package attributes, such as `tests`.\n\n`outputs`\n: Optional list of assumed outputs. Default: `[ \"out\" ]`\n\n  This must match the set of outputs that the returned derivation has.\n  You must use this when the derivation has multiple outputs.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":99,"column":3},"path":["lib","derivations","lazyDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lazyGenericClosure","path":["lib","lazyGenericClosure"],"aliases":[["lib","misc","lazyGenericClosure"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":581,"column":9},"attr_expr":"lazyGenericClosure","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":188,"column":5},"lambda_expr":"{ startSet, operator }:\n    let\n      work =\n        list: doneKeys: result:\n        if list == [ ] then\n          result\n        else\n          let\n            x = head list;\n            key = x.key;\n          in\n          if elem key doneKeys then\n            work (tail list) doneKeys result\n          else\n            work (tail list ++ operator x) ([ key ] ++ doneKeys) ([ x ] ++ result);\n    in\n    work startSet [ ] [ ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":188,"column":5},"path":["lib","lazyGenericClosure"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":188,"column":5},"path":["lib","lazyGenericClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.length","path":["lib","length"],"aliases":[["builtins","length"],["lib","lists","length"]],"signature":null,"is_primop":true,"primop_meta":{"name":"length","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":313,"column":9},"attr_expr":"length","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","length"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the length of the list *e*.\n","source":{"position":null,"path":["lib","length"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lessThan","path":["lib","lessThan"],"aliases":[["builtins","lessThan"],["lib","trivial","lessThan"]],"signature":null,"is_primop":true,"primop_meta":{"name":"lessThan","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":169,"column":9},"attr_expr":"lessThan","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lessThan"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if the value *e1* is less than the value *e2*, and `false` otherwise.\nEvaluation aborts if either *e1* or *e2* does not evaluate to a number, string or path.\nFurthermore, it aborts if *e2* does not match *e1*'s type according to the aforementioned classification of number, string or path.\n","source":{"position":null,"path":["lib","lessThan"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.listDfs","path":["lib","listDfs"],"aliases":[["lib","lists","listDfs"]],"signature":"listDfs :: Bool -> (a -> a -> Bool) -> [a] -> ({ minimal :: a; visited :: [a]; rest :: [a]; } | { cycle :: a; loops :: [a]; visited :: [a]; rest :: [a]; })\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":289,"column":9},"attr_expr":"listDfs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1176,"column":5},"lambda_expr":"listDfs =\n    stopOnCycles: before: list:\n    let\n      dfs' =\n        us: visited: rest:\n        let\n          c = filter (x: before x us) visited;\n          b = partition (x: before x us) rest;\n        in\n        if stopOnCycles && (length c > 0) then\n          {\n            cycle = us;\n            loops = c;\n            inherit visited rest;\n          }\n        else if length b.right == 0 then\n          # nothing is before us\n          {\n            minimal = us;\n            inherit visited rest;\n          }\n        else\n          # grab the first one before us and continue\n          dfs' (head b.right) ([ us ] ++ visited) (tail b.right ++ b.wrong);\n    in\n    dfs' (head list) [ ] (tail list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1175,"column":3},"path":["lib","lists","listDfs"],"pos_type":"Attribute"}},"content":{"content":"\nDepth-First Search (DFS) for lists `list != []`.\n\n`before a b == true` means that `b` depends on `a` (there's an\nedge from `b` to `a`).\n\n# Inputs\n\n`stopOnCycles`\n\n: 1\\. Function argument\n\n`before`\n\n: 2\\. Function argument\n\n`list`\n\n: 3\\. Function argument\n\n# Type\n\n```\nlistDfs :: Bool -> (a -> a -> Bool) -> [a] -> ({ minimal :: a; visited :: [a]; rest :: [a]; } | { cycle :: a; loops :: [a]; visited :: [a]; rest :: [a]; })\n```\n\n# Examples\n:::{.example}\n## `lib.lists.listDfs` usage example\n\n```nix\nlistDfs true hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" ]\n  == { minimal = \"/\";                  # minimal element\n       visited = [ \"/home/user\" ];     # seen elements (in reverse order)\n       rest    = [ \"/home\" \"other\" ];  # everything else\n     }\n\nlistDfs true hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" \"/\" ]\n  == { cycle   = \"/\";                  # cycle encountered at this element\n       loops   = [ \"/\" ];              # and continues to these elements\n       visited = [ \"/\" \"/home/user\" ]; # elements leading to the cycle (in reverse order)\n       rest    = [ \"/home\" \"other\" ];  # everything else\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1175,"column":3},"path":["lib","lists","listDfs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.listToAttrs","path":["lib","listToAttrs"],"aliases":[["builtins","listToAttrs"],["lib","attrsets","listToAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"listToAttrs","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":253,"column":9},"attr_expr":"listToAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","listToAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nConstruct a set from a list specifying the names and values of each\nattribute. Each element of the list should be a set consisting of a\nstring-valued attribute `name` specifying the name of the attribute,\nand an attribute `value` specifying its value.\n\nIn case of duplicate occurrences of the same name, the first\ntakes precedence.\n\nExample:\n\n```nix\nbuiltins.listToAttrs\n  [ { name = \"foo\"; value = 123; }\n    { name = \"bar\"; value = 456; }\n    { name = \"bar\"; value = 420; }\n  ]\n```\n\nevaluates to\n\n```nix\n{ foo = 123; bar = 456; }\n```\n","source":{"position":null,"path":["lib","listToAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.literalExpression","path":["lib","literalExpression"],"aliases":[["lib","options","literalExpression"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":529,"column":9},"attr_expr":"literalExpression","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":715,"column":5},"lambda_expr":"literalExpression =\n    text:\n    if !isString text then\n      throw \"literalExpression expects a string.\"\n    else\n      {\n        _type = \"literalExpression\";\n        inherit text;\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":714,"column":3},"path":["lib","options","literalExpression"],"pos_type":"Attribute"}},"content":{"content":"\nFor use in the `defaultText` and `example` option attributes. Causes the\ngiven string to be rendered verbatim in the documentation as Nix code. This\nis necessary for complex values, e.g. functions, or values that depend on\nother values or packages.\n\n# Examples\n:::{.example}\n## `literalExpression` usage example\n\n```nix\nllvmPackages = mkOption {\n  type = types.str;\n  description = ''\n    Version of llvm packages to use for\n    this module\n  '';\n  example = literalExpression ''\n    llvmPackages = pkgs.llvmPackages_20;\n  '';\n};\n```\n\n:::\n\n# Inputs\n\n`text`\n\n: The text to render as a Nix expression\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":714,"column":3},"path":["lib","options","literalExpression"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.literalMD","path":["lib","literalMD"],"aliases":[["lib","options","literalMD"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":536,"column":9},"attr_expr":"literalMD","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":779,"column":5},"lambda_expr":"literalMD =\n    text:\n    if !isString text then\n      throw \"literalMD expects a string.\"\n    else\n      {\n        _type = \"literalMD\";\n        inherit text;\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":778,"column":3},"path":["lib","options","literalMD"],"pos_type":"Attribute"}},"content":{"content":"\nFor use in the `defaultText` and `example` option attributes. Causes the\ngiven MD text to be inserted verbatim in the documentation, for when\na `literalExpression` would be too hard to read.\n\n# Inputs\n\n`text`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":778,"column":3},"path":["lib","options","literalMD"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lowPrio","path":["lib","lowPrio"],"aliases":[["lib","meta","lowPrio"]],"signature":"lowPrio :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":438,"column":9},"attr_expr":"lowPrio","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":58,"column":15},"lambda_expr":"drv:\n    if drv ? overrideAttrs then\n      drv.overrideAttrs (old: {\n        meta = (old.meta or { }) // newAttrs;\n      })\n    else\n      drv // { meta = (drv.meta or { }) // newAttrs; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":227,"column":3},"path":["lib","meta","lowPrio"],"pos_type":"Attribute"}},"content":{"content":"\nDecrease the nix-env priority of the package, i.e., other\nversions/variants of the package will be preferred.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\nlowPrio :: Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":227,"column":3},"path":["lib","meta","lowPrio"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lowPrioSet","path":["lib","lowPrioSet"],"aliases":[["lib","meta","lowPrioSet"]],"signature":"lowPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":439,"column":9},"attr_expr":"lowPrioSet","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":244,"column":16},"lambda_expr":"lowPrioSet = set: mapDerivationAttrset lowPrio set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":244,"column":3},"path":["lib","meta","lowPrioSet"],"pos_type":"Attribute"}},"content":{"content":"\nApply `lowPrio` to an attrset with derivations.\n\n# Inputs\n\n`set`\n\n: 1\\. Function argument\n\n# Type\n\n```\nlowPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":244,"column":3},"path":["lib","meta","lowPrioSet"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeBinPath","path":["lib","makeBinPath"],"aliases":[["lib","strings","makeBinPath"]],"signature":"makeBinPath :: [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":341,"column":9},"attr_expr":"makeBinPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":21},"lambda_expr":"pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":696,"column":3},"path":["lib","strings","makeBinPath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a binary search path (such as $PATH) containing the\nbinaries for a set of packages.\n\n# Inputs\n\n`packages`\n: List of packages\n\n# Type\n\n```\nmakeBinPath :: [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeBinPath` usage example\n\n```nix\nmakeBinPath [\"/root\" \"/usr\" \"/usr/local\"]\n=> \"/root/bin:/usr/bin:/usr/local/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":696,"column":3},"path":["lib","strings","makeBinPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeExtensible","path":["lib","makeExtensible"],"aliases":[["lib","fixedPoints","makeExtensible"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":196,"column":9},"attr_expr":"makeExtensible","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":451,"column":19},"lambda_expr":"rattrs:\n    fix' (\n      self:\n      (rattrs self)\n      // {\n        ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);\n      }\n    )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":434,"column":3},"path":["lib","fixedPoints","makeExtensible"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an overridable, recursive attribute set. For example:\n\n```\nnix-repl> obj = makeExtensible (final: { })\n\nnix-repl> obj\n{ __unfix__ = «lambda»; extend = «lambda»; }\n\nnix-repl> obj = obj.extend (final: prev: { foo = \"foo\"; })\n\nnix-repl> obj\n{ __unfix__ = «lambda»; extend = «lambda»; foo = \"foo\"; }\n\nnix-repl> obj = obj.extend (final: prev: { foo = prev.foo + \" + \"; bar = \"bar\"; foobar = final.foo + final.bar; })\n\nnix-repl> obj\n{ __unfix__ = «lambda»; bar = \"bar\"; extend = «lambda»; foo = \"foo + \"; foobar = \"foo + bar\"; }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":434,"column":3},"path":["lib","fixedPoints","makeExtensible"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeExtensibleWithCustomName","path":["lib","makeExtensibleWithCustomName"],"aliases":[["lib","fixedPoints","makeExtensibleWithCustomName"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":197,"column":9},"attr_expr":"makeExtensibleWithCustomName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":451,"column":5},"lambda_expr":"makeExtensibleWithCustomName =\n    extenderName: rattrs:\n    fix' (\n      self:\n      (rattrs self)\n      // {\n        ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":450,"column":3},"path":["lib","fixedPoints","makeExtensibleWithCustomName"],"pos_type":"Attribute"}},"content":{"content":"\nSame as `makeExtensible` but the name of the extending attribute is\ncustomized.\n\n# Inputs\n\n`extenderName`\n\n: 1\\. Function argument\n\n`rattrs`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":450,"column":3},"path":["lib","fixedPoints","makeExtensibleWithCustomName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeIncludePath","path":["lib","makeIncludePath"],"aliases":[["lib","strings","makeIncludePath"]],"signature":"makeIncludePath :: [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":340,"column":9},"attr_expr":"makeIncludePath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":21},"lambda_expr":"pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":668,"column":3},"path":["lib","strings","makeIncludePath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct an include search path (such as C_INCLUDE_PATH) containing the\nheader files for a set of packages or paths.\n\n# Inputs\n\n`packages`\n: List of packages\n\n# Type\n\n```\nmakeIncludePath :: [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeIncludePath` usage example\n\n```nix\nmakeIncludePath [ \"/usr\" \"/usr/local\" ]\n=> \"/usr/include:/usr/local/include\"\npkgs = import <nixpkgs> { }\nmakeIncludePath [ pkgs.openssl pkgs.zlib ]\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev/include:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8-dev/include\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":668,"column":3},"path":["lib","strings","makeIncludePath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeLibraryPath","path":["lib","makeLibraryPath"],"aliases":[["lib","strings","makeLibraryPath"]],"signature":"makeLibraryPath :: [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":339,"column":9},"attr_expr":"makeLibraryPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":21},"lambda_expr":"pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":637,"column":3},"path":["lib","strings","makeLibraryPath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a library search path (such as RPATH) containing the\nlibraries for a set of packages\n\n# Inputs\n\n`packages`\n: List of packages\n\n# Type\n\n```\nmakeLibraryPath :: [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeLibraryPath` usage example\n\n```nix\nmakeLibraryPath [ \"/usr\" \"/usr/local\" ]\n=> \"/usr/lib:/usr/local/lib\"\npkgs = import <nixpkgs> { }\nmakeLibraryPath [ pkgs.openssl pkgs.zlib ]\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r/lib:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/lib\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":637,"column":3},"path":["lib","strings","makeLibraryPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeOverridable","path":["lib","makeOverridable"],"aliases":[["lib","customisation","makeOverridable"]],"signature":"makeOverridable :: (AttrSet -> a) -> AttrSet -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":409,"column":9},"attr_expr":"makeOverridable","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":152,"column":5},"lambda_expr":"makeOverridable =\n    f:\n    let\n      # Creates a functor with the same arguments as f\n      mirrorArgs = mirrorFunctionArgs f;\n\n      f' =\n        origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result;\n    in\n    # Recover overrider and additional attributes for f\n    # When f is a callable attribute set,\n    # it may contain its own `f.override` and additional attributes.\n    # This recovers those attributes and decorates the overrider.\n    if isAttrs f then\n      # Preserve additional attributes for f\n      f\n      // (mirrorArgs f')\n      # Decorate f.override if presented\n      // {\n        ${if f ? override then \"override\" else null} = fdrv: makeOverridable (f.override fdrv);\n      }\n\n    else\n      mirrorArgs f';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":151,"column":3},"path":["lib","customisation","makeOverridable"],"pos_type":"Attribute"}},"content":{"content":"\n`makeOverridable` takes a function from attribute set to attribute set and\ninjects `override` attribute which can be used to override arguments of\nthe function.\n\nPlease refer to  documentation on [`<pkg>.overrideDerivation`](#sec-pkg-overrideDerivation) to learn about `overrideDerivation` and caveats\nrelated to its use.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmakeOverridable :: (AttrSet -> a) -> AttrSet -> a\n```\n\n# Examples\n:::{.example}\n## `lib.customisation.makeOverridable` usage example\n\n```nix\nnix-repl> x = {a, b}: { result = a + b; }\n\nnix-repl> y = lib.makeOverridable x { a = 1; b = 2; }\n\nnix-repl> y\n{ override = «lambda»; overrideDerivation = «lambda»; result = 3; }\n\nnix-repl> y.override { a = 10; }\n{ override = «lambda»; overrideDerivation = «lambda»; result = 12; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":151,"column":3},"path":["lib","customisation","makeOverridable"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeScope","path":["lib","makeScope"],"aliases":[["lib","customisation","makeScope"]],"signature":"makeScope :: (AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a) -> (AttrSet -> AttrSet) -> Scope\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":414,"column":9},"attr_expr":"makeScope","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":624,"column":5},"lambda_expr":"makeScope =\n    newScope: f:\n    let\n      self = {\n        callPackage = self.newScope { };\n      }\n      // f self\n      // {\n        newScope = scope: newScope (self // scope);\n        overrideScope = g: makeScope newScope (extends g f);\n        packages = f;\n      };\n    in\n    self;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":623,"column":3},"path":["lib","customisation","makeScope"],"pos_type":"Attribute"}},"content":{"content":"\nMake an attribute set (a \"scope\") from functions that take arguments from that same attribute set.\nSee [](#ex-makeScope) for how to use it.\n\n# Inputs\n\n1. `newScope` (`AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a`)\n\n   A function that takes an attribute set `attrs` and returns what ends up as `callPackage` in the output.\n\n   Typical values are `callPackageWith` or the output attribute `newScope`.\n\n2. `f` (`AttrSet -> AttrSet`)\n\n   A function that takes an attribute set as returned by `makeScope newScope f` (a \"scope\") and returns any attribute set.\n\n   This function is used to compute the fixpoint of the resulting scope using `callPackage`.\n   Its argument is the lazily evaluated reference to the value of that fixpoint, and is typically called `self` or `final`.\n\n   See [](#ex-makeScope) for how to use it.\n   See [](#sec-functions-library-fixedPoints) for details on fixpoint computation.\n\n# Output\n\n`makeScope` returns an attribute set of a form called `scope`, which also contains the final attributes produced by `f`:\n\n```\nscope :: {\n  callPackage :: ((AttrSet -> a) | Path) -> AttrSet -> a\n  newScope = AttrSet -> scope\n  overrideScope = (scope -> scope -> AttrSet) -> scope\n  packages :: AttrSet -> AttrSet\n}\n```\n\n- `callPackage` (`((AttrSet -> a) | Path) -> AttrSet -> a`)\n\n  A function that\n\n  1. Takes a function `p`, or a path to a Nix file that contains a function `p`, which takes an attribute set and returns value of arbitrary type `a`,\n  2. Takes an attribute set `args` with explicit attributes to pass to `p`,\n  3. Calls `f` with attributes from the original attribute set `attrs` passed to `newScope` updated with `args`, i.e. `attrs // args`, if they match the attributes in the argument of `p`.\n\n  All such functions `p` will be called with the same value for `attrs`.\n\n  See [](#ex-makeScope-callPackage) for how to use it.\n\n- `newScope` (`AttrSet -> scope`)\n\n  Takes an attribute set `attrs` and returns a scope that extends the original scope.\n\n- `overrideScope` (`(scope -> scope -> AttrSet) -> scope`)\n\n  Takes a function `g` of the form `final: prev: { # attributes }` to act as an overlay on `f`, and returns a new scope with values determined by `extends g f`.\n  See [](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.fixedPoints.extends) for details.\n\n  This allows subsequent modification of the final attribute set in a consistent way, i.e. all functions `p` invoked with `callPackage` will be called with the modified values.\n\n- `packages` (`AttrSet -> AttrSet`)\n\n  The value of the argument `f` to `makeScope`.\n\n- final attributes\n\n  The final values returned by `f`.\n\n# Examples\n\n:::{#ex-makeScope .example}\n# Create an interdependent package set on top of `pkgs`\n\nThe functions in `foo.nix` and `bar.nix` can depend on each other, in the sense that `foo.nix` can contain a function that expects `bar` as an attribute in its argument.\n\n```nix\nlet\n  pkgs = import <nixpkgs> { };\nin\npkgs.lib.makeScope pkgs.newScope (self: {\n  foo = self.callPackage ./foo.nix { };\n  bar = self.callPackage ./bar.nix { };\n})\n```\n\nevaluates to\n\n```nix\n{\n  callPackage = «lambda»;\n  newScope = «lambda»;\n  overrideScope = «lambda»;\n  packages = «lambda»;\n  foo = «derivation»;\n  bar = «derivation»;\n}\n```\n:::\n\n:::{#ex-makeScope-callPackage .example}\n# Using `callPackage` from a scope\n\n```nix\nlet\n  pkgs = import <nixpkgs> { };\n  inherit (pkgs) lib;\n  scope = lib.makeScope lib.callPackageWith (self: { a = 1; b = 2; });\n  three = scope.callPackage ({ a, b }: a + b) { };\n  four = scope.callPackage ({ a, b }: a + b) { a = 2; };\nin\n[ three four ]\n```\n\nevaluates to\n\n```nix\n[ 3 4 ]\n```\n:::\n\n# Type\n\n```\nmakeScope :: (AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a) -> (AttrSet -> AttrSet) -> Scope\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":623,"column":3},"path":["lib","customisation","makeScope"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeScopeWithSplicing","path":["lib","makeScopeWithSplicing"],"aliases":[["lib","customisation","makeScopeWithSplicing"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":415,"column":9},"attr_expr":"makeScopeWithSplicing","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":668,"column":5},"lambda_expr":"makeScopeWithSplicing =\n    splicePackages: newScope: otherSplices: keep: extra: f:\n    makeScopeWithSplicing' { inherit splicePackages newScope; } {\n      inherit\n        otherSplices\n        keep\n        extra\n        f\n        ;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":667,"column":3},"path":["lib","customisation","makeScopeWithSplicing"],"pos_type":"Attribute"}},"content":{"content":"\nbackward compatibility with old uncurried form; deprecated\n\n# Inputs\n\n`splicePackages`\n\n: 1\\. Function argument\n\n`newScope`\n\n: 2\\. Function argument\n\n`otherSplices`\n\n: 3\\. Function argument\n\n`keep`\n\n: 4\\. Function argument\n\n`extra`\n\n: 5\\. Function argument\n\n`f`\n\n: 6\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":667,"column":3},"path":["lib","customisation","makeScopeWithSplicing"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeScopeWithSplicing' (Prime)","path":["lib","makeScopeWithSplicing'"],"aliases":[["lib","customisation","makeScopeWithSplicing'"]],"signature":"makeScopeWithSplicing' ::\n  { splicePackages :: Splice -> AttrSet;\n    newScope :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a;\n  }\n  -> { otherSplices :: Splice; keep :: AttrSet -> AttrSet; extra :: AttrSet -> AttrSet; }\n  -> AttrSet\n\nSplice :: {\n  pkgsBuildBuild :: AttrSet;\n  pkgsBuildHost :: AttrSet;\n  pkgsBuildTarget :: AttrSet;\n  pkgsHostHost :: AttrSet;\n  pkgsHostTarget :: AttrSet;\n  pkgsTargetTarget :: AttrSet;\n}\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":416,"column":9},"attr_expr":"makeScopeWithSplicing'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":703,"column":5},"lambda_expr":"makeScopeWithSplicing' =\n    {\n      splicePackages,\n      newScope,\n    }:\n    {\n      otherSplices,\n      # Attrs from `self` which won't be spliced.\n      # Avoid using keep, it's only used for a python hook workaround, added in PR #104201.\n      # ex: `keep = (self: { inherit (self) aAttr; })`\n      keep ? (_self: { }),\n      # Additional attrs to add to the sets `callPackage`.\n      # When the package is from a subset (but not a subset within a package IS #211340)\n      # within `spliced0` it will be spliced.\n      # When using an package outside the set but it's available from `pkgs`, use the package from `pkgs.__splicedPackages`.\n      # If the package is not available within the set or in `pkgs`, such as a package in a let binding, it will not be spliced\n      # ex:\n      # ```\n      # nix-repl> darwin.apple_sdk.frameworks.CoreFoundation\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # nix-repl> darwin.CoreFoundation\n      #   error: attribute 'CoreFoundation' missing\n      # nix-repl> darwin.callPackage ({ CoreFoundation }: CoreFoundation) { }\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # ```\n      extra ? (_spliced0: { }),\n      f,\n    }:\n    let\n      spliced0 = splicePackages {\n        pkgsBuildBuild = otherSplices.selfBuildBuild;\n        pkgsBuildHost = otherSplices.selfBuildHost;\n        pkgsBuildTarget = otherSplices.selfBuildTarget;\n        pkgsHostHost = otherSplices.selfHostHost;\n        pkgsHostTarget = self; # Not `otherSplices.selfHostTarget`;\n        pkgsTargetTarget = otherSplices.selfTargetTarget;\n      };\n      spliced = extra spliced0 // spliced0 // keep self;\n      self = f self // {\n        newScope = scope: newScope (spliced // scope);\n        callPackage = newScope spliced; # == self.newScope {};\n        # N.B. the other stages of the package set spliced in are *not*\n        # overridden.\n        overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });\n        packages = f;\n      };\n    in\n    self;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":702,"column":3},"path":["lib","customisation","makeScopeWithSplicing'"],"pos_type":"Attribute"}},"content":{"content":"\nLike `makeScope`, but aims to support cross compilation. It's still ugly, but\nhopefully it helps a little bit.\n\n# Type\n\n```\nmakeScopeWithSplicing' ::\n  { splicePackages :: Splice -> AttrSet;\n    newScope :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a;\n  }\n  -> { otherSplices :: Splice; keep :: AttrSet -> AttrSet; extra :: AttrSet -> AttrSet; }\n  -> AttrSet\n\nSplice :: {\n  pkgsBuildBuild :: AttrSet;\n  pkgsBuildHost :: AttrSet;\n  pkgsBuildTarget :: AttrSet;\n  pkgsHostHost :: AttrSet;\n  pkgsHostTarget :: AttrSet;\n  pkgsTargetTarget :: AttrSet;\n}\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":702,"column":3},"path":["lib","customisation","makeScopeWithSplicing'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeSearchPath","path":["lib","makeSearchPath"],"aliases":[["lib","strings","makeSearchPath"]],"signature":"makeSearchPath :: String -> [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":337,"column":9},"attr_expr":"makeSearchPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":567,"column":5},"lambda_expr":"makeSearchPath =\n    subDir: paths: concatStringsSep \":\" (map (path: path + \"/\" + subDir) (filter (x: x != null) paths));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":566,"column":3},"path":["lib","strings","makeSearchPath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a Unix-style, colon-separated search path consisting of\nthe given `subDir` appended to each of the given paths.\n\n# Inputs\n\n`subDir`\n: Directory name to append\n\n`paths`\n: List of base paths\n\n# Type\n\n```\nmakeSearchPath :: String -> [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeSearchPath` usage example\n\n```nix\nmakeSearchPath \"bin\" [\"/root\" \"/usr\" \"/usr/local\"]\n=> \"/root/bin:/usr/bin:/usr/local/bin\"\nmakeSearchPath \"bin\" [\"\"]\n=> \"/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":566,"column":3},"path":["lib","strings","makeSearchPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.makeSearchPathOutput","path":["lib","makeSearchPathOutput"],"aliases":[["lib","strings","makeSearchPathOutput"]],"signature":"makeSearchPathOutput :: String -> String -> [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":338,"column":9},"attr_expr":"makeSearchPathOutput","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":5},"lambda_expr":"makeSearchPathOutput =\n    output: subDir: pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":604,"column":3},"path":["lib","strings","makeSearchPathOutput"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a Unix-style search path by appending the given\n`subDir` to the specified `output` of each of the packages.\n\nIf no output by the given name is found, fallback to `.out` and then to\nthe default.\n\n# Inputs\n\n`output`\n: Package output to use\n\n`subDir`\n: Directory name to append\n\n`pkgs`\n: List of packages\n\n# Type\n\n```\nmakeSearchPathOutput :: String -> String -> [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeSearchPathOutput` usage example\n\n```nix\nmakeSearchPathOutput \"dev\" \"bin\" [ pkgs.openssl pkgs.zlib ]\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev/bin:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":604,"column":3},"path":["lib","strings","makeSearchPathOutput"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.map","path":["lib","map"],"aliases":[["builtins","map"],["lib","lists","map"]],"signature":null,"is_primop":true,"primop_meta":{"name":"map","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":263,"column":9},"attr_expr":"map","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","map"],"pos_type":"Lambda"}},"content":{"content":"\nApply the function *f* to each element in the list *list*. For\nexample,\n\n```nix\nmap (x: \"foo\" + x) [ \"bar\" \"bla\" \"abc\" ]\n```\n\nevaluates to `[ \"foobar\" \"foobla\" \"fooabc\" ]`.\n","source":{"position":null,"path":["lib","map"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mapAttrs","path":["lib","mapAttrs"],"aliases":[["builtins","mapAttrs"],["lib","attrsets","mapAttrs"]],"signature":"mapAttrs :: (String -> a -> b) -> { [String] :: a } -> { [String] :: b }\n","is_primop":true,"primop_meta":{"name":"mapAttrs","args":["f","attrset"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":216,"column":9},"attr_expr":"mapAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1015,"column":3},"path":["lib","attrsets","mapAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nApply a function to each element in an attribute set, creating a new attribute set.\n\n# Inputs\n\n`f`\n\n: A function that takes an attribute name and its value, and returns the new value for the attribute.\n\n`attrset`\n\n: The attribute set to iterate through.\n\n# Type\n\n```\nmapAttrs :: (String -> a -> b) -> { [String] :: a } -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrs` usage example\n\n```nix\nmapAttrs (name: value: name + \"-\" + value)\n   { x = \"foo\"; y = \"bar\"; }\n=> { x = \"x-foo\"; y = \"y-bar\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1015,"column":3},"path":["lib","attrsets","mapAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapAttrs' (Prime)","path":["lib","mapAttrs'"],"aliases":[["lib","attrsets","mapAttrs'"]],"signature":"mapAttrs' :: (String -> a -> { name :: String; value :: b; }) -> { [String] :: a } -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":217,"column":9},"attr_expr":"mapAttrs'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1050,"column":15},"lambda_expr":"mapAttrs' = f: set: listToAttrs (mapAttrsToList f set);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1050,"column":3},"path":["lib","attrsets","mapAttrs'"],"pos_type":"Attribute"}},"content":{"content":"\nLike `mapAttrs`, but allows the name of each attribute to be\nchanged in addition to the value.  The applied function should\nreturn both the new name and value as a `nameValuePair`.\n\n# Inputs\n\n`f`\n\n: A function, given an attribute's name and value, returns a new `nameValuePair`.\n\n`set`\n\n: Attribute set to map over.\n\n# Type\n\n```\nmapAttrs' :: (String -> a -> { name :: String; value :: b; }) -> { [String] :: a } -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrs'` usage example\n\n```nix\nmapAttrs' (name: value: nameValuePair (\"foo_\" + name) (\"bar-\" + value))\n   { x = \"a\"; y = \"b\"; }\n=> { foo_x = \"bar-a\"; foo_y = \"bar-b\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1050,"column":3},"path":["lib","attrsets","mapAttrs'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapAttrsRecursive","path":["lib","mapAttrsRecursive"],"aliases":[["lib","attrsets","mapAttrsRecursive"]],"signature":"mapAttrsRecursive :: ([String] -> a -> b) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":221,"column":9},"attr_expr":"mapAttrsRecursive","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1156,"column":23},"lambda_expr":"mapAttrsRecursive = f: set: mapAttrsRecursiveCond (as: true) f set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1156,"column":3},"path":["lib","attrsets","mapAttrsRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nLike `mapAttrs`, except that it recursively applies itself to the *leaf* attributes of a potentially-nested attribute set:\nthe second argument of the function will never be an attrset.\nAlso, the first argument of the mapping function is a *list* of the attribute names that form the path to the leaf attribute.\n\nFor a function that gives you control over what counts as a leaf, see `mapAttrsRecursiveCond`.\n\n:::{#map-attrs-recursive-example .example}\n# Map over leaf attributes\n\n```nix\nmapAttrsRecursive (path: value: concatStringsSep \"-\" (path ++ [value]))\n  { n = { a = \"A\"; m = { b = \"B\"; c = \"C\"; }; }; d = \"D\"; }\n```\nevaluates to\n```nix\n{ n = { a = \"n-a-A\"; m = { b = \"n-m-b-B\"; c = \"n-m-c-C\"; }; }; d = \"d-D\"; }\n```\n:::\n\n# Type\n```\nmapAttrsRecursive :: ([String] -> a -> b) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1156,"column":3},"path":["lib","attrsets","mapAttrsRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapAttrsRecursiveCond","path":["lib","mapAttrsRecursiveCond"],"aliases":[["lib","attrsets","mapAttrsRecursiveCond"]],"signature":"mapAttrsRecursiveCond :: (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":222,"column":9},"attr_expr":"mapAttrsRecursiveCond","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1182,"column":5},"lambda_expr":"mapAttrsRecursiveCond =\n    cond: f: set:\n    let\n      recurse =\n        path:\n        mapAttrs (\n          name: value:\n          if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value\n        );\n    in\n    recurse [ ] set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1181,"column":3},"path":["lib","attrsets","mapAttrsRecursiveCond"],"pos_type":"Attribute"}},"content":{"content":"\nLike `mapAttrsRecursive`, but it takes an additional predicate that tells it whether to recurse into an attribute set.\nIf the predicate returns false, `mapAttrsRecursiveCond` does not recurse, but instead applies the mapping function.\nIf the predicate returns true, it does recurse, and does not apply the mapping function.\n\n:::{#map-attrs-recursive-cond-example .example}\n# Map over an leaf attributes defined by a condition\n\nMap derivations to their `name` attribute.\nDerivatons are identified as attribute sets that contain `{ type = \"derivation\"; }`.\n```nix\nmapAttrsRecursiveCond\n  (as: !(as ? \"type\" && as.type == \"derivation\"))\n  (path: x: x.name)\n  attrs\n```\n:::\n\n# Type\n```\nmapAttrsRecursiveCond :: (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1181,"column":3},"path":["lib","attrsets","mapAttrsRecursiveCond"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapAttrsToList","path":["lib","mapAttrsToList"],"aliases":[["lib","attrsets","mapAttrsToList"]],"signature":"mapAttrsToList :: (String -> a -> b) -> { [String] :: a } -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":218,"column":9},"attr_expr":"mapAttrsToList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":20},"lambda_expr":"mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":3},"path":["lib","attrsets","mapAttrsToList"],"pos_type":"Attribute"}},"content":{"content":"\nCall a function for each attribute in the given set and return\nthe result in a list.\n\n# Inputs\n\n`f`\n\n: A function, given an attribute's name and value, returns a new value.\n\n`attrs`\n\n: Attribute set to map over.\n\n# Type\n\n```\nmapAttrsToList :: (String -> a -> b) -> { [String] :: a } -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrsToList` usage example\n\n```nix\nmapAttrsToList (name: value: name + value)\n   { x = \"a\"; y = \"b\"; }\n=> [ \"xa\" \"yb\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":3},"path":["lib","attrsets","mapAttrsToList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapAttrsToListRecursive","path":["lib","mapAttrsToListRecursive"],"aliases":[["lib","attrsets","mapAttrsToListRecursive"]],"signature":"mapAttrsToListRecursive :: ([String] -> a -> b) -> AttrSet -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":223,"column":9},"attr_expr":"mapAttrsToListRecursive","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1304,"column":11},"lambda_expr":"f: set:\n    let\n      mapRecursive =\n        path: value: if isAttrs value && pred path value then recurse path value else [ (f path value) ];\n      recurse = path: set: concatMap (name: mapRecursive (path ++ [ name ]) set.${name}) (attrNames set);\n    in\n    recurse [ ] set","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1236,"column":3},"path":["lib","attrsets","mapAttrsToListRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nApply a function to each leaf (non‐attribute‐set attribute) of a tree of\nnested attribute sets, returning the results of the function as a list,\nordered lexicographically by their attribute paths.\n\nLike `mapAttrsRecursive`, but concatenates the mapping function results\ninto a list.\n\n# Inputs\n\n`f`\n\n: Mapping function which, given an attribute’s path and value, returns a\n  new value.\n\n  This value will be an element of the list returned by\n  `mapAttrsToListRecursive`.\n\n  The first argument to the mapping function is a list of attribute names\n  forming the path to the leaf attribute. The second argument is the leaf\n  attribute value, which will never be an attribute set.\n\n`set`\n\n: Attribute set to map over.\n\n# Type\n\n```\nmapAttrsToListRecursive :: ([String] -> a -> b) -> AttrSet -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrsToListRecursive` usage example\n\n```nix\nmapAttrsToListRecursive (path: value: \"${concatStringsSep \".\" path}=${value}\")\n  { n = { a = \"A\"; m = { b = \"B\"; c = \"C\"; }; }; d = \"D\"; }\n=> [ \"n.a=A\" \"n.m.b=B\" \"n.m.c=C\" \"d=D\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1236,"column":3},"path":["lib","attrsets","mapAttrsToListRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapAttrsToListRecursiveCond","path":["lib","mapAttrsToListRecursiveCond"],"aliases":[["lib","attrsets","mapAttrsToListRecursiveCond"]],"signature":"mapAttrsToListRecursiveCond :: ([String] -> AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":224,"column":9},"attr_expr":"mapAttrsToListRecursiveCond","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1304,"column":5},"lambda_expr":"mapAttrsToListRecursiveCond =\n    pred: f: set:\n    let\n      mapRecursive =\n        path: value: if isAttrs value && pred path value then recurse path value else [ (f path value) ];\n      recurse = path: set: concatMap (name: mapRecursive (path ++ [ name ]) set.${name}) (attrNames set);\n    in\n    recurse [ ] set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1303,"column":3},"path":["lib","attrsets","mapAttrsToListRecursiveCond"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine the nodes of a tree of nested attribute sets by applying a\npredicate, then apply a function to the leaves, returning the results\nas a list, ordered lexicographically by their attribute paths.\n\nLike `mapAttrsToListRecursive`, but takes an additional predicate to\ndecide whether to recurse into an attribute set.\n\nUnlike `mapAttrsRecursiveCond` this predicate receives the attribute path\nas its first argument, in addition to the attribute set.\n\n# Inputs\n\n`pred`\n\n: Predicate to decide whether to recurse into an attribute set.\n\n  If the predicate returns true, `mapAttrsToListRecursiveCond` recurses into\n  the attribute set. If the predicate returns false, it does not recurse\n  but instead applies the mapping function, treating the attribute set as\n  a leaf.\n\n  The first argument to the predicate is a list of attribute names forming\n  the path to the attribute set. The second argument is the attribute set.\n\n`f`\n\n: Mapping function which, given an attribute’s path and value, returns a\n  new value.\n\n  This value will be an element of the list returned by\n  `mapAttrsToListRecursiveCond`.\n\n  The first argument to the mapping function is a list of attribute names\n  forming the path to the leaf attribute. The second argument is the leaf\n  attribute value, which may be an attribute set if the predicate returned\n  false.\n\n`set`\n\n: Attribute set to map over.\n\n# Type\n```\nmapAttrsToListRecursiveCond :: ([String] -> AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrsToListRecursiveCond` usage example\n\n```nix\nmapAttrsToListRecursiveCond\n  (path: as: !(lib.isDerivation as))\n  (path: value: \"--set=${lib.concatStringsSep \".\" path}=${toString value}\")\n  {\n    rust.optimize = 2;\n    target = {\n      riscv64-unknown-linux-gnu.linker = pkgs.lld;\n    };\n  }\n=> [ \"--set=rust.optimize=2\" \"--set=target.riscv64-unknown-linux-gnu.linker=/nix/store/sjw4h1k…\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1303,"column":3},"path":["lib","attrsets","mapAttrsToListRecursiveCond"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapCartesianProduct","path":["lib","mapCartesianProduct"],"aliases":[["lib","attrsets","mapCartesianProduct"]],"signature":"mapCartesianProduct :: ({ [String] :: a } -> b) -> { [String] :: a } -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":251,"column":9},"attr_expr":"mapCartesianProduct","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":950,"column":25},"lambda_expr":"mapCartesianProduct = f: attrsOfLists: map f (cartesianProduct attrsOfLists);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":950,"column":3},"path":["lib","attrsets","mapCartesianProduct"],"pos_type":"Attribute"}},"content":{"content":"\nReturn the result of function `f` applied to the cartesian product of attribute set value combinations.\nEquivalent to using `cartesianProduct` followed by `map`.\n\n# Inputs\n\n`f`\n\n: A function, given an attribute set, it returns a new value.\n\n`attrsOfLists`\n\n: Attribute set with attributes that are lists of values\n\n# Type\n\n```\nmapCartesianProduct :: ({ [String] :: a } -> b) -> { [String] :: a } -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapCartesianProduct` usage example\n\n```nix\nmapCartesianProduct ({a, b}: \"${a}-${b}\") { a = [ \"1\" \"2\" ]; b = [ \"3\" \"4\" ]; }\n=> [ \"1-3\" \"1-4\" \"2-3\" \"2-4\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":950,"column":3},"path":["lib","attrsets","mapCartesianProduct"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapCrossIndex","path":["lib","mapCrossIndex"],"aliases":[["lib","customisation","mapCrossIndex"]],"signature":"mapCrossIndex :: (a -> b) -> {\n  buildBuild :: a;\n  buildHost :: a;\n  buildTarget :: a;\n  hostHost :: a;\n  hostTarget :: a;\n  targetTarget :: a;\n} -> {\n  buildBuild :: b;\n  buildHost :: b;\n  buildTarget :: b;\n  hostHost :: b;\n  hostTarget :: b;\n  targetTarget :: b;\n}\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":420,"column":9},"attr_expr":"mapCrossIndex","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":1023,"column":5},"lambda_expr":"mapCrossIndex =\n    f:\n    {\n      buildBuild,\n      buildHost,\n      buildTarget,\n      hostHost,\n      hostTarget,\n      targetTarget,\n    }:\n    {\n      buildBuild = f buildBuild;\n      buildHost = f buildHost;\n      buildTarget = f buildTarget;\n      hostHost = f hostHost;\n      hostTarget = f hostTarget;\n      targetTarget = f targetTarget;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":1022,"column":3},"path":["lib","customisation","mapCrossIndex"],"pos_type":"Attribute"}},"content":{"content":"\nTakes a function and applies it pointwise to each field of a cross index.\n\nA cross index (short for \"Cross Platform Pair Index\") is a 6-field structure\norganizing values by cross-compilation platform relationships.\n\n# Inputs\n\n`f`\n: Function to apply to each cross index value\n\n`crossIndex`\n: A cross index to transform\n\n# Type\n\n```\nmapCrossIndex :: (a -> b) -> {\n  buildBuild :: a;\n  buildHost :: a;\n  buildTarget :: a;\n  hostHost :: a;\n  hostTarget :: a;\n  targetTarget :: a;\n} -> {\n  buildBuild :: b;\n  buildHost :: b;\n  buildTarget :: b;\n  hostHost :: b;\n  hostTarget :: b;\n  targetTarget :: b;\n}\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.mapCrossIndex` usage example\n\n```nix\nmapCrossIndex (x: x * 10) { buildBuild = 1; buildHost = 2; ... }\n=> { buildBuild = 10; buildHost = 20; ... }\n```\n\n```nix\n# Extract a package from package sets\nmapCrossIndex (pkgs: pkgs.hello) crossIndexedPackageSets\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":1022,"column":3},"path":["lib","customisation","mapCrossIndex"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapDerivationAttrset","path":["lib","mapDerivationAttrset"],"aliases":[["lib","meta","mapDerivationAttrset"]],"signature":"mapDerivationAttrset :: (Derivation -> a) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":436,"column":9},"attr_expr":"mapDerivationAttrset","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":185,"column":5},"lambda_expr":"mapDerivationAttrset =\n    f: set: lib.mapAttrs (name: pkg: if lib.isDerivation pkg then (f pkg) else pkg) set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":184,"column":3},"path":["lib","meta","mapDerivationAttrset"],"pos_type":"Attribute"}},"content":{"content":"\nApply a function to each derivation and only to derivations in an attrset.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`set`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmapDerivationAttrset :: (Derivation -> a) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":184,"column":3},"path":["lib","meta","mapDerivationAttrset"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mapNullable","path":["lib","mapNullable"],"aliases":[["lib","trivial","mapNullable"]],"signature":"mapNullable :: (a -> b) -> (a | Null) -> (b | Null)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":145,"column":9},"attr_expr":"mapNullable","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":448,"column":17},"lambda_expr":"mapNullable = f: a: if a == null then a else f a;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":448,"column":3},"path":["lib","trivial","mapNullable"],"pos_type":"Attribute"}},"content":{"content":"\nApply function if the supplied argument is non-null.\n\n# Inputs\n\n`f`\n\n: Function to call\n\n`a`\n\n: Argument to check for null before passing it to `f`\n\n# Type\n\n```\nmapNullable :: (a -> b) -> (a | Null) -> (b | Null)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mapNullable` usage example\n\n```nix\nmapNullable (x: x+1) null\n=> null\nmapNullable (x: x+1) 22\n=> 23\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":448,"column":3},"path":["lib","trivial","mapNullable"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.match","path":["lib","match"],"aliases":[["builtins","match"],["lib","strings","match"]],"signature":null,"is_primop":true,"primop_meta":{"name":"match","args":["regex","str"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":378,"column":9},"attr_expr":"match","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","match"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a list if the [extended POSIX regular\nexpression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)\n*regex* matches *str* precisely, otherwise returns `null`. Each item\nin the list is a regex group.\n\n```nix\nbuiltins.match \"ab\" \"abc\"\n```\n\nEvaluates to `null`.\n\n```nix\nbuiltins.match \"abc\" \"abc\"\n```\n\nEvaluates to `[ ]`.\n\n```nix\nbuiltins.match \"a(b)(c)\" \"abc\"\n```\n\nEvaluates to `[ \"b\" \"c\" ]`.\n\n```nix\nbuiltins.match \"[[:space:]]+([[:upper:]]+)[[:space:]]+\" \"  FOO   \"\n```\n\nEvaluates to `[ \"FOO\" ]`.\n","source":{"position":null,"path":["lib","match"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.matchAttrs","path":["lib","matchAttrs"],"aliases":[["lib","attrsets","matchAttrs"]],"signature":"matchAttrs :: AttrSet -> AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":235,"column":9},"attr_expr":"matchAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":5},"lambda_expr":"matchAttrs =\n    pattern: attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1800,"column":3},"path":["lib","attrsets","matchAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nRecurse into every attribute set of the first argument and check that:\n- Each attribute path also exists in the second argument.\n- If the attribute's value is not a nested attribute set, it must have the same value in the right argument.\n\n# Inputs\n\n`pattern`\n\n: Attribute set structure to match\n\n`attrs`\n\n: Attribute set to check\n\n# Type\n\n```\nmatchAttrs :: AttrSet -> AttrSet -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.matchAttrs` usage example\n\n```nix\nmatchAttrs { cpu = {}; } { cpu = { bits = 64; }; }\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1800,"column":3},"path":["lib","attrsets","matchAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.max","path":["lib","max"],"aliases":[["lib","trivial","max"]],"signature":"max :: Number -> Number -> Number\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":149,"column":9},"attr_expr":"max","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":616,"column":9},"lambda_expr":"max = x: y: if x > y then x else y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":616,"column":3},"path":["lib","trivial","max"],"pos_type":"Attribute"}},"content":{"content":"\nReturns maximum of two numbers.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmax :: Number -> Number -> Number\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":616,"column":3},"path":["lib","trivial","max"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.maybeAttr","path":["lib","maybeAttr"],"aliases":[["lib","maybeAttrNullable"],["lib","misc","maybeAttr"],["lib","misc","maybeAttrNullable"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":573,"column":9},"attr_expr":"maybeAttr","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"lambda_expr":"maybeAttr =\n    name: default: attrs:\n    attrs.${name} or default;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","maybeAttr"],"pos_type":"Lambda"}},"content":{"content":"shortcut for attrByPath [\"name\"] default attrs","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","maybeAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.maybeAttrNullable","path":["lib","maybeAttrNullable"],"aliases":[["lib","maybeAttr"],["lib","misc","maybeAttr"],["lib","misc","maybeAttrNullable"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":572,"column":9},"attr_expr":"maybeAttrNullable","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"lambda_expr":"maybeAttr =\n    name: default: attrs:\n    attrs.${name} or default;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","maybeAttrNullable"],"pos_type":"Lambda"}},"content":{"content":"shortcut for attrByPath [\"name\"] default attrs","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","maybeAttrNullable"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.maybeEnv","path":["lib","maybeEnv"],"aliases":[["lib","misc","maybeEnv"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":568,"column":9},"attr_expr":"maybeEnv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":30,"column":5},"lambda_expr":"maybeEnv =\n    name: default:\n    let\n      value = builtins.getEnv name;\n    in\n    if value == \"\" then default else value;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":30,"column":5},"path":["lib","maybeEnv"],"pos_type":"Lambda"}},"content":{"content":"returns default if env var is not set","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":30,"column":5},"path":["lib","maybeEnv"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeAttrByFunc","path":["lib","mergeAttrByFunc"],"aliases":[["lib","misc","mergeAttrByFunc"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":592,"column":9},"attr_expr":"mergeAttrByFunc","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":344,"column":5},"lambda_expr":"mergeAttrByFunc =\n    x: y:\n    let\n      mergeAttrBy2 = {\n        mergeAttrBy = mergeAttrs;\n      }\n      // (maybeAttr \"mergeAttrBy\" { } x)\n      // (maybeAttr \"mergeAttrBy\" { } y);\n    in\n    foldr mergeAttrs { } [\n      x\n      y\n      (mapAttrs\n        (\n          a: v: # merge special names using given functions\n          if x ? ${a} then\n            if y ? ${a} then\n              v x.${a} y.${a} # both have attr, use merge func\n            else\n              x.${a} # only x has attr\n          else\n            y.${a} # only y has attr)\n        )\n        (\n          removeAttrs mergeAttrBy2\n            # don't merge attrs which are neither in x nor y\n            (filter (a: !x ? ${a} && !y ? ${a}) (attrNames mergeAttrBy2))\n        )\n      )\n    ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":344,"column":5},"path":["lib","mergeAttrByFunc"],"pos_type":"Lambda"}},"content":{"content":"foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":344,"column":5},"path":["lib","mergeAttrByFunc"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeAttrs","path":["lib","mergeAttrs"],"aliases":[["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":142,"column":9},"attr_expr":"mergeAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrsByFuncDefaults","path":["lib","mergeAttrsByFuncDefaults"],"aliases":[["lib","misc","mergeAttrsByFuncDefaults"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":593,"column":9},"attr_expr":"mergeAttrsByFuncDefaults","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":196,"column":14},"lambda_expr":"list:\n    let\n      foldl' = n: if n == -1 then nul else op (foldl' (n - 1)) (elemAt list n);\n    in\n    foldl' (length list - 1)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"lib.mergeAttrsByFuncDefaultsClean","path":["lib","mergeAttrsByFuncDefaultsClean"],"aliases":[["lib","misc","mergeAttrsByFuncDefaultsClean"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":594,"column":9},"attr_expr":"mergeAttrsByFuncDefaultsClean","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":374,"column":35},"lambda_expr":"list: removeAttrs (mergeAttrsByFuncDefaults list) [ \"mergeAttrBy\" ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":374,"column":35},"path":["lib","mergeAttrsByFuncDefaultsClean"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":374,"column":35},"path":["lib","mergeAttrsByFuncDefaultsClean"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeAttrsConcatenateValues","path":["lib","mergeAttrsConcatenateValues"],"aliases":[["lib","misc","mergeAttrsConcatenateValues"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":590,"column":9},"attr_expr":"mergeAttrsConcatenateValues","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":8},"lambda_expr":"set1: set2:\n    foldr (n: set: if set ? ${n} then setAttr set n (f set.${n} set2.${n}) else set) (set2 // set1) (\n      attrNames set2\n    )","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mergeAttrsList","path":["lib","mergeAttrsList"],"aliases":[["lib","attrsets","mergeAttrsList"]],"signature":"mergeAttrsList :: [AttrSet] -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":236,"column":9},"attr_expr":"mergeAttrsList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1608,"column":5},"lambda_expr":"mergeAttrsList =\n    list:\n    let\n      # `binaryMerge start end` merges the elements at indices `index` of `list` such that `start <= index < end`\n      # Type: Int -> Int -> AttrSet\n      binaryMerge =\n        start: end:\n        # assert start < end; # Invariant\n        if end - start >= 2 then\n          # If there's at least 2 elements, split the range in two, recurse on each part and merge the result\n          # The invariant is satisfied because each half will have at least 1 element\n          binaryMerge start (start + (end - start) / 2) // binaryMerge (start + (end - start) / 2) end\n        else\n          # Otherwise there will be exactly 1 element due to the invariant, in which case we just return it directly\n          elemAt list start;\n    in\n    if list == [ ] then\n      # Calling binaryMerge as below would not satisfy its invariant\n      { }\n    else\n      binaryMerge 0 (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1607,"column":3},"path":["lib","attrsets","mergeAttrsList"],"pos_type":"Attribute"}},"content":{"content":"\nMerge a list of attribute sets together using the `//` operator.\nIn case of duplicate attributes, values from later list elements take precedence over earlier ones.\nThe result is the same as `foldl mergeAttrs { }`, but the performance is better for large inputs.\nFor n list elements, each with an attribute set containing m unique attributes, the complexity of this operation is O(nm log n).\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmergeAttrsList :: [AttrSet] -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mergeAttrsList` usage example\n\n```nix\nmergeAttrsList [ { a = 0; b = 1; } { c = 2; d = 3; } ]\n=> { a = 0; b = 1; c = 2; d = 3; }\nmergeAttrsList [ { a = 0; } { a = 1; } ]\n=> { a = 1; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1607,"column":3},"path":["lib","attrsets","mergeAttrsList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrsNoOverride","path":["lib","mergeAttrsNoOverride"],"aliases":[["lib","misc","mergeAttrsNoOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":591,"column":9},"attr_expr":"mergeAttrsNoOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":307,"column":5},"lambda_expr":"mergeAttrsNoOverride =\n    {\n      mergeLists ? [\n        \"buildInputs\"\n        \"propagatedBuildInputs\"\n      ],\n      overrideSnd ? [ \"buildPhase\" ],\n    }:\n    attrs1: attrs2:\n    foldr (\n      n: set:\n      setAttr set n (\n        if set ? ${n} then # merge\n          if\n            elem n mergeLists # attribute contains list, merge them by concatenating\n          then\n            attrs2.${n} ++ attrs1.${n}\n          else if elem n overrideSnd then\n            attrs1.${n}\n          else\n            throw \"error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined\"\n        else\n          attrs2.${n} # add attribute not existing in attr1\n      )\n    ) attrs1 (attrNames attrs2);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":307,"column":5},"path":["lib","mergeAttrsNoOverride"],"pos_type":"Lambda"}},"content":{"content":"! deprecated, use mergeAttrByFunc instead","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":307,"column":5},"path":["lib","mergeAttrsNoOverride"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeAttrsWithFunc","path":["lib","mergeAttrsWithFunc"],"aliases":[["lib","misc","mergeAttrsWithFunc"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":589,"column":9},"attr_expr":"mergeAttrsWithFunc","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":5},"lambda_expr":"mergeAttrsWithFunc =\n    f: set1: set2:\n    foldr (n: set: if set ? ${n} then setAttr set n (f set.${n} set2.${n}) else set) (set2 // set1) (\n      attrNames set2\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":5},"path":["lib","mergeAttrsWithFunc"],"pos_type":"Lambda"}},"content":{"content":"exists in both sets","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":5},"path":["lib","mergeAttrsWithFunc"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeDefaultOption","path":["lib","mergeDefaultOption"],"aliases":[["lib","options","mergeDefaultOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":520,"column":9},"attr_expr":"mergeDefaultOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":423,"column":5},"lambda_expr":"mergeDefaultOption =\n    loc: defs:\n    let\n      list = getValues defs;\n    in\n    if length list == 1 then\n      head list\n    else if all isFunction list then\n      x: mergeDefaultOption loc (map (f: f x) list)\n    else if all isList list then\n      concatLists list\n    else if all isAttrs list then\n      foldl' lib.mergeAttrs { } list\n    else if all isBool list then\n      foldl' lib.\"or\" false list\n    else if all isString list then\n      lib.concatStrings list\n    else if all isInt list && all (x: x == head list) list then\n      head list\n    else\n      throw \"Cannot merge definitions of `${showOption loc}'. Definition values:${showDefs defs}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":422,"column":3},"path":["lib","options","mergeDefaultOption"],"pos_type":"Attribute"}},"content":{"content":"\nA merge function that merges multiple definitions of an option into a single value\n\n:::{.caution}\nThis function is used as the default merge operation in `lib.types.mkOptionType`. In most cases, explicit usage of this function is unnecessary.\n:::\n\n# Inputs\n\n`loc`\n: location of the option in the configuration as a list of strings.\n\n  e.g. `[\"boot\" \"loader \"grub\" \"enable\"]`\n\n`defs`\n: list of definition values and locations.\n\n  e.g. `[ { file = \"/foo.nix\"; value = 1; } { file = \"/bar.nix\"; value = 2 } ]`\n\n# Example\n:::{.example}\n## `lib.options.mergeDefaultOption` usage example\n\n```nix\nmyType = mkOptionType {\n  name = \"myType\";\n  merge = mergeDefaultOption; # <- This line is redundant. It is the default already.\n};\n```\n\n:::\n\n# Merge behavior\n\nMerging requires all definition values to have the same type.\n\n- If all definitions are booleans, the result of a `foldl'` with the `or` operation is returned.\n- If all definitions are strings, they are concatenated. (`lib.concatStrings`)\n- If all definitions are integers and all are equal, the first one is returned.\n- If all definitions are lists, they are concatenated. (`++`)\n- If all definitions are attribute sets, they are merged. (`lib.mergeAttrs`)\n- If all definitions are functions, the first function is applied to the result of the second function. (`f -> x: f x`)\n- Otherwise, an error is thrown.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":422,"column":3},"path":["lib","options","mergeDefaultOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeDefinitions","path":["lib","mergeDefinitions"],"aliases":[["lib","modules","mergeDefinitions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":482,"column":9},"attr_expr":"mergeDefinitions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1205,"column":22},"lambda_expr":"mergeDefinitions = loc: type: defs: rec {\n    defsFinal' =\n      let\n        # Process mkMerge and mkIf properties.\n        defsNormalized = concatMap (\n          m:\n          map (\n            value:\n            if value._type or null == \"definition\" then\n              value\n            else\n              {\n                inherit (m) file;\n                inherit value;\n              }\n          ) (addErrorContext \"while evaluating definitions from `${m.file}':\" (dischargeProperties m.value))\n        ) defs;\n\n        # Process mkOverride properties.\n        defsFiltered = filterOverrides' defsNormalized;\n\n        # Sort mkOrder properties.\n        defsSorted =\n          # Avoid sorting if we don't have to.\n          if any (def: def.value._type or \"\" == \"order\") defsFiltered.values then\n            sortProperties defsFiltered.values\n          else\n            defsFiltered.values;\n      in\n      # Fast path: the overwhelming majority of options have exactly one\n      # definition whose value carries no property wrapper\n      # (mkIf/mkMerge/mkOverride/mkOrder/definition). In that case the\n      # discharge/filter/sort pipeline above is a no-op but still allocates\n      # several intermediate lists and closures. Detect it up front and hand\n      # the original singleton straight to the type merge. The let-bindings\n      # above are lazy and thus never forced on this branch.\n      if\n        length defs == 1\n        && (\n          let\n            d = head defs;\n          in\n          addErrorContext \"while evaluating definitions from `${d.file}':\" (\n            !(isAttrs d.value && d.value ? _type)\n          )\n        )\n      then\n        {\n          values = defs;\n          highestPrio = defaultOverridePriority;\n        }\n      else\n        {\n          values = defsSorted;\n          inherit (defsFiltered) highestPrio;\n        };\n    defsFinal = defsFinal'.values;\n\n    # Type-check the remaining definitions, and merge them. Or throw if no definitions.\n    mergedValue =\n      if isDefined then\n        if type.merge ? v2 then\n          # check and merge share the same closure\n          # .headError is either not-present, null, or a string describing the error\n          if checkedAndMerged.headError or null != null then\n            throw \"A definition for option `${showOption loc}' is not of type `${type.description}'. TypeError: ${checkedAndMerged.headError.message}\"\n          else\n            checkedAndMerged.value\n        else if all (def: type.check def.value) defsFinal then\n          type.merge loc defsFinal\n        else\n          let\n            allInvalid = filter (def: !type.check def.value) defsFinal;\n          in\n          throw \"A definition for option `${showOption loc}' is not of type `${type.description}'. Definition values:${showDefs allInvalid}\"\n      else if type.emptyValue ? value then\n        type.emptyValue.value\n      else\n        # (nixos-option detects this specific error message and gives it special\n        # handling.  If changed here, please change it there too.)\n        throw\n          \"The option `${showOption loc}' was accessed but has no value defined. Try setting the option.\";\n\n    checkedAndMerged =\n      (\n        # This function (which is immediately applied) checks that type.merge\n        # returns the proper attrset.\n        # Once use of the merge.v2 feature has propagated, consider removing this\n        # for an estimated one thousandth performance improvement (NixOS by nr.thunks).\n        {\n          headError,\n          value,\n          valueMeta,\n        }@args:\n        args\n      )\n        (\n          if type.merge ? v2 then\n            let\n              # Check for v2 merge coherence\n              r = checkV2MergeCoherence loc type (\n                type.merge.v2 {\n                  inherit loc;\n                  defs = defsFinal;\n                }\n              );\n            in\n            r\n            // {\n              valueMeta = r.valueMeta // {\n                _internal = {\n                  inherit type;\n                };\n              };\n            }\n          else\n            {\n              headError = null;\n              value = mergedValue;\n              valueMeta = { };\n            }\n        );\n\n    isDefined = defsFinal != [ ];\n\n    optionalValue = if isDefined then { value = mergedValue; } else { };\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1205,"column":22},"path":["lib","mergeDefinitions"],"pos_type":"Lambda"}},"content":{"content":"Merge definitions of a value of a given type.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1205,"column":22},"path":["lib","mergeDefinitions"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeEqualOption","path":["lib","mergeEqualOption"],"aliases":[["lib","options","mergeEqualOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":522,"column":9},"attr_expr":"mergeEqualOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":500,"column":5},"lambda_expr":"mergeEqualOption =\n    loc: defs:\n    if defs == [ ] then\n      abort \"This case should never happen.\"\n    # Returns early if we only have one element\n    # This also makes it work for functions, because the foldl' below would try\n    # to compare the first element with itself, which is false for functions\n    else if length defs == 1 then\n      (head defs).value\n    else\n      (foldl' (\n        first: def:\n        if def.value != first.value then\n          throw \"The option `${showOption loc}' has conflicting definition values:${\n            showDefs [\n              first\n              def\n            ]\n          }\\n${prioritySuggestion}\"\n        else\n          first\n      ) (head defs) (tail defs)).value;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":499,"column":3},"path":["lib","options","mergeEqualOption"],"pos_type":"Attribute"}},"content":{"content":"\n\"Merge\" option definitions by checking that they all have the same value.\n\n# Inputs\n\n`loc`\n\n: 1\\. Function argument\n\n`defs`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":499,"column":3},"path":["lib","options","mergeEqualOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeModules","path":["lib","mergeModules"],"aliases":[["lib","modules","mergeModules"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":479,"column":9},"attr_expr":"mergeModules","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":774,"column":5},"lambda_expr":"mergeModules =\n    prefix: modules:\n    mergeModules' prefix modules (\n      concatMap (\n        m:\n        map (config: {\n          file = m._file;\n          inherit config;\n        }) (pushDownProperties m.config)\n      ) modules\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":774,"column":5},"path":["lib","mergeModules"],"pos_type":"Lambda"}},"content":{"content":"\nMerge a list of modules.  This will recurse over the option\ndeclarations in all modules, combining them into a single set.\nAt the same time, for each option declaration, it will merge the\ncorresponding option definitions in all machines, returning them\nin the ‘value’ attribute of each option.\n\nThis returns a set like\n  {\n    # A recursive set of options along with their final values\n    matchedOptions = {\n      foo = { _type = \"option\"; value = \"option value of foo\"; ... };\n      bar.baz = { _type = \"option\"; value = \"option value of bar.baz\"; ... };\n      ...\n    };\n    # A list of definitions that weren't matched by any option\n    unmatchedDefns = [\n      { file = \"file.nix\"; prefix = [ \"qux\" ]; value = \"qux\"; }\n      ...\n    ];\n  }\n\n# Inputs\n\n`prefix`\n\n: 1\\. Function argument\n\n`modules`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":774,"column":5},"path":["lib","mergeModules"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeModules' (Prime)","path":["lib","mergeModules'"],"aliases":[["lib","modules","mergeModules'"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":480,"column":9},"attr_expr":"mergeModules'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":786,"column":5},"lambda_expr":"prefix: modules: configs:\n    let\n      # an attrset 'name' => list of submodules that declare ‘name’.\n      declsByName = zipAttrs (\n        map (\n          module:\n          let\n            subtree = module.options;\n          in\n          if !(isAttrs subtree) then\n            throw ''\n              An option declaration for `${concatStringsSep \".\" prefix}' has type\n              `${typeOf subtree}' rather than an attribute set.\n              Did you mean to define this outside of `options'?\n            ''\n          else\n            mapAttrs (n: option: {\n              inherit (module) _file;\n              pos = unsafeGetAttrPos n subtree;\n              options = option;\n            }) subtree\n        ) modules\n      );\n\n      # The root of any module definition must be an attrset.\n      checkedConfigs =\n        assert all (\n          c:\n          # TODO: I have my doubts that this error would occur when option definitions are not matched.\n          #       The implementation of this check used to be tied to a superficially similar check for\n          #       options, so maybe that's why this is here.\n          isAttrs c.config\n          || throw ''\n            In module `${c.file}', you're trying to define a value of type `${typeOf c.config}'\n            rather than an attribute set for the option\n            `${concatStringsSep \".\" prefix}'!\n\n            This usually happens if `${concatStringsSep \".\" prefix}' has option\n            definitions inside that are not matched. Please check how to properly define\n            this option by e.g. referring to `man 5 configuration.nix'!\n          ''\n        ) configs;\n        configs;\n\n      # an attrset 'name' => list of submodules that define ‘name’.\n      pushedDownDefinitionsByName = zipAttrsWith (n: concatLists) (\n        map (\n          module:\n          mapAttrs (\n            n: value:\n            map (config: {\n              inherit (module) file;\n              inherit config;\n            }) (pushDownProperties value)\n          ) module.config\n        ) checkedConfigs\n      );\n      # extract the definitions for each loc\n      rawDefinitionsByName = zipAttrs (\n        map (\n          module:\n          mapAttrs (n: value: {\n            inherit (module) file;\n            inherit value;\n          }) module.config\n        ) checkedConfigs\n      );\n\n      # Convert an option tree decl to a submodule option decl\n      optionTreeToOption =\n        decl:\n        if isOption decl.options then\n          decl\n        else\n          decl\n          // {\n            options = mkOption {\n              type = types.submoduleWith {\n                modules = [ { options = decl.options; } ];\n                # `null` is not intended for use by modules. It is an internal\n                # value that means \"whatever the user has declared elsewhere\".\n                # This might become obsolete with https://github.com/NixOS/nixpkgs/issues/162398\n                shorthandOnlyDefinesConfig = null;\n              };\n            };\n          };\n\n      resultsByName = mapAttrs (\n        name: decls:\n        # We're descending into attribute ‘name’.\n        let\n          loc = prefix ++ [ name ];\n          defns = pushedDownDefinitionsByName.${name} or [ ];\n          defns' = rawDefinitionsByName.${name} or [ ];\n          optionDecls = filter (\n            m:\n            m.options ? _type\n            && (m.options._type == \"option\" || throwDeclarationTypeError loc m.options._type m._file)\n          ) decls;\n        in\n        if length optionDecls == length decls then\n          let\n            opt = fixupOptionType loc (mergeOptionDecls loc decls);\n          in\n          {\n            matchedOptions = evalOptionValue loc opt defns';\n            unmatchedDefns = [ ];\n          }\n        else if optionDecls != [ ] then\n          if\n            all (x: x.options.type.name or null == \"submodule\") optionDecls\n          # Raw options can only be merged into submodules. Merging into\n          # attrsets might be nice, but ambiguous. Suppose we have\n          # attrset as a `attrsOf submodule`. User declares option\n          # attrset.foo.bar, this could mean:\n          #  a. option `bar` is only available in `attrset.foo`\n          #  b. option `foo.bar` is available in all `attrset.*`\n          #  c. reject and require \"<name>\" as a reminder that it behaves like (b).\n          #  d. magically combine (a) and (c).\n          # All of the above are merely syntax sugar though.\n          then\n            let\n              opt = fixupOptionType loc (mergeOptionDecls loc (map optionTreeToOption decls));\n            in\n            {\n              matchedOptions = evalOptionValue loc opt defns';\n              unmatchedDefns = [ ];\n            }\n          else\n            let\n              nonOptions = filter (m: !isOption m.options) decls;\n            in\n            throw \"The option `${showOption loc}' in module `${(head optionDecls)._file}' would be a parent of the following options, but its type `${\n              (head optionDecls).options.type.description or \"<no description>\"\n            }' does not support nested options.\\n${showRawDecls loc nonOptions}\"\n        else\n          mergeModules' loc decls defns\n      ) declsByName;\n\n      matchedOptions = mapAttrs (n: v: v.matchedOptions) resultsByName;\n\n      # an attrset 'name' => list of unmatched definitions for 'name'\n      unmatchedDefnsByName =\n        # Propagate all unmatched definitions from nested option sets\n        mapAttrs (n: v: v.unmatchedDefns) resultsByName\n        # Plus the definitions for the current prefix that don't have a matching option\n        // removeAttrs rawDefinitionsByName (attrNames matchedOptions);\n    in\n    {\n      inherit matchedOptions;\n\n      # Transforms unmatchedDefnsByName into a list of definitions\n      unmatchedDefns =\n        if configs == [ ] then\n          # When no config values exist, there can be no unmatched config, so\n          # we short circuit and avoid evaluating more _options_ than necessary.\n          [ ]\n        else\n          concatLists (\n            mapAttrsToList (\n              name: defs:\n              map (\n                def:\n                def\n                // {\n                  # Set this so we know when the definition first left unmatched territory\n                  prefix = [ name ] ++ (def.prefix or [ ]);\n                }\n              ) defs\n            ) unmatchedDefnsByName\n          );\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":786,"column":5},"path":["lib","mergeModules'"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":786,"column":5},"path":["lib","mergeModules'"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeOneOption","path":["lib","mergeOneOption"],"aliases":[["lib","options","mergeOneOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":521,"column":9},"attr_expr":"mergeOneOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":479,"column":5},"lambda_expr":"loc: defs:\n    if length defs == 1 then\n      merge loc defs\n    else\n      assert length defs > 1;\n      throw \"The option `${showOption loc}' is defined multiple times while it's expected to be unique.\\n${message}\\nDefinition values:${showDefs defs}\\n${prioritySuggestion}\"","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":451,"column":3},"path":["lib","options","mergeOneOption"],"pos_type":"Attribute"}},"content":{"content":"\nRequire a single definition.\n\n::: {.warning}\nDoes not perform nested checks, as this does not run the merge function!\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":451,"column":3},"path":["lib","options","mergeOneOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeOptionDecls","path":["lib","mergeOptionDecls"],"aliases":[["lib","modules","mergeOptionDecls"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":481,"column":9},"attr_expr":"mergeOptionDecls","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1011,"column":5},"lambda_expr":"mergeOptionDecls =\n    loc: opts:\n    foldl'\n      (\n        res: opt:\n        let\n          t = res.type;\n          t' = opt.options.type;\n          mergedType = t.typeMerge t'.functor;\n          typesMergeable = mergedType != null;\n\n          # TODO: Remove this when all downstream reliances of internals: 'functor.wrapped' are sufficiently migrated.\n          # A function that adds the deprecated wrapped message to a type.\n          addDeprecatedWrapped =\n            t:\n            t\n            // {\n              functor = t.functor // {\n                wrapped = t.functor.wrappedDeprecationMessage {\n                  inherit loc;\n                };\n              };\n            };\n\n          typeSet =\n            if opt.options ? type then\n              if res ? type then\n                if typesMergeable then\n                  {\n                    type =\n                      if mergedType ? functor.wrappedDeprecationMessage then\n                        addDeprecatedWrapped mergedType\n                      else\n                        mergedType;\n                  }\n                else\n                  # Keep in sync with the same error below!\n                  throw\n                    \"The option `${showOption loc}' in `${opt._file}' is already declared in ${showFiles res.declarations}.\"\n              else if opt.options.type ? functor.wrappedDeprecationMessage then\n                { type = addDeprecatedWrapped opt.options.type; }\n              else\n                { }\n            else\n              { };\n\n          bothHave = k: opt.options ? ${k} && res ? ${k};\n        in\n        if bothHave \"default\" || bothHave \"example\" || bothHave \"description\" || bothHave \"apply\" then\n          # Keep in sync with the same error above!\n          throw\n            \"The option `${showOption loc}' in `${opt._file}' is already declared in ${showFiles res.declarations}.\"\n        else\n          let\n            getSubModules = opt.options.type.getSubModules or null;\n            submodules =\n              if getSubModules != null then\n                map (setDefaultModuleLocation opt._file) getSubModules ++ res.options\n              else\n                res.options;\n          in\n          opt.options\n          // res\n          // {\n            declarations = res.declarations ++ [ opt._file ];\n            # In the case of modules that are generated dynamically, we won't\n            # have exact declaration lines; fall back to just the file being\n            # evaluated.\n            declarationPositions =\n              res.declarationPositions\n              ++ (\n                if opt.pos != null then\n                  [ opt.pos ]\n                else\n                  [\n                    {\n                      file = opt._file;\n                      line = null;\n                      column = null;\n                    }\n                  ]\n              );\n            options = submodules;\n          }\n          // typeSet\n      )\n      {\n        inherit loc;\n        declarations = [ ];\n        declarationPositions = [ ];\n        options = [ ];\n      }\n      opts;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1011,"column":5},"path":["lib","mergeOptionDecls"],"pos_type":"Lambda"}},"content":{"content":"\nMerge multiple option declarations into a single declaration.  In\ngeneral, there should be only one declaration of each option.\nThe exception is the ‘options’ attribute, which specifies\nsub-options.  These can be specified multiple times to allow one\nmodule to add sub-options to an option declared somewhere else\n(e.g. multiple modules define sub-options for ‘fileSystems’).\n\n'loc' is the list of attribute names where the option is located.\n\n'opts' is a list of modules.  Each module has an options attribute which\ncorrespond to the definition of 'loc' in 'opt.file'.\n\n# Inputs\n\n`loc`\n\n: 1\\. Function argument\n\n`opts`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1011,"column":5},"path":["lib","mergeOptionDecls"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeUniqueOption","path":["lib","mergeUniqueOption"],"aliases":[["lib","options","mergeUniqueOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":523,"column":9},"attr_expr":"mergeUniqueOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":471,"column":5},"lambda_expr":"mergeUniqueOption =\n    {\n      message,\n      # WARNING: the default merge function assumes that the definition is a valid (option) value. You MUST pass a merge function if the return value needs to be\n      #   - type checked beyond what .check does (which should be very little; only on the value head; not attribute values, etc)\n      #   - if you want attribute values to be checked, or list items\n      #   - if you want coercedTo-like behavior to work\n      merge ? loc: defs: (head defs).value,\n    }:\n    loc: defs:\n    if length defs == 1 then\n      merge loc defs\n    else\n      assert length defs > 1;\n      throw \"The option `${showOption loc}' is defined multiple times while it's expected to be unique.\\n${message}\\nDefinition values:${showDefs defs}\\n${prioritySuggestion}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":470,"column":3},"path":["lib","options","mergeUniqueOption"],"pos_type":"Attribute"}},"content":{"content":"\nRequire a single definition.\n\n::: {.note}\nWhen the type is not checked completely by check, pass a merge function for further checking (of sub-attributes, etc).\n:::\n\n# Inputs\n\n`loc`\n\n: 2\\. Function argument\n\n`defs`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":470,"column":3},"path":["lib","options","mergeUniqueOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mesonBool","path":["lib","mesonBool"],"aliases":[["lib","strings","mesonBool"]],"signature":"mesonBool :: String -> Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":384,"column":9},"attr_expr":"mesonBool","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2296,"column":5},"lambda_expr":"mesonBool =\n    condition: flag:\n    assert (lib.isString condition);\n    assert (lib.isBool flag);\n    mesonOption condition (lib.boolToString flag);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2295,"column":3},"path":["lib","strings","mesonBool"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<condition>={true,false}\"` string that can be passed to typical\nMeson invocations.\n\n# Inputs\n\n`condition`\n: The condition to be made true or false\n\n`flag`\n: The controlling flag of the condition\n\n# Type\n\n```\nmesonBool :: String -> Bool -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.mesonBool` usage example\n\n```nix\nmesonBool \"hardened\" true\n=> \"-Dhardened=true\"\nmesonBool \"static\" false\n=> \"-Dstatic=false\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2295,"column":3},"path":["lib","strings","mesonBool"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mesonEnable","path":["lib","mesonEnable"],"aliases":[["lib","strings","mesonEnable"]],"signature":"mesonEnable :: String -> Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":385,"column":9},"attr_expr":"mesonEnable","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2333,"column":5},"lambda_expr":"mesonEnable =\n    feature: flag:\n    assert (lib.isString feature);\n    assert (lib.isBool flag);\n    mesonOption feature (if flag then \"enabled\" else \"disabled\");","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2332,"column":3},"path":["lib","strings","mesonEnable"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>={enabled,disabled}\"` string that can be passed to\ntypical Meson invocations.\n\n# Inputs\n\n`feature`\n: The feature to be enabled or disabled\n\n`flag`\n: The controlling flag\n\n# Type\n\n```\nmesonEnable :: String -> Bool -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.mesonEnable` usage example\n\n```nix\nmesonEnable \"docs\" true\n=> \"-Ddocs=enabled\"\nmesonEnable \"savage\" false\n=> \"-Dsavage=disabled\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2332,"column":3},"path":["lib","strings","mesonEnable"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mesonOption","path":["lib","mesonOption"],"aliases":[["lib","strings","mesonOption"]],"signature":"mesonOption :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":383,"column":9},"attr_expr":"mesonOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2259,"column":5},"lambda_expr":"mesonOption =\n    feature: value:\n    assert (lib.isString feature);\n    assert (lib.isString value);\n    \"-D${feature}=${value}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2258,"column":3},"path":["lib","strings","mesonOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>=<value>\"` string that can be passed to typical Meson\ninvocations.\n\n# Inputs\n\n`feature`\n: The feature to be set\n\n`value`\n: The desired value\n\n# Type\n\n```\nmesonOption :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.mesonOption` usage example\n\n```nix\nmesonOption \"engine\" \"opengl\"\n=> \"-Dengine=opengl\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2258,"column":3},"path":["lib","strings","mesonOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.min","path":["lib","min"],"aliases":[["lib","trivial","min"]],"signature":"min :: Number -> Number -> Number\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":148,"column":9},"attr_expr":"min","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":595,"column":9},"lambda_expr":"min = x: y: if x < y then x else y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":595,"column":3},"path":["lib","trivial","min"],"pos_type":"Attribute"}},"content":{"content":"\nReturns minimum of two numbers.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmin :: Number -> Number -> Number\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":595,"column":3},"path":["lib","trivial","min"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mirrorFunctionArgs","path":["lib","mirrorFunctionArgs"],"aliases":[["lib","trivial","mirrorFunctionArgs"]],"signature":"mirrorFunctionArgs :: (a -> b) -> (a -> c) -> (a -> c)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":176,"column":9},"attr_expr":"mirrorFunctionArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1178,"column":5},"lambda_expr":"mirrorFunctionArgs =\n    f:\n    let\n      fArgs = functionArgs f;\n    in\n    g: {\n      __functor = self: g;\n      __functionArgs = fArgs;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1177,"column":3},"path":["lib","trivial","mirrorFunctionArgs"],"pos_type":"Attribute"}},"content":{"content":"\n`mirrorFunctionArgs f g` creates a new function `g'` with the same behavior as `g` (`g' x == g x`)\nbut its function arguments mirroring `f` (`lib.functionArgs g' == lib.functionArgs f`).\n\n# Inputs\n\n`f`\n\n: Function to provide the argument metadata\n\n`g`\n\n: Function to set the argument metadata to\n\n# Type\n\n```\nmirrorFunctionArgs :: (a -> b) -> (a -> c) -> (a -> c)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mirrorFunctionArgs` usage example\n\n```nix\naddab = {a, b}: a + b\naddab { a = 2; b = 4; }\n=> 6\nlib.functionArgs addab\n=> { a = false; b = false; }\naddab1 = attrs: addab attrs + 1\naddab1 { a = 2; b = 4; }\n=> 7\nlib.functionArgs addab1\n=> { }\naddab1' = lib.mirrorFunctionArgs addab addab1\naddab1' { a = 2; b = 4; }\n=> 7\nlib.functionArgs addab1'\n=> { a = false; b = false; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1177,"column":3},"path":["lib","trivial","mirrorFunctionArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkAfter","path":["lib","mkAfter"],"aliases":[["lib","modules","mkAfter"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":501,"column":9},"attr_expr":"mkAfter","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":23},"lambda_expr":"content: {\n    _type = \"order\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mkAliasAndWrapDefinitions","path":["lib","mkAliasAndWrapDefinitions"],"aliases":[["lib","modules","mkAliasAndWrapDefinitions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":503,"column":9},"attr_expr":"mkAliasAndWrapDefinitions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":31},"lambda_expr":"wrap: option: mkIf option.isDefined (wrap (mkMerge option.definitions))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":31},"path":["lib","mkAliasAndWrapDefinitions"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":31},"path":["lib","mkAliasAndWrapDefinitions"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkAliasDefinitions","path":["lib","mkAliasDefinitions"],"aliases":[["lib","modules","mkAliasDefinitions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":502,"column":9},"attr_expr":"mkAliasDefinitions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":37},"lambda_expr":"option: mkIf option.isDefined (wrap (mkMerge option.definitions))","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mkAliasOptionModule","path":["lib","mkAliasOptionModule"],"aliases":[["lib","mkAliasOptionModuleMD"],["lib","modules","mkAliasOptionModule"],["lib","modules","mkAliasOptionModuleMD"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":510,"column":9},"attr_expr":"mkAliasOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"lambda_expr":"mkAliasOptionModule =\n    from: to:\n    doRename {\n      inherit from to;\n      visible = true;\n      warn = false;\n      use = id;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","mkAliasOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nLike ‘mkRenamedOptionModule’, but doesn't show a warning.\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","mkAliasOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkAliasOptionModuleMD","path":["lib","mkAliasOptionModuleMD"],"aliases":[["lib","mkAliasOptionModule"],["lib","modules","mkAliasOptionModule"],["lib","modules","mkAliasOptionModuleMD"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":513,"column":9},"attr_expr":"mkAliasOptionModuleMD","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"lambda_expr":"mkAliasOptionModule =\n    from: to:\n    doRename {\n      inherit from to;\n      visible = true;\n      warn = false;\n      use = id;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","mkAliasOptionModuleMD"],"pos_type":"Lambda"}},"content":{"content":"\nLike ‘mkRenamedOptionModule’, but doesn't show a warning.\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","mkAliasOptionModuleMD"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkAssert","path":["lib","mkAssert"],"aliases":[["lib","modules","mkAssert"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":489,"column":9},"attr_expr":"mkAssert","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1569,"column":5},"lambda_expr":"assertion: message: content:\n    mkIf (if assertion then true else throw \"\\nFailed assertion: ${message}\") content","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1569,"column":5},"path":["lib","mkAssert"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1569,"column":5},"path":["lib","mkAssert"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkBefore","path":["lib","mkBefore"],"aliases":[["lib","modules","mkBefore"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":500,"column":9},"attr_expr":"mkBefore","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":23},"lambda_expr":"content: {\n    _type = \"order\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mkChangedOptionModule","path":["lib","mkChangedOptionModule"],"aliases":[["lib","modules","mkChangedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":509,"column":9},"attr_expr":"mkChangedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1916,"column":5},"lambda_expr":"mkChangedOptionModule =\n    from: to: changeFn:\n    mkMergedOptionModule [ from ] to changeFn;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1916,"column":5},"path":["lib","mkChangedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nSingle \"from\" version of mkMergedOptionModule.\nReturns a module that causes a warning to be shown if the \"from\" option is\ndefined; the defined value can be used in the \"mergeFn\" to set the \"to\"\nvalue.\nThis function can be used to change an option into another that has a\ndifferent type.\n\n\"mergeFn\" takes the module \"config\" as a parameter and must return a value of\n\"to\" option type.\n\n  mkChangedOptionModule [ \"a\" \"b\" \"c\" ] [ \"x\" \"y\" \"z\" ]\n    (config:\n      let value = getAttrFromPath [ \"a\" \"b\" \"c\" ] config;\n      in\n      if   value > 100 then \"high\"\n      else \"normal\")\n\n- options.a.b.c is a removed int option\n- options.x.y.z is a new str option that supersedes a.b.c\n\nThis show a warning if a.b.c is set, and set the value of x.y.z to the\nresult of the change function\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n\n`changeFn`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1916,"column":5},"path":["lib","mkChangedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkDefault","path":["lib","mkDefault"],"aliases":[["lib","modules","mkDefault"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":494,"column":9},"attr_expr":"mkDefault","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mkDefinition","path":["lib","mkDefinition"],"aliases":[["lib","modules","mkDefinition"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":490,"column":9},"attr_expr":"mkDefinition","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1580,"column":18},"lambda_expr":"mkDefinition = args@{ file, value, ... }: args // { _type = \"definition\"; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1580,"column":18},"path":["lib","mkDefinition"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a definition with file location information.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1580,"column":18},"path":["lib","mkDefinition"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkDerivedConfig","path":["lib","mkDerivedConfig"],"aliases":[["lib","modules","mkDerivedConfig"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":511,"column":9},"attr_expr":"mkDerivedConfig","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1973,"column":21},"lambda_expr":"mkDerivedConfig = opt: f: mkOverride (opt.highestPrio or defaultOverridePriority) (f opt.value);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1973,"column":21},"path":["lib","mkDerivedConfig"],"pos_type":"Lambda"}},"content":{"content":"\nmkDerivedConfig : Option a -> (a -> Definition b) -> Definition b\n\nCreate config definitions with the same priority as the definition of another option.\nThis should be used for option definitions where one option sets the value of another as a convenience.\nFor instance a config file could be set with a `text` or `source` option, where text translates to a `source`\nvalue using `mkDerivedConfig options.text (pkgs.writeText \"filename.conf\")`.\n\nIt takes care of setting the right priority using `mkOverride`.\n\n# Inputs\n\n`opt`\n\n: 1\\. Function argument\n\n`f`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1973,"column":21},"path":["lib","mkDerivedConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkEUI64Suffix","path":["lib","mkEUI64Suffix"],"aliases":[["lib","network","ipv6","mkEUI64Suffix"]],"signature":"mkEUI64Suffix :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":607,"column":9},"attr_expr":"mkEUI64Suffix","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":79,"column":7},"lambda_expr":"mkEUI64Suffix =\n      mac:\n      pipe mac [\n        # match mac address\n        (match \"^([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})$\")\n\n        # check if there are matches\n        (\n          matches:\n          if matches == null then\n            throw ''\"${mac}\" is not a valid MAC address (expected 6 octets of hex digits)''\n          else\n            matches\n        )\n\n        # transform to result hextets\n        (octets: [\n          # combine 1st and 2nd octets into first hextet, flip U/L bit, 512 = 0x200\n          (toHexString (bitXor 512 (fromHexString ((elemAt octets 0) + (elemAt octets 1)))))\n\n          # combine 3rd and 4th octets, combine them, insert fffe pattern in between to get next two hextets\n          \"${elemAt octets 2}ff\"\n          \"fe${elemAt octets 3}\"\n\n          # combine 5th and 6th octets into the last hextet\n          ((elemAt octets 4) + (elemAt octets 5))\n        ])\n\n        # concat to result suffix\n        (concatStringsSep \":\")\n\n        toLower\n      ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":78,"column":5},"path":["lib","network","ipv6","mkEUI64Suffix"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a 48-bit MAC address into a EUI-64 IPv6 address suffix.\n\n# Example\n\n```nix\nmkEUI64Suffix \"66:75:63:6B:20:75\"\n=> \"6475:63ff:fe6b:2075\"\n```\n\n# Type\n\n```\nmkEUI64Suffix :: String -> String\n```\n\n# Inputs\n\nmac\n: The MAC address (may contain these delimiters: `:`, `-` or `.` but it's not necessary)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":78,"column":5},"path":["lib","network","ipv6","mkEUI64Suffix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkEnableOption","path":["lib","mkEnableOption"],"aliases":[["lib","options","mkEnableOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":518,"column":9},"attr_expr":"mkEnableOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":187,"column":5},"lambda_expr":"mkEnableOption =\n    name:\n    mkOption {\n      default = false;\n      example = true;\n      description = \"Whether to enable ${name}.\";\n      type = lib.types.bool;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":186,"column":3},"path":["lib","options","mkEnableOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreates an option declaration with a default value of `false`, and can be defined to `true`.\n\n# Inputs\n\n`name`\n\n: Name for the created option\n\n# Examples\n:::{.example}\n## `lib.options.mkEnableOption` usage example\n\n```nix\n# module\nlet\n  eval = lib.evalModules {\n    modules = [\n      {\n        options.foo.enable = mkEnableOption \"foo\";\n\n        config.foo.enable = true;\n      }\n    ];\n  };\nin\neval.config\n=> { foo.enable = true; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":186,"column":3},"path":["lib","options","mkEnableOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkFixStrictness","path":["lib","mkFixStrictness"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":498,"column":9},"attr_expr":"mkFixStrictness","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkForce","path":["lib","mkForce"],"aliases":[["lib","modules","mkForce"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":496,"column":9},"attr_expr":"mkForce","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mkIf","path":["lib","mkIf"],"aliases":[["lib","modules","mkIf"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":488,"column":9},"attr_expr":"mkIf","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1563,"column":10},"lambda_expr":"mkIf = condition: content: {\n    _type = \"if\";\n    inherit condition content;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1563,"column":10},"path":["lib","mkIf"],"pos_type":"Lambda"}},"content":{"content":"\nProperties.\n\n# Inputs\n\n`condition`\n\n: 1\\. Function argument\n\n`content`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1563,"column":10},"path":["lib","mkIf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkImageMediaOverride","path":["lib","mkImageMediaOverride"],"aliases":[["lib","modules","mkImageMediaOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":495,"column":9},"attr_expr":"mkImageMediaOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mkLuaInline","path":["lib","mkLuaInline"],"aliases":[["lib","generators","mkLuaInline"]],"signature":"mkLuaInline :: String -> { _type = \"lua-inline\"; expr :: String; }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":429,"column":33},"attr_expr":"mkLuaInline","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":885,"column":17},"lambda_expr":"mkLuaInline = expr: {\n    _type = \"lua-inline\";\n    inherit expr;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":885,"column":3},"path":["lib","generators","mkLuaInline"],"pos_type":"Attribute"}},"content":{"content":"\nMark string as Lua expression to be inlined when processed by `toLua`.\n\n# Inputs\n\n`expr`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkLuaInline :: String -> { _type = \"lua-inline\"; expr :: String; }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":885,"column":3},"path":["lib","generators","mkLuaInline"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkMerge","path":["lib","mkMerge"],"aliases":[["lib","modules","mkMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":491,"column":9},"attr_expr":"mkMerge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1572,"column":13},"lambda_expr":"contents: {\n    _type = \"merge\";\n    inherit contents;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1572,"column":13},"path":["lib","mkMerge"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1572,"column":13},"path":["lib","mkMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkMergedOptionModule","path":["lib","mkMergedOptionModule"],"aliases":[["lib","modules","mkMergedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":508,"column":9},"attr_expr":"mkMergedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1843,"column":5},"lambda_expr":"mkMergedOptionModule =\n    from: to: mergeFn:\n    { config, options, ... }:\n    {\n      options = foldl' recursiveUpdate { } (\n        map (\n          path:\n          setAttrByPath path (mkOption {\n            visible = false;\n            # To use the value in mergeFn without triggering errors\n            default = \"_mkMergedOptionModule\";\n          })\n        ) from\n      );\n\n      config = {\n        warnings = filter (x: x != \"\") (\n          map (\n            f:\n            let\n              val = getAttrFromPath f config;\n              opt = getAttrFromPath f options;\n            in\n            optionalString (val != \"_mkMergedOptionModule\")\n              \"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.\"\n          ) from\n        );\n      }\n      // setAttrByPath to (\n        mkMerge (\n          optional (any (f: (getAttrFromPath f config) != \"_mkMergedOptionModule\") from) (mergeFn config)\n        )\n      );\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1843,"column":5},"path":["lib","mkMergedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that causes a warning to be shown if any of the \"from\"\noption is defined; the defined values can be used in the \"mergeFn\" to set\nthe \"to\" value.\nThis function can be used to merge multiple options into one that has a\ndifferent type.\n\n\"mergeFn\" takes the module \"config\" as a parameter and must return a value\nof \"to\" option type.\n\n  mkMergedOptionModule\n    [ [ \"a\" \"b\" \"c\" ]\n      [ \"d\" \"e\" \"f\" ] ]\n    [ \"x\" \"y\" \"z\" ]\n    (config:\n      let value = p: getAttrFromPath p config;\n      in\n      if      (value [ \"a\" \"b\" \"c\" ]) == true then \"foo\"\n      else if (value [ \"d\" \"e\" \"f\" ]) == true then \"bar\"\n      else \"baz\")\n\n- options.a.b.c is a removed boolean option\n- options.d.e.f is a removed boolean option\n- options.x.y.z is a new str option that combines a.b.c and d.e.f\n  functionality\n\nThis show a warning if any a.b.c or d.e.f is set, and set the value of\nx.y.z to the result of the merge function\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n\n`mergeFn`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1843,"column":5},"path":["lib","mkMergedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkOption","path":["lib","mkOption"],"aliases":[["lib","options","mkOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":534,"column":9},"attr_expr":"mkOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":140,"column":5},"lambda_expr":"mkOption =\n    {\n      default ? null,\n      defaultText ? null,\n      example ? null,\n      description ? null,\n      relatedPackages ? null,\n      type ? null,\n      apply ? null,\n      internal ? null,\n      visible ? null,\n      readOnly ? null,\n    }@attrs:\n    attrs // { _type = \"option\"; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":139,"column":3},"path":["lib","options","mkOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreates an Option declaration for use with the module system.\n\n# Inputs\n\nAttribute set\n: containing none or some of the following attributes.\n\n  `default`\n  : Optional default value used when no definition is given in the configuration.\n\n  `defaultText`\n  : Substitute for documenting the `default`, if evaluating the default value during documentation rendering is not possible.\n  : Can be any nix value that evaluates.\n  : Usage with `lib.literalMD` or `lib.literalExpression` is supported\n\n  `example`\n  : Optional example value used in the manual.\n  : Can be any nix value that evaluates.\n  : Usage with `lib.literalMD` or `lib.literalExpression` is supported\n\n  `description`\n  : Optional string describing the option. This is required if option documentation is generated.\n\n  `relatedPackages`\n  : Optional related packages used in the manual (see `genRelatedPackages` in `../nixos/lib/make-options-doc/default.nix`).\n\n  `type`\n  : Optional option type, providing type-checking and value merging.\n\n  `apply`\n  : Optional function that converts the option value to something else.\n\n  `internal`\n  : Optional boolean indicating whether the option is for NixOS developers only.\n\n  `visible`\n  : Optional, whether the option and/or sub-options show up in the manual.\n    Use false to hide the option and any sub-options from submodules.\n    Use \"shallow\" to hide only sub-options.\n    Use \"transparent\" to hide this option, but not its sub-options.\n    Default: true.\n\n  `readOnly`\n  : Optional boolean indicating whether the option can be set only once.\n\n# Examples\n:::{.example}\n## `lib.options.mkOption` usage example\n\n```nix\nmkOption { }\n# => Empty option; type = types.anything\n\nmkOption { default = \"foo\"; }\n# => Same as above, with a default value\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":139,"column":3},"path":["lib","options","mkOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkOptionDefault","path":["lib","mkOptionDefault"],"aliases":[["lib","modules","mkOptionDefault"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":493,"column":9},"attr_expr":"mkOptionDefault","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mkOptionType","path":["lib","mkOptionType"],"aliases":[["lib","types","mkOptionType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":544,"column":9},"attr_expr":"mkOptionType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":223,"column":5},"lambda_expr":"{\n      # Human-readable representation of the type, should be equivalent to\n      # the type function name.\n      name,\n      # Description of the type, defined recursively by embedding the wrapped type if any.\n      description ? null,\n      # A hint for whether or not this description needs parentheses. Possible values:\n      #  - \"noun\": a noun phrase\n      #    Example description: \"positive integer\",\n      #  - \"conjunction\": a phrase with a potentially ambiguous \"or\" connective\n      #    Example description: \"int or string\"\n      #  - \"composite\": a phrase with an \"of\" connective\n      #    Example description: \"list of string\"\n      #  - \"nonRestrictiveClause\": a noun followed by a comma and a clause\n      #    Example description: \"positive integer, meaning >0\"\n      # See the `optionDescriptionPhrase` function.\n      descriptionClass ? null,\n      # DO NOT USE WITHOUT KNOWING WHAT YOU ARE DOING!\n      # Function applied to each definition that must return false when a definition\n      # does not match the type. It should not check more than the root of the value,\n      # because checking nested values reduces laziness, leading to unnecessary\n      # infinite recursions in the module system.\n      # Further checks of nested values should be performed by throwing in\n      # the merge function.\n      # Strict and deep type checking can be performed by calling lib.deepSeq on\n      # the merged value.\n      #\n      # See https://github.com/NixOS/nixpkgs/pull/6794 that introduced this change,\n      # https://github.com/NixOS/nixpkgs/pull/173568 and\n      # https://github.com/NixOS/nixpkgs/pull/168295 that attempted to revert this,\n      # https://github.com/NixOS/nixpkgs/issues/191124 and\n      # https://github.com/NixOS/nixos-search/issues/391 for what happens if you ignore\n      # this disclaimer.\n      check ? (x: true),\n      # Merge a list of definitions together into a single value.\n      # This function is called with two arguments: the location of\n      # the option in the configuration as a list of strings\n      # (e.g. [\"boot\" \"loader \"grub\" \"enable\"]), and a list of\n      # definition values and locations (e.g. [ { file = \"/foo.nix\";\n      # value = 1; } { file = \"/bar.nix\"; value = 2 } ]).\n      merge ? mergeDefaultOption,\n      # Whether this type has a value representing nothingness. If it does,\n      # this should be a value of the form { value = <the nothing value>; }\n      # If it doesn't, this should be {}\n      # This may be used when a value is required for `mkIf false`. This allows the extra laziness in e.g. `lazyAttrsOf`.\n      emptyValue ? { },\n      # Return a flat attrset of sub-options.  Used to generate\n      # documentation.\n      getSubOptions ? prefix: { },\n      # List of modules if any, or null if none.\n      getSubModules ? null,\n      # Function for building the same option type with a different list of\n      # modules.\n      substSubModules ? m: null,\n      # Function that merge type declarations.\n      # internal, takes a functor as argument and returns the merged type.\n      # returning null means the type is not mergeable\n      typeMerge ? defaultTypeMerge functor,\n      # The type functor.\n      # internal, representation of the type as an attribute set.\n      #   name: name of the type\n      #   type: type function.\n      #   wrapped: the type wrapped in case of compound types.\n      #   payload: values of the type, two payloads of the same type must be\n      #            combinable with the binOp binary operation.\n      #   binOp: binary operation that merge two payloads of the same type.\n      functor ? defaultFunctor name,\n      # The deprecation message to display when this type is used by an option\n      # If null, the type isn't deprecated\n      deprecationMessage ? null,\n      # The types that occur in the definition of this type. This is used to\n      # issue deprecation warnings recursively. Can also be used to reuse\n      # nested types\n      nestedTypes ? { },\n    }:\n    {\n      _type = \"option-type\";\n      inherit\n        name\n        check\n        merge\n        emptyValue\n        getSubOptions\n        getSubModules\n        substSubModules\n        typeMerge\n        deprecationMessage\n        nestedTypes\n        descriptionClass\n        ;\n      functor =\n        if functor ? wrappedDeprecationMessage then\n          functor\n          // {\n            wrapped = functor.wrappedDeprecationMessage {\n              loc = null;\n            };\n          }\n        else\n          functor;\n      description = if description == null then name else description;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":223,"column":5},"path":["lib","mkOptionType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":223,"column":5},"path":["lib","mkOptionType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkOrder","path":["lib","mkOrder"],"aliases":[["lib","modules","mkOrder"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":499,"column":9},"attr_expr":"mkOrder","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":13},"lambda_expr":"priority: content: {\n    _type = \"order\";\n    inherit priority content;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":13},"path":["lib","mkOrder"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":13},"path":["lib","mkOrder"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkOverride","path":["lib","mkOverride"],"aliases":[["lib","modules","mkOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":492,"column":9},"attr_expr":"mkOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":16},"lambda_expr":"priority: content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":16},"path":["lib","mkOverride"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":16},"path":["lib","mkOverride"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkPackageOption","path":["lib","mkPackageOption"],"aliases":[["lib","options","mkPackageOption"]],"signature":"mkPackageOption :: Pkgs -> (String | [String]) -> { nullable? :: Bool; default? :: String | [String]; example? :: Null | String | [String]; extraDescription? :: String; pkgsText? :: String; } -> Option\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":535,"column":9},"attr_expr":"mkPackageOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":309,"column":5},"lambda_expr":"mkPackageOption =\n    pkgs: name:\n    {\n      nullable ? false,\n      default ? name,\n      example ? null,\n      extraDescription ? \"\",\n      pkgsText ? \"pkgs\",\n    }:\n    let\n      name' = if isList name then last name else name;\n      default' = toList default;\n      defaultText = showAttrPath default';\n      defaultValue = attrByPath default' (throw \"${defaultText} cannot be found in ${pkgsText}\") pkgs;\n      defaults =\n        if default != null then\n          {\n            default = defaultValue;\n            defaultText = literalExpression \"${pkgsText}.${defaultText}\";\n          }\n        else\n          optionalAttrs nullable {\n            default = null;\n          };\n    in\n    mkOption (\n      defaults\n      // {\n        description =\n          \"The ${name'} package to use.\" + (if extraDescription == \"\" then \"\" else \" \") + extraDescription;\n        type = with lib.types; (if nullable then nullOr else lib.id) package;\n      }\n      // optionalAttrs (example != null) {\n        example = literalExpression (\n          if isList example then \"${pkgsText}.${showAttrPath example}\" else example\n        );\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":308,"column":3},"path":["lib","options","mkPackageOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreates an Option attribute set for an option that specifies the\npackage a module should use for some purpose.\n\nThe package is specified in the third argument under `default` as a list of strings\nrepresenting its attribute path in nixpkgs (or another package set).\nBecause of this, you need to pass nixpkgs itself (usually `pkgs` in a module;\nalternatively to nixpkgs itself, another package set) as the first argument.\n\nIf you pass another package set you should set the `pkgsText` option.\nThis option is used to display the expression for the package set. It is `\"pkgs\"` by default.\nIf your expression is complex you should parenthesize it, as the `pkgsText` argument\nis usually immediately followed by an attribute lookup (`.`).\n\nThe second argument may be either a string or a list of strings.\nIt provides the display name of the package in the description of the generated option\n(using only the last element if the passed value is a list)\nand serves as the fallback value for the `default` argument.\n\nTo include extra information in the description, pass `extraDescription` to\nappend arbitrary text to the generated description.\n\nYou can also pass an `example` value, either a literal string or an attribute path.\n\nThe `default` argument can be omitted if the provided name is\nan attribute of pkgs (if `name` is a string) or a valid attribute path in pkgs (if `name` is a list).\nYou can also set `default` to just a string in which case it is interpreted as an attribute name\n(a singleton attribute path, if you will).\n\nIf you wish to explicitly provide no default, pass `null` as `default`.\n\nIf you want users to be able to set no package, pass `nullable = true`.\nIn this mode a `default = null` will not be interpreted as no default and is interpreted literally.\n\n# Inputs\n\n`pkgs`\n\n: Package set (an instantiation of nixpkgs such as pkgs in modules or another package set)\n\n`name`\n\n: Name for the package, shown in option description\n\nStructured function argument\n: Attribute set containing the following attributes.\n\n  `nullable`\n  : Optional whether the package can be null, for example to disable installing a package altogether. Default: `false`\n\n  `default`\n  : Optional attribute path where the default package is located. Default: `name`\n    If omitted will be copied from `name`\n\n  `example`\n  : Optional string or an attribute path to use as an example. Default: `null`\n\n  `extraDescription`\n  : Optional additional text to include in the option description. Default: `\"\"`\n\n  `pkgsText`\n  : Optional representation of the package set passed as pkgs. Default: `\"pkgs\"`\n\n# Type\n\n```\nmkPackageOption :: Pkgs -> (String | [String]) -> { nullable? :: Bool; default? :: String | [String]; example? :: Null | String | [String]; extraDescription? :: String; pkgsText? :: String; } -> Option\n```\n\n# Examples\n:::{.example}\n## `lib.options.mkPackageOption` usage example\n\n```nix\nmkPackageOption pkgs \"hello\" { }\n=> { ...; default = pkgs.hello; defaultText = literalExpression \"pkgs.hello\"; description = \"The hello package to use.\"; type = package; }\n\nmkPackageOption pkgs \"GHC\" {\n  default = [ \"ghc\" ];\n  example = \"pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])\";\n}\n=> { ...; default = pkgs.ghc; defaultText = literalExpression \"pkgs.ghc\"; description = \"The GHC package to use.\"; example = literalExpression \"pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])\"; type = package; }\n\nmkPackageOption pkgs [ \"python3Packages\" \"pytorch\" ] {\n  extraDescription = \"This is an example and doesn't actually do anything.\";\n}\n=> { ...; default = pkgs.python3Packages.pytorch; defaultText = literalExpression \"pkgs.python3Packages.pytorch\"; description = \"The pytorch package to use. This is an example and doesn't actually do anything.\"; type = package; }\n\nmkPackageOption pkgs \"nushell\" {\n  nullable = true;\n}\n=> { ...; default = pkgs.nushell; defaultText = literalExpression \"pkgs.nushell\"; description = \"The nushell package to use.\"; type = nullOr package; }\n\nmkPackageOption pkgs \"coreutils\" {\n  default = null;\n}\n=> { ...; description = \"The coreutils package to use.\"; type = package; }\n\nmkPackageOption pkgs \"dbus\" {\n  nullable = true;\n  default = null;\n}\n=> { ...; default = null; description = \"The dbus package to use.\"; type = nullOr package; }\n\nmkPackageOption pkgs.javaPackages \"OpenJFX\" {\n  default = \"openjfx20\";\n  pkgsText = \"pkgs.javaPackages\";\n}\n=> { ...; default = pkgs.javaPackages.openjfx20; defaultText = literalExpression \"pkgs.javaPackages.openjfx20\"; description = \"The OpenJFX package to use.\"; type = package; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":308,"column":3},"path":["lib","options","mkPackageOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkRemovedOptionModule","path":["lib","mkRemovedOptionModule"],"aliases":[["lib","modules","mkRemovedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":505,"column":9},"attr_expr":"mkRemovedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1709,"column":5},"lambda_expr":"mkRemovedOptionModule =\n    optionName: replacementInstructions:\n    { options, ... }:\n    {\n      options = setAttrByPath optionName (mkOption {\n        visible = false;\n        apply =\n          x:\n          throw \"The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}\";\n      });\n      config.assertions =\n        let\n          opt = getAttrFromPath optionName options;\n        in\n        [\n          {\n            assertion = !opt.isDefined;\n            message = ''\n              The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.\n              ${replacementInstructions}\n            '';\n          }\n        ];\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1709,"column":5},"path":["lib","mkRemovedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that causes a warning to be shown if the\nspecified option is defined. For example,\n\n  mkRemovedOptionModule [ \"boot\" \"loader\" \"grub\" \"bootDevice\" ] \"<replacement instructions>\"\n\ncauses a assertion if the user defines boot.loader.grub.bootDevice.\n\nreplacementInstructions is a string that provides instructions on\nhow to achieve the same functionality without the removed option,\nor alternatively a reasoning why the functionality is not needed.\nreplacementInstructions SHOULD be provided!\n\n# Inputs\n\n`optionName`\n\n: 1\\. Function argument\n\n`replacementInstructions`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1709,"column":5},"path":["lib","mkRemovedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkRenamedOptionModule","path":["lib","mkRenamedOptionModule"],"aliases":[["lib","modules","mkRenamedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":506,"column":9},"attr_expr":"mkRenamedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1768,"column":5},"lambda_expr":"mkRenamedOptionModule =\n    from: to:\n    doRename {\n      inherit from to;\n      visible = false;\n      warn = true;\n      use = trace \"Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'.\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1768,"column":5},"path":["lib","mkRenamedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that causes a warning to be shown if the\nspecified \"from\" option is defined; the defined value is however\nforwarded to the \"to\" option. This can be used to rename options\nwhile providing backward compatibility. For example,\n\n  mkRenamedOptionModule [ \"boot\" \"copyKernels\" ] [ \"boot\" \"loader\" \"grub\" \"copyKernels\" ]\n\nforwards any definitions of boot.copyKernels to\nboot.loader.grub.copyKernels while printing a warning.\n\nThis also copies over the priority from the aliased option to the\nnon-aliased option.\n\n# Inputs\n\n`from`\n\n: The \"from\" option path as list of strings.\n  Option must not exist in the current module set.\n\n`to`\n\n: The \"to\" option path as list of strings.\n  Option must already exist in the current module set.\n\n# Limitations\n\n- The \"to\" option must already be declared.\n- The \"from\" option should not be declared, as this function will declare it.\n- \"to\" Options whose types don't support merging at any level of their structure (like `types.raw`,\n  or `types.attrsOf types.raw` where the attribute values can't merge) are not well-supported\n  because this function wraps aliased definitions in `mkMerge`.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1768,"column":5},"path":["lib","mkRenamedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkRenamedOptionModuleWith","path":["lib","mkRenamedOptionModuleWith"],"aliases":[["lib","modules","mkRenamedOptionModuleWith"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":507,"column":9},"attr_expr":"mkRenamedOptionModuleWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1777,"column":5},"lambda_expr":"{\n      /**\n        Old option path as list of strings.\n      */\n      from,\n      /**\n        New option path as list of strings.\n      */\n      to,\n      /**\n        Release number of the first release that contains the rename, ignoring backports.\n        Set it to the upcoming release, matching the nixpkgs/.version file.\n      */\n      sinceRelease,\n    }:\n    doRename {\n      inherit from to;\n      visible = false;\n      warn = oldestSupportedReleaseIsAtLeast sinceRelease;\n      use = warnIf (oldestSupportedReleaseIsAtLeast sinceRelease) \"Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'.\";\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1777,"column":5},"path":["lib","mkRenamedOptionModuleWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1777,"column":5},"path":["lib","mkRenamedOptionModuleWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mkSinkUndeclaredOptions","path":["lib","mkSinkUndeclaredOptions"],"aliases":[["lib","options","mkSinkUndeclaredOptions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":519,"column":9},"attr_expr":"mkSinkUndeclaredOptions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":361,"column":5},"lambda_expr":"mkSinkUndeclaredOptions =\n    attrs:\n    mkOption (\n      {\n        internal = true;\n        visible = false;\n        default = false;\n        description = \"Sink for option definitions.\";\n        type = mkOptionType {\n          name = \"sink\";\n          check = x: true;\n          merge = loc: defs: false;\n        };\n        apply = x: throw \"Option value is not readable because the option is not declared.\";\n      }\n      // attrs\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":360,"column":3},"path":["lib","options","mkSinkUndeclaredOptions"],"pos_type":"Attribute"}},"content":{"content":"\nThis option accepts arbitrary definitions, but it does not produce an option value.\n\nThis is useful for sharing a module across different module sets\nwithout having to implement similar features as long as the\nvalues of the options are not accessed.\n\n# Inputs\n\n`attrs`\n\n: Attribute set whose attributes override the argument to `mkOption`.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":360,"column":3},"path":["lib","options","mkSinkUndeclaredOptions"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mkVMOverride","path":["lib","mkVMOverride"],"aliases":[["lib","modules","mkVMOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":497,"column":9},"attr_expr":"mkVMOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.mod","path":["lib","mod"],"aliases":[["lib","trivial","mod"]],"signature":"mod :: Int -> Int -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":164,"column":9},"attr_expr":"mod","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":650,"column":9},"lambda_expr":"mod = base: int: base - (int * (builtins.div base int));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":650,"column":3},"path":["lib","trivial","mod"],"pos_type":"Attribute"}},"content":{"content":"\nInteger modulus\n\n# Inputs\n\n`base`\n\n: 1\\. Function argument\n\n`int`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmod :: Int -> Int -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mod` usage example\n\n```nix\nmod 11 10\n=> 1\nmod 1 10\n=> 1\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":650,"column":3},"path":["lib","trivial","mod"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.modifySumArgs","path":["lib","modifySumArgs"],"aliases":[["lib","misc","modifySumArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":583,"column":9},"attr_expr":"modifySumArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":209,"column":19},"lambda_expr":"f: x: innerModifySumArgs f x { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":209,"column":19},"path":["lib","modifySumArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":209,"column":19},"path":["lib","modifySumArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mul","path":["lib","mul"],"aliases":[["builtins","mul"],["lib","trivial","mul"]],"signature":null,"is_primop":true,"primop_meta":{"name":"mul","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":133,"column":9},"attr_expr":"mul","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","mul"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the product of the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","mul"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mutuallyExclusive","path":["lib","mutuallyExclusive"],"aliases":[["lib","lists","mutuallyExclusive"]],"signature":"mutuallyExclusive :: [a] -> [a] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":308,"column":9},"attr_expr":"mutuallyExclusive","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2058,"column":23},"lambda_expr":"mutuallyExclusive = a: b: length a == 0 || !(any (x: elem x a) b);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2058,"column":3},"path":["lib","lists","mutuallyExclusive"],"pos_type":"Attribute"}},"content":{"content":"\nTest if two lists have no common element.\nIt should be slightly more efficient than `intersectLists a b == []`.\n\n# Inputs\n\n`a`\n\n: 1\\. Function argument\n\n`b`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmutuallyExclusive :: [a] -> [a] -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2058,"column":3},"path":["lib","lists","mutuallyExclusive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.nameFromURL","path":["lib","nameFromURL"],"aliases":[["lib","strings","nameFromURL"]],"signature":"nameFromURL :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":386,"column":9},"attr_expr":"nameFromURL","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2094,"column":5},"lambda_expr":"nameFromURL =\n    url: sep:\n    let\n      components = splitString \"/\" url;\n      filename = lib.last components;\n      name = head (splitString sep filename);\n    in\n    assert name != filename;\n    name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2093,"column":3},"path":["lib","strings","nameFromURL"],"pos_type":"Attribute"}},"content":{"content":"\nExtract name and version from a URL as shown in the examples.\n\nSeparator `sep` is used to determine the end of the extension.\n\n# Inputs\n\n`url`\n: 1\\. Function argument\n\n`sep`\n: 2\\. Function argument\n\n# Type\n\n```\nnameFromURL :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.nameFromURL` usage example\n\n```nix\nnameFromURL \"https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2\" \"-\"\n=> \"nix\"\nnameFromURL \"https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2\" \"_\"\n=> \"nix-1.7-x86\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2093,"column":3},"path":["lib","strings","nameFromURL"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.nameValuePair","path":["lib","nameValuePair"],"aliases":[["lib","attrsets","nameValuePair"]],"signature":"nameValuePair :: String -> a -> { name :: String; value :: a; }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":215,"column":9},"attr_expr":"nameValuePair","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":19},"lambda_expr":"nameValuePair = name: value: { inherit name value; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":3},"path":["lib","attrsets","nameValuePair"],"pos_type":"Attribute"}},"content":{"content":"\nUtility function that creates a `{name, value}` pair as expected by `builtins.listToAttrs`.\n\n# Inputs\n\n`name`\n\n: Attribute name\n\n`value`\n\n: Attribute value\n\n# Type\n\n```\nnameValuePair :: String -> a -> { name :: String; value :: a; }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.nameValuePair` usage example\n\n```nix\nnameValuePair \"some\" 6\n=> { name = \"some\"; value = 6; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":3},"path":["lib","attrsets","nameValuePair"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.naturalSort","path":["lib","naturalSort"],"aliases":[["lib","lists","naturalSort"]],"signature":"naturalSort :: [String] -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":293,"column":9},"attr_expr":"naturalSort","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1464,"column":5},"lambda_expr":"naturalSort =\n    lst:\n    let\n      vectorise = s: map (x: if isList x then toInt (head x) else x) (builtins.split \"(0|[1-9][0-9]*)\" s);\n      prepared = map (x: [\n        (vectorise x)\n        x\n      ]) lst; # remember vectorised version for O(n) regex splits\n      less = a: b: (compareLists compare (head a) (head b)) < 0;\n    in\n    map (x: elemAt x 1) (sort less prepared);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1463,"column":3},"path":["lib","lists","naturalSort"],"pos_type":"Attribute"}},"content":{"content":"\nSort list using \"Natural sorting\".\nNumeric portions of strings are sorted in numeric order.\n\n# Inputs\n\n`lst`\n\n: 1\\. Function argument\n\n# Type\n\n```\nnaturalSort :: [String] -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.naturalSort` usage example\n\n```nix\nnaturalSort [\"disk11\" \"disk8\" \"disk100\" \"disk9\"]\n=> [\"disk8\" \"disk9\" \"disk11\" \"disk100\"]\nnaturalSort [\"10.46.133.149\" \"10.5.16.62\" \"10.54.16.25\"]\n=> [\"10.5.16.62\" \"10.46.133.149\" \"10.54.16.25\"]\nnaturalSort [\"v0.2\" \"v0.15\" \"v0.0.9\"]\n=> [ \"v0.0.9\" \"v0.2\" \"v0.15\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1463,"column":3},"path":["lib","lists","naturalSort"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.nixType","path":["lib","nixType"],"aliases":[["lib","misc","nixType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":599,"column":9},"attr_expr":"nixType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":405,"column":5},"lambda_expr":"x:\n    if isAttrs x then\n      if x ? outPath then \"derivation\" else \"attrs\"\n    else if isFunction x then\n      \"function\"\n    else if isList x then\n      \"list\"\n    else if x == true then\n      \"bool\"\n    else if x == false then\n      \"bool\"\n    else if x == null then\n      \"null\"\n    else if isInt x then\n      \"int\"\n    else\n      \"string\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":405,"column":5},"path":["lib","nixType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":405,"column":5},"path":["lib","nixType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.noDepEntry","path":["lib","noDepEntry"],"aliases":[["lib","stringsWithDeps","noDepEntry"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":402,"column":9},"attr_expr":"noDepEntry","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":171,"column":16},"lambda_expr":"text: {\n    inherit text;\n    deps = [ ];\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":171,"column":16},"path":["lib","noDepEntry"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":171,"column":16},"path":["lib","noDepEntry"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.nvs","path":["lib","nvs"],"aliases":[["lib","misc","nvs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":586,"column":9},"attr_expr":"nvs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":273,"column":9},"lambda_expr":"nvs = name: value: listToAttrs [ (nameValuePair name value) ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":273,"column":9},"path":["lib","nvs"],"pos_type":"Lambda"}},"content":{"content":"attribute set containing one attribute","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":273,"column":9},"path":["lib","nvs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.oldestSupportedReleaseIsAtLeast","path":["lib","oldestSupportedReleaseIsAtLeast"],"aliases":[["lib","isInOldestRelease"],["lib","trivial","isInOldestRelease"],["lib","trivial","oldestSupportedReleaseIsAtLeast"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":163,"column":9},"attr_expr":"oldestSupportedReleaseIsAtLeast","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":499,"column":37},"lambda_expr":"oldestSupportedReleaseIsAtLeast = release: release <= lib.trivial.oldestSupportedRelease;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":490,"column":3},"path":["lib","trivial","isInOldestRelease"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a feature is supported in all supported releases (at the time of\nrelease branch-off, if applicable). See `oldestSupportedRelease`.\n\n# Inputs\n\n`release`\n\n: Release number of feature introduction as an integer, e.g. 2111 for 21.11.\nSet it to the upcoming release, matching the nixpkgs/.version file.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":490,"column":3},"path":["lib","trivial","isInOldestRelease"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.optionAttrSetToDocList","path":["lib","optionAttrSetToDocList"],"aliases":[["lib","options","optionAttrSetToDocList"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":526,"column":9},"attr_expr":"optionAttrSetToDocList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":8},"lambda_expr":"options:\n    concatMap (\n      opt:\n      let\n        name = showOption opt.loc;\n        visible = opt.visible or true;\n        docOption = {\n          loc = opt.loc;\n          inherit name;\n          description = opt.description or null;\n          declarations = filter (x: x != unknownModule) opt.declarations;\n          internal = opt.internal or false;\n          visible = if isBool visible then visible else visible == \"shallow\";\n          readOnly = opt.readOnly or false;\n          type = opt.type.description or \"unspecified\";\n        }\n        // optionalAttrs (opt ? example) {\n          example = builtins.addErrorContext \"while evaluating the example of option `${name}`\" (\n            renderOptionValue opt.example\n          );\n        }\n        //\n          optionalAttrs\n            (\n              opt ? defaultText\n              || opt ? default\n              # Render emptyValue-based defaults, but only for types without\n              # submodules (e.g. types.submodule). Submodules may evaluate to\n              # error without user defs, and their sub-options are documented\n              # individually, so best to skip those here.\n              || ((opt.type or { }).emptyValue or { }) ? value && (opt.type or { }).getSubModules or null == null\n            )\n            {\n              default =\n                builtins.addErrorContext\n                  \"while evaluating the ${\n                    if opt ? defaultText then \"defaultText\" else \"default value\"\n                  } of option `${name}`\"\n                  (renderOptionValue (opt.defaultText or opt.default or opt.type.emptyValue.value));\n            }\n        // optionalAttrs (opt ? relatedPackages && opt.relatedPackages != null) {\n          inherit (opt) relatedPackages;\n        };\n\n        subOptions =\n          let\n            ss = opt.type.getSubOptions opt.loc;\n          in\n          if ss != { } then optionAttrSetToDocList' opt.loc ss else [ ];\n        subOptionsVisible = if isBool visible then visible else visible == \"transparent\";\n      in\n      # To find infinite recursion in NixOS option docs:\n      # builtins.trace opt.loc\n      [ docOption ] ++ optionals subOptionsVisible subOptions\n    ) (collect isOption options)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.optionAttrSetToDocList' (Prime)","path":["lib","optionAttrSetToDocList'"],"aliases":[["lib","options","optionAttrSetToDocList'"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":527,"column":9},"attr_expr":"optionAttrSetToDocList'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":5},"lambda_expr":"_: options:\n    concatMap (\n      opt:\n      let\n        name = showOption opt.loc;\n        visible = opt.visible or true;\n        docOption = {\n          loc = opt.loc;\n          inherit name;\n          description = opt.description or null;\n          declarations = filter (x: x != unknownModule) opt.declarations;\n          internal = opt.internal or false;\n          visible = if isBool visible then visible else visible == \"shallow\";\n          readOnly = opt.readOnly or false;\n          type = opt.type.description or \"unspecified\";\n        }\n        // optionalAttrs (opt ? example) {\n          example = builtins.addErrorContext \"while evaluating the example of option `${name}`\" (\n            renderOptionValue opt.example\n          );\n        }\n        //\n          optionalAttrs\n            (\n              opt ? defaultText\n              || opt ? default\n              # Render emptyValue-based defaults, but only for types without\n              # submodules (e.g. types.submodule). Submodules may evaluate to\n              # error without user defs, and their sub-options are documented\n              # individually, so best to skip those here.\n              || ((opt.type or { }).emptyValue or { }) ? value && (opt.type or { }).getSubModules or null == null\n            )\n            {\n              default =\n                builtins.addErrorContext\n                  \"while evaluating the ${\n                    if opt ? defaultText then \"defaultText\" else \"default value\"\n                  } of option `${name}`\"\n                  (renderOptionValue (opt.defaultText or opt.default or opt.type.emptyValue.value));\n            }\n        // optionalAttrs (opt ? relatedPackages && opt.relatedPackages != null) {\n          inherit (opt) relatedPackages;\n        };\n\n        subOptions =\n          let\n            ss = opt.type.getSubOptions opt.loc;\n          in\n          if ss != { } then optionAttrSetToDocList' opt.loc ss else [ ];\n        subOptionsVisible = if isBool visible then visible else visible == \"transparent\";\n      in\n      # To find infinite recursion in NixOS option docs:\n      # builtins.trace opt.loc\n      [ docOption ] ++ optionals subOptionsVisible subOptions\n    ) (collect isOption options)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":5},"path":["lib","optionAttrSetToDocList'"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":5},"path":["lib","optionAttrSetToDocList'"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.optional","path":["lib","optional"],"aliases":[["lib","lists","optional"]],"signature":"optional :: Bool -> a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":280,"column":9},"attr_expr":"optional","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":785,"column":14},"lambda_expr":"optional = cond: elem: if cond then [ elem ] else [ ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":785,"column":3},"path":["lib","lists","optional"],"pos_type":"Attribute"}},"content":{"content":"\nReturn a singleton list or an empty list, depending on a boolean\nvalue.  Useful when building lists with optional elements\n(e.g. `++ optional (system == \"i686-linux\") firefox`).\n\n# Inputs\n\n`cond`\n\n: 1\\. Function argument\n\n`elem`\n\n: 2\\. Function argument\n\n# Type\n\n```\noptional :: Bool -> a -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.optional` usage example\n\n```nix\noptional true \"foo\"\n=> [ \"foo\" ]\noptional false \"foo\"\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":785,"column":3},"path":["lib","lists","optional"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.optionalAttrs","path":["lib","optionalAttrs"],"aliases":[["lib","attrsets","optionalAttrs"]],"signature":"optionalAttrs :: Bool -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":229,"column":9},"attr_expr":"optionalAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1477,"column":19},"lambda_expr":"optionalAttrs = cond: as: if cond then as else { };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1477,"column":3},"path":["lib","attrsets","optionalAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nIf `cond` is true, return the attribute set `as`,\notherwise an empty attribute set.\n\n# Inputs\n\n`cond`\n\n: Condition under which the `as` attribute set is returned.\n\n`as`\n\n: The attribute set to return if `cond` is `true`.\n\n# Type\n\n```\noptionalAttrs :: Bool -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.optionalAttrs` usage example\n\n```nix\noptionalAttrs (true) { my = \"set\"; }\n=> { my = \"set\"; }\noptionalAttrs (false) { my = \"set\"; }\n=> { }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1477,"column":3},"path":["lib","attrsets","optionalAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.optionalDrvAttr","path":["lib","optionalDrvAttr"],"aliases":[["lib","derivations","optionalDrvAttr"]],"signature":"optionalDrvAttr :: Bool -> a -> (a | Null)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":424,"column":9},"attr_expr":"optionalDrvAttr","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":219,"column":21},"lambda_expr":"optionalDrvAttr = cond: value: if cond then value else null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":219,"column":3},"path":["lib","derivations","optionalDrvAttr"],"pos_type":"Attribute"}},"content":{"content":"\nConditionally set a derivation attribute.\n\nBecause `mkDerivation` sets `__ignoreNulls = true`, a derivation\nattribute set to `null` will not impact the derivation output hash.\nThus, this function passes through its `value` argument if the `cond`\nis `true`, but returns `null` if not.\n\n# Inputs\n\n`cond`\n\n: Condition\n\n`value`\n\n: Attribute value\n\n# Type\n\n```\noptionalDrvAttr :: Bool -> a -> (a | Null)\n```\n\n# Examples\n:::{.example}\n## `lib.derivations.optionalDrvAttr` usage example\n\n```nix\n(stdenv.mkDerivation {\n  name = \"foo\";\n  x = optionalDrvAttr true 1;\n  y = optionalDrvAttr false 1;\n}).drvPath == (stdenv.mkDerivation {\n  name = \"foo\";\n  x = 1;\n}).drvPath\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":219,"column":3},"path":["lib","derivations","optionalDrvAttr"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.optionalString","path":["lib","optionalString"],"aliases":[["lib","strings","optionalString"]],"signature":"optionalString :: Bool -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":342,"column":9},"attr_expr":"optionalString","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":766,"column":20},"lambda_expr":"optionalString = cond: string: if cond then string else \"\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":766,"column":3},"path":["lib","strings","optionalString"],"pos_type":"Attribute"}},"content":{"content":"\nDepending on the boolean `cond`, return either the given string\nor the empty string. Useful to concatenate against a bigger string.\n\n# Inputs\n\n`cond`\n: Condition\n\n`string`\n: String to return if condition is true\n\n# Type\n\n```\noptionalString :: Bool -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.optionalString` usage example\n\n```nix\noptionalString true \"some-string\"\n=> \"some-string\"\noptionalString false \"some-string\"\n=> \"\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":766,"column":3},"path":["lib","strings","optionalString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.optionals","path":["lib","optionals"],"aliases":[["lib","lists","optionals"]],"signature":"optionals :: Bool -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":281,"column":9},"attr_expr":"optionals","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":819,"column":15},"lambda_expr":"optionals = cond: elems: if cond then elems else [ ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":819,"column":3},"path":["lib","lists","optionals"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list or an empty list, depending on a boolean value.\n\n# Inputs\n\n`cond`\n\n: Condition\n\n`elems`\n\n: List to return if condition is true\n\n# Type\n\n```\noptionals :: Bool -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.optionals` usage example\n\n```nix\noptionals true [ 2 3 ]\n=> [ 2 3 ]\noptionals false [ 2 3 ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":819,"column":3},"path":["lib","lists","optionals"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.or","path":["lib","or"],"aliases":[["lib","trivial","or"]],"signature":"or :: Bool -> Bool -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":131,"column":9},"attr_expr":"\"or\"","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":212,"column":10},"lambda_expr":"\"or\" = x: y: x || y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":212,"column":3},"path":["lib","trivial","or"],"pos_type":"Attribute"}},"content":{"content":"\nboolean “or”\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nor :: Bool -> Bool -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":212,"column":3},"path":["lib","trivial","or"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.overrideDerivation","path":["lib","overrideDerivation"],"aliases":[["lib","customisation","overrideDerivation"]],"signature":"overrideDerivation :: Derivation -> ( Derivation -> AttrSet ) -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":408,"column":9},"attr_expr":"overrideDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":99,"column":5},"lambda_expr":"overrideDerivation =\n    drv: f:\n    (extendDerivation (seq drv.drvPath true)) (\n      {\n        meta = drv.meta or { };\n        passthru = drv.passthru or { };\n      }\n      // (drv.passthru or { })\n      // {\n        ${if drv ? __spliced then \"__spliced\" else null} = mapAttrs (\n          _: sDrv: overrideDerivation sDrv f\n        ) drv.__spliced;\n      }\n    ) (derivation (drv.drvAttrs // (f drv)));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":98,"column":3},"path":["lib","customisation","overrideDerivation"],"pos_type":"Attribute"}},"content":{"content":"\n`overrideDerivation drv f` takes a derivation (i.e., the result\nof a call to the builtin function `derivation`) and returns a new\nderivation in which the attributes of the original are overridden\naccording to the function `f`.  The function `f` is called with\nthe original derivation attributes.\n\n`overrideDerivation` allows certain \"ad-hoc\" customisation\nscenarios (e.g. in ~/.config/nixpkgs/config.nix).  For instance,\nif you want to \"patch\" the derivation returned by a package\nfunction in Nixpkgs to build another version than what the\nfunction itself provides.\n\nFor another application, see build-support/vm, where this\nfunction is used to build arbitrary derivations inside a QEMU\nvirtual machine.\n\nNote that in order to preserve evaluation errors, the new derivation's\noutPath depends on the old one's, which means that this function cannot\nbe used in circular situations when the old derivation also depends on the\nnew one.\n\nYou should in general prefer `drv.overrideAttrs` over this function;\nsee the nixpkgs manual for more information on overriding.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n`f`\n\n: 2\\. Function argument\n\n# Type\n\n```\noverrideDerivation :: Derivation -> ( Derivation -> AttrSet ) -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.customisation.overrideDerivation` usage example\n\n```nix\nmySed = overrideDerivation pkgs.gnused (oldAttrs: {\n  name = \"sed-4.2.2-pre\";\n  src = fetchurl {\n    url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;\n    hash = \"sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY=\";\n  };\n  patches = [];\n});\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":98,"column":3},"path":["lib","customisation","overrideDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.overrideExisting","path":["lib","overrideExisting"],"aliases":[["lib","attrsets","overrideExisting"]],"signature":"overrideExisting :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":237,"column":9},"attr_expr":"overrideExisting","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1853,"column":22},"lambda_expr":"overrideExisting = old: new: mapAttrs (name: value: new.${name} or value) old;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1853,"column":3},"path":["lib","attrsets","overrideExisting"],"pos_type":"Attribute"}},"content":{"content":"\nOverride only the attributes that are already present in the old set\nuseful for deep-overriding.\n\n# Inputs\n\n`old`\n\n: Original attribute set\n\n`new`\n\n: Attribute set with attributes to override in `old`.\n\n# Type\n\n```\noverrideExisting :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.overrideExisting` usage example\n\n```nix\noverrideExisting {} { a = 1; }\n=> {}\noverrideExisting { b = 2; } { a = 1; }\n=> { b = 2; }\noverrideExisting { a = 3; b = 2; } { a = 1; }\n=> { a = 1; b = 2; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1853,"column":3},"path":["lib","attrsets","overrideExisting"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.packEntry","path":["lib","packEntry"],"aliases":[["lib","stringsWithDeps","packEntry"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":404,"column":9},"attr_expr":"packEntry","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":176,"column":15},"lambda_expr":"deps: {\n    inherit deps;\n    text = \"\";\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":176,"column":15},"path":["lib","packEntry"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":176,"column":15},"path":["lib","packEntry"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.packagesFromDirectoryRecursive","path":["lib","packagesFromDirectoryRecursive"],"aliases":[["lib","filesystem","packagesFromDirectoryRecursive"]],"signature":"packagesFromDirectoryRecursive :: {\n  callPackage :: Path -> AttrSet -> Any;\n  newScope? :: AttrSet -> Scope;\n  directory :: Path;\n} -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":455,"column":9},"attr_expr":"packagesFromDirectoryRecursive","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":415,"column":5},"lambda_expr":"{\n      callPackage,\n      newScope ? throw \"lib.packagesFromDirectoryRecursive: newScope wasn't passed in args\",\n      directory,\n    }@args:\n    let\n      defaultPath = directory + \"/package.nix\";\n    in\n    if pathExists defaultPath then\n      # if `${directory}/package.nix` exists, call it directly\n      callPackage defaultPath { }\n    else if args ? newScope then\n      # Create a new scope and mark it `recurseForDerivations`.\n      # This lets the packages refer to each other.\n      # See:\n      #  [lib.makeScope](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.makeScope) and\n      #  [lib.recurseIntoAttrs](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.makeScope)\n      recurseIntoAttrs (\n        makeScope newScope (\n          self:\n          # generate the attrset representing the directory, using the new scope's `callPackage` and `newScope`\n          processDir (\n            args\n            // {\n              inherit (self) callPackage newScope;\n            }\n          )\n        )\n      )\n    else\n      processDir args","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":370,"column":3},"path":["lib","filesystem","packagesFromDirectoryRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nTransform a directory tree containing package files suitable for\n`callPackage` into a matching nested attribute set of derivations.\n\nFor a directory tree like this:\n\n```\nmy-packages\n├── a.nix\n├── b.nix\n├── c\n│  ├── my-extra-feature.patch\n│  ├── package.nix\n│  └── support-definitions.nix\n└── my-namespace\n   ├── d.nix\n   ├── e.nix\n   └── f\n      └── package.nix\n```\n\n`packagesFromDirectoryRecursive` will produce an attribute set like this:\n\n```nix\n# packagesFromDirectoryRecursive {\n#   callPackage = pkgs.callPackage;\n#   directory = ./my-packages;\n# }\n{\n  a = pkgs.callPackage ./my-packages/a.nix { };\n  b = pkgs.callPackage ./my-packages/b.nix { };\n  c = pkgs.callPackage ./my-packages/c/package.nix { };\n  my-namespace = {\n    d = pkgs.callPackage ./my-packages/my-namespace/d.nix { };\n    e = pkgs.callPackage ./my-packages/my-namespace/e.nix { };\n    f = pkgs.callPackage ./my-packages/my-namespace/f/package.nix { };\n  };\n}\n```\n\nIn particular:\n- If the input directory contains a `package.nix` file, then\n  `callPackage <directory>/package.nix { }` is returned.\n- Otherwise, the input directory's contents are listed and transformed into\n  an attribute set.\n  - If a regular file's name has the `.nix` extension, it is turned into attribute\n    where:\n    - The attribute name is the file name without the `.nix` extension\n    - The attribute value is `callPackage <file path> { }`\n  - Directories are turned into an attribute where:\n    - The attribute name is the name of the directory\n    - The attribute value is the result of calling\n      `packagesFromDirectoryRecursive { ... }` on the directory.\n\n    As a result, directories with no `.nix` files (including empty\n    directories) will be transformed into empty attribute sets.\n  - Other files are ignored, including symbolic links to directories and to regular `.nix`\n    files; this is because nixlang code cannot distinguish the type of a link's target.\n\n# Inputs\n\n`callPackage`\n: The function used to convert a Nix file's path into a leaf of the attribute set.\n  It is typically the `callPackage` function, taken from either `pkgs` or a new scope corresponding to the `directory`.\n\n`newScope`\n: If present, this function is used when recursing into a directory, to generate a new scope.\n  The arguments are updated with the scope's `callPackage` and `newScope` functions, so packages can require\n  anything in their scope, or in an ancestor of their scope.\n\n`directory`\n: The directory to read package files from.\n\n# Type\n\n```\npackagesFromDirectoryRecursive :: {\n  callPackage :: Path -> AttrSet -> Any;\n  newScope? :: AttrSet -> Scope;\n  directory :: Path;\n} -> AttrSet\n```\n\n# Examples\n:::{.example}\n## Basic use of `lib.packagesFromDirectoryRecursive`\n\n```nix\npackagesFromDirectoryRecursive {\n  inherit (pkgs) callPackage;\n  directory = ./my-packages;\n}\n=> { ... }\n```\n\nIn this case, `callPackage` will only search `pkgs` for a file's input parameters.\nIn other words, a file cannot refer to another file in the directory in its input parameters.\n:::\n\n::::{.example}\n## Create a scope for the nix files found in a directory\n```nix\npackagesFromDirectoryRecursive {\n  inherit (pkgs) callPackage newScope;\n  directory = ./my-packages;\n}\n=> { ... }\n```\n\nFor example, take the following directory structure:\n```\nmy-packages\n├── a.nix    → { b }: assert b ? b1; ...\n└── b\n   ├── b1.nix  → { a }: ...\n   └── b2.nix\n```\n\nHere, `b1.nix` can specify `{ a }` as a parameter, which `callPackage` will resolve as expected.\nLikewise, `a.nix` receive an attrset corresponding to the contents of the `b` directory.\n\n:::{.note}\n`a.nix` cannot directly take as inputs packages defined in a child directory, such as `b1`.\n:::\n::::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":370,"column":3},"path":["lib","filesystem","packagesFromDirectoryRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.parseDrvName","path":["lib","parseDrvName"],"aliases":[["builtins","parseDrvName"],["lib","strings","parseDrvName"]],"signature":null,"is_primop":true,"primop_meta":{"name":"parseDrvName","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":116,"column":9},"attr_expr":"parseDrvName","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","parseDrvName"],"pos_type":"Lambda"}},"content":{"content":"\nSplit the string *s* into a package name and version. The package\nname is everything up to but not including the first dash not followed\nby a letter, and the version is everything following that dash. The\nresult is returned in a set `{ name, version }`. Thus,\n`builtins.parseDrvName \"nix-0.12pre12876\"` returns `{ name =\n\"nix\"; version = \"0.12pre12876\"; }`.\n","source":{"position":null,"path":["lib","parseDrvName"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.parseFlakeRef","path":["lib","parseFlakeRef"],"aliases":[["builtins","parseFlakeRef"],["lib","flakes","parseFlakeRef"]],"signature":null,"is_primop":true,"primop_meta":{"name":"parseFlakeRef","args":["flake-ref"],"experimental":true,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":610,"column":9},"attr_expr":"parseFlakeRef","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","parseFlakeRef"],"pos_type":"Lambda"}},"content":{"content":"\nParse a flake reference, and return its exploded form.\n\nFor example:\n\n```nix\nbuiltins.parseFlakeRef \"github:NixOS/nixpkgs/23.05?dir=lib\"\n```\n\nevaluates to:\n\n```nix\n{ dir = \"lib\"; owner = \"NixOS\"; ref = \"23.05\"; repo = \"nixpkgs\"; type = \"github\"; }\n```\n","source":{"position":null,"path":["lib","parseFlakeRef"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.partition","path":["lib","partition"],"aliases":[["builtins","partition"],["lib","lists","partition"]],"signature":"partition :: (a -> Bool) -> [a] -> { right :: [a]; wrong :: [a]; }\n","is_primop":true,"primop_meta":{"name":"partition","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":285,"column":9},"attr_expr":"partition","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":952,"column":3},"path":["lib","lists","partition"],"pos_type":"Attribute"}},"content":{"content":"\nSplits the elements of a list in two lists, `right` and\n`wrong`, depending on the evaluation of a predicate.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\npartition :: (a -> Bool) -> [a] -> { right :: [a]; wrong :: [a]; }\n```\n\n# Examples\n:::{.example}\n## `lib.lists.partition` usage example\n\n```nix\npartition (x: x > 2) [ 5 1 2 3 4 ]\n=> { right = [ 5 3 4 ]; wrong = [ 1 2 ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":952,"column":3},"path":["lib","lists","partition"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.pathExists","path":["lib","pathExists"],"aliases":[["builtins","pathExists"],["lib","trivial","pathExists"]],"signature":null,"is_primop":true,"primop_meta":{"name":"pathExists","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":183,"column":9},"attr_expr":"pathExists","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","pathExists"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if the path *path* exists at evaluation time, and\n`false` otherwise.\n","source":{"position":null,"path":["lib","pathExists"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.pathHasContext","path":["lib","pathHasContext"],"aliases":[["builtins","hasContext"],["lib","hasContext"],["lib","sources","pathHasContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hasContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":467,"column":9},"attr_expr":"pathHasContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","pathHasContext"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if string *s* has a non-empty context.\nThe context can be obtained with\n[`getContext`](#builtins-getContext).\n\n> **Example**\n>\n> Many operations require a string context to be empty because they are intended only to work with \"regular\" strings, and also to help users avoid unintentionally loosing track of string context elements.\n> `builtins.hasContext` can help create better domain-specific errors in those case.\n>\n> ```nix\n> name: meta:\n>\n> if builtins.hasContext name\n> then throw \"package name cannot contain string context\"\n> else { ${name} = meta; }\n> ```\n","source":{"position":null,"path":["lib","pathHasContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.pathIsDirectory","path":["lib","pathIsDirectory"],"aliases":[["lib","filesystem","pathIsDirectory"]],"signature":"pathIsDirectory :: Path -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":450,"column":9},"attr_expr":"pathIsDirectory","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":103,"column":21},"lambda_expr":"pathIsDirectory = path: pathExists path && pathType path == \"directory\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":103,"column":3},"path":["lib","filesystem","pathIsDirectory"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a path exists and is a directory.\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\npathIsDirectory :: Path -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathIsDirectory` usage example\n\n```nix\npathIsDirectory /.\n=> true\n\npathIsDirectory /this/does/not/exist\n=> false\n\npathIsDirectory /some/file.nix\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":103,"column":3},"path":["lib","filesystem","pathIsDirectory"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.pathIsGitRepo","path":["lib","pathIsGitRepo"],"aliases":[["lib","sources","pathIsGitRepo"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":469,"column":9},"attr_expr":"pathIsGitRepo","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":279,"column":19},"lambda_expr":"path: (_commitIdFromGitRepoOrError path) ? value","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":279,"column":19},"path":["lib","pathIsGitRepo"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":279,"column":19},"path":["lib","pathIsGitRepo"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.pathIsRegularFile","path":["lib","pathIsRegularFile"],"aliases":[["lib","filesystem","pathIsRegularFile"]],"signature":"pathIsRegularFile :: Path -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":451,"column":9},"attr_expr":"pathIsRegularFile","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":137,"column":23},"lambda_expr":"pathIsRegularFile = path: pathExists path && pathType path == \"regular\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":137,"column":3},"path":["lib","filesystem","pathIsRegularFile"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a path exists and is a regular file, meaning not a symlink or any other special file type.\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\npathIsRegularFile :: Path -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathIsRegularFile` usage example\n\n```nix\npathIsRegularFile /.\n=> false\n\npathIsRegularFile /this/does/not/exist\n=> false\n\npathIsRegularFile /some/file.nix\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":137,"column":3},"path":["lib","filesystem","pathIsRegularFile"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.pathType","path":["lib","pathType"],"aliases":[["builtins","readFileType"],["lib","readFileType"],["lib","filesystem","pathType"],["lib","filesystem","readFileType"]],"signature":"pathType :: Path -> String\n","is_primop":true,"primop_meta":{"name":"readFileType","args":["p"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":449,"column":9},"attr_expr":"pathType","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}},"content":{"content":"\nThe type of a path. The path needs to exist and be accessible.\nThe result is either `\"directory\"` for a directory, `\"regular\"` for a\nregular file, `\"symlink\"` for a symlink, or `\"unknown\"` for anything else.\n\n# Inputs\n\npath\n\n: The path to query\n\n# Type\n\n```\npathType :: Path -> String\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathType` usage example\n\n```nix\npathType /.\n=> \"directory\"\n\npathType /some/file.nix\n=> \"regular\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.pipe","path":["lib","pipe"],"aliases":[["lib","trivial","pipe"]],"signature":"pipe :: a -> [(a -> b) (b -> c) ... (x -> y) (y -> z)] -> z\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":129,"column":9},"attr_expr":"pipe","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":152,"column":3},"path":["lib","trivial","pipe"],"pos_type":"Attribute"}},"content":{"content":"\nPipes a value through a list of functions, left to right.\n\n# Inputs\n\n`value`\n\n: Value to start piping.\n\n`fns`\n\n: List of functions to apply sequentially.\n\n# Type\n\n```\npipe :: a -> [(a -> b) (b -> c) ... (x -> y) (y -> z)] -> z\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.pipe` usage example\n\n```nix\npipe 2 [\n    (x: x + 2)  # 2 + 2 = 4\n    (x: x * 2)  # 4 * 2 = 8\n  ]\n=> 8\n\n# ideal to do text transformations\npipe [ \"a/b\" \"a/c\" ] [\n\n  # create the cp command\n  (map (file: ''cp \"${src}/${file}\" $out\\n''))\n\n  # concatenate all commands into one string\n  lib.concatStrings\n\n  # make that string into a nix derivation\n  (pkgs.runCommand \"copy-to-out\" {})\n\n]\n=> <drv which copies all files to $out>\n\nThe output type of each function has to be the input type\nof the next function, and the last function returns the\nfinal value.\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":152,"column":3},"path":["lib","trivial","pipe"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.placeholder","path":["lib","placeholder"],"aliases":[["builtins","placeholder"]],"signature":null,"is_primop":true,"primop_meta":{"name":"placeholder","args":["output"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":117,"column":9},"attr_expr":"placeholder","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","placeholder"],"pos_type":"Lambda"}},"content":{"content":"\nReturn an\n[output placeholder string](@docroot@/store/derivation/index.md#output-placeholder)\nfor the specified *output* that will be substituted by the corresponding\n[output path](@docroot@/glossary.md#gloss-output-path)\nat build time.\n\nTypical outputs would be `\"out\"`, `\"bin\"` or `\"dev\"`.\n","source":{"position":null,"path":["lib","placeholder"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.pushDownProperties","path":["lib","pushDownProperties"],"aliases":[["lib","modules","pushDownProperties"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":483,"column":9},"attr_expr":"pushDownProperties","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1367,"column":5},"lambda_expr":"cfg:\n    if cfg._type or \"\" == \"merge\" then\n      concatMap pushDownProperties cfg.contents\n    else if cfg._type or \"\" == \"if\" then\n      map (mapAttrsIfAttrs (n: v: mkIf cfg.condition v)) (pushDownProperties cfg.content)\n    else if cfg._type or \"\" == \"override\" then\n      map (mapAttrsIfAttrs (n: v: mkOverride cfg.priority v)) (pushDownProperties cfg.content)\n    # FIXME: handle mkOrder?\n    else\n      [ cfg ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1367,"column":5},"path":["lib","pushDownProperties"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1367,"column":5},"path":["lib","pushDownProperties"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.range","path":["lib","range"],"aliases":[["lib","lists","range"]],"signature":"range :: Int -> Int -> [Int]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":283,"column":9},"attr_expr":"range","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":885,"column":11},"lambda_expr":"range = first: last: if first > last then [ ] else genList (n: first + n) (last - first + 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":885,"column":3},"path":["lib","lists","range"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list of integers from `first` up to and including `last`.\n\n# Inputs\n\n`first`\n\n: First integer in the range\n\n`last`\n\n: Last integer in the range\n\n# Type\n\n```\nrange :: Int -> Int -> [Int]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.range` usage example\n\n```nix\nrange 2 4\n=> [ 2 3 4 ]\nrange 3 2\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":885,"column":3},"path":["lib","lists","range"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.readDir","path":["lib","readDir"],"aliases":[["builtins","readDir"],["lib","filesystem","readDir"]],"signature":null,"is_primop":true,"primop_meta":{"name":"readDir","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":457,"column":9},"attr_expr":"readDir","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","readDir"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the contents of the directory *path* as a set mapping\ndirectory entries to the corresponding file type. For instance, if\ndirectory `A` contains a regular file `B` and another directory\n`C`, then `builtins.readDir ./A` returns the set\n\n```nix\n{ B = \"regular\"; C = \"directory\"; }\n```\n\nThe possible values for the file type are `\"regular\"`,\n`\"directory\"`, `\"symlink\"` and `\"unknown\"`.\n","source":{"position":null,"path":["lib","readDir"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.readFile","path":["lib","readFile"],"aliases":[["builtins","readFile"],["lib","strings","readFile"],["lib","trivial","readFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"readFile","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":185,"column":9},"attr_expr":"readFile","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","readFile"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the contents of the file *path* as a string.\n","source":{"position":null,"path":["lib","readFile"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.readFileType","path":["lib","readFileType"],"aliases":[["builtins","readFileType"],["lib","pathType"],["lib","filesystem","pathType"],["lib","filesystem","readFileType"]],"signature":"pathType :: Path -> String\n","is_primop":true,"primop_meta":{"name":"readFileType","args":["p"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":458,"column":9},"attr_expr":"readFileType","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}},"content":{"content":"\nThe type of a path. The path needs to exist and be accessible.\nThe result is either `\"directory\"` for a directory, `\"regular\"` for a\nregular file, `\"symlink\"` for a symlink, or `\"unknown\"` for anything else.\n\n# Inputs\n\npath\n\n: The path to query\n\n# Type\n\n```\npathType :: Path -> String\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathType` usage example\n\n```nix\npathType /.\n=> \"directory\"\n\npathType /some/file.nix\n=> \"regular\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.recurseIntoAttrs","path":["lib","recurseIntoAttrs"],"aliases":[["lib","attrsets","recurseIntoAttrs"]],"signature":"recurseIntoAttrs :: AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":248,"column":9},"attr_expr":"recurseIntoAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2199,"column":22},"lambda_expr":"recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2199,"column":3},"path":["lib","attrsets","recurseIntoAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMake various Nix tools consider the contents of the resulting\nattribute set when looking for what to build, find, etc.\n\nThis function only affects a single attribute set; it does not\napply itself recursively for nested attribute sets.\n\n# Inputs\n\n`attrs`\n\n: An attribute set to scan for derivations.\n\n# Type\n\n```\nrecurseIntoAttrs :: AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.recurseIntoAttrs` usage example\n\n```nix\n{ pkgs ? import <nixpkgs> {} }:\n{\n  myTools = pkgs.lib.recurseIntoAttrs {\n    inherit (pkgs) hello figlet;\n  };\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2199,"column":3},"path":["lib","attrsets","recurseIntoAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.recursiveUpdate","path":["lib","recursiveUpdate"],"aliases":[["lib","attrsets","recursiveUpdate"]],"signature":"recursiveUpdate :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":234,"column":9},"attr_expr":"recursiveUpdate","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1762,"column":5},"lambda_expr":"recursiveUpdate =\n    lhs: rhs:\n    recursiveUpdateUntil (\n      path: lhs: rhs:\n      !(isAttrs lhs && isAttrs rhs)\n    ) lhs rhs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1761,"column":3},"path":["lib","attrsets","recursiveUpdate"],"pos_type":"Attribute"}},"content":{"content":"\nA recursive variant of the update operator `//`.  The recursion\nstops when one of the attribute values is not an attribute set,\nin which case the right hand side value takes precedence over the\nleft hand side value.\n\n# Inputs\n\n`lhs`\n\n: Left attribute set of the merge.\n\n`rhs`\n\n: Right attribute set of the merge.\n\n# Type\n\n```\nrecursiveUpdate :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.recursiveUpdate` usage example\n\n```nix\nrecursiveUpdate {\n  boot.loader.grub.enable = true;\n  boot.loader.grub.device = \"/dev/hda\";\n} {\n  boot.loader.grub.device = \"\";\n}\n\nreturns: {\n  boot.loader.grub.enable = true;\n  boot.loader.grub.device = \"\";\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1761,"column":3},"path":["lib","attrsets","recursiveUpdate"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.recursiveUpdateUntil","path":["lib","recursiveUpdateUntil"],"aliases":[["lib","attrsets","recursiveUpdateUntil"]],"signature":"recursiveUpdateUntil :: ([String] -> AttrSet -> AttrSet -> Bool) -> AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":233,"column":9},"attr_expr":"recursiveUpdateUntil","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1702,"column":5},"lambda_expr":"recursiveUpdateUntil =\n    pred: lhs: rhs:\n    let\n      f =\n        attrPath:\n        zipAttrsWith (\n          name: values:\n          let\n            here = attrPath ++ [ name ];\n          in\n          if length values == 1 || pred here (elemAt values 1) (head values) then\n            head values\n          else\n            f here values\n        );\n    in\n    f [ ] [ rhs lhs ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1701,"column":3},"path":["lib","attrsets","recursiveUpdateUntil"],"pos_type":"Attribute"}},"content":{"content":"\nUpdate `lhs` so that `rhs` wins for any given attribute path that occurs in both.\n\nUnlike the `//` (update) operator, which operates on a single attribute set,\nThis function views its operands `lhs` and `rhs` as a mapping from attribute *paths*\nto values.\n\nThe caller-provided function `pred` decides whether any given path is one of the following:\n\n- `true`: a value in the mapping\n- `false`: an attribute set whose purpose is to create the nesting structure.\n\n# Inputs\n\n`pred`\n\n: Predicate function (of type `List String -> Any -> Any -> Bool`)\n\n  Inputs:\n\n  - `path : List String`: the path to the current attribute as a list of strings for attribute names\n  - `lhsAtPath : Any`: the value at that path in `lhs`; same as `getAttrFromPath path lhs`\n  - `rhsAtPath : Any`: the value at that path in `rhs`; same as `getAttrFromPath path rhs`\n\n  Output:\n\n  - `true`: `path` points to a value in the mapping, and `rhsAtPath` will appear in the return value of `recursiveUpdateUntil`\n  - `false`: `path` is part of the nesting structure and will be an attrset in the return value of `recursiveUpdateUntil`\n\n  `pred` is only called for `path`s that extend prefixes for which `pred` returned `false`.\n\n`lhs`\n\n: Left attribute set of the update.\n\n`rhs`\n\n: Right attribute set of the update.\n\n# Type\n\n```\nrecursiveUpdateUntil :: ([String] -> AttrSet -> AttrSet -> Bool) -> AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.recursiveUpdateUntil` usage example\n\n```nix\nrecursiveUpdateUntil (path: lhs: rhs: path == [\"foo\"]) {\n  # left attribute set\n  foo.bar = 1;\n  foo.baz = 2;\n  bar = 3;\n} {\n  # right attribute set\n  foo.bar = 1;\n  foo.quz = 2;\n  baz = 4;\n}\n\n=> {\n  foo.bar = 1; # 'foo.*' from the 'right' set\n  foo.quz = 2; #\n  bar = 3;     # 'bar' from the 'left' set\n  baz = 4;     # 'baz' from the 'right' set\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1701,"column":3},"path":["lib","attrsets","recursiveUpdateUntil"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.remove","path":["lib","remove"],"aliases":[["lib","lists","remove"]],"signature":"remove :: a -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":274,"column":9},"attr_expr":"remove","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":477,"column":12},"lambda_expr":"remove = e: filter (x: x != e);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":477,"column":3},"path":["lib","lists","remove"],"pos_type":"Attribute"}},"content":{"content":"\nRemove elements equal to `e` from a list.  Useful for `buildInputs`.\n\n# Inputs\n\n`e`\n\n: Element to remove from `list`\n\n`list`\n\n: The list\n\n# Type\n\n```\nremove :: a -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.remove` usage example\n\n```nix\nremove 3 [ 1 3 4 3 ]\n=> [ 1 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":477,"column":3},"path":["lib","lists","remove"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.removeAttrs","path":["lib","removeAttrs"],"aliases":[["builtins","removeAttrs"],["lib","attrsets","removeAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"removeAttrs","args":["set","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":258,"column":9},"attr_expr":"removeAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","removeAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nRemove the attributes listed in *list* from *set*. The attributes\ndon’t have to exist in *set*. For instance,\n\n```nix\nremoveAttrs { x = 1; y = 2; z = 3; } [ \"a\" \"x\" \"z\" ]\n```\n\nevaluates to `{ y = 2; }`.\n","source":{"position":null,"path":["lib","removeAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.removePrefix","path":["lib","removePrefix"],"aliases":[["lib","strings","removePrefix"]],"signature":"removePrefix :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":372,"column":9},"attr_expr":"removePrefix","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1854,"column":5},"lambda_expr":"removePrefix =\n    prefix: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath prefix)\n      ''\n        lib.strings.removePrefix: The first argument (${toString prefix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function never removes any prefix in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        let\n          preLen = stringLength prefix;\n        in\n        if substring 0 preLen str == prefix then\n          # -1 will take the string until the end\n          substring preLen (-1) str\n        else\n          str\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1853,"column":3},"path":["lib","strings","removePrefix"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a string without the specified prefix, if the prefix matches.\n\n# Inputs\n\n`prefix`\n: Prefix to remove if it matches\n\n`str`\n: Input string\n\n# Type\n\n```\nremovePrefix :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.removePrefix` usage example\n\n```nix\nremovePrefix \"foo.\" \"foo.bar.baz\"\n=> \"bar.baz\"\nremovePrefix \"xxx\" \"foo.bar.baz\"\n=> \"foo.bar.baz\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1853,"column":3},"path":["lib","strings","removePrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.removeSuffix","path":["lib","removeSuffix"],"aliases":[["lib","strings","removeSuffix"]],"signature":"removeSuffix :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":373,"column":9},"attr_expr":"removeSuffix","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1905,"column":5},"lambda_expr":"removeSuffix =\n    suffix: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath suffix)\n      ''\n        lib.strings.removeSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function never removes any suffix in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        let\n          sufLen = stringLength suffix;\n          sLen = stringLength str;\n        in\n        if sufLen <= sLen && suffix == substring (sLen - sufLen) sufLen str then\n          substring 0 (sLen - sufLen) str\n        else\n          str\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1904,"column":3},"path":["lib","strings","removeSuffix"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a string without the specified suffix, if the suffix matches.\n\n# Inputs\n\n`suffix`\n: Suffix to remove if it matches\n\n`str`\n: Input string\n\n# Type\n\n```\nremoveSuffix :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.removeSuffix` usage example\n\n```nix\nremoveSuffix \"front\" \"homefront\"\n=> \"home\"\nremoveSuffix \"xxx\" \"homefront\"\n=> \"homefront\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1904,"column":3},"path":["lib","strings","removeSuffix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.renameCrossIndexFrom","path":["lib","renameCrossIndexFrom"],"aliases":[["lib","customisation","renameCrossIndexFrom"]],"signature":"renameCrossIndexFrom :: String -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":418,"column":9},"attr_expr":"renameCrossIndexFrom","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":923,"column":26},"lambda_expr":"renameCrossIndexFrom = prefix: x: {\n    buildBuild = x.\"${prefix}BuildBuild\";\n    buildHost = x.\"${prefix}BuildHost\";\n    buildTarget = x.\"${prefix}BuildTarget\";\n    hostHost = x.\"${prefix}HostHost\";\n    hostTarget = x.\"${prefix}HostTarget\";\n    targetTarget = x.\"${prefix}TargetTarget\";\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":923,"column":3},"path":["lib","customisation","renameCrossIndexFrom"],"pos_type":"Attribute"}},"content":{"content":"\nRemoves a prefix from the attribute names of a cross index.\n\nA cross index (short for \"Cross Platform Pair Index\") is a 6-field structure\norganizing values by cross-compilation platform relationships.\n\n# Inputs\n\n`prefix`\n: The prefix to remove from cross index attribute names\n\n`crossIndex`\n: A cross index with prefixed names\n\n# Type\n\n```\nrenameCrossIndexFrom :: String -> AttrSet -> AttrSet\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.renameCrossIndexFrom` usage example\n\n```nix\nrenameCrossIndexFrom \"pkgs\" { pkgsBuildBuild = ...; pkgsBuildHost = ...; ... }\n=> { buildBuild = ...; buildHost = ...; ... }\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":923,"column":3},"path":["lib","customisation","renameCrossIndexFrom"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.renameCrossIndexTo","path":["lib","renameCrossIndexTo"],"aliases":[["lib","customisation","renameCrossIndexTo"]],"signature":"renameCrossIndexTo :: String -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":419,"column":9},"attr_expr":"renameCrossIndexTo","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":963,"column":24},"lambda_expr":"renameCrossIndexTo = prefix: x: {\n    \"${prefix}BuildBuild\" = x.buildBuild;\n    \"${prefix}BuildHost\" = x.buildHost;\n    \"${prefix}BuildTarget\" = x.buildTarget;\n    \"${prefix}HostHost\" = x.hostHost;\n    \"${prefix}HostTarget\" = x.hostTarget;\n    \"${prefix}TargetTarget\" = x.targetTarget;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":963,"column":3},"path":["lib","customisation","renameCrossIndexTo"],"pos_type":"Attribute"}},"content":{"content":"\nAdds a prefix to the attribute names of a cross index.\n\nA cross index (short for \"Cross Platform Pair Index\") is a 6-field structure\norganizing values by cross-compilation platform relationships.\n\n# Inputs\n\n`prefix`\n: The prefix to add to cross index attribute names\n\n`crossIndex`\n: A cross index to be prefixed\n\n# Type\n\n```\nrenameCrossIndexTo :: String -> AttrSet -> AttrSet\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.renameCrossIndexTo` usage example\n\n```nix\nrenameCrossIndexTo \"self\" { buildBuild = ...; buildHost = ...; ... }\n=> { selfBuildBuild = ...; selfBuildHost = ...; ... }\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":963,"column":3},"path":["lib","customisation","renameCrossIndexTo"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.replaceElemAt","path":["lib","replaceElemAt"],"aliases":[["lib","lists","replaceElemAt"]],"signature":"replaceElemAt :: [a] -> Int -> a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":320,"column":9},"attr_expr":"replaceElemAt","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2121,"column":5},"lambda_expr":"replaceElemAt =\n    list: idx: newElem:\n    assert lib.assertMsg (idx >= 0 && idx < length list)\n      \"'lists.replaceElemAt' called with index ${toString idx} on a list of size ${toString (length list)}\";\n    genList (i: if i == idx then newElem else elemAt list i) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2120,"column":3},"path":["lib","lists","replaceElemAt"],"pos_type":"Attribute"}},"content":{"content":"\nReplaces a list's nth element with a new element\n\n# Inputs\n\n`list`\n: Input list\n\n`idx`\n: index to replace\n\n`newElem`\n: new element to replace with\n\n# Type\n\n```\nreplaceElemAt :: [a] -> Int -> a -> [a]\n```\n\n# Examples\n:::{.example}\n## `replaceElemAt` usage example\n\n```nix\nlib.replaceElemAt` [1 2 3] 0 \"a\"\n=> [\"a\" 2 3]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2120,"column":3},"path":["lib","lists","replaceElemAt"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.replaceString","path":["lib","replaceString"],"aliases":[["lib","strings","replaceString"]],"signature":"replaceString :: String -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":329,"column":9},"attr_expr":"replaceString","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":398,"column":19},"lambda_expr":"replaceString = from: to: replaceStrings [ from ] [ to ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":398,"column":3},"path":["lib","strings","replaceString"],"pos_type":"Attribute"}},"content":{"content":"\nGiven string `s`, replace every occurrence of the string `from` with the string `to`.\n\n# Inputs\n\n`from`\n: The string to be replaced\n\n`to`\n: The string to replace with\n\n`s`\n: The original string where replacements will be made\n\n# Type\n\n```\nreplaceString :: String -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.replaceString` usage example\n\n```nix\nreplaceString \"world\" \"Nix\" \"Hello, world!\"\n=> \"Hello, Nix!\"\nreplaceString \".\" \"_\" \"v1.2.3\"\n=> \"v1_2_3\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":398,"column":3},"path":["lib","strings","replaceString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.replaceStrings","path":["lib","replaceStrings"],"aliases":[["builtins","replaceStrings"],["lib","strings","replaceStrings"]],"signature":null,"is_primop":true,"primop_meta":{"name":"replaceStrings","args":["from","to","s"],"experimental":false,"arity":3},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":330,"column":9},"attr_expr":"replaceStrings","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","replaceStrings"],"pos_type":"Lambda"}},"content":{"content":"\nGiven string *s*, replace every occurrence of the strings in *from*\nwith the corresponding string in *to*.\n\nThe argument *to* is lazy, that is, it is only evaluated when its corresponding pattern in *from* is matched in the string *s*\n\nExample:\n\n```nix\nbuiltins.replaceStrings [\"oo\" \"a\"] [\"a\" \"i\"] \"foobar\"\n```\n\nevaluates to `\"fabir\"`.\n","source":{"position":null,"path":["lib","replaceStrings"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.replicate","path":["lib","replicate"],"aliases":[["lib","lists","replicate"]],"signature":"replicate :: Int -> a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":284,"column":9},"attr_expr":"replicate","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":919,"column":15},"lambda_expr":"replicate = n: elem: genList (_: elem) n;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":919,"column":3},"path":["lib","lists","replicate"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list with `n` copies of an element.\n\n# Inputs\n\n`n`\n\n: 1\\. Function argument\n\n`elem`\n\n: 2\\. Function argument\n\n# Type\n\n```\nreplicate :: Int -> a -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.replicate` usage example\n\n```nix\nreplicate 3 \"a\"\n=> [ \"a\" \"a\" \"a\" ]\nreplicate 2 true\n=> [ true true ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":919,"column":3},"path":["lib","lists","replicate"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.repoRevToName","path":["lib","repoRevToName"],"aliases":[["lib","sources","repoRevToName"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":471,"column":9},"attr_expr":"repoRevToName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":506,"column":5},"lambda_expr":"repoRevToName =\n    kind:\n    # match on `kind` first to minimize the thunk\n    if kind == \"source\" then\n      (\n        repo: rev: suffix:\n        \"source\"\n      )\n    else if kind == \"versioned\" then\n      (\n        repo: rev: suffix:\n        repoRevToNameFull repo rev null\n      )\n    else if kind == \"full\" then\n      repoRevToNameFull\n    else\n      throw \"repoRevToName: invalid kind\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":506,"column":5},"path":["lib","repoRevToName"],"pos_type":"Lambda"}},"content":{"content":"\"full\" -> name everything as \"${repo}-${rev}-${fetcher}-source\"","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":506,"column":5},"path":["lib","repoRevToName"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.revOrTag","path":["lib","revOrTag"],"aliases":[["lib","sources","revOrTag"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":470,"column":9},"attr_expr":"revOrTag","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":474,"column":5},"lambda_expr":"revOrTag =\n    rev: tag:\n    if tag != null then\n      tag\n    else if rev != null then\n      rev\n    else\n      \"HEAD\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":474,"column":5},"path":["lib","revOrTag"],"pos_type":"Lambda"}},"content":{"content":"Turn git `rev` and `tag` pair into a revision usable in `repoRevToName*`.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":474,"column":5},"path":["lib","revOrTag"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.reverseList","path":["lib","reverseList"],"aliases":[["lib","lists","reverseList"]],"signature":"reverseList :: [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":288,"column":9},"attr_expr":"reverseList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1123,"column":5},"lambda_expr":"reverseList =\n    xs:\n    let\n      l = length xs;\n    in\n    genList (n: elemAt xs (l - n - 1)) l;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1122,"column":3},"path":["lib","lists","reverseList"],"pos_type":"Attribute"}},"content":{"content":"\nReverse the order of the elements of a list.\n\n# Inputs\n\n`xs`\n\n: 1\\. Function argument\n\n# Type\n\n```\nreverseList :: [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.reverseList` usage example\n\n```nix\nreverseList [ \"b\" \"o\" \"j\" ]\n=> [ \"j\" \"o\" \"b\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1122,"column":3},"path":["lib","lists","reverseList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.runTests","path":["lib","runTests"],"aliases":[["lib","debug","runTests"]],"signature":"runTests :: {\n  tests :: [String];\n  ${testName} :: {\n    expr :: a;\n    expected :: a;\n  };\n}\n->\n[\n  {\n    name :: String;\n    expected :: a;\n    result :: a;\n  }\n]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":564,"column":9},"attr_expr":"runTests","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":513,"column":5},"lambda_expr":"runTests =\n    tests:\n    concatLists (\n      attrValues (\n        mapAttrs (\n          name: test:\n          let\n            testsToRun = if tests ? tests then tests.tests else [ ];\n          in\n          if\n            (substring 0 4 name == \"test\" || elem name testsToRun)\n            && ((testsToRun == [ ]) || elem name tests.tests)\n            && (test.expr != test.expected)\n\n          then\n            [\n              {\n                inherit name;\n                expected = test.expected;\n                result = test.expr;\n              }\n            ]\n          else\n            [ ]\n        ) tests\n      )\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":512,"column":3},"path":["lib","debug","runTests"],"pos_type":"Attribute"}},"content":{"content":"\nEvaluates a set of tests.\n\nA test is an attribute set `{expr, expected}`,\ndenoting an expression and its expected result.\n\nThe result is a `list` of __failed tests__, each represented as\n`{name, expected, result}`,\n\n- expected\n  - What was passed as `expected`\n- result\n  - The actual `result` of the test\n\nUsed for regression testing of the functions in lib; see\ntests.nix for more examples.\n\nImportant: Only attributes that start with `test` are executed.\n\n- If you want to run only a subset of the tests add the attribute `tests = [\"testName\"];`\n\n# Inputs\n\n`tests`\n\n: Tests to run\n\n# Type\n\n```\nrunTests :: {\n  tests :: [String];\n  ${testName} :: {\n    expr :: a;\n    expected :: a;\n  };\n}\n->\n[\n  {\n    name :: String;\n    expected :: a;\n    result :: a;\n  }\n]\n```\n\n# Examples\n:::{.example}\n## `lib.debug.runTests` usage example\n\n```nix\nrunTests {\n  testAndOk = {\n    expr = lib.and true false;\n    expected = false;\n  };\n  testAndFail = {\n    expr = lib.and true false;\n    expected = true;\n  };\n}\n->\n[\n  {\n    name = \"testAndFail\";\n    expected = true;\n    result = false;\n  }\n]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":512,"column":3},"path":["lib","debug","runTests"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.scrubOptionValue","path":["lib","scrubOptionValue"],"aliases":[["lib","options","scrubOptionValue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":528,"column":9},"attr_expr":"scrubOptionValue","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":646,"column":5},"lambda_expr":"scrubOptionValue =\n    x:\n    if isDerivation x then\n      {\n        type = \"derivation\";\n        drvPath = x.name;\n        outPath = x.name;\n        name = x.name;\n      }\n    else if isList x then\n      map scrubOptionValue x\n    else if isAttrs x then\n      mapAttrs (n: v: scrubOptionValue v) (removeAttrs x [ \"_args\" ])\n    else\n      x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":645,"column":3},"path":["lib","options","scrubOptionValue"],"pos_type":"Attribute"}},"content":{"content":"\nThis function recursively removes all derivation attributes from\n`x` except for the `name` attribute.\n\nThis is to make the generation of `options.xml` much more\nefficient: the XML representation of derivations is very large\n(on the order of megabytes) and is not actually used by the\nmanual generator.\n\nThis function was made obsolete by `renderOptionValue` and is kept for\ncompatibility with out-of-tree code.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":645,"column":3},"path":["lib","options","scrubOptionValue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.seq","path":["lib","seq"],"aliases":[["builtins","seq"],["lib","trivial","seq"]],"signature":null,"is_primop":true,"primop_meta":{"name":"seq","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":167,"column":9},"attr_expr":"seq","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","seq"],"pos_type":"Lambda"}},"content":{"content":"\nEvaluate *e1*, then evaluate and return *e2*. This ensures that a\ncomputation is strict in the value of *e1*.\n","source":{"position":null,"path":["lib","seq"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.setAttr","path":["lib","setAttr"],"aliases":[["lib","misc","setAttr"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":587,"column":9},"attr_expr":"setAttr","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":276,"column":5},"lambda_expr":"setAttr =\n    set: name: v:\n    set // (nvs name v);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":276,"column":5},"path":["lib","setAttr"],"pos_type":"Lambda"}},"content":{"content":"adds / replaces an attribute of an attribute set","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":276,"column":5},"path":["lib","setAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.setAttrByPath","path":["lib","setAttrByPath"],"aliases":[["lib","attrsets","setAttrByPath"]],"signature":"setAttrByPath :: [String] -> Any -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":203,"column":9},"attr_expr":"setAttrByPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":285,"column":5},"lambda_expr":"setAttrByPath =\n    attrPath: value:\n    let\n      len = length attrPath;\n      atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); };\n    in\n    atDepth 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":284,"column":3},"path":["lib","attrsets","setAttrByPath"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a new attribute set with `value` set at the nested attribute location specified in `attrPath`.\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to set\n\n`value`\n\n: The value to set at the location described by `attrPath`\n\n# Type\n\n```\nsetAttrByPath :: [String] -> Any -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.setAttrByPath` usage example\n\n```nix\nsetAttrByPath [\"a\" \"b\"] 3\n=> { a = { b = 3; }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":284,"column":3},"path":["lib","attrsets","setAttrByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.setAttrMerge","path":["lib","setAttrMerge"],"aliases":[["lib","misc","setAttrMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":588,"column":9},"attr_expr":"setAttrMerge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":283,"column":5},"lambda_expr":"setAttrMerge =\n    name: default: attrs: f:\n    setAttr attrs name (f (maybeAttr name default attrs));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":283,"column":5},"path":["lib","setAttrMerge"],"pos_type":"Lambda"}},"content":{"content":"setAttrMerge \"a\" [] {         } (x: x ++ [3]) -> { a = [  3]; }","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":283,"column":5},"path":["lib","setAttrMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.setDefaultModuleLocation","path":["lib","setDefaultModuleLocation"],"aliases":[["lib","modules","setDefaultModuleLocation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":476,"column":9},"attr_expr":"setDefaultModuleLocation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":611,"column":30},"lambda_expr":"setDefaultModuleLocation = file: m: {\n    _file = file;\n    imports = [ m ];\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":611,"column":30},"path":["lib","setDefaultModuleLocation"],"pos_type":"Lambda"}},"content":{"content":"\nWrap a module with a default location for reporting errors.\n\n# Inputs\n\n`file`\n\n: 1\\. Function argument\n\n`m`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":611,"column":30},"path":["lib","setDefaultModuleLocation"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.setFunctionArgs","path":["lib","setFunctionArgs"],"aliases":[["lib","trivial","setFunctionArgs"]],"signature":"setFunctionArgs : (a -> b) -> { [String] :: Bool } -> (a -> b)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":173,"column":9},"attr_expr":"setFunctionArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":21},"lambda_expr":"setFunctionArgs = f: args: {\n    # TODO: Should we add call-time \"type\" checking like built in?\n    __functor = self: f;\n    __functionArgs = args;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":3},"path":["lib","trivial","setFunctionArgs"],"pos_type":"Attribute"}},"content":{"content":"\nAdd metadata about expected function arguments to a function.\nThe metadata should match the format given by\nbuiltins.functionArgs, i.e. a set from expected argument to a bool\nrepresenting whether that argument has a default or not.\n\nThis function is necessary because you can't dynamically create a\nfunction of the `{ a, b ? foo, ... }:` format, but some facilities\nlike `callPackage` expect to be able to query expected arguments.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`args`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsetFunctionArgs : (a -> b) -> { [String] :: Bool } -> (a -> b)\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":3},"path":["lib","trivial","setFunctionArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.setName","path":["lib","setName"],"aliases":[["lib","meta","setName"]],"signature":"setName :: String -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":433,"column":9},"attr_expr":"setName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":106,"column":13},"lambda_expr":"setName = name: drv: drv // { inherit name; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":106,"column":3},"path":["lib","meta","setName"],"pos_type":"Attribute"}},"content":{"content":"\nChange the [symbolic name of a derivation](https://nixos.org/manual/nix/stable/language/derivations.html#attr-name).\n\n:::{.warning}\nDependent derivations will be rebuilt when the symbolic name is changed.\n:::\n\n# Inputs\n\n`name`\n\n: 1\\. Function argument\n\n`drv`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsetName :: String -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":106,"column":3},"path":["lib","meta","setName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.setPrio","path":["lib","setPrio"],"aliases":[["lib","meta","setPrio"]],"signature":"setPrio :: Int -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":437,"column":9},"attr_expr":"setPrio","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":209,"column":13},"lambda_expr":"setPrio = priority: addMetaAttrs { inherit priority; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":209,"column":3},"path":["lib","meta","setPrio"],"pos_type":"Attribute"}},"content":{"content":"\nSet the nix-env priority of the package. Note that higher values are lower priority, and vice versa.\n\n# Inputs\n\n`priority`\n: 1\\. The priority to set.\n\n`drv`\n: 2\\. Function argument\n\n# Type\n\n```\nsetPrio :: Int -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":209,"column":3},"path":["lib","meta","setPrio"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.setType","path":["lib","setType"],"aliases":[["lib","types","setType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":540,"column":9},"attr_expr":"setType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":160,"column":5},"lambda_expr":"typeName: value:\n    value\n    // {\n      _type = typeName;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":160,"column":5},"path":["lib","setType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":160,"column":5},"path":["lib","setType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.showAttrPath","path":["lib","showAttrPath"],"aliases":[["lib","attrsets","showAttrPath"]],"signature":"showAttrPath :: [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":238,"column":9},"attr_expr":"showAttrPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1887,"column":5},"lambda_expr":"showAttrPath =\n    path:\n    if path == [ ] then \"<root attribute path>\" else concatMapStringsSep \".\" escapeNixIdentifier path;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1886,"column":3},"path":["lib","attrsets","showAttrPath"],"pos_type":"Attribute"}},"content":{"content":"\nTurns a list of strings into a human-readable description of those\nstrings represented as an attribute path. The result of this function is\nnot intended to be machine-readable.\nCreate a new attribute set with `value` set at the nested attribute location specified in `attrPath`.\n\n# Inputs\n\n`path`\n\n: Attribute path to render to a string\n\n# Type\n\n```\nshowAttrPath :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.showAttrPath` usage example\n\n```nix\nshowAttrPath [ \"foo\" \"10\" \"bar\" ]\n=> \"foo.\\\"10\\\".bar\"\nshowAttrPath []\n=> \"<root attribute path>\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1886,"column":3},"path":["lib","attrsets","showAttrPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.showFiles","path":["lib","showFiles"],"aliases":[["lib","options","showFiles"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":532,"column":9},"attr_expr":"showFiles","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":832,"column":15},"lambda_expr":"files: concatStringsSep \" and \" (map (f: \"`${f}'\") files)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":832,"column":15},"path":["lib","showFiles"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":832,"column":15},"path":["lib","showFiles"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.showOption","path":["lib","showOption"],"aliases":[["lib","options","showOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":530,"column":9},"attr_expr":"showOption","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":818,"column":5},"lambda_expr":"showOption =\n    parts:\n    let\n      # If the part is a named placeholder of the form \"<...>\" don't escape it.\n      # It may cause misleading escaping if somebody uses literally \"<...>\" in their option names.\n      # This is the trade-off to allow for placeholders in option names.\n      isNamedPlaceholder = builtins.match \"<(.*)>\";\n      escapeOptionPart =\n        part:\n        if part == \"*\" || isNamedPlaceholder part != null then\n          part\n        else\n          lib.strings.escapeNixIdentifier part;\n    in\n    (concatStringsSep \".\") (map escapeOptionPart parts);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":817,"column":3},"path":["lib","options","showOption"],"pos_type":"Attribute"}},"content":{"content":"\nConvert an option, described as a list of the option parts to a\nhuman-readable version.\n\n# Inputs\n\n`parts`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `showOption` usage example\n\n```nix\n(showOption [\"foo\" \"bar\" \"baz\"]) == \"foo.bar.baz\"\n  (showOption [\"foo\" \"bar.baz\" \"tux\"]) == \"foo.\\\"bar.baz\\\".tux\"\n  (showOption [\"windowManager\" \"2bwm\" \"enable\"]) == \"windowManager.\\\"2bwm\\\".enable\"\n\nPlaceholders will not be quoted as they are not actual values:\n  (showOption [\"foo\" \"*\" \"bar\"]) == \"foo.*.bar\"\n  (showOption [\"foo\" \"<name>\" \"bar\"]) == \"foo.<name>.bar\"\n  (showOption [\"foo\" \"<myPlaceholder>\" \"bar\"]) == \"foo.<myPlaceholder>.bar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":817,"column":3},"path":["lib","options","showOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.showOptionWithDefLocs","path":["lib","showOptionWithDefLocs"],"aliases":[["lib","options","showOptionWithDefLocs"]],"signature":"showOptionWithDefLocs :: { files :: [String]; loc :: [String]; ... } -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":531,"column":9},"attr_expr":"showOptionWithDefLocs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":905,"column":27},"lambda_expr":"showOptionWithDefLocs = opt: ''\n    ${showOption opt.loc}, with values defined in:\n    ${concatMapStringsSep \"\\n\" (defFile: \"  - ${defFile}\") opt.files}\n  '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":905,"column":3},"path":["lib","options","showOptionWithDefLocs"],"pos_type":"Attribute"}},"content":{"content":"\nPretty prints all option definition locations\n\n# Inputs\n\n`option`\n: The option to pretty print\n\n# Examples\n:::{.example}\n## `lib.options.showOptionWithDefLocs` usage example\n\n```nix\nshowOptionWithDefLocs { loc = [\"x\" \"y\" ]; files = [ \"foo.nix\" \"bar.nix\" ];  }\n\"x.y, with values defined in:\\n  - foo.nix\\n  - bar.nix\\n\"\n```\n\n```nix\nnix-repl> eval = lib.evalModules {\n    modules = [\n      {\n        options = {\n          foo = lib.mkEnableOption \"foo\";\n        };\n      }\n    ];\n  }\n\nnix-repl> lib.options.showOptionWithDefLocs eval.options.foo\n\"foo, with values defined in:\\n  - <unknown-file>\\n\"\n```\n\n:::\n\n# Type\n\n```\nshowOptionWithDefLocs :: { files :: [String]; loc :: [String]; ... } -> String\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":905,"column":3},"path":["lib","options","showOptionWithDefLocs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.showWarnings","path":["lib","showWarnings"],"aliases":[["lib","trivial","showWarnings"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":159,"column":9},"attr_expr":"showWarnings","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1051,"column":18},"lambda_expr":"warnings: res: foldr warn res warnings","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1051,"column":18},"path":["lib","showWarnings"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1051,"column":18},"path":["lib","showWarnings"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.singleton","path":["lib","singleton"],"aliases":[["lib","lists","singleton"]],"signature":"singleton :: a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":261,"column":9},"attr_expr":"singleton","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":59,"column":15},"lambda_expr":"singleton = x: [ x ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":59,"column":3},"path":["lib","lists","singleton"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a list consisting of a single element. `singleton x` is\nsometimes more convenient with respect to indentation than `[x]`\nwhen x spans multiple lines.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\nsingleton :: a -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.singleton` usage example\n\n```nix\nsingleton \"foo\"\n=> [ \"foo\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":59,"column":3},"path":["lib","lists","singleton"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.sort","path":["lib","sort"],"aliases":[["builtins","sort"],["lib","lists","sort"]],"signature":"sort :: (a -> a -> Bool) -> [a] -> [a]\n","is_primop":true,"primop_meta":{"name":"sort","args":["comparator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":291,"column":9},"attr_expr":"sort","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1305,"column":3},"path":["lib","lists","sort"],"pos_type":"Attribute"}},"content":{"content":"\nSort a list based on a comparator function which compares two\nelements and returns true if the first argument is strictly below\nthe second argument.  The returned list is sorted in an increasing\norder.  The implementation does a quick-sort.\n\nSee also [`sortOn`](#function-library-lib.lists.sortOn), which applies the\ndefault comparison on a function-derived property, and may be more efficient.\n\n# Inputs\n\n`comparator`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsort :: (a -> a -> Bool) -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.sort` usage example\n\n```nix\nsort (p: q: p < q) [ 5 3 7 ]\n=> [ 3 5 7 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1305,"column":3},"path":["lib","lists","sort"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.sortOn","path":["lib","sortOn"],"aliases":[["lib","lists","sortOn"]],"signature":"sortOn :: (a -> b) -> [a] -> [a], for comparable b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":292,"column":9},"attr_expr":"sortOn","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1351,"column":5},"lambda_expr":"sortOn =\n    f: list:\n    let\n      # Heterogenous list as pair may be ugly, but requires minimal allocations.\n      pairs = map (x: [\n        (f x)\n        x\n      ]) list;\n    in\n    map (x: builtins.elemAt x 1) (\n      sort\n        # Compare the first element of the pairs\n        # Do not factor out the `<`, to avoid calls in hot code; duplicate instead.\n        (a: b: head a < head b)\n        pairs\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1350,"column":3},"path":["lib","lists","sortOn"],"pos_type":"Attribute"}},"content":{"content":"\nSort a list based on the default comparison of a derived property `b`.\n\nThe items are returned in `b`-increasing order.\n\n**Performance**:\n\nThe passed function `f` is only evaluated once per item,\nunlike an unprepared [`sort`](#function-library-lib.lists.sort) using\n`f p < f q`.\n\n**Laws**:\n```nix\nsortOn f == sort (p: q: f p < f q)\n```\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsortOn :: (a -> b) -> [a] -> [a], for comparable b\n```\n\n# Examples\n:::{.example}\n## `lib.lists.sortOn` usage example\n\n```nix\nsortOn stringLength [ \"aa\" \"b\" \"cccc\" ]\n=> [ \"b\" \"aa\" \"cccc\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1350,"column":3},"path":["lib","lists","sortOn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.sortProperties","path":["lib","sortProperties"],"aliases":[["lib","modules","sortProperties"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":486,"column":9},"attr_expr":"sortProperties","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1470,"column":5},"lambda_expr":"sortProperties =\n    defs:\n    let\n      strip =\n        def:\n        if def.value._type or \"\" == \"order\" then\n          def\n          // {\n            value = def.value.content;\n            inherit (def.value) priority;\n          }\n        else\n          def;\n      defs' = map strip defs;\n      compare = a: b: (a.priority or defaultOrderPriority) < (b.priority or defaultOrderPriority);\n    in\n    sort compare defs';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1470,"column":5},"path":["lib","sortProperties"],"pos_type":"Lambda"}},"content":{"content":"\nSort a list of properties.  The sort priority of a property is\ndefaultOrderPriority by default, but can be overridden by wrapping the property\nusing mkOrder.\n\n# Inputs\n\n`defs`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1470,"column":5},"path":["lib","sortProperties"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sourceByRegex","path":["lib","sourceByRegex"],"aliases":[["lib","sources","sourceByRegex"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":463,"column":9},"attr_expr":"sourceByRegex","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":216,"column":5},"lambda_expr":"sourceByRegex =\n    src: regexes:\n    let\n      isFiltered = src ? _isLibCleanSourceWith;\n      origSrc = if isFiltered then src.origSrc else src;\n    in\n    lib.cleanSourceWith {\n      filter = (\n        path: type:\n        let\n          relPath = lib.removePrefix (toString origSrc + \"/\") (toString path);\n        in\n        lib.any (re: match re relPath != null) regexes\n      );\n      inherit src;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":216,"column":5},"path":["lib","sourceByRegex"],"pos_type":"Lambda"}},"content":{"content":"\nFilter sources by a list of regular expressions.\n\n# Inputs\n\n`src`\n\n: 1\\. Function argument\n\n`regexes`\n\n: 2\\. Function argument\n\n# Examples\n:::{.example}\n## `sourceByRegex` usage example\n\n```nix\nsrc = sourceByRegex ./my-subproject [\".*\\\\.py$\" \"^database\\\\.sql$\"]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":216,"column":5},"path":["lib","sourceByRegex"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sourceFilesBySuffices","path":["lib","sourceFilesBySuffices"],"aliases":[["lib","sources","sourceFilesBySuffices"]],"signature":"sourceFilesBySuffices :: SourceLike -> [String] -> Source\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":464,"column":9},"attr_expr":"sourceFilesBySuffices","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":266,"column":5},"lambda_expr":"sourceFilesBySuffices =\n    # Path or source containing the files to be returned\n    src:\n    # A list of file suffix strings\n    exts:\n    let\n      filter =\n        name: type:\n        let\n          base = baseNameOf (toString name);\n        in\n        type == \"directory\" || lib.any (ext: lib.hasSuffix ext base) exts;\n    in\n    cleanSourceWith { inherit filter src; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":266,"column":5},"path":["lib","sourceFilesBySuffices"],"pos_type":"Lambda"}},"content":{"content":"\nGet all files ending with the specified suffices from the given\nsource directory or its descendants, omitting files that do not match\nany suffix. The result of the example below will include files like\n`./dir/module.c` and `./dir/subdir/doc.xml` if present.\n\n# Inputs\n\n`src`\n\n: Path or source containing the files to be returned\n\n`exts`\n\n: A list of file suffix strings\n\n# Type\n\n```\nsourceFilesBySuffices :: SourceLike -> [String] -> Source\n```\n\n# Examples\n:::{.example}\n## `sourceFilesBySuffices` usage example\n\n```nix\nsourceFilesBySuffices ./. [ \".xml\" \".c\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":266,"column":5},"path":["lib","sourceFilesBySuffices"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.split","path":["lib","split"],"aliases":[["builtins","split"],["lib","strings","split"]],"signature":null,"is_primop":true,"primop_meta":{"name":"split","args":["regex","str"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":379,"column":9},"attr_expr":"split","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","split"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a list composed of non matched strings interleaved with the\nlists of the [extended POSIX regular\nexpression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)\n*regex* matches of *str*. Each item in the lists of matched\nsequences is a regex group.\n\n```nix\nbuiltins.split \"(a)b\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" ] \"c\" ]`.\n\n```nix\nbuiltins.split \"([ac])\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" ] \"b\" [ \"c\" ] \"\" ]`.\n\n```nix\nbuiltins.split \"(a)|(c)\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" null ] \"b\" [ null \"c\" ] \"\" ]`.\n\n```nix\nbuiltins.split \"([[:upper:]]+)\" \" FOO \"\n```\n\nEvaluates to `[ \" \" [ \"FOO\" ] \" \" ]`.\n","source":{"position":null,"path":["lib","split"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.splitByAndCompare","path":["lib","splitByAndCompare"],"aliases":[["lib","trivial","splitByAndCompare"]],"signature":"splitByAndCompare :: (a -> Bool) -> (a -> a -> Int) -> (a -> a -> Int) -> (a -> a -> Int)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":166,"column":9},"attr_expr":"splitByAndCompare","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":739,"column":5},"lambda_expr":"splitByAndCompare =\n    p: yes: no: a: b:\n    if p a then\n      if p b then yes a b else -1\n    else if p b then\n      1\n    else\n      no a b;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":738,"column":3},"path":["lib","trivial","splitByAndCompare"],"pos_type":"Attribute"}},"content":{"content":"\nSplit type into two subtypes by predicate `p`, take all elements\nof the first subtype to be less than all the elements of the\nsecond subtype, compare elements of a single subtype with `yes`\nand `no` respectively.\n\n# Inputs\n\n`p`\n\n: Predicate\n\n`yes`\n\n: Comparison function if predicate holds for both values\n\n`no`\n\n: Comparison function if predicate holds for neither value\n\n`a`\n\n: First value to compare\n\n`b`\n\n: Second value to compare\n\n# Type\n\n```\nsplitByAndCompare :: (a -> Bool) -> (a -> a -> Int) -> (a -> a -> Int) -> (a -> a -> Int)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.splitByAndCompare` usage example\n\n```nix\nlet cmp = splitByAndCompare (hasPrefix \"foo\") compare compare; in\n\ncmp \"a\" \"z\" => -1\ncmp \"fooa\" \"fooz\" => -1\n\ncmp \"f\" \"a\" => 1\ncmp \"fooa\" \"a\" => -1\n# while\ncompare \"fooa\" \"a\" => 1\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":738,"column":3},"path":["lib","trivial","splitByAndCompare"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.splitString","path":["lib","splitString"],"aliases":[["lib","strings","splitString"]],"signature":"splitString :: String -> String -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":370,"column":9},"attr_expr":"splitString","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1724,"column":5},"lambda_expr":"splitString =\n    sep: s:\n    let\n      splits = builtins.filter builtins.isString (\n        builtins.split (escapeRegex (toString sep)) (toString s)\n      );\n    in\n    map (addContextFrom s) splits;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1723,"column":3},"path":["lib","strings","splitString"],"pos_type":"Attribute"}},"content":{"content":"\nCut a string with a separator and produces a list of strings which\nwere separated by this separator.\n\n# Inputs\n\n`sep`\n: 1\\. Function argument\n\n`s`\n: 2\\. Function argument\n\n# Type\n\n```\nsplitString :: String -> String -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.splitString` usage example\n\n```nix\nsplitString \".\" \"foo.bar.baz\"\n=> [ \"foo\" \"bar\" \"baz\" ]\nsplitString \"/\" \"/usr/local/bin\"\n=> [ \"\" \"usr\" \"local\" \"bin\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1723,"column":3},"path":["lib","strings","splitString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.splitStringBy","path":["lib","splitStringBy"],"aliases":[["lib","strings","splitStringBy"]],"signature":"splitStringBy :: (String -> String -> Bool) -> Bool -> String -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":371,"column":9},"attr_expr":"splitStringBy","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1794,"column":5},"lambda_expr":"splitStringBy =\n    predicate: keepSplit: str:\n    let\n      len = stringLength str;\n\n      # Helper function that processes the string character by character\n      go =\n        pos: currentPart: result:\n        # Base case: reached end of string\n        if pos == len then\n          result ++ [ currentPart ]\n        else\n          let\n            currChar = substring pos 1 str;\n            prevChar = if pos > 0 then substring (pos - 1) 1 str else \"\";\n            isSplit = predicate prevChar currChar;\n          in\n          if isSplit then\n            # Split here - add current part to results and start a new one\n            let\n              newResult = result ++ [ currentPart ];\n              newCurrentPart = if keepSplit then currChar else \"\";\n            in\n            go (pos + 1) newCurrentPart newResult\n          else\n            # Keep building current part\n            go (pos + 1) (currentPart + currChar) result;\n    in\n    if len == 0 then [ (addContextFrom str \"\") ] else map (addContextFrom str) (go 0 \"\" [ ]);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1793,"column":3},"path":["lib","strings","splitStringBy"],"pos_type":"Attribute"}},"content":{"content":"\nSplits a string into substrings based on a predicate that examines adjacent characters.\n\nThis function provides a flexible way to split strings by checking pairs of characters\nagainst a custom predicate function. Unlike simpler splitting functions, this allows\nfor context-aware splitting based on character transitions and patterns.\n\n# Inputs\n\n`predicate`\n: Function that takes two arguments (previous character and current character)\n  and returns true when the string should be split at the current position.\n  For the first character, previous will be \"\" (empty string).\n\n`keepSplit`\n: Boolean that determines whether the splitting character should be kept as\n  part of the result. If true, the character will be included at the beginning\n  of the next substring; if false, it will be discarded.\n\n`str`\n: The input string to split.\n\n# Return\n\nA list of substrings from the original string, split according to the predicate.\n\n# Type\n\n```\nsplitStringBy :: (String -> String -> Bool) -> Bool -> String -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.splitStringBy` usage example\n\nSplit on periods and hyphens, discarding the separators:\n```nix\nsplitStringBy (prev: curr: builtins.elem curr [ \".\" \"-\" ]) false \"foo.bar-baz\"\n=> [ \"foo\" \"bar\" \"baz\" ]\n```\n\nSplit on transitions from lowercase to uppercase, keeping the uppercase characters:\n```nix\nsplitStringBy (prev: curr: builtins.match \"[a-z]\" prev != null && builtins.match \"[A-Z]\" curr != null) true \"fooBarBaz\"\n=> [ \"foo\" \"Bar\" \"Baz\" ]\n```\n\nHandle leading separators correctly:\n```nix\nsplitStringBy (prev: curr: builtins.elem curr [ \".\" ]) false \".foo.bar.baz\"\n=> [ \"\" \"foo\" \"bar\" \"baz\" ]\n```\n\nHandle trailing separators correctly:\n```nix\nsplitStringBy (prev: curr: builtins.elem curr [ \".\" ]) false \"foo.bar.baz.\"\n=> [ \"foo\" \"bar\" \"baz\" \"\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1793,"column":3},"path":["lib","strings","splitStringBy"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.splitVersion","path":["lib","splitVersion"],"aliases":[["builtins","splitVersion"],["lib","versions","splitVersion"]],"signature":"splitVersion :: String -> [String]\n","is_primop":true,"primop_meta":{"name":"splitVersion","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":604,"column":9},"attr_expr":"splitVersion","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":28,"column":3},"path":["lib","versions","splitVersion"],"pos_type":"Attribute"}},"content":{"content":"\nBreak a version string into its component parts.\n\n# Type\n\n```\nsplitVersion :: String -> [String]\n```\n\n# Examples\n:::{.example}\n## `splitVersion` usage example\n\n```nix\nsplitVersion \"1.2.3\"\n=> [\"1\" \"2\" \"3\"]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":28,"column":3},"path":["lib","versions","splitVersion"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.stringAfter","path":["lib","stringAfter"],"aliases":[["lib","stringsWithDeps","stringAfter"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":405,"column":9},"attr_expr":"stringAfter","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":181,"column":17},"lambda_expr":"deps: text: { inherit text deps; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":181,"column":17},"path":["lib","stringAfter"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":181,"column":17},"path":["lib","stringAfter"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.stringAsChars","path":["lib","stringAsChars"],"aliases":[["lib","strings","stringAsChars"]],"signature":"stringAsChars :: (String -> String) -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":348,"column":9},"attr_expr":"stringAsChars","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":971,"column":5},"lambda_expr":"stringAsChars =\n    # Function to map over each individual character\n    f:\n    # Input string\n    s:\n    concatStrings (map f (stringToCharacters s));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":969,"column":3},"path":["lib","strings","stringAsChars"],"pos_type":"Attribute"}},"content":{"content":"\nManipulate a string character by character and replace them by\nstrings before concatenating the results.\n\n# Inputs\n\n`f`\n: Function to map over each individual character\n\n`s`\n: Input string\n\n# Type\n\n```\nstringAsChars :: (String -> String) -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.stringAsChars` usage example\n\n```nix\nstringAsChars (x: if x == \"a\" then \"i\" else x) \"nax\"\n=> \"nix\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":969,"column":3},"path":["lib","strings","stringAsChars"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.stringLength","path":["lib","stringLength"],"aliases":[["builtins","stringLength"],["lib","strings","stringLength"]],"signature":null,"is_primop":true,"primop_meta":{"name":"stringLength","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":326,"column":9},"attr_expr":"stringLength","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","stringLength"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the number of bytes of the string *e*. If *e* is not a string,\nevaluation is aborted.\n","source":{"position":null,"path":["lib","stringLength"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.stringToCharacters","path":["lib","stringToCharacters"],"aliases":[["lib","strings","stringToCharacters"]],"signature":"stringToCharacters :: String -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":347,"column":9},"attr_expr":"stringToCharacters","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":938,"column":24},"lambda_expr":"stringToCharacters = s: genList (p: substring p 1 s) (stringLength s);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":938,"column":3},"path":["lib","strings","stringToCharacters"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a string `s` to a list of characters (i.e. singleton strings).\nThis allows you to, e.g., map a function over each character.  However,\nnote that this will likely be horribly inefficient; Nix is not a\ngeneral purpose programming language. Complex string manipulations\nshould, if appropriate, be done in a derivation.\nAlso note that Nix treats strings as a list of bytes and thus doesn't\nhandle unicode.\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nstringToCharacters :: String -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.stringToCharacters` usage example\n\n```nix\nstringToCharacters \"\"\n=> [ ]\nstringToCharacters \"abc\"\n=> [ \"a\" \"b\" \"c\" ]\nstringToCharacters \"🦄\"\n=> [ \"�\" \"�\" \"�\" \"�\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":938,"column":3},"path":["lib","strings","stringToCharacters"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.sub","path":["lib","sub"],"aliases":[["builtins","sub"],["lib","trivial","sub"]],"signature":null,"is_primop":true,"primop_meta":{"name":"sub","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":171,"column":9},"attr_expr":"sub","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","sub"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the difference between the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","sub"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sublist","path":["lib","sublist"],"aliases":[["lib","lists","sublist"]],"signature":"sublist :: Int -> Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":299,"column":9},"attr_expr":"sublist","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1723,"column":5},"lambda_expr":"sublist =\n    start: count: list:\n    let\n      len = length list;\n    in\n    genList (n: elemAt list (n + start)) (\n      if start >= len then\n        0\n      else if start + count > len then\n        len - start\n      else\n        count\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1722,"column":3},"path":["lib","lists","sublist"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list consisting of at most `count` elements of `list`,\nstarting at index `start`.\n\n# Inputs\n\n`start`\n\n: Index at which to start the sublist\n\n`count`\n\n: Number of elements to take\n\n`list`\n\n: Input list\n\n# Type\n\n```\nsublist :: Int -> Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.sublist` usage example\n\n```nix\nsublist 1 3 [ \"a\" \"b\" \"c\" \"d\" \"e\" ]\n=> [ \"b\" \"c\" \"d\" ]\nsublist 1 3 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1722,"column":3},"path":["lib","lists","sublist"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.substring","path":["lib","substring"],"aliases":[["builtins","substring"],["lib","strings","substring"]],"signature":null,"is_primop":true,"primop_meta":{"name":"substring","args":["start","len","s"],"experimental":false,"arity":3},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":327,"column":9},"attr_expr":"substring","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","substring"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the substring of *s* from byte position *start*\n(zero-based) up to but not including *start + len*. If *start* is\ngreater than the length of the string, an empty string is returned.\nIf *start + len* lies beyond the end of the string or *len* is `-1`,\nonly the substring up to the end of the string is returned.\n*start* must be non-negative.\nFor example,\n\n```nix\nbuiltins.substring 0 3 \"nixos\"\n```\n\nevaluates to `\"nix\"`.\n","source":{"position":null,"path":["lib","substring"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.subtractLists","path":["lib","subtractLists"],"aliases":[["lib","lists","subtractLists"]],"signature":"subtractLists :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":307,"column":9},"attr_expr":"subtractLists","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2036,"column":19},"lambda_expr":"subtractLists = e: filter (x: !(elem x e));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2036,"column":3},"path":["lib","lists","subtractLists"],"pos_type":"Attribute"}},"content":{"content":"\nSubtracts list `e` from another list (`list2`).\n\nO(nm) complexity.\n\n# Inputs\n\n`e`\n\n: First list\n\n`list2`\n\n: Second list\n\n# Type\n\n```\nsubtractLists :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.subtractLists` usage example\n\n```nix\nsubtractLists [ 3 2 ] [ 1 2 3 4 5 3 ]\n=> [ 1 4 5 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2036,"column":3},"path":["lib","lists","subtractLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.tail","path":["lib","tail"],"aliases":[["builtins","tail"],["lib","lists","tail"],["lib","strings","tail"]],"signature":null,"is_primop":true,"primop_meta":{"name":"tail","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":315,"column":9},"attr_expr":"tail","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","tail"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the list without its first item; abort evaluation if\nthe argument isn’t a list or is an empty list.\n\n> **Warning**\n>\n> This function should generally be avoided since it's inefficient:\n> unlike Haskell's `tail`, it takes O(n) time, so recursing over a\n> list by repeatedly calling `tail` takes O(n^2) time.\n","source":{"position":null,"path":["lib","tail"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.take","path":["lib","take"],"aliases":[["lib","lists","take"]],"signature":"take :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":295,"column":9},"attr_expr":"take","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1507,"column":10},"lambda_expr":"take = count: sublist 0 count;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1507,"column":3},"path":["lib","lists","take"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the first (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Number of elements to take\n\n`list`\n\n: Input list\n\n# Type\n\n```\ntake :: Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.take` usage example\n\n```nix\ntake 2 [ \"a\" \"b\" \"c\" \"d\" ]\n=> [ \"a\" \"b\" ]\ntake 2 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1507,"column":3},"path":["lib","lists","take"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.takeEnd","path":["lib","takeEnd"],"aliases":[["lib","lists","takeEnd"]],"signature":"takeEnd :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":296,"column":9},"attr_expr":"takeEnd","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1541,"column":13},"lambda_expr":"takeEnd = n: xs: drop (max 0 (length xs - n)) xs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1541,"column":3},"path":["lib","lists","takeEnd"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the last (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Maximum number of elements to pick\n\n`list`\n\n: Input list\n\n# Type\n\n```\ntakeEnd :: Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.takeEnd` usage example\n\n```nix\ntakeEnd 2 [ \"a\" \"b\" \"c\" \"d\" ]\n=> [ \"c\" \"d\" ]\ntakeEnd 2 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1541,"column":3},"path":["lib","lists","takeEnd"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.testAllTrue","path":["lib","testAllTrue"],"aliases":[["lib","debug","testAllTrue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":565,"column":9},"attr_expr":"testAllTrue","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":682,"column":17},"lambda_expr":"testAllTrue = expr: {\n    inherit expr;\n    expected = map (x: true) expr;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":682,"column":3},"path":["lib","debug","testAllTrue"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a test assuming that list elements are `true`.\n\n# Inputs\n\n`expr`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `lib.debug.testAllTrue` usage example\n\n```nix\n{ testX = allTrue [ true ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":682,"column":3},"path":["lib","debug","testAllTrue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.textClosureList","path":["lib","textClosureList"],"aliases":[["lib","stringsWithDeps","textClosureList"]],"signature":"textClosureList :: { [String] :: { deps :: [String]; text :: String; } | String; } -> [String] -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":400,"column":9},"attr_expr":"textClosureList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":130,"column":5},"lambda_expr":"textClosureList =\n    predefined: arg:\n    let\n      f =\n        done: todo:\n        if todo == [ ] then\n          {\n            result = [ ];\n            inherit done;\n          }\n        else\n          let\n            entry = head todo;\n          in\n          if isAttrs entry then\n            let\n              x = f done entry.deps;\n              y = f x.done (tail todo);\n            in\n            {\n              result = x.result ++ [ entry.text ] ++ y.result;\n              done = y.done;\n            }\n          else if done ? ${entry} then\n            f done (tail todo)\n          else\n            f (\n              done\n              // listToAttrs [\n                {\n                  name = entry;\n                  value = 1;\n                }\n              ]\n            ) ([ predefined.${entry} ] ++ tail todo);\n    in\n    (f { } arg).result;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":129,"column":3},"path":["lib","stringsWithDeps","textClosureList"],"pos_type":"Attribute"}},"content":{"content":"\nTopologically sort a collection of dependent strings.\nOnly the values to keys listed in `arg` and their dependencies will be included in the result.\n\n::: {.note}\nThis function doesn't formally fulfill the definition of topological sorting, but it's good enough for our purposes in Nixpkgs.\n:::\n\n# Inputs\n\n`predefined` (attribute set)\n\n: strings with annotated dependencies (strings or attribute set)\n  A value can be a simple string if it has no dependencies.\n  Otherwise, is can be an attribute set with the following attributes:\n  - `deps` (list of strings)\n  - `text` (Any\n\n`arg` (list of strings)\n\n: Keys for which the values in the dependency closure will be included in the result\n\n# Type\n\n```\ntextClosureList :: { [String] :: { deps :: [String]; text :: String; } | String; } -> [String] -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.stringsWithDeps.textClosureList` usage example\n\n```nix\ntextClosureList {\n  a = {\n    deps = [ \"b\" \"c\" \"e\" ];\n    text = \"a: depends on b, c and e\";\n  };\n  b = {\n    deps = [ ];\n    text = \"b: no dependencies\";\n  };\n  c = {\n    deps = [ \"b\" ];\n    text = \"c: depends on b\";\n  };\n  d = {\n    deps = [ \"c\" ];\n    text = \"d: not being depended on by anything in `arg`\";\n  };\n  e = {\n    deps = [ \"c\" ];\n    text = \"e: depends on c, depended on by a, not in `arg`\";\n  };\n} [\n  \"a\"\n  \"b\"\n  \"c\"\n]\n=> [\n  \"b: no dependencies\"\n  \"c: depends on b\"\n  \"e: depends on c, depended on by a, not in `arg`\"\n  \"a: depends on b, c and e\"\n]\n```\n:::\n\nCommon real world usages are:\n- Ordering the dependent phases of `system.activationScripts`\n- Ordering the dependent phases of `system.userActivationScripts`\n\nFor further examples see: [NixOS activation script](https://nixos.org/manual/nixos/stable/#sec-activation-script)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":129,"column":3},"path":["lib","stringsWithDeps","textClosureList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.textClosureMap","path":["lib","textClosureMap"],"aliases":[["lib","stringsWithDeps","textClosureMap"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":401,"column":9},"attr_expr":"textClosureMap","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":168,"column":5},"lambda_expr":"f: predefined: names:\n    concatMapStringsSep \"\\n\" f (textClosureList predefined names)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":168,"column":5},"path":["lib","textClosureMap"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":168,"column":5},"path":["lib","textClosureMap"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.throwIf","path":["lib","throwIf"],"aliases":[["lib","trivial","throwIf"]],"signature":"throwIf :: Bool -> String -> a -> (a | Never)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":155,"column":9},"attr_expr":"throwIf","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1003,"column":13},"lambda_expr":"throwIf = cond: msg: if cond then throw msg else x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1003,"column":3},"path":["lib","trivial","throwIf"],"pos_type":"Attribute"}},"content":{"content":"\nLike `throwIfNot`, but negated (throw if the first argument is `true`).\n\n# Inputs\n\n`cond`\n\n: 1\\. Function argument\n\n`msg`\n\n: 2\\. Function argument\n\n# Type\n\n```\nthrowIf :: Bool -> String -> a -> (a | Never)\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1003,"column":3},"path":["lib","trivial","throwIf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.throwIfNot","path":["lib","throwIfNot"],"aliases":[["lib","trivial","throwIfNot"]],"signature":"throwIfNot :: Bool -> String -> a -> (a | Never)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":156,"column":9},"attr_expr":"throwIfNot","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":982,"column":16},"lambda_expr":"throwIfNot = cond: msg: if cond then x: x else throw msg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":982,"column":3},"path":["lib","trivial","throwIfNot"],"pos_type":"Attribute"}},"content":{"content":"\nLike the `assert b; e` expression, but with a custom error message and\nwithout the semicolon.\n\nIf true, return the identity function, `r: r`.\n\nIf false, throw the error message.\n\nCalls can be juxtaposed using function application, as `(r: r) a = a`, so\n`(r: r) (r: r) a = a`, and so forth.\n\n# Inputs\n\n`cond`\n\n: 1\\. Function argument\n\n`msg`\n\n: 2\\. Function argument\n\n# Type\n\n```\nthrowIfNot :: Bool -> String -> a -> (a | Never)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.throwIfNot` usage example\n\n```nix\nthrowIfNot (lib.isList overlays) \"The overlays argument to nixpkgs must be a list.\"\nlib.foldr (x: throwIfNot (lib.isFunction x) \"All overlays passed to nixpkgs must be functions.\") (r: r) overlays\npkgs\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":982,"column":3},"path":["lib","trivial","throwIfNot"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toBaseDigits","path":["lib","toBaseDigits"],"aliases":[["lib","trivial","toBaseDigits"]],"signature":"toBaseDigits :: Int -> Int -> [Int]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":179,"column":9},"attr_expr":"toBaseDigits","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1322,"column":5},"lambda_expr":"toBaseDigits =\n    base: i:\n    let\n      go =\n        i:\n        if i < base then\n          [ i ]\n        else\n          let\n            r = i - ((i / base) * base);\n            q = (i - r) / base;\n          in\n          go q ++ [ r ];\n    in\n    assert (isInt base);\n    assert (isInt i);\n    assert (base >= 2);\n    assert (i >= 0);\n    go i;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1321,"column":3},"path":["lib","trivial","toBaseDigits"],"pos_type":"Attribute"}},"content":{"content":"\n`toBaseDigits base i` converts the positive integer `i` to a list of its\ndigits in the given base.\n\n# Inputs\n\n`base`\n\n: 1\\. Function argument\n\n`i`\n\n: 2\\. Function argument\n\n# Type\n\n```\ntoBaseDigits :: Int -> Int -> [Int]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.toBaseDigits`\n\n```nix\ntoBaseDigits 10 123 => [ 1 2 3 ]\n\ntoBaseDigits 2 6 => [ 1 1 0 ]\n\ntoBaseDigits 16 250 => [ 15 10 ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1321,"column":3},"path":["lib","trivial","toBaseDigits"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toCamelCase","path":["lib","toCamelCase"],"aliases":[["lib","strings","toCamelCase"]],"signature":"toCamelCase :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":366,"column":9},"attr_expr":"toCamelCase","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1616,"column":5},"lambda_expr":"toCamelCase =\n    str:\n    lib.throwIfNot (isString str) \"toCamelCase does only accepts string values, but got ${typeOf str}\" (\n      let\n        separators = splitStringBy (\n          prev: curr:\n          elem curr [\n            \"-\"\n            \"_\"\n            \" \"\n          ]\n        ) false str;\n\n        parts = lib.flatten (\n          map (splitStringBy (\n            prev: curr: match \"[a-z]\" prev != null && match \"[A-Z]\" curr != null\n          ) true) separators\n        );\n\n        first = if length parts > 0 then toLower (head parts) else \"\";\n        rest = if length parts > 1 then map toSentenceCase (tail parts) else [ ];\n      in\n      concatStrings (map (addContextFrom str) ([ first ] ++ rest))\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1615,"column":3},"path":["lib","strings","toCamelCase"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a string to camelCase. Handles snake_case, PascalCase,\nkebab-case strings as well as strings delimited by spaces.\n\n# Inputs\n\n`string`\n: The string to convert to camelCase\n\n# Type\n\n```\ntoCamelCase :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toCamelCase` usage example\n\n```nix\ntoCamelCase \"hello-world\"\n=> \"helloWorld\"\ntoCamelCase \"hello_world\"\n=> \"helloWorld\"\ntoCamelCase \"hello world\"\n=> \"helloWorld\"\ntoCamelCase \"HelloWorld\"\n=> \"helloWorld\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1615,"column":3},"path":["lib","strings","toCamelCase"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toDerivation","path":["lib","toDerivation"],"aliases":[["lib","attrsets","toDerivation"]],"signature":"toDerivation :: Path -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":228,"column":9},"attr_expr":"toDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1430,"column":5},"lambda_expr":"toDerivation =\n    path:\n    let\n      path' = builtins.storePath path;\n      res = {\n        type = \"derivation\";\n        name = sanitizeDerivationName (builtins.substring 33 (-1) (baseNameOf path'));\n        outPath = path';\n        outputs = [ \"out\" ];\n        out = res;\n        outputName = \"out\";\n      };\n    in\n    res;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1429,"column":3},"path":["lib","attrsets","toDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a store path to a fake derivation.\n\n# Inputs\n\n`path`\n\n: A store path to convert to a derivation.\n\n# Type\n\n```\ntoDerivation :: Path -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1429,"column":3},"path":["lib","attrsets","toDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toExtension","path":["lib","toExtension"],"aliases":[["lib","fixedPoints","toExtension"]],"signature":"toExtension :: b' -> Any -> Any -> b'\nor\ntoExtension :: (a -> b') -> Any -> a -> b'\nor\ntoExtension :: (a -> a -> b) -> a -> a -> b\nwhere b' = ! Callable\n\nSet a = b = b' = AttrSet & ! Callable to make toExtension return an extending function.\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":198,"column":9},"attr_expr":"toExtension","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":513,"column":5},"lambda_expr":"toExtension =\n    f:\n    if lib.isFunction f then\n      final: prev:\n      let\n        fPrev = f prev;\n      in\n      if lib.isFunction fPrev then\n        # f is (final: prev: { ... })\n        f final prev\n      else\n        # f is (prev: { ... })\n        fPrev\n    else\n      # f is not a function; probably { ... }\n      final: prev: f;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":512,"column":3},"path":["lib","fixedPoints","toExtension"],"pos_type":"Attribute"}},"content":{"content":"\nConvert to an extending function (overlay).\n\n`toExtension` is the `toFunction` for extending functions (a.k.a. extensions or overlays).\nIt converts a non-function or a single-argument function to an extending function,\nwhile returning a two-argument function as-is.\n\nThat is, it takes a value of the shape `x`, `prev: x`, or `final: prev: x`,\nand returns `final: prev: x`, assuming `x` is not a function.\n\nThis function takes care of the input to `stdenv.mkDerivation`'s\n`overrideAttrs` function.\nIt bridges the gap between `<pkg>.overrideAttrs`\nbefore and after the overlay-style support.\n\n# Inputs\n\n`f`\n: The function or value to convert to an extending function.\n\n# Type\n\n```\ntoExtension :: b' -> Any -> Any -> b'\nor\ntoExtension :: (a -> b') -> Any -> a -> b'\nor\ntoExtension :: (a -> a -> b) -> a -> a -> b\nwhere b' = ! Callable\n\nSet a = b = b' = AttrSet & ! Callable to make toExtension return an extending function.\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.toExtension` usage example\n\n```nix\nfix (final: { a = 0; c = final.a; })\n=> { a = 0; c = 0; };\n\nfix (extends (toExtension { a = 1; b = 2; }) (final: { a = 0; c = final.a; }))\n=> { a = 1; b = 2; c = 1; };\n\nfix (extends (toExtension (prev: { a = 1; b = prev.a; })) (final: { a = 0; c = final.a; }))\n=> { a = 1; b = 0; c = 1; };\n\nfix (extends (toExtension (final: prev: { a = 1; b = prev.a; c = final.a + 1 })) (final: { a = 0; c = final.a; }))\n=> { a = 1; b = 0; c = 2; };\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":512,"column":3},"path":["lib","fixedPoints","toExtension"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toFile","path":["lib","toFile"],"aliases":[["builtins","toFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toFile","args":["name","s"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":120,"column":9},"attr_expr":"toFile","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","toFile"],"pos_type":"Lambda"}},"content":{"content":"\nStore the string *s* in a file in the Nix store and return its\npath.  The file has suffix *name*. This file can be used as an\ninput to derivations. One application is to write builders\n“inline”. For instance, the following Nix expression combines the\nNix expression for GNU Hello and its build script into one file:\n\n```nix\n{ stdenv, fetchurl, perl }:\n\nstdenv.mkDerivation {\n  name = \"hello-2.1.1\";\n\n  builder = builtins.toFile \"builder.sh\" \"\n    source $stdenv/setup\n\n    PATH=$perl/bin:$PATH\n\n    tar xvfz $src\n    cd hello-*\n    ./configure --prefix=$out\n    make\n    make install\n  \";\n\n  src = fetchurl {\n    url = \"http://ftp.nluug.nl/pub/gnu/hello/hello-2.1.1.tar.gz\";\n    sha256 = \"1md7jsfd8pa45z73bz1kszpp01yw6x5ljkjk2hx7wl800any6465\";\n  };\n  inherit perl;\n}\n```\n\nIt is even possible for one file to refer to another, e.g.,\n\n```nix\nbuilder = let\n  configFile = builtins.toFile \"foo.conf\" \"\n    # This is some dummy configuration file.\n    ...\n  \";\nin builtins.toFile \"builder.sh\" \"\n  source $stdenv/setup\n  ...\n  cp ${configFile} $out/etc/foo.conf\n\";\n```\n\nNote that `${configFile}` is a\n[string interpolation](@docroot@/language/types.md#type-string), so the result of the\nexpression `configFile`\n(i.e., a path like `/nix/store/m7p7jfny445k...-foo.conf`) will be\nspliced into the resulting string.\n\nIt is however *not* allowed to have files mutually referring to each\nother, like so:\n\n```nix\nlet\n  foo = builtins.toFile \"foo\" \"...${bar}...\";\n  bar = builtins.toFile \"bar\" \"...${foo}...\";\nin foo\n```\n\nThis is not allowed because it would cause a cyclic dependency in\nthe computation of the cryptographic hashes for `foo` and `bar`.\n\nIt is also not possible to reference the result of a derivation. If\nyou are using Nixpkgs, the `writeTextFile` function is able to do\nthat.\n","source":{"position":null,"path":["lib","toFile"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.toFunction","path":["lib","toFunction"],"aliases":[["lib","trivial","toFunction"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":175,"column":9},"attr_expr":"toFunction","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1211,"column":16},"lambda_expr":"toFunction = v: if isFunction v then v else k: v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1211,"column":3},"path":["lib","trivial","toFunction"],"pos_type":"Attribute"}},"content":{"content":"\nTurns any non-callable values into constant functions.\nReturns callable values as is.\n\n# Inputs\n\n`v`\n\n: Any value\n\n# Examples\n:::{.example}\n## `lib.trivial.toFunction` usage example\n\n```nix\nnix-repl> lib.toFunction 1 2\n1\n\nnix-repl> lib.toFunction (x: x + 1) 2\n3\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1211,"column":3},"path":["lib","trivial","toFunction"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toHexString","path":["lib","toHexString"],"aliases":[["lib","trivial","toHexString"]],"signature":"toHexString :: Int -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":178,"column":9},"attr_expr":"toHexString","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1286,"column":5},"lambda_expr":"i: lib.concatMapStrings toHexDigit (toBaseDigits 16 i)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1274,"column":3},"path":["lib","trivial","toHexString"],"pos_type":"Attribute"}},"content":{"content":"\nConvert the given positive integer to a string of its hexadecimal\nrepresentation.\n\n# Type\n\n```\ntoHexString :: Int -> String\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.toHexString` usage example\n\n```nix\ntoHexString 0 => \"0\"\n\ntoHexString 16 => \"10\"\n\ntoHexString 250 => \"FA\"\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1274,"column":3},"path":["lib","trivial","toHexString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toInt","path":["lib","toInt"],"aliases":[["lib","strings","toInt"]],"signature":"toInt :: String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":393,"column":9},"attr_expr":"toInt","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2740,"column":5},"lambda_expr":"str:\n    let\n      # RegEx: Match any leading whitespace, possibly a '-', one or more digits,\n      # and finally match any trailing whitespace.\n      strippedInput = matchStripInput str;\n\n      # RegEx: Match a leading '0' then one or more digits.\n      isLeadingZero = matchLeadingZero (head strippedInput) == [ ];\n\n      # Attempt to parse input\n      parsedInput = fromJSON (head strippedInput);\n\n      generalError = \"toInt: Could not convert ${escapeNixString str} to int.\";\n\n    in\n    # Error on presence of non digit characters.\n    if strippedInput == null then\n      throw generalError\n    # Error on presence of leading zero/octal ambiguity.\n    else if isLeadingZero then\n      throw \"toInt: Ambiguity in interpretation of ${escapeNixString str} between octal and zero padded integer.\"\n    # Error if parse function fails.\n    else if !isInt parsedInput then\n      throw generalError\n    # Return result.\n    else\n      parsedInput","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2735,"column":3},"path":["lib","strings","toInt"],"pos_type":"Attribute"}},"content":{"content":"\nParse a string as an int. Does not support parsing of integers with preceding zero due to\nambiguity between zero-padded and octal numbers. See `toIntBase10`.\n\n# Inputs\n\n`str`\n: A string to be interpreted as an int.\n\n# Type\n\n```\ntoInt :: String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toInt` usage example\n\n```nix\ntoInt \"1337\"\n=> 1337\n\ntoInt \"-4\"\n=> -4\n\ntoInt \" 123 \"\n=> 123\n\ntoInt \"00024\"\n=> error: Ambiguity in interpretation of 00024 between octal and zero padded integer.\n\ntoInt \"3.14\"\n=> error: floating point JSON numbers are not supported\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2735,"column":3},"path":["lib","strings","toInt"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toIntBase10","path":["lib","toIntBase10"],"aliases":[["lib","strings","toIntBase10"]],"signature":"toIntBase10 :: String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":394,"column":9},"attr_expr":"toIntBase10","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2810,"column":5},"lambda_expr":"str:\n    let\n      # RegEx: Match any leading whitespace, then match any zero padding,\n      # capture possibly a '-' followed by one or more digits,\n      # and finally match any trailing whitespace.\n      strippedInput = matchStripInput str;\n\n      # RegEx: Match at least one '0'.\n      isZero = matchZero (head strippedInput) == [ ];\n\n      # Attempt to parse input\n      parsedInput = fromJSON (head strippedInput);\n\n      generalError = \"toIntBase10: Could not convert ${escapeNixString str} to int.\";\n\n    in\n    # Error on presence of non digit characters.\n    if strippedInput == null then\n      throw generalError\n    # In the special case zero-padded zero (00000), return early.\n    else if isZero then\n      0\n    # Error if parse function fails.\n    else if !isInt parsedInput then\n      throw generalError\n    # Return result.\n    else\n      parsedInput","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2805,"column":3},"path":["lib","strings","toIntBase10"],"pos_type":"Attribute"}},"content":{"content":"\nParse a string as a base 10 int. This supports parsing of zero-padded integers.\n\n# Inputs\n\n`str`\n: A string to be interpreted as an int.\n\n# Type\n\n```\ntoIntBase10 :: String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toIntBase10` usage example\n\n```nix\ntoIntBase10 \"1337\"\n=> 1337\n\ntoIntBase10 \"-4\"\n=> -4\n\ntoIntBase10 \" 123 \"\n=> 123\n\ntoIntBase10 \"00024\"\n=> 24\n\ntoIntBase10 \"3.14\"\n=> error: floating point JSON numbers are not supported\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2805,"column":3},"path":["lib","strings","toIntBase10"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toJSON","path":["lib","toJSON"],"aliases":[["builtins","toJSON"],["lib","strings","toJSON"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toJSON","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":121,"column":9},"attr_expr":"toJSON","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","toJSON"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a string containing a JSON representation of *e*. Strings,\nintegers, floats, booleans, nulls and lists are mapped to their JSON\nequivalents. Sets (except derivations) are represented as objects.\nDerivations are translated to a JSON string containing the\nderivation’s output path. Paths are copied to the store and\nrepresented as a JSON string of the resulting store path.\n","source":{"position":null,"path":["lib","toJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.toList","path":["lib","toList"],"aliases":[["lib","lists","toList"]],"signature":"toList :: (a | [a]) -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":282,"column":9},"attr_expr":"toList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":851,"column":12},"lambda_expr":"toList = x: if isList x then x else [ x ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":851,"column":3},"path":["lib","lists","toList"],"pos_type":"Attribute"}},"content":{"content":"\nIf argument is a list, return it; else, wrap it in a singleton\nlist. If you're using this, you should almost certainly\nreconsider if there isn't a more \"well-typed\" approach.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\ntoList :: (a | [a]) -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.toList` usage example\n\n```nix\ntoList [ 1 2 ]\n=> [ 1 2 ]\ntoList \"hi\"\n=> [ \"hi\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":851,"column":3},"path":["lib","lists","toList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toLower","path":["lib","toLower"],"aliases":[["lib","strings","toLower"]],"signature":"toLower :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":364,"column":9},"attr_expr":"toLower","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1517,"column":3},"path":["lib","strings","toLower"],"pos_type":"Attribute"}},"content":{"content":"\nConverts an ASCII string `s` to lower-case.\n\n# Inputs\n\n`s`\n: The string to convert to lower-case.\n\n# Type\n\n```\ntoLower :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toLower` usage example\n\n```nix\ntoLower \"HOME\"\n=> \"home\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1517,"column":3},"path":["lib","strings","toLower"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toSentenceCase","path":["lib","toSentenceCase"],"aliases":[["lib","strings","toSentenceCase"]],"signature":"toSentenceCase :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":367,"column":9},"attr_expr":"toSentenceCase","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1572,"column":5},"lambda_expr":"toSentenceCase =\n    str:\n    lib.throwIfNot (isString str)\n      \"toSentenceCase does only accepts string values, but got ${typeOf str}\"\n      (\n        let\n          firstChar = substring 0 1 str;\n          rest = substring 1 (stringLength str) str;\n        in\n        addContextFrom str (toUpper firstChar + toLower rest)\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1571,"column":3},"path":["lib","strings","toSentenceCase"],"pos_type":"Attribute"}},"content":{"content":"\nConverts the first character of a string `s` to upper-case.\n\n# Inputs\n\n`str`\n: The string to convert to sentence case.\n\n# Type\n\n```\ntoSentenceCase :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toSentenceCase` usage example\n\n```nix\ntoSentenceCase \"home\"\n=> \"Home\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1571,"column":3},"path":["lib","strings","toSentenceCase"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toShellVar","path":["lib","toShellVar"],"aliases":[["lib","strings","toShellVar"]],"signature":"toShellVar :: String -> (String | [String] | { [String] :: String }) -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":355,"column":9},"attr_expr":"toShellVar","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1306,"column":5},"lambda_expr":"toShellVar =\n    name: value:\n    lib.throwIfNot (isValidPosixName name) \"toShellVar: ${name} is not a valid shell variable name\" (\n      if isAttrs value && !isStringLike value then\n        \"declare -A ${name}=(${\n          concatStringsSep \" \" (lib.mapAttrsToList (n: v: \"[${escapeShellArg n}]=${escapeShellArg v}\") value)\n        })\"\n      else if isList value then\n        \"declare -a ${name}=(${escapeShellArgs value})\"\n      else\n        \"${name}=${escapeShellArg value}\"\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1305,"column":3},"path":["lib","strings","toShellVar"],"pos_type":"Attribute"}},"content":{"content":"\nTranslate a Nix value into a shell variable declaration, with proper escaping.\n\nThe value can be a string (mapped to a regular variable), a list of strings\n(mapped to a Bash-style array) or an attribute set of strings (mapped to a\nBash-style associative array). Note that \"string\" includes string-coercible\nvalues like paths or derivations.\n\nStrings are translated into POSIX sh-compatible code; lists and attribute sets\nassume a shell that understands Bash syntax (e.g. Bash or ZSH).\n\n# Inputs\n\n`name`\n: 1\\. Function argument\n\n`value`\n: 2\\. Function argument\n\n# Type\n\n```\ntoShellVar :: String -> (String | [String] | { [String] :: String }) -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toShellVar` usage example\n\n```nix\n''\n  ${toShellVar \"foo\" \"some string\"}\n  [[ \"$foo\" == \"some string\" ]]\n''\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1305,"column":3},"path":["lib","strings","toShellVar"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toShellVars","path":["lib","toShellVars"],"aliases":[["lib","strings","toShellVars"]],"signature":"toShellVars :: {\n  [String] :: String | [String] | { [String] :: String };\n} -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":356,"column":9},"attr_expr":"toShellVars","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1351,"column":17},"lambda_expr":"toShellVars = vars: concatStringsSep \"\\n\" (lib.mapAttrsToList toShellVar vars);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1351,"column":3},"path":["lib","strings","toShellVars"],"pos_type":"Attribute"}},"content":{"content":"\nTranslate an attribute set `vars` into corresponding shell variable declarations\nusing `toShellVar`.\n\n# Inputs\n\n`vars`\n: 1\\. Function argument\n\n# Type\n\n```\ntoShellVars :: {\n  [String] :: String | [String] | { [String] :: String };\n} -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toShellVars` usage example\n\n```nix\nlet\n  foo = \"value\";\n  bar = foo;\nin ''\n  ${toShellVars { inherit foo bar; }}\n  [[ \"$foo\" == \"$bar\" ]]\n''\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1351,"column":3},"path":["lib","strings","toShellVars"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toString","path":["lib","toString"],"aliases":[["builtins","toString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toString","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":122,"column":9},"attr_expr":"toString","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","toString"],"pos_type":"Lambda"}},"content":{"content":"\nConvert the expression *e* to a string. *e* can be:\n\n  - A string (in which case the string is returned unmodified).\n\n  - A path (e.g., `toString /foo/bar` yields `\"/foo/bar\"`.\n\n  - A set containing `{ __toString = self: ...; }` or `{ outPath = ...; }`.\n\n  - An integer.\n\n  - A list, in which case the string representations of its elements\n    are joined with spaces.\n\n  - A Boolean (`false` yields `\"\"`, `true` yields `\"1\"`).\n\n  - `null`, which yields the empty string.\n","source":{"position":null,"path":["lib","toString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.toUpper","path":["lib","toUpper"],"aliases":[["lib","strings","toUpper"]],"signature":"toUpper :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":365,"column":9},"attr_expr":"toUpper","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1544,"column":3},"path":["lib","strings","toUpper"],"pos_type":"Attribute"}},"content":{"content":"\nConverts an ASCII string `s` to upper-case.\n\n# Inputs\n\n`s`\n: The string to convert to upper-case.\n\n# Type\n\n```\ntoUpper :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toUpper` usage example\n\n```nix\ntoUpper \"home\"\n=> \"HOME\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1544,"column":3},"path":["lib","strings","toUpper"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.toXML","path":["lib","toXML"],"aliases":[["builtins","toXML"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toXML","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":123,"column":9},"attr_expr":"toXML","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","toXML"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a string containing an XML representation of *e*. The main\napplication for `toXML` is to communicate information with the\nbuilder in a more structured format than plain environment\nvariables.\n\nHere is an example where this is the case:\n\n```nix\n{ stdenv, fetchurl, libxslt, jira, uberwiki }:\n\nstdenv.mkDerivation (rec {\n  name = \"web-server\";\n\n  buildInputs = [ libxslt ];\n\n  builder = builtins.toFile \"builder.sh\" \"\n    source $stdenv/setup\n    mkdir $out\n    echo \"$servlets\" | xsltproc ${stylesheet} - > $out/server-conf.xml ①\n  \";\n\n  stylesheet = builtins.toFile \"stylesheet.xsl\" ②\n   \"<?xml version='1.0' encoding='UTF-8'?>\n    <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>\n      <xsl:template match='/'>\n        <Configure>\n          <xsl:for-each select='/expr/list/attrs'>\n            <Call name='addWebApplication'>\n              <Arg><xsl:value-of select=\\\"attr[@name = 'path']/string/@value\\\" /></Arg>\n              <Arg><xsl:value-of select=\\\"attr[@name = 'war']/path/@value\\\" /></Arg>\n            </Call>\n          </xsl:for-each>\n        </Configure>\n      </xsl:template>\n    </xsl:stylesheet>\n  \";\n\n  servlets = builtins.toXML [ ③\n    { path = \"/bugtracker\"; war = jira + \"/lib/atlassian-jira.war\"; }\n    { path = \"/wiki\"; war = uberwiki + \"/uberwiki.war\"; }\n  ];\n})\n```\n\nThe builder is supposed to generate the configuration file for a\n[Jetty servlet container](http://jetty.mortbay.org/). A servlet\ncontainer contains a number of servlets (`*.war` files) each\nexported under a specific URI prefix. So the servlet configuration\nis a list of sets containing the `path` and `war` of the servlet\n(①). This kind of information is difficult to communicate with the\nnormal method of passing information through an environment\nvariable, which just concatenates everything together into a\nstring (which might just work in this case, but wouldn’t work if\nfields are optional or contain lists themselves). Instead the Nix\nexpression is converted to an XML representation with `toXML`,\nwhich is unambiguous and can easily be processed with the\nappropriate tools. For instance, in the example an XSLT stylesheet\n(at point ②) is applied to it (at point ①) to generate the XML\nconfiguration file for the Jetty server. The XML representation\nproduced at point ③ by `toXML` is as follows:\n\n```xml\n<?xml version='1.0' encoding='utf-8'?>\n<expr>\n  <list>\n    <attrs>\n      <attr name=\"path\">\n        <string value=\"/bugtracker\" />\n      </attr>\n      <attr name=\"war\">\n        <path value=\"/nix/store/d1jh9pasa7k2...-jira/lib/atlassian-jira.war\" />\n      </attr>\n    </attrs>\n    <attrs>\n      <attr name=\"path\">\n        <string value=\"/wiki\" />\n      </attr>\n      <attr name=\"war\">\n        <path value=\"/nix/store/y6423b1yi4sx...-uberwiki/uberwiki.war\" />\n      </attr>\n    </attrs>\n  </list>\n</expr>\n```\n\nNote that we used the `toFile` built-in to write the builder and\nthe stylesheet “inline” in the Nix expression. The path of the\nstylesheet is spliced into the builder using the syntax `xsltproc\n${stylesheet}`.\n","source":{"position":null,"path":["lib","toXML"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.toposort","path":["lib","toposort"],"aliases":[["lib","lists","toposort"]],"signature":"toposort :: (a -> a -> Bool) -> [a] -> ({ result :: [a]; } | { cycle :: [a]; loops :: [a]; })\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":290,"column":9},"attr_expr":"toposort","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1247,"column":5},"lambda_expr":"toposort =\n    before: list:\n    let\n      dfsthis = listDfs true before list;\n      toporest = toposort before (dfsthis.visited ++ dfsthis.rest);\n    in\n    if length list < 2 then\n      # finish\n      { result = list; }\n    else if dfsthis ? cycle then\n      # there's a cycle, starting from the current vertex, return it\n      {\n        cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited);\n        inherit (dfsthis) loops;\n      }\n    else if toporest ? cycle then\n      # there's a cycle somewhere else in the graph, return it\n      toporest\n    # Slow, but short. Can be made a bit faster with an explicit stack.\n    else\n      # there are no cycles\n      { result = [ dfsthis.minimal ] ++ toporest.result; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1246,"column":3},"path":["lib","lists","toposort"],"pos_type":"Attribute"}},"content":{"content":"\nSort a list based on a partial ordering using DFS. This\nimplementation is O(N^2), if your ordering is linear, use `sort`\ninstead.\n\n`before a b == true` means that `b` should be after `a`\nin the result.\n\n# Inputs\n\n`before`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\ntoposort :: (a -> a -> Bool) -> [a] -> ({ result :: [a]; } | { cycle :: [a]; loops :: [a]; })\n```\n\n# Examples\n:::{.example}\n## `lib.lists.toposort` usage example\n\n```nix\ntoposort hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" ]\n  == { result = [ \"/\" \"/home\" \"/home/user\" \"other\" ]; }\n\ntoposort hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" \"/\" ]\n  == { cycle = [ \"/home/user\" \"/\" \"/\" ]; # path leading to a cycle\n       loops = [ \"/\" ]; }                # loops back to these elements\n\ntoposort hasPrefix [ \"other\" \"/home/user\" \"/home\" \"/\" ]\n  == { result = [ \"other\" \"/\" \"/home\" \"/home/user\" ]; }\n\ntoposort (a: b: a < b) [ 3 2 1 ] == { result = [ 1 2 3 ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1246,"column":3},"path":["lib","lists","toposort"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trace","path":["lib","trace"],"aliases":[["builtins","trace"],["lib","debug","trace"]],"signature":null,"is_primop":true,"primop_meta":{"name":"trace","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":551,"column":9},"attr_expr":"trace","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trace"],"pos_type":"Lambda"}},"content":{"content":"\nEvaluate *e1* and print its abstract syntax representation on\nstandard error. Then return *e2*. This function is useful for\ndebugging.\n\nIf the\n[`debugger-on-trace`](@docroot@/command-ref/conf-file.md#conf-debugger-on-trace)\noption is set to `true` and the `--debugger` flag is given, the\ninteractive debugger is started when `trace` is called (like\n[`break`](@docroot@/language/builtins.md#builtins-break)).\n","source":{"position":null,"path":["lib","trace"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.traceFnSeqN","path":["lib","traceFnSeqN"],"aliases":[["lib","debug","traceFnSeqN"]],"signature":"traceFnSeqN :: Int -> String -> (a -> b) -> a -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":561,"column":9},"attr_expr":"traceFnSeqN","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":426,"column":5},"lambda_expr":"traceFnSeqN =\n    depth: name: f: v:\n    let\n      res = f v;\n    in\n    lib.traceSeqN (depth + 1) {\n      fn = name;\n      from = v;\n      to = res;\n    } res;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":425,"column":3},"path":["lib","debug","traceFnSeqN"],"pos_type":"Attribute"}},"content":{"content":"\nTrace the input and output of a function `f` named `name`,\nboth down to `depth`.\n\nThis is useful for adding around a function call,\nto see the before/after of values as they are transformed.\n\n# Inputs\n\n`depth`\n\n: 1\\. Function argument\n\n`name`\n\n: 2\\. Function argument\n\n`f`\n\n: 3\\. Function argument\n\n`v`\n\n: 4\\. Function argument\n\n# Type\n\n```\ntraceFnSeqN :: Int -> String -> (a -> b) -> a -> b\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceFnSeqN` usage example\n\n```nix\ntraceFnSeqN 2 \"id\" (x: x) { a.b.c = 3; }\ntrace: { fn = \"id\"; from = { a.b = {…}; }; to = { a.b = {…}; }; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":425,"column":3},"path":["lib","debug","traceFnSeqN"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceIf","path":["lib","traceIf"],"aliases":[["lib","debug","traceIf"]],"signature":"traceIf :: Bool -> String -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":552,"column":9},"attr_expr":"traceIf","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":79,"column":5},"lambda_expr":"traceIf =\n    pred: msg: x:\n    if pred then trace msg x else x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":78,"column":3},"path":["lib","debug","traceIf"],"pos_type":"Attribute"}},"content":{"content":"\nConditionally trace the supplied message, based on a predicate.\n\n# Inputs\n\n`pred`\n\n: Predicate to check\n\n`msg`\n\n: Message that should be traced\n\n`x`\n\n: Value to return\n\n# Type\n\n```\ntraceIf :: Bool -> String -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceIf` usage example\n\n```nix\ntraceIf true \"hello\" 3\ntrace: hello\n=> 3\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":78,"column":3},"path":["lib","debug","traceIf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceSeq","path":["lib","traceSeq"],"aliases":[["lib","debug","traceSeq"]],"signature":"traceSeq :: a -> b -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":555,"column":9},"attr_expr":"traceSeq","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":179,"column":14},"lambda_expr":"traceSeq = x: y: trace (builtins.deepSeq x x) y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":179,"column":3},"path":["lib","debug","traceSeq"],"pos_type":"Attribute"}},"content":{"content":"\n`builtins.trace`, but the value is `builtins.deepSeq`ed first.\n\n# Inputs\n\n`x`\n\n: The value to trace\n\n`y`\n\n: The value to return\n\n# Type\n\n```\ntraceSeq :: a -> b -> b\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceSeq` usage example\n\n```nix\ntrace { a.b.c = 3; } null\ntrace: { a = <thunk>; }\n=> null\ntraceSeq { a.b.c = 3; } null\ntrace: { a = { b = { c = 3; }; }; }\n=> null\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":179,"column":3},"path":["lib","debug","traceSeq"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceSeqN","path":["lib","traceSeqN"],"aliases":[["lib","debug","traceSeqN"]],"signature":"traceSeqN :: Int -> a -> b -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":556,"column":9},"attr_expr":"traceSeqN","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":219,"column":5},"lambda_expr":"traceSeqN =\n    depth: x: y:\n    let\n      snip =\n        v:\n        if isList v then\n          noQuotes \"[…]\" v\n        else if isAttrs v then\n          noQuotes \"{…}\" v\n        else\n          v;\n      noQuotes = str: v: {\n        __pretty = const str;\n        val = v;\n      };\n      modify =\n        n: fn: v:\n        if (n == 0) then\n          fn v\n        else if isList v then\n          map (modify (n - 1) fn) v\n        else if isAttrs v then\n          mapAttrs (const (modify (n - 1) fn)) v\n        else\n          v;\n    in\n    trace (generators.toPretty { allowPrettyValues = true; } (modify depth snip x)) y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":218,"column":3},"path":["lib","debug","traceSeqN"],"pos_type":"Attribute"}},"content":{"content":"\nLike `traceSeq`, but only evaluate down to depth n.\nThis is very useful because lots of `traceSeq` usages\nlead to an infinite recursion.\n\n# Inputs\n\n`depth`\n\n: 1\\. Function argument\n\n`x`\n\n: 2\\. Function argument\n\n`y`\n\n: 3\\. Function argument\n\n# Type\n\n```\ntraceSeqN :: Int -> a -> b -> b\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceSeqN` usage example\n\n```nix\ntraceSeqN 2 { a.b.c = 3; } null\ntrace: { a = { b = {…}; }; }\n=> null\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":218,"column":3},"path":["lib","debug","traceSeqN"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceVal","path":["lib","traceVal"],"aliases":[["lib","debug","traceVal"]],"signature":"traceVal :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":553,"column":9},"attr_expr":"traceVal","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":19},"lambda_expr":"x: trace (f x) x","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":143,"column":3},"path":["lib","debug","traceVal"],"pos_type":"Attribute"}},"content":{"content":"\nTrace the supplied value and return it.\n\n# Inputs\n\n`x`\n\n: Value to trace and return\n\n# Type\n\n```\ntraceVal :: a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceVal` usage example\n\n```nix\ntraceVal 42\n# trace: 42\n=> 42\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":143,"column":3},"path":["lib","debug","traceVal"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceValFn","path":["lib","traceValFn"],"aliases":[["lib","debug","traceValFn"]],"signature":"traceValFn :: (a -> b) -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":554,"column":9},"attr_expr":"traceValFn","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":16},"lambda_expr":"traceValFn = f: x: trace (f x) x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":3},"path":["lib","debug","traceValFn"],"pos_type":"Attribute"}},"content":{"content":"\nTrace the supplied value after applying a function to it, and\nreturn the original value.\n\n# Inputs\n\n`f`\n\n: Function to apply\n\n`x`\n\n: Value to trace and return\n\n# Type\n\n```\ntraceValFn :: (a -> b) -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValFn` usage example\n\n```nix\ntraceValFn (v: \"mystring ${v}\") \"foo\"\ntrace: mystring foo\n=> \"foo\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":3},"path":["lib","debug","traceValFn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceValSeq","path":["lib","traceValSeq"],"aliases":[["lib","debug","traceValSeq"]],"signature":"traceValSeq :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":557,"column":9},"attr_expr":"traceValSeq","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":22},"lambda_expr":"v: traceValFn f (builtins.deepSeq v v)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":307,"column":3},"path":["lib","debug","traceValSeq"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeq`.\n\n# Inputs\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeq :: a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeq` usage example\n\n```nix\ntraceValSeq { a.b.c = 3; }\ntrace: { a = { b = { c = 3; }; }; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":307,"column":3},"path":["lib","debug","traceValSeq"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceValSeqFn","path":["lib","traceValSeqFn"],"aliases":[["lib","debug","traceValSeqFn"]],"signature":"traceValSeqFn :: (a -> b) -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":558,"column":9},"attr_expr":"traceValSeqFn","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":19},"lambda_expr":"traceValSeqFn = f: v: traceValFn f (builtins.deepSeq v v);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":3},"path":["lib","debug","traceValSeqFn"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeq` that applies a\nprovided function to the value to be traced after `deepSeq`ing\nit.\n\n# Inputs\n\n`f`\n\n: Function to apply\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeqFn :: (a -> b) -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeqFn` usage example\n\n```nix\ntraceValSeqFn (v: v // { d = \"foo\";}) { a.b.c = 3; }\ntrace: { a = { b = { c = 3; }; }; d = \"foo\"; }\n=> { a = { ... }; }\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":3},"path":["lib","debug","traceValSeqFn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceValSeqN","path":["lib","traceValSeqN"],"aliases":[["lib","debug","traceValSeqN"]],"signature":"traceValSeqN :: Int -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":559,"column":9},"attr_expr":"traceValSeqN","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":346,"column":8},"lambda_expr":"depth: v:\n    traceSeqN depth (f v) v","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":380,"column":3},"path":["lib","debug","traceValSeqN"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeqN`.\n\n# Inputs\n\n`depth`\n\n: 1\\. Function argument\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeqN :: Int -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeqN` usage example\n\n```nix\ntraceValSeqN 2 { a.b.c = 3; }\ntrace: { a = { b = {…}; }; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":380,"column":3},"path":["lib","debug","traceValSeqN"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.traceValSeqNFn","path":["lib","traceValSeqNFn"],"aliases":[["lib","debug","traceValSeqNFn"]],"signature":"traceValSeqNFn :: (a -> b) -> Int -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":560,"column":9},"attr_expr":"traceValSeqNFn","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":346,"column":5},"lambda_expr":"traceValSeqNFn =\n    f: depth: v:\n    traceSeqN depth (f v) v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":345,"column":3},"path":["lib","debug","traceValSeqNFn"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeqN` that applies a\nprovided function to the value to be traced.\n\n# Inputs\n\n`f`\n\n: Function to apply\n\n`depth`\n\n: 2\\. Function argument\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeqNFn :: (a -> b) -> Int -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeqNFn` usage example\n\n```nix\ntraceValSeqNFn (v: v // { d = \"foo\";}) 2 { a.b.c = 3; }\ntrace: { a = { b = {…}; }; d = \"foo\"; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":345,"column":3},"path":["lib","debug","traceValSeqNFn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trim","path":["lib","trim"],"aliases":[["lib","strings","trim"]],"signature":"trim :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":357,"column":9},"attr_expr":"trim","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":527,"column":5},"lambda_expr":"s:\n    let\n      # If the string was empty or entirely whitespace,\n      # then the regex may not match and `res` will be `null`.\n      res = match regex s;\n    in\n    optionalString (res != null) (head res)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":461,"column":3},"path":["lib","strings","trim"],"pos_type":"Attribute"}},"content":{"content":"\nRemove leading and trailing whitespace from a string `s`.\n\nWhitespace is defined as any of the following characters:\n  \" \", \"\\t\" \"\\r\" \"\\n\"\n\n# Inputs\n\n`s`\n: The string to trim\n\n# Type\n\n```\ntrim :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.trim` usage example\n\n```nix\ntrim \"   hello, world!   \"\n=> \"hello, world!\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":461,"column":3},"path":["lib","strings","trim"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trimWith","path":["lib","trimWith"],"aliases":[["lib","strings","trimWith"]],"signature":"trimWith :: { start :: Bool; end :: Bool; } -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":358,"column":9},"attr_expr":"trimWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":506,"column":5},"lambda_expr":"trimWith =\n    {\n      start ? false,\n      end ? false,\n    }:\n    let\n      # Define our own whitespace character class instead of using\n      # `[:space:]`, which is not well-defined.\n      chars = \" \\t\\r\\n\";\n\n      # To match up until trailing whitespace, we need to capture a\n      # group that ends with a non-whitespace character.\n      regex =\n        if start && end then\n          \"[${chars}]*(.*[^${chars}])[${chars}]*\"\n        else if start then\n          \"[${chars}]*(.*)\"\n        else if end then\n          \"(.*[^${chars}])[${chars}]*\"\n        else\n          \"(.*)\";\n    in\n    s:\n    let\n      # If the string was empty or entirely whitespace,\n      # then the regex may not match and `res` will be `null`.\n      res = match regex s;\n    in\n    optionalString (res != null) (head res);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":505,"column":3},"path":["lib","strings","trimWith"],"pos_type":"Attribute"}},"content":{"content":"\nRemove leading and/or trailing whitespace from a string `s`.\n\nTo remove both leading and trailing whitespace, you can also use [`trim`](#function-library-lib.strings.trim)\n\nWhitespace is defined as any of the following characters:\n  \" \", \"\\t\" \"\\r\" \"\\n\"\n\n# Inputs\n\n`config` (Attribute set)\n: `start`\n  : Whether to trim leading whitespace (`false` by default)\n\n: `end`\n  : Whether to trim trailing whitespace (`false` by default)\n\n`s`\n: The string to trim\n\n# Type\n\n```\ntrimWith :: { start :: Bool; end :: Bool; } -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.trimWith` usage example\n\n```nix\ntrimWith { start = true; } \"   hello, world!   \"}\n=> \"hello, world!   \"\n\ntrimWith { end = true; } \"   hello, world!   \"}\n=> \"   hello, world!\"\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":505,"column":3},"path":["lib","strings","trimWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.tryEval","path":["lib","tryEval"],"aliases":[["builtins","tryEval"]],"signature":null,"is_primop":true,"primop_meta":{"name":"tryEval","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":124,"column":9},"attr_expr":"tryEval","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","tryEval"],"pos_type":"Lambda"}},"content":{"content":"\nTry to shallowly evaluate *e*. Return a set containing the\nattributes `success` (`true` if *e* evaluated successfully,\n`false` if an error was thrown) and `value`, equalling *e* if\nsuccessful and `false` otherwise. `tryEval` only prevents\nerrors created by `throw` or `assert` from being thrown.\nErrors `tryEval` doesn't catch are, for example, those created\nby `abort` and type errors generated by builtins. Also note that\nthis doesn't evaluate *e* deeply, so `let e = { x = throw \"\"; };\nin (builtins.tryEval e).success` is `true`. Using\n`builtins.deepSeq` one can get the expected result:\n`let e = { x = throw \"\"; }; in\n(builtins.tryEval (builtins.deepSeq e e)).success` is\n`false`.\n\n`tryEval` intentionally does not return the error message, because that risks bringing non-determinism into the evaluation result, and it would become very difficult to improve error reporting without breaking existing expressions.\nInstead, use [`builtins.addErrorContext`](@docroot@/language/builtins.md#builtins-addErrorContext) to add context to the error message, and use a Nix unit testing tool for testing.\n","source":{"position":null,"path":["lib","tryEval"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.typeOf","path":["lib","typeOf"],"aliases":[["builtins","typeOf"],["lib","strings","typeOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"typeOf","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":368,"column":9},"attr_expr":"typeOf","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","typeOf"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a string representing the type of the value *e*, namely\n`\"int\"`, `\"bool\"`, `\"string\"`, `\"path\"`, `\"null\"`, `\"set\"`,\n`\"list\"`, `\"lambda\"` or `\"float\"`.\n","source":{"position":null,"path":["lib","typeOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.unifyModuleSyntax","path":["lib","unifyModuleSyntax"],"aliases":[["lib","modules","unifyModuleSyntax"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":477,"column":9},"attr_expr":"unifyModuleSyntax","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":635,"column":5},"lambda_expr":"unifyModuleSyntax =\n    file: key: m:\n    let\n      addMeta =\n        config:\n        if m ? meta then\n          mkMerge [\n            config\n            { meta = m.meta; }\n          ]\n        else\n          config;\n      addFreeformType =\n        config:\n        if m ? freeformType then\n          mkMerge [\n            config\n            { _module.freeformType = m.freeformType; }\n          ]\n        else\n          config;\n    in\n    if m ? config || m ? options then\n      let\n        badAttrs = removeAttrs m [\n          \"_class\"\n          \"_file\"\n          \"key\"\n          \"disabledModules\"\n          \"imports\"\n          \"options\"\n          \"config\"\n          \"meta\"\n          \"freeformType\"\n        ];\n      in\n      if badAttrs != { } then\n        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.\"\n      else\n        {\n          _file = toString m._file or file;\n          _class = m._class or null;\n          key = toString m.key or key;\n          disabledModules = m.disabledModules or [ ];\n          imports = m.imports or [ ];\n          options = m.options or { };\n          config = addFreeformType (addMeta (m.config or { }));\n        }\n    else\n      # shorthand syntax\n      throwIfNot (isAttrs m) \"module ${file} (${key}) does not look like a module.\" {\n        _file = toString m._file or file;\n        _class = m._class or null;\n        key = toString m.key or key;\n        disabledModules = m.disabledModules or [ ];\n        imports = m.require or [ ] ++ m.imports or [ ];\n        options = { };\n        config = addFreeformType (\n          removeAttrs m [\n            \"_class\"\n            \"_file\"\n            \"key\"\n            \"disabledModules\"\n            \"require\"\n            \"imports\"\n            \"freeformType\"\n          ]\n        );\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":635,"column":5},"path":["lib","unifyModuleSyntax"],"pos_type":"Lambda"}},"content":{"content":"\nMassage a module into canonical form, that is, a set consisting\nof ‘options’, ‘config’ and ‘imports’ attributes.\n\n# Inputs\n\n`file`\n\n: 1\\. Function argument\n\n`key`\n\n: 2\\. Function argument\n\n`m`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":635,"column":5},"path":["lib","unifyModuleSyntax"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.uniqList","path":["lib","uniqList"],"aliases":[["lib","misc","uniqList"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":578,"column":9},"attr_expr":"uniqList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":139,"column":5},"lambda_expr":"uniqList =\n    {\n      inputList,\n      acc ? [ ],\n    }:\n    let\n      go =\n        xs: acc:\n        if xs == [ ] then\n          [ ]\n        else\n          let\n            x = head xs;\n            y = if elem x acc then [ ] else [ x ];\n          in\n          y ++ go (tail xs) (y ++ acc);\n    in\n    go inputList acc;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":139,"column":5},"path":["lib","uniqList"],"pos_type":"Lambda"}},"content":{"content":"This function has O(n^2) performance.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":139,"column":5},"path":["lib","uniqList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.uniqListExt","path":["lib","uniqListExt"],"aliases":[["lib","misc","uniqListExt"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":579,"column":9},"attr_expr":"uniqListExt","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":158,"column":5},"lambda_expr":"{\n      inputList,\n      outputList ? [ ],\n      getter ? (x: x),\n      compare ? (x: y: x == y),\n    }:\n    if inputList == [ ] then\n      outputList\n    else\n      let\n        x = head inputList;\n        isX = y: (compare (getter y) (getter x));\n        newOutputList = outputList ++ (if any isX outputList then [ ] else [ x ]);\n      in\n      uniqListExt {\n        outputList = newOutputList;\n        inputList = (tail inputList);\n        inherit getter compare;\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":158,"column":5},"path":["lib","uniqListExt"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":158,"column":5},"path":["lib","uniqListExt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.unique","path":["lib","unique"],"aliases":[["lib","lists","unique"]],"signature":"unique :: [a] -> [a]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":303,"column":9},"attr_expr":"unique","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1901,"column":3},"path":["lib","lists","unique"],"pos_type":"Attribute"}},"content":{"content":"\nRemove duplicate elements from the `list`. O(n^2) complexity.\n\n:::{.note}\nIf the list only contains strings and order is not important, the complexity can be reduced to O(n log n) by using [`lib.lists.uniqueStrings`](#function-library-lib.lists.uniqueStrings) instead.\n:::\n\n# Inputs\n\n`list`\n\n: Input list\n\n# Type\n\n```\nunique :: [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.unique` usage example\n\n```nix\nunique [ 3 2 3 4 ]\n=> [ 3 2 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1901,"column":3},"path":["lib","lists","unique"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.uniqueStrings","path":["lib","uniqueStrings"],"aliases":[["lib","lists","uniqueStrings"]],"signature":"uniqueStrings :: [String] -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":304,"column":9},"attr_expr":"uniqueStrings","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1938,"column":19},"lambda_expr":"uniqueStrings = list: attrNames (groupBy id list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1938,"column":3},"path":["lib","lists","uniqueStrings"],"pos_type":"Attribute"}},"content":{"content":"\nRemoves duplicate strings from the `list`. O(n log n) complexity.\n\n:::{.note}\nOrder is not preserved.\n\nAll elements of the list must be strings without context.\n\nThis function fails when the list contains a non-string element or a [string with context](https://nix.dev/manual/nix/latest/language/string-context.html).\nIn that case use [`lib.lists.unique`](#function-library-lib.lists.unique) instead.\n:::\n\n# Inputs\n\n`list`\n\n: List of strings\n\n# Type\n\n```\nuniqueStrings :: [String] -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.uniqueStrings` usage example\n\n```nix\nuniqueStrings [ \"foo\" \"bar\" \"foo\" ]\n=> [ \"bar\" \"foo\" ] # order is not preserved\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1938,"column":3},"path":["lib","lists","uniqueStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.unsafeDiscardOutputDependency","path":["lib","unsafeDiscardOutputDependency"],"aliases":[["builtins","unsafeDiscardOutputDependency"],["lib","derivations","unsafeDiscardOutputDependency"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeDiscardOutputDependency","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":427,"column":9},"attr_expr":"unsafeDiscardOutputDependency","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","unsafeDiscardOutputDependency"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a copy of the given string where every\n[derivation deep](@docroot@/language/string-context.md#string-context-element-derivation-deep)\nstring context element is turned into a\n[constant](@docroot@/language/string-context.md#string-context-element-constant)\nstring context element.\n\nThis is the opposite of [`builtins.addDrvOutputDependencies`](#builtins-addDrvOutputDependencies).\n\nThis is unsafe because it allows us to \"forget\" store objects we would have otherwise referred to with the string context,\nwhereas Nix normally tracks all dependencies consistently.\nSafe operations \"grow\" but never \"shrink\" string contexts.\n[`builtins.addDrvOutputDependencies`] in contrast is safe because \"derivation deep\" string context element always refers to the underlying derivation (among many more things).\nReplacing a constant string context element with a \"derivation deep\" element is a safe operation that just enlargens the string context without forgetting anything.\n\n[`builtins.addDrvOutputDependencies`]: #builtins-addDrvOutputDependencies\n","source":{"position":null,"path":["lib","unsafeDiscardOutputDependency"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.unsafeDiscardStringContext","path":["lib","unsafeDiscardStringContext"],"aliases":[["builtins","unsafeDiscardStringContext"],["lib","strings","unsafeDiscardStringContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeDiscardStringContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":397,"column":9},"attr_expr":"unsafeDiscardStringContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","unsafeDiscardStringContext"],"pos_type":"Lambda"}},"content":{"content":"\nDiscard the [string context](@docroot@/language/string-context.md) from a value that can be coerced to a string.\n","source":{"position":null,"path":["lib","unsafeDiscardStringContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.unsafeGetAttrPos","path":["lib","unsafeGetAttrPos"],"aliases":[["builtins","unsafeGetAttrPos"],["lib","debug","unsafeGetAttrPos"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeGetAttrPos","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":563,"column":9},"attr_expr":"unsafeGetAttrPos","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","unsafeGetAttrPos"],"pos_type":"Lambda"}},"content":{"content":"\n`unsafeGetAttrPos` returns the position of the attribute named *s*\nfrom *set*. This is used by Nixpkgs to provide location information\nin error messages.\n","source":{"position":null,"path":["lib","unsafeGetAttrPos"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.updateManyAttrsByPath","path":["lib","updateManyAttrsByPath"],"aliases":[["lib","attrsets","updateManyAttrsByPath"]],"signature":"updateManyAttrsByPath :: [{ path :: [String]; update :: (Any -> Any); }] -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":252,"column":9},"attr_expr":"updateManyAttrsByPath","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":498,"column":5},"lambda_expr":"updates: value: go 0 true value updates","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":431,"column":3},"path":["lib","attrsets","updateManyAttrsByPath"],"pos_type":"Attribute"}},"content":{"content":"\nUpdate or set specific paths of an attribute set.\n\nTakes a list of updates to apply and an attribute set to apply them to,\nand returns the attribute set with the updates applied. Updates are\nrepresented as `{ path = ...; update = ...; }` values, where `path` is a\nlist of strings representing the attribute path that should be updated,\nand `update` is a function that takes the old value at that attribute path\nas an argument and returns the new\nvalue it should be.\n\nProperties:\n\n- Updates to deeper attribute paths are applied before updates to more\n  shallow attribute paths\n\n- Multiple updates to the same attribute path are applied in the order\n  they appear in the update list\n\n- If any but the last `path` element leads into a value that is not an\n  attribute set, an error is thrown\n\n- If there is an update for an attribute path that doesn't exist,\n  accessing the argument in the update function causes an error, but\n  intermediate attribute sets are implicitly created as needed\n\n# Type\n\n```\nupdateManyAttrsByPath :: [{ path :: [String]; update :: (Any -> Any); }] -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.updateManyAttrsByPath` usage example\n\n```nix\nupdateManyAttrsByPath [\n  {\n    path = [ \"a\" \"b\" ];\n    update = old: { d = old.c; };\n  }\n  {\n    path = [ \"a\" \"b\" \"c\" ];\n    update = old: old + 1;\n  }\n  {\n    path = [ \"x\" \"y\" ];\n    update = old: \"xy\";\n  }\n] { a.b.c = 0; }\n=> { a = { b = { d = 1; }; }; x = { y = \"xy\"; }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":431,"column":3},"path":["lib","attrsets","updateManyAttrsByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.updateName","path":["lib","updateName"],"aliases":[["lib","meta","updateName"]],"signature":"updateName :: (String -> String) -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":434,"column":9},"attr_expr":"updateName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":137,"column":16},"lambda_expr":"updateName = updater: drv: drv // { name = updater (drv.name); };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":137,"column":3},"path":["lib","meta","updateName"],"pos_type":"Attribute"}},"content":{"content":"\nLike `setName`, but takes the previous name as an argument.\n\n# Inputs\n\n`updater`\n\n: 1\\. Function argument\n\n`drv`\n\n: 2\\. Function argument\n\n# Type\n\n```\nupdateName :: (String -> String) -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.meta.updateName` usage example\n\n```nix\nupdateName (oldName: oldName + \"-experimental\") somePkg\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":137,"column":3},"path":["lib","meta","updateName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.versionAtLeast","path":["lib","versionAtLeast"],"aliases":[["lib","strings","versionAtLeast"]],"signature":"versionAtLeast :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":375,"column":9},"attr_expr":"versionAtLeast","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":20},"lambda_expr":"versionAtLeast = v1: v2: !versionOlder v1 v2;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":3},"path":["lib","strings","versionAtLeast"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if string `v1` denotes a version equal to or newer than `v2`.\n\n# Inputs\n\n`v1`\n: 1\\. Function argument\n\n`v2`\n: 2\\. Function argument\n\n# Type\n\n```\nversionAtLeast :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.versionAtLeast` usage example\n\n```nix\nversionAtLeast \"1.1\" \"1.0\"\n=> true\nversionAtLeast \"1.1\" \"1.1\"\n=> true\nversionAtLeast \"1.1\" \"1.2\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":3},"path":["lib","strings","versionAtLeast"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.versionOlder","path":["lib","versionOlder"],"aliases":[["lib","strings","versionOlder"]],"signature":"versionOlder :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":374,"column":9},"attr_expr":"versionOlder","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":18},"lambda_expr":"versionOlder = v1: v2: compareVersions v2 v1 == 1;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":3},"path":["lib","strings","versionOlder"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if string `v1` denotes a version older than `v2`.\n\n# Inputs\n\n`v1`\n: 1\\. Function argument\n\n`v2`\n: 2\\. Function argument\n\n# Type\n\n```\nversionOlder :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.versionOlder` usage example\n\n```nix\nversionOlder \"1.1\" \"1.2\"\n=> true\nversionOlder \"1.1\" \"1.1\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":3},"path":["lib","strings","versionOlder"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.warn","path":["lib","warn"],"aliases":[["builtins","warn"],["lib","trivial","warn"]],"signature":"warn :: String -> a -> a\n","is_primop":true,"primop_meta":{"name":"warn","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":152,"column":9},"attr_expr":"warn","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":867,"column":3},"path":["lib","trivial","warn"],"pos_type":"Attribute"}},"content":{"content":"\n`warn` *`message`* *`value`*\n\nPrint a warning before returning the second argument.\n\nSee [`builtins.warn`](https://nix.dev/manual/nix/latest/language/builtins.html#builtins-warn) (Nix >= 2.23).\nOn older versions, the Nix 2.23 behavior is emulated with [`builtins.trace`](https://nix.dev/manual/nix/latest/language/builtins.html#builtins-warn), including the [`NIX_ABORT_ON_WARN`](https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-abort-on-warn) behavior, but not the `nix.conf` setting or command line option.\n\n# Inputs\n\n*`message`* (String)\n\n: Warning message to print before evaluating *`value`*.\n\n*`value`* (any value)\n\n: Value to return as-is.\n\n# Type\n\n```\nwarn :: String -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":867,"column":3},"path":["lib","trivial","warn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.warnIf","path":["lib","warnIf"],"aliases":[["lib","trivial","warnIf"]],"signature":"warnIf :: Bool -> String -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":153,"column":9},"attr_expr":"warnIf","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":914,"column":12},"lambda_expr":"warnIf = cond: msg: if cond then warn msg else x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":914,"column":3},"path":["lib","trivial","warnIf"],"pos_type":"Attribute"}},"content":{"content":"\n`warnIf` *`condition`* *`message`* *`value`*\n\nLike `warn`, but only warn when the first argument is `true`.\n\n# Inputs\n\n*`condition`* (Boolean)\n\n: `true` to trigger the warning before continuing with *`value`*.\n\n*`message`* (String)\n\n: Warning message to print before evaluating\n\n*`value`* (any value)\n\n: Value to return as-is.\n\n# Type\n\n```\nwarnIf :: Bool -> String -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":914,"column":3},"path":["lib","trivial","warnIf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.warnIfNot","path":["lib","warnIfNot"],"aliases":[["lib","trivial","warnIfNot"]],"signature":"warnIfNot :: Bool -> String -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":154,"column":9},"attr_expr":"warnIfNot","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":941,"column":15},"lambda_expr":"warnIfNot = cond: msg: if cond then x: x else warn msg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":941,"column":3},"path":["lib","trivial","warnIfNot"],"pos_type":"Attribute"}},"content":{"content":"\n`warnIfNot` *`condition`* *`message`* *`value`*\n\nLike `warnIf`, but negated: warn if the first argument is `false`.\n\n# Inputs\n\n*`condition`*\n\n: `false` to trigger the warning before continuing with `val`.\n\n*`message`*\n\n: Warning message to print before evaluating *`value`*.\n\n*`value`*\n\n: Value to return as-is.\n\n# Type\n\n```\nwarnIfNot :: Bool -> String -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":941,"column":3},"path":["lib","trivial","warnIfNot"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.warnOnInstantiate","path":["lib","warnOnInstantiate"],"aliases":[["lib","derivations","warnOnInstantiate"]],"signature":"warnOnInstantiate :: String -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":425,"column":9},"attr_expr":"warnOnInstantiate","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":255,"column":5},"lambda_expr":"warnOnInstantiate =\n    msg: drv:\n    let\n      drvToWrap = removeAttrs drv [\n        \"meta\"\n        \"name\"\n        \"type\"\n        \"outputName\"\n      ];\n    in\n    drv\n    // mapAttrs (_: lib.warn msg) drvToWrap\n    // (\n      if drv ? overrideAttrs && builtins.isFunction drv.overrideAttrs then\n        { overrideAttrs = x: lib.derivations.warnOnInstantiate msg (drv.overrideAttrs x); }\n      else\n        { }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":254,"column":3},"path":["lib","derivations","warnOnInstantiate"],"pos_type":"Attribute"}},"content":{"content":"\nWrap a derivation such that instantiating it produces a warning.\n\nAll attributes will be wrapped with `lib.warn` except from `.meta`, `.name`,\nand `.type` which are used by `nix search`, and `.outputName` which avoids\ndouble warnings with `nix-instantiate` and `nix-build`.\n\n# Inputs\n\n`msg`\n: The warning message to emit (via `lib.warn`).\n\n`drv`\n: The derivation to wrap.\n\n# Type\n\n```\nwarnOnInstantiate :: String -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.derivations.warnOnInstantiate` usage example\n\n```nix\n{\n  myPackage = warnOnInstantiate \"myPackage has been renamed to my-package\" my-package;\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":254,"column":3},"path":["lib","derivations","warnOnInstantiate"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.withFeature","path":["lib","withFeature"],"aliases":[["lib","strings","withFeature"]],"signature":"withFeature :: Bool -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":389,"column":9},"attr_expr":"withFeature","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2445,"column":5},"lambda_expr":"withFeature =\n    flag: feature:\n    assert isString feature; # e.g. passing openssl instead of \"openssl\"\n    \"--${if flag then \"with\" else \"without\"}-${feature}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2444,"column":3},"path":["lib","strings","withFeature"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{with,without}-<feature>\"` string that can be passed to\nstandard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n# Type\n\n```\nwithFeature :: Bool -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.withFeature` usage example\n\n```nix\nwithFeature true \"shared\"\n=> \"--with-shared\"\nwithFeature false \"shared\"\n=> \"--without-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2444,"column":3},"path":["lib","strings","withFeature"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.withFeatureAs","path":["lib","withFeatureAs"],"aliases":[["lib","strings","withFeatureAs"]],"signature":"withFeatureAs :: Bool -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":390,"column":9},"attr_expr":"withFeatureAs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2484,"column":5},"lambda_expr":"withFeatureAs =\n    flag: feature: value:\n    withFeature flag feature + optionalString flag \"=${value}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2483,"column":3},"path":["lib","strings","withFeatureAs"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{with-<feature>=<value>,without-<feature>}\"` string that can be passed to\nstandard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n`value`\n: 3\\. Function argument\n\n# Type\n\n```\nwithFeatureAs :: Bool -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.withFeatureAs` usage example\n\n```nix\nwithFeatureAs true \"shared\" \"foo\"\n=> \"--with-shared=foo\"\nwithFeatureAs false \"shared\" (throw \"ignored\")\n=> \"--without-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2483,"column":3},"path":["lib","strings","withFeatureAs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.xor","path":["lib","xor"],"aliases":[["lib","trivial","xor"]],"signature":"xor :: bool -> bool -> bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":135,"column":9},"attr_expr":"xor","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":256,"column":9},"lambda_expr":"xor = x: y: (!x) != (!y);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":256,"column":3},"path":["lib","trivial","xor"],"pos_type":"Attribute"}},"content":{"content":"\nboolean “exclusive or”\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nxor :: bool -> bool -> bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":256,"column":3},"path":["lib","trivial","xor"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.zipAttrs","path":["lib","zipAttrs"],"aliases":[["lib","attrsets","zipAttrs"]],"signature":"zipAttrs :: [{ [String] :: a }] -> { [String] :: [a] }\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":232,"column":9},"attr_expr":"zipAttrs","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1574,"column":3},"path":["lib","attrsets","zipAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge sets of attributes and combine each attribute value in to a list.\n\nLike `lib.attrsets.zipAttrsWith` with `(name: values: values)` as the function.\n\n# Type\n\n```\nzipAttrs :: [{ [String] :: a }] -> { [String] :: [a] }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.zipAttrs` usage example\n\n```nix\nzipAttrs [{a = \"x\";} {a = \"y\"; b = \"z\";}]\n=> { a = [\"x\" \"y\"]; b = [\"z\"]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1574,"column":3},"path":["lib","attrsets","zipAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.zipAttrsWith","path":["lib","zipAttrsWith"],"aliases":[["builtins","zipAttrsWith"],["lib","attrsets","zipAttrsWith"]],"signature":"zipAttrsWith :: (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n","is_primop":true,"primop_meta":{"name":"zipAttrsWith","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":231,"column":9},"attr_expr":"zipAttrsWith","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1549,"column":3},"path":["lib","attrsets","zipAttrsWith"],"pos_type":"Attribute"}},"content":{"content":"\nMerge sets of attributes and use the function `f` to merge attribute values.\nLike `lib.attrsets.zipAttrsWithNames` with all key names are passed for `names`.\n\nImplementation note: Common names appear multiple times in the list of\nnames, hopefully this does not affect the system because the maximal\nlaziness avoid computing twice the same expression and `listToAttrs` does\nnot care about duplicated attribute names.\n\n# Type\n\n```\nzipAttrsWith :: (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.zipAttrsWith` usage example\n\n```nix\nzipAttrsWith (name: values: values) [{a = \"x\";} {a = \"y\"; b = \"z\";}]\n=> { a = [\"x\" \"y\"]; b = [\"z\"]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1549,"column":3},"path":["lib","attrsets","zipAttrsWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.zipAttrsWithNames","path":["lib","zipAttrsWithNames"],"aliases":[["lib","attrsets","zipAttrsWithNames"]],"signature":"zipAttrsWithNames :: [String] -> (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":230,"column":9},"attr_expr":"zipAttrsWithNames","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1515,"column":5},"lambda_expr":"zipAttrsWithNames =\n    names: f: sets:\n    listToAttrs (\n      map (name: {\n        inherit name;\n        value = f name (catAttrs name sets);\n      }) names\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1514,"column":3},"path":["lib","attrsets","zipAttrsWithNames"],"pos_type":"Attribute"}},"content":{"content":"\nMerge sets of attributes and use the function `f` to merge attributes\nvalues.\n\n# Inputs\n\n`names`\n\n: List of attribute names to zip.\n\n`f`\n\n: A function, accepts an attribute name, all the values, and returns a combined value.\n\n`sets`\n\n: List of values from the list of attribute sets.\n\n# Type\n\n```\nzipAttrsWithNames :: [String] -> (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.zipAttrsWithNames` usage example\n\n```nix\nzipAttrsWithNames [\"a\"] (name: vs: vs) [{a = \"x\";} {a = \"y\"; b = \"z\";}]\n=> { a = [\"x\" \"y\"]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1514,"column":3},"path":["lib","attrsets","zipAttrsWithNames"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.zipLists","path":["lib","zipLists"],"aliases":[["lib","lists","zipLists"]],"signature":"zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":287,"column":9},"attr_expr":"zipLists","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1060,"column":8},"lambda_expr":"fst: snd:\n    genList (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd))","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1094,"column":3},"path":["lib","lists","zipLists"],"pos_type":"Attribute"}},"content":{"content":"\nMerges two lists of the same size together. If the sizes aren't the same\nthe merging stops at the shortest.\n\n# Inputs\n\n`fst`\n\n: First list\n\n`snd`\n\n: Second list\n\n# Type\n\n```\nzipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.zipLists` usage example\n\n```nix\nzipLists [ 1 2 ] [ \"a\" \"b\" ]\n=> [ { fst = 1; snd = \"a\"; } { fst = 2; snd = \"b\"; } ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1094,"column":3},"path":["lib","lists","zipLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.zipListsWith","path":["lib","zipListsWith"],"aliases":[["lib","lists","zipListsWith"]],"signature":"zipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/default.nix","line":286,"column":9},"attr_expr":"zipListsWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1060,"column":5},"lambda_expr":"zipListsWith =\n    f: fst: snd:\n    genList (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1059,"column":3},"path":["lib","lists","zipListsWith"],"pos_type":"Attribute"}},"content":{"content":"\nMerges two lists of the same size together. If the sizes aren't the same\nthe merging stops at the shortest. How both lists are merged is defined\nby the first argument.\n\n# Inputs\n\n`f`\n\n: Function to zip elements of both lists\n\n`fst`\n\n: First list\n\n`snd`\n\n: Second list\n\n# Type\n\n```\nzipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.zipListsWith` usage example\n\n```nix\nzipListsWith (a: b: a + b) [\"h\" \"l\"] [\"e\" \"o\"]\n=> [\"he\" \"lo\"]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1059,"column":3},"path":["lib","lists","zipListsWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.asserts.assertEachOneOf","path":["lib","asserts","assertEachOneOf"],"aliases":[],"signature":"assertEachOneOf :: String -> [ComparableVal] -> [ComparableVal] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":139,"column":3},"attr_expr":"assertEachOneOf =\n    name: vals: xs:\n    assertMsg (lib.all (val: lib.elem val xs) vals)\n      \"each element in ${name} must be one of ${lib.generators.toPretty { } xs}, but is: ${\n        lib.generators.toPretty { } vals\n      }\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":140,"column":5},"lambda_expr":"assertEachOneOf =\n    name: vals: xs:\n    assertMsg (lib.all (val: lib.elem val xs) vals)\n      \"each element in ${name} must be one of ${lib.generators.toPretty { } xs}, but is: ${\n        lib.generators.toPretty { } vals\n      }\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":139,"column":3},"path":["lib","asserts","assertEachOneOf"],"pos_type":"Attribute"}},"content":{"content":"\nSpecialized `assertMsg` for checking if every one of `vals` is one of the elements\nof the list `xs`. Useful for checking lists of supported attributes.\n\n# Inputs\n\n`name`\n\n: The name of the variable the user entered `val` into, for inclusion in the error message\n\n`vals`\n\n: The list of values of what the user provided, to be compared against the values in `xs`\n\n`xs`\n\n: The list of valid values\n\n# Type\n\n```\nassertEachOneOf :: String -> [ComparableVal] -> [ComparableVal] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.asserts.assertEachOneOf` usage example\n\n```nix\nlet sslLibraries = [ \"libressl\" \"bearssl\" ];\nin assertEachOneOf \"sslLibraries\" sslLibraries [ \"openssl\" \"bearssl\" ]\nstderr> error: each element in sslLibraries must be one of [\nstderr>   \"openssl\"\nstderr>   \"bearssl\"\nstderr> ], but is: [\nstderr>   \"libressl\"\nstderr>   \"bearssl\"\nstderr> ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":139,"column":3},"path":["lib","asserts","assertEachOneOf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.asserts.assertMsg","path":["lib","asserts","assertMsg"],"aliases":[["lib","assertMsg"]],"signature":"assertMsg :: Bool -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":50,"column":3},"attr_expr":"assertMsg = pred: msg: pred || throw msg;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":50,"column":15},"lambda_expr":"assertMsg = pred: msg: pred || throw msg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":50,"column":3},"path":["lib","asserts","assertMsg"],"pos_type":"Attribute"}},"content":{"content":"\nThrow if `pred` is false, else return `pred`.\nIntended to be used to augment asserts with helpful error messages.\n\n# Inputs\n\n`pred`\n\n: Predicate that needs to succeed, otherwise `msg` is thrown\n\n`msg`\n\n: Message to throw in case `pred` fails\n\n# Type\n\n```\nassertMsg :: Bool -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.asserts.assertMsg` usage example\n\n```nix\nassertMsg false \"nope\"\nstderr> error: nope\nassert assertMsg (\"foo\" == \"bar\") \"foo is not bar, silly\"; \"\"\nstderr> error: foo is not bar, silly\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":50,"column":3},"path":["lib","asserts","assertMsg"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.asserts.assertOneOf","path":["lib","asserts","assertOneOf"],"aliases":[["lib","assertOneOf"]],"signature":"assertOneOf :: String -> ComparableVal -> [ComparableVal] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":91,"column":3},"attr_expr":"assertOneOf =\n    name: val: xs:\n    assertMsg (lib.elem val xs) \"${name} must be one of ${lib.generators.toPretty { } xs}, but is: ${\n      lib.generators.toPretty { } val\n    }\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":92,"column":5},"lambda_expr":"assertOneOf =\n    name: val: xs:\n    assertMsg (lib.elem val xs) \"${name} must be one of ${lib.generators.toPretty { } xs}, but is: ${\n      lib.generators.toPretty { } val\n    }\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":91,"column":3},"path":["lib","asserts","assertOneOf"],"pos_type":"Attribute"}},"content":{"content":"\nSpecialized `assertMsg` for checking if `val` is one of the elements\nof the list `xs`. Useful for checking enums.\n\n# Inputs\n\n`name`\n\n: The name of the variable the user entered `val` into, for inclusion in the error message\n\n`val`\n\n: The value of what the user provided, to be compared against the values in `xs`\n\n`xs`\n\n: The list of valid values\n\n# Type\n\n```\nassertOneOf :: String -> ComparableVal -> [ComparableVal] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.asserts.assertOneOf` usage example\n\n```nix\nlet sslLibrary = \"libressl\";\nin assertOneOf \"sslLibrary\" sslLibrary [ \"openssl\" \"bearssl\" ]\nstderr> error: sslLibrary must be one of [\nstderr>   \"openssl\"\nstderr>   \"bearssl\"\nstderr> ], but is: \"libressl\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":91,"column":3},"path":["lib","asserts","assertOneOf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.asserts.checkAssertWarn","path":["lib","asserts","checkAssertWarn"],"aliases":[],"signature":"checkAssertWarn :: [{ assertion :: Bool; message :: String; }] -> [String] -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":192,"column":3},"attr_expr":"checkAssertWarn =\n    assertions: warnings: val:\n    let\n      failedAssertions = map (x: x.message) (filter (x: !x.assertion) assertions);\n    in\n    if failedAssertions != [ ] then\n      throw \"\\nFailed assertions:\\n${concatStringsSep \"\\n\" (map (x: \"- ${x}\") failedAssertions)}\"\n    else\n      showWarnings warnings val;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":193,"column":5},"lambda_expr":"checkAssertWarn =\n    assertions: warnings: val:\n    let\n      failedAssertions = map (x: x.message) (filter (x: !x.assertion) assertions);\n    in\n    if failedAssertions != [ ] then\n      throw \"\\nFailed assertions:\\n${concatStringsSep \"\\n\" (map (x: \"- ${x}\") failedAssertions)}\"\n    else\n      showWarnings warnings val;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":192,"column":3},"path":["lib","asserts","checkAssertWarn"],"pos_type":"Attribute"}},"content":{"content":"\nWrap a value with logic that throws an error when assertions\nfail and emits any warnings.\n\n# Inputs\n\n`assertions`\n\n: A list of assertions. If any of their `assertion` attrs is `false`, their `message` attrs will be emitted in a `throw`.\n\n`warnings`\n\n: A list of strings to emit as warnings. This function does no filtering on this list.\n\n`val`\n\n: A value to return, wrapped in `warn`, if a `throw` is not necessary.\n\n# Type\n\n```\ncheckAssertWarn :: [{ assertion :: Bool; message :: String; }] -> [String] -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.asserts.checkAssertWarn` usage example\n```nix\ncheckAssertWarn\n  [ { assertion = false; message = \"Will fail\"; } ]\n  [ ]\n  null\nstderr>        error:\nstderr>        Failed assertions:\nstderr>        - Will fail\n\ncheckAssertWarn\n  [ { assertion = true; message = \"Will not fail\"; } ]\n  [ \"Will warn\" ]\n  null\nstderr> evaluation warning: Will warn\nnull\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/asserts.nix","line":192,"column":3},"path":["lib","asserts","checkAssertWarn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.attrByPath","path":["lib","attrsets","attrByPath"],"aliases":[["lib","attrByPath"]],"signature":"attrByPath :: [String] -> Any -> AttrSet -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":87,"column":3},"attr_expr":"attrByPath =\n    attrPath: default: set:\n    let\n      lenAttrPath = length attrPath;\n      attrByPath' =\n        n: s:\n        (\n          if n == lenAttrPath then\n            s\n          else\n            (\n              let\n                attr = elemAt attrPath n;\n              in\n              if s ? ${attr} then attrByPath' (n + 1) s.${attr} else default\n            )\n        );\n    in\n    attrByPath' 0 set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":88,"column":5},"lambda_expr":"attrByPath =\n    attrPath: default: set:\n    let\n      lenAttrPath = length attrPath;\n      attrByPath' =\n        n: s:\n        (\n          if n == lenAttrPath then\n            s\n          else\n            (\n              let\n                attr = elemAt attrPath n;\n              in\n              if s ? ${attr} then attrByPath' (n + 1) s.${attr} else default\n            )\n        );\n    in\n    attrByPath' 0 set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":87,"column":3},"path":["lib","attrsets","attrByPath"],"pos_type":"Attribute"}},"content":{"content":"\nReturns an attribute from nested attribute sets.\n\nNix has an [attribute selection operator `.`](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:\n\n```nix\n(x.a.b or 6) == attrByPath [\"a\" \"b\"] 6 x\n# and\n(x.${f p}.\"example.com\" or 6) == attrByPath [ (f p) \"example.com\" ] 6 x\n```\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to return from `set`\n\n`default`\n\n: Default value if `attrPath` does not resolve to an existing value\n\n`set`\n\n: The nested attribute set to select values from\n\n# Type\n\n```\nattrByPath :: [String] -> Any -> AttrSet -> Any\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrByPath` usage example\n\n```nix\nx = { a = { b = 3; }; }\n# [\"a\" \"b\"] is equivalent to x.a.b\n# 6 is a default value to return if the path does not exist in attrset\nattrByPath [\"a\" \"b\"] 6 x\n=> 3\nattrByPath [\"z\" \"z\"] 6 x\n=> 6\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":87,"column":3},"path":["lib","attrsets","attrByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.attrNames","path":["lib","attrsets","attrNames"],"aliases":[["builtins","attrNames"],["lib","attrNames"]],"signature":null,"is_primop":true,"primop_meta":{"name":"attrNames","args":["set"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":31,"column":5},"attr_expr":"attrNames","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrsets","attrNames"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the names of the attributes in the set *set* in an\nalphabetically sorted list. For instance, `builtins.attrNames { y\n= 1; x = \"foo\"; }` evaluates to `[ \"x\" \"y\" ]`.\n","source":{"position":null,"path":["lib","attrsets","attrNames"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrsets.attrVals","path":["lib","attrsets","attrVals"],"aliases":[["lib","attrVals"]],"signature":"attrVals :: [String] -> { [String] :: a } -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":530,"column":3},"attr_expr":"attrVals = nameList: set: map (x: set.${x}) nameList;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":530,"column":14},"lambda_expr":"attrVals = nameList: set: map (x: set.${x}) nameList;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":530,"column":3},"path":["lib","attrsets","attrVals"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the specified attributes from a set.\n\n# Inputs\n\n`nameList`\n\n: The list of attributes to fetch from `set`. Each attribute name must exist on the attribute set\n\n`set`\n\n: The set to get attribute values from\n\n# Type\n\n```\nattrVals :: [String] -> { [String] :: a } -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrVals` usage example\n\n```nix\nattrVals [\"a\" \"b\" \"c\"] as\n=> [as.a as.b as.c]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":530,"column":3},"path":["lib","attrsets","attrVals"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.attrValues","path":["lib","attrsets","attrValues"],"aliases":[["builtins","attrValues"],["lib","attrValues"]],"signature":"attrValues :: { [String] :: a } -> [a]\n","is_primop":true,"primop_meta":{"name":"attrValues","args":["set"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":553,"column":3},"attr_expr":"attrValues = builtins.attrValues;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":553,"column":3},"path":["lib","attrsets","attrValues"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the values of all attributes in the given set, sorted by\nattribute name.\n\n# Type\n\n```\nattrValues :: { [String] :: a } -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrValues` usage example\n\n```nix\nattrValues {c = 3; a = 1; b = 2;}\n=> [1 2 3]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":553,"column":3},"path":["lib","attrsets","attrValues"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.attrsToList","path":["lib","attrsets","attrsToList"],"aliases":[["lib","attrsToList"]],"signature":"attrsToList :: { [String] :: a } -> [{ name :: String; value :: a; }]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1129,"column":3},"attr_expr":"attrsToList = mapAttrsToList nameValuePair;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":23},"lambda_expr":"attrs: attrValues (mapAttrs f attrs)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1129,"column":3},"path":["lib","attrsets","attrsToList"],"pos_type":"Attribute"}},"content":{"content":"\nDeconstruct an attrset to a list of name-value pairs as expected by [`builtins.listToAttrs`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-listToAttrs).\nEach element of the resulting list is an attribute set with these attributes:\n- `name` (string): The name of the attribute\n- `value` (any): The value of the attribute\n\nThe following is always true:\n```nix\nbuiltins.listToAttrs (attrsToList attrs) == attrs\n```\n\n:::{.warning}\nThe opposite is not always true. In general expect that\n```nix\nattrsToList (builtins.listToAttrs list) != list\n```\n\nThis is because the `listToAttrs` removes duplicate names and doesn't preserve the order of the list.\n:::\n\n# Inputs\n\n`set`\n\n: The attribute set to deconstruct.\n\n# Type\n\n```\nattrsToList :: { [String] :: a } -> [{ name :: String; value :: a; }]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.attrsToList` usage example\n\n```nix\nattrsToList { foo = 1; bar = \"asdf\"; }\n=> [ { name = \"bar\"; value = \"asdf\"; } { name = \"foo\"; value = 1; } ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1129,"column":3},"path":["lib","attrsets","attrsToList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.cartesianProduct","path":["lib","attrsets","cartesianProduct"],"aliases":[["lib","cartesianProduct"]],"signature":"cartesianProduct :: { [String] :: [a] } -> [{ [String] :: a }]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":910,"column":3},"attr_expr":"cartesianProduct =\n    attrsOfLists:\n    foldl' (\n      listOfAttrs: attrName:\n      concatMap (\n        attrs: map (listValue: attrs // { ${attrName} = listValue; }) attrsOfLists.${attrName}\n      ) listOfAttrs\n    ) [ { } ] (attrNames attrsOfLists);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":911,"column":5},"lambda_expr":"cartesianProduct =\n    attrsOfLists:\n    foldl' (\n      listOfAttrs: attrName:\n      concatMap (\n        attrs: map (listValue: attrs // { ${attrName} = listValue; }) attrsOfLists.${attrName}\n      ) listOfAttrs\n    ) [ { } ] (attrNames attrsOfLists);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":910,"column":3},"path":["lib","attrsets","cartesianProduct"],"pos_type":"Attribute"}},"content":{"content":"\nReturn the cartesian product of attribute set value combinations.\n\n# Inputs\n\n`attrsOfLists`\n\n: Attribute set with attributes that are lists of values\n\n# Type\n\n```\ncartesianProduct :: { [String] :: [a] } -> [{ [String] :: a }]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.cartesianProduct` usage example\n\n```nix\ncartesianProduct { a = [ 1 2 ]; b = [ 10 20 ]; }\n=> [\n     { a = 1; b = 10; }\n     { a = 1; b = 20; }\n     { a = 2; b = 10; }\n     { a = 2; b = 20; }\n   ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":910,"column":3},"path":["lib","attrsets","cartesianProduct"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.catAttrs","path":["lib","attrsets","catAttrs"],"aliases":[["builtins","catAttrs"],["lib","catAttrs"]],"signature":"catAttrs :: String -> [{ [String] :: a }] -> [a]\n","is_primop":true,"primop_meta":{"name":"catAttrs","args":["attr","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":619,"column":3},"attr_expr":"catAttrs = builtins.catAttrs;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":619,"column":3},"path":["lib","attrsets","catAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nCollect each attribute named `attr` from a list of attribute\nsets.  Sets that don't contain the named attribute are ignored.\n\n# Inputs\n\n`attr`\n\n: The attribute name to get out of the sets.\n\n`list`\n\n: The list of attribute sets to go through\n\n# Type\n\n```\ncatAttrs :: String -> [{ [String] :: a }] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.catAttrs` usage example\n\n```nix\ncatAttrs \"a\" [{a = 1;} {b = 0;} {a = 2;}]\n=> [1 2]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":619,"column":3},"path":["lib","attrsets","catAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.chooseDevOutputs","path":["lib","attrsets","chooseDevOutputs"],"aliases":[["lib","chooseDevOutputs"]],"signature":"chooseDevOutputs :: [Derivation] -> [Derivation]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2163,"column":3},"attr_expr":"chooseDevOutputs = map getDev;","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2163,"column":3},"path":["lib","attrsets","chooseDevOutputs"],"pos_type":"Attribute"}},"content":{"content":"\nPick the outputs of packages to place in `buildInputs`\n\n# Inputs\n\n`pkgs`\n\n: List of packages.\n\n# Type\n\n```\nchooseDevOutputs :: [Derivation] -> [Derivation]\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2163,"column":3},"path":["lib","attrsets","chooseDevOutputs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.collect","path":["lib","attrsets","collect"],"aliases":[["lib","collect"]],"signature":"collect :: (AttrSet -> Bool) -> AttrSet -> [Any]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":870,"column":3},"attr_expr":"collect =\n    pred: attrs:\n    if pred attrs then\n      [ attrs ]\n    else if isAttrs attrs then\n      concatMap (collect pred) (attrValues attrs)\n    else\n      [ ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":871,"column":5},"lambda_expr":"collect =\n    pred: attrs:\n    if pred attrs then\n      [ attrs ]\n    else if isAttrs attrs then\n      concatMap (collect pred) (attrValues attrs)\n    else\n      [ ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":870,"column":3},"path":["lib","attrsets","collect"],"pos_type":"Attribute"}},"content":{"content":"\nRecursively collect sets that verify a given predicate named `pred`\nfrom the set `attrs`. The recursion is stopped when the predicate is\nverified.\n\n# Inputs\n\n`pred`\n\n: Given an attribute's value, determine if recursion should stop.\n\n`attrs`\n\n: The attribute set to recursively collect.\n\n# Type\n\n```\ncollect :: (AttrSet -> Bool) -> AttrSet -> [Any]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.collect` usage example\n\n```nix\ncollect isList { a = { b = [\"b\"]; }; c = [1]; }\n=> [[\"b\"] [1]]\n\ncollect (x: x ? outPath)\n   { a = { outPath = \"a/\"; }; b = { outPath = \"b/\"; }; }\n=> [{ outPath = \"a/\"; } { outPath = \"b/\"; }]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":870,"column":3},"path":["lib","attrsets","collect"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.concatMapAttrs","path":["lib","attrsets","concatMapAttrs"],"aliases":[["lib","concatMapAttrs"]],"signature":"concatMapAttrs :: (String -> Any -> AttrSet) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":373,"column":3},"attr_expr":"concatMapAttrs = f: v: foldl' mergeAttrs { } (attrValues (mapAttrs f v));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":373,"column":20},"lambda_expr":"concatMapAttrs = f: v: foldl' mergeAttrs { } (attrValues (mapAttrs f v));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":373,"column":3},"path":["lib","attrsets","concatMapAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMap each attribute in the given set and merge them into a new attribute set.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`v`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcatMapAttrs :: (String -> Any -> AttrSet) -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.concatMapAttrs` usage example\n\n```nix\nconcatMapAttrs\n  (name: value: {\n    ${name} = value;\n    ${name + value} = value;\n  })\n  { x = \"a\"; y = \"b\"; }\n=> { x = \"a\"; xa = \"a\"; y = \"b\"; yb = \"b\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":373,"column":3},"path":["lib","attrsets","concatMapAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.dontRecurseIntoAttrs","path":["lib","attrsets","dontRecurseIntoAttrs"],"aliases":[["lib","dontRecurseIntoAttrs"]],"signature":"dontRecurseIntoAttrs :: AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2216,"column":3},"attr_expr":"dontRecurseIntoAttrs = attrs: attrs // { recurseForDerivations = false; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2216,"column":26},"lambda_expr":"dontRecurseIntoAttrs = attrs: attrs // { recurseForDerivations = false; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2216,"column":3},"path":["lib","attrsets","dontRecurseIntoAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nUndo the effect of `recurseIntoAttrs`.\n\n# Inputs\n\n`attrs`\n\n: An attribute set to not scan for derivations.\n\n# Type\n\n```\ndontRecurseIntoAttrs :: AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2216,"column":3},"path":["lib","attrsets","dontRecurseIntoAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.filterAttrs","path":["lib","attrsets","filterAttrs"],"aliases":[["lib","filterAttrs"]],"signature":"filterAttrs :: (String -> a -> Bool) -> { [String] :: a } -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":662,"column":3},"attr_expr":"filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":662,"column":17},"lambda_expr":"filterAttrs = pred: set: removeAttrs set (filter (name: !pred name set.${name}) (attrNames set));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":662,"column":3},"path":["lib","attrsets","filterAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nFilter an attribute set by removing all attributes for which the\ngiven predicate return false.\n\n# Inputs\n\n`pred`\n\n: Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.\n\n  <!-- TIP -->\n  If possible, decide on `name` first and on `value` only if necessary.\n  This avoids evaluating the value if the name is already enough, making it possible, potentially, to have the argument reference the return value.\n  (Depending on context, that could still be considered a self reference by users; a common pattern in Nix.)\n\n  <!-- TIP -->\n  `filterAttrs` is occasionally the cause of infinite recursion in configuration systems that allow self-references.\n  To support the widest range of user-provided logic, perform the `filterAttrs` call as late as possible.\n  Typically that's right before using it in a derivation, as opposed to an implicit conversion whose result is accessible to the user's expressions.\n\n`set`\n\n: The attribute set to filter\n\n# Type\n\n```\nfilterAttrs :: (String -> a -> Bool) -> { [String] :: a } -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.filterAttrs` usage example\n\n```nix\nfilterAttrs (n: v: n == \"foo\") { foo = 1; bar = 2; }\n=> { foo = 1; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":662,"column":3},"path":["lib","attrsets","filterAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.filterAttrsRecursive","path":["lib","attrsets","filterAttrsRecursive"],"aliases":[["lib","filterAttrsRecursive"]],"signature":"filterAttrsRecursive :: (String -> Any -> Bool) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":695,"column":3},"attr_expr":"filterAttrsRecursive =\n    pred: set:\n    listToAttrs (\n      concatMap (\n        name:\n        let\n          v = set.${name};\n        in\n        if pred name v then\n          [\n            (nameValuePair name (if isAttrs v then filterAttrsRecursive pred v else v))\n          ]\n        else\n          [ ]\n      ) (attrNames set)\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":696,"column":5},"lambda_expr":"filterAttrsRecursive =\n    pred: set:\n    listToAttrs (\n      concatMap (\n        name:\n        let\n          v = set.${name};\n        in\n        if pred name v then\n          [\n            (nameValuePair name (if isAttrs v then filterAttrsRecursive pred v else v))\n          ]\n        else\n          [ ]\n      ) (attrNames set)\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":695,"column":3},"path":["lib","attrsets","filterAttrsRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nFilter an attribute set recursively by removing all attributes for\nwhich the given predicate return false.\n\n# Inputs\n\n`pred`\n\n: Predicate taking an attribute name and an attribute value, which returns `true` to include the attribute, or `false` to exclude the attribute.\n\n`set`\n\n: The attribute set to filter\n\n# Type\n\n```\nfilterAttrsRecursive :: (String -> Any -> Bool) -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.filterAttrsRecursive` usage example\n\n```nix\nfilterAttrsRecursive (n: v: v != null) { foo = { bar = null; }; }\n=> { foo = {}; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":695,"column":3},"path":["lib","attrsets","filterAttrsRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.foldAttrs","path":["lib","attrsets","foldAttrs"],"aliases":[["lib","foldAttrs"]],"signature":"foldAttrs :: (a -> b -> b) -> b -> [{ [String] :: a }] -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":828,"column":3},"attr_expr":"foldAttrs =\n    op: nul: list_of_attrs:\n    foldr (\n      n: a: foldr (name: o: o // { ${name} = op n.${name} (a.${name} or nul); }) a (attrNames n)\n    ) { } list_of_attrs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":829,"column":5},"lambda_expr":"foldAttrs =\n    op: nul: list_of_attrs:\n    foldr (\n      n: a: foldr (name: o: o // { ${name} = op n.${name} (a.${name} or nul); }) a (attrNames n)\n    ) { } list_of_attrs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":828,"column":3},"path":["lib","attrsets","foldAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nApply fold functions to values grouped by key.\n\n# Inputs\n\n`op`\n\n: A function, given a value and a collector combines the two.\n\n`nul`\n\n: The starting value.\n\n`list_of_attrs`\n\n: A list of attribute sets to fold together by key.\n\n# Type\n\n```\nfoldAttrs :: (a -> b -> b) -> b -> [{ [String] :: a }] -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.foldAttrs` usage example\n\n```nix\nfoldAttrs (item: acc: [item] ++ acc) [] [{ a = 2; } { a = 3; }]\n=> { a = [ 2 3 ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":828,"column":3},"path":["lib","attrsets","foldAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.foldlAttrs","path":["lib","attrsets","foldlAttrs"],"aliases":[["lib","foldlAttrs"]],"signature":"foldlAttrs :: ( a -> String -> b -> a ) -> a -> { [String] :: b } -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":790,"column":3},"attr_expr":"foldlAttrs =\n    f: init: set:\n    foldl' (acc: name: f acc name set.${name}) init (attrNames set);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":791,"column":5},"lambda_expr":"foldlAttrs =\n    f: init: set:\n    foldl' (acc: name: f acc name set.${name}) init (attrNames set);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":790,"column":3},"path":["lib","attrsets","foldlAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nLike [`lib.lists.foldl'`](#function-library-lib.lists.foldl-prime) but for attribute sets.\nIterates over every name-value pair in the given attribute set.\nThe 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`.\n\n::: {.note}\nThere is a completely different function `lib.foldAttrs`\nwhich has nothing to do with this function, despite the similar name.\n:::\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`init`\n\n: 2\\. Function argument\n\n`set`\n\n: 3\\. Function argument\n\n# Type\n\n```\nfoldlAttrs :: ( a -> String -> b -> a ) -> a -> { [String] :: b } -> a\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.foldlAttrs` usage example\n\n```nix\nfoldlAttrs\n  (acc: name: value: {\n    sum = acc.sum + value;\n    names = acc.names ++ [name];\n  })\n  { sum = 0; names = []; }\n  {\n    foo = 1;\n    bar = 10;\n  }\n->\n  {\n    sum = 11;\n    names = [\"bar\" \"foo\"];\n  }\n\nfoldlAttrs\n  (throw \"function not needed\")\n  123\n  {};\n->\n  123\n\nfoldlAttrs\n  (acc: _: _: acc)\n  3\n  { z = throw \"value not needed\"; a = throw \"value not needed\"; };\n->\n  3\n\nThe accumulator doesn't have to be an attrset.\nIt can be as simple as a number or string.\n\nfoldlAttrs\n  (acc: _: v: acc * 10 + v)\n  1\n  { z = 1; a = 2; };\n->\n  121\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":790,"column":3},"path":["lib","attrsets","foldlAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.genAttrs","path":["lib","attrsets","genAttrs"],"aliases":[["lib","genAttrs"]],"signature":"genAttrs :: [String] -> (String -> a) -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1343,"column":3},"attr_expr":"genAttrs = names: f: genAttrs' names (n: nameValuePair n (f n));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1343,"column":14},"lambda_expr":"genAttrs = names: f: genAttrs' names (n: nameValuePair n (f n));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1343,"column":3},"path":["lib","attrsets","genAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate an attribute set by mapping a function over a list of\nattribute names.\n\n# Inputs\n\n`names`\n\n: Names of values in the resulting attribute set.\n\n`f`\n\n: A function, given the name of the attribute, returns the attribute's value.\n\n# Type\n\n```\ngenAttrs :: [String] -> (String -> a) -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.genAttrs` usage example\n\n```nix\ngenAttrs [ \"foo\" \"bar\" ] (name: \"x_\" + name)\n=> { foo = \"x_foo\"; bar = \"x_bar\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1343,"column":3},"path":["lib","attrsets","genAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.genAttrs' (Prime)","path":["lib","attrsets","genAttrs'"],"aliases":[["lib","genAttrs'"]],"signature":"genAttrs' :: [a] -> (a -> { name :: String; value :: b; }) -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1380,"column":3},"attr_expr":"genAttrs' = xs: f: listToAttrs (map f xs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1380,"column":15},"lambda_expr":"genAttrs' = xs: f: listToAttrs (map f xs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1380,"column":3},"path":["lib","attrsets","genAttrs'"],"pos_type":"Attribute"}},"content":{"content":"\nLike `genAttrs`, but allows the name of each attribute to be specified in addition to the value.\nThe applied function should return both the new name and value as a `nameValuePair`.\n::: {.warning}\nIn case of attribute name collision the first entry determines the value,\nall subsequent conflicting entries for the same name are silently ignored.\n:::\n\n# Inputs\n\n`xs`\n\n: A list of strings `s` used as generator.\n\n`f`\n\n: A function, given a string `s` from the list `xs`, returns a new `nameValuePair`.\n\n# Type\n\n```\ngenAttrs' :: [a] -> (a -> { name :: String; value :: b; }) -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.genAttrs'` usage example\n\n```nix\ngenAttrs' [ \"foo\" \"bar\" ] (s: nameValuePair (\"x_\" + s) (\"y_\" + s))\n=> { x_foo = \"y_foo\"; x_bar = \"y_bar\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1380,"column":3},"path":["lib","attrsets","genAttrs'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getAttr","path":["lib","attrsets","getAttr"],"aliases":[["builtins","getAttr"],["lib","getAttr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"getAttr","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":35,"column":5},"attr_expr":"getAttr","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrsets","getAttr"],"pos_type":"Lambda"}},"content":{"content":"\n`getAttr` returns the attribute named *s* from *set*. Evaluation\naborts if the attribute doesn’t exist. This is a dynamic version of\nthe `.` operator, since *s* is an expression rather than an\nidentifier.\n","source":{"position":null,"path":["lib","attrsets","getAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrsets.getAttrFromPath","path":["lib","attrsets","getAttrFromPath"],"aliases":[["lib","getAttrFromPath"]],"signature":"getAttrFromPath :: [String] -> AttrSet -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":334,"column":3},"attr_expr":"getAttrFromPath =\n    attrPath: set:\n    attrByPath attrPath (abort (\"cannot find attribute '\" + concatStringsSep \".\" attrPath + \"'\")) set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":335,"column":5},"lambda_expr":"getAttrFromPath =\n    attrPath: set:\n    attrByPath attrPath (abort (\"cannot find attribute '\" + concatStringsSep \".\" attrPath + \"'\")) set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":334,"column":3},"path":["lib","attrsets","getAttrFromPath"],"pos_type":"Attribute"}},"content":{"content":"\nLike `attrByPath`, but without a default value. If it doesn't find the\npath it will throw an error.\n\nNix has an [attribute selection operator](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example:\n\n```nix\nx.a.b == getAttrFromPath [\"a\" \"b\"] x\n# and\nx.${f p}.\"example.com\" == getAttrFromPath [ (f p) \"example.com\" ] x\n```\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to get from `set`\n\n`set`\n\n: The nested attribute set to find the value in.\n\n# Type\n\n```\ngetAttrFromPath :: [String] -> AttrSet -> Any\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getAttrFromPath` usage example\n\n```nix\nx = { a = { b = 3; }; }\ngetAttrFromPath [\"a\" \"b\"] x\n=> 3\ngetAttrFromPath [\"z\" \"z\"] x\n=> error: cannot find attribute `z.z'\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":334,"column":3},"path":["lib","attrsets","getAttrFromPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getAttrs","path":["lib","attrsets","getAttrs"],"aliases":[["lib","getAttrs"]],"signature":"getAttrs :: [String] -> { [String] :: a } -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":586,"column":3},"attr_expr":"getAttrs = names: attrs: genAttrs names (name: attrs.${name});","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":586,"column":14},"lambda_expr":"getAttrs = names: attrs: genAttrs names (name: attrs.${name});","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":586,"column":3},"path":["lib","attrsets","getAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nGiven a set of attribute names, return the set of the corresponding\nattributes from the given set.\n\n# Inputs\n\n`names`\n\n: A list of attribute names to get out of `set`\n\n`set`\n\n: The set to get the named attributes from\n\n# Type\n\n```\ngetAttrs :: [String] -> { [String] :: a } -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getAttrs` usage example\n\n```nix\ngetAttrs [ \"a\" \"b\" ] { a = 1; b = 2; c = 3; }\n=> { a = 1; b = 2; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":586,"column":3},"path":["lib","attrsets","getAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getBin","path":["lib","attrsets","getBin"],"aliases":[["lib","getBin"]],"signature":"getBin :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1993,"column":3},"attr_expr":"getBin = getOutput \"bin\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1993,"column":3},"path":["lib","attrsets","getBin"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `bin` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `bin` output will be retrieved.\n\n# Type\n\n```\ngetBin :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getBin` usage example\n\n```nix\n\"${getBin pkgs.openssl}\"\n=> \"/nix/store/00000000000000000000000000000000-openssl-1.0.1r\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1993,"column":3},"path":["lib","attrsets","getBin"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getDev","path":["lib","attrsets","getDev"],"aliases":[["lib","getDev"]],"signature":"getDev :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2084,"column":3},"attr_expr":"getDev = getOutput \"dev\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2084,"column":3},"path":["lib","attrsets","getDev"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `dev` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `dev` output will be retrieved.\n\n# Type\n\n```\ngetDev :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getDev` usage example\n\n```nix\n\"${getDev pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2084,"column":3},"path":["lib","attrsets","getDev"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getFirstOutput","path":["lib","attrsets","getFirstOutput"],"aliases":[["lib","getFirstOutput"]],"signature":"getFirstOutput :: [String] -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1958,"column":3},"attr_expr":"getFirstOutput =\n    candidates: pkg:\n    let\n      outputs = builtins.filter (name: hasAttr name pkg) candidates;\n      output = builtins.head outputs;\n    in\n    if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output};","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1959,"column":5},"lambda_expr":"getFirstOutput =\n    candidates: pkg:\n    let\n      outputs = builtins.filter (name: hasAttr name pkg) candidates;\n      output = builtins.head outputs;\n    in\n    if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output};","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1958,"column":3},"path":["lib","attrsets","getFirstOutput"],"pos_type":"Attribute"}},"content":{"content":"\nGet the first of the `outputs` provided by the package, or the default.\nThis function is aligned with `_overrideFirst()` from the `multiple-outputs.sh` setup hook.\nLike `getOutput`, the function is idempotent.\n\n# Inputs\n\n`outputs`\n\n: 1\\. Function argument\n\n`pkg`\n\n: 2\\. Function argument\n\n# Type\n\n```\ngetFirstOutput :: [String] -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getFirstOutput` usage example\n\n```nix\n\"${getFirstOutput [ \"include\" \"dev\" ] pkgs.openssl}\"\n=> \"/nix/store/00000000000000000000000000000000-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1958,"column":3},"path":["lib","attrsets","getFirstOutput"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getInclude","path":["lib","attrsets","getInclude"],"aliases":[["lib","getInclude"]],"signature":"getInclude :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2113,"column":3},"attr_expr":"getInclude = getFirstOutput [\n    \"include\"\n    \"dev\"\n    \"out\"\n  ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1959,"column":17},"lambda_expr":"pkg:\n    let\n      outputs = builtins.filter (name: hasAttr name pkg) candidates;\n      output = builtins.head outputs;\n    in\n    if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2113,"column":3},"path":["lib","attrsets","getInclude"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `include` output.\nIf the output does not exist, fallback to `.dev`, then to `.out`, and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `include` output will be retrieved.\n\n# Type\n\n```\ngetInclude :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getInclude` usage example\n\n```nix\n\"${getInclude pkgs.openssl}\"\n=> \"/nix/store/00000000000000000000000000000000-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2113,"column":3},"path":["lib","attrsets","getInclude"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getLib","path":["lib","attrsets","getLib"],"aliases":[["lib","getLib"]],"signature":"getLib :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2022,"column":3},"attr_expr":"getLib = getOutput \"lib\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2022,"column":3},"path":["lib","attrsets","getLib"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `lib` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `lib` output will be retrieved.\n\n# Type\n\n```\ngetLib :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getLib` usage example\n\n```nix\n\"${getLib pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-lib\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2022,"column":3},"path":["lib","attrsets","getLib"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getMan","path":["lib","attrsets","getMan"],"aliases":[["lib","getMan"]],"signature":"getMan :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2146,"column":3},"attr_expr":"getMan = getOutput \"man\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":13},"lambda_expr":"pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2146,"column":3},"path":["lib","attrsets","getMan"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `man` output.\nIf the output does not exist, fallback to `.out` and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `man` output will be retrieved.\n\n# Type\n\n```\ngetMan :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getMan` usage example\n\n```nix\n\"${getMan pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-man\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2146,"column":3},"path":["lib","attrsets","getMan"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getOutput","path":["lib","attrsets","getOutput"],"aliases":[["lib","getOutput"]],"signature":"getOutput :: String -> :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1922,"column":3},"attr_expr":"getOutput =\n    output: pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1923,"column":5},"lambda_expr":"getOutput =\n    output: pkg:\n    if !pkg ? outputSpecified || !pkg.outputSpecified then pkg.${output} or pkg.out or pkg else pkg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1922,"column":3},"path":["lib","attrsets","getOutput"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package output.\nIf no output is found, fallback to `.out` and then to the default.\nThe function is idempotent: `getOutput \"b\" (getOutput \"a\" p) == getOutput \"a\" p`.\n\n# Inputs\n\n`output`\n\n: 1\\. Function argument\n\n`pkg`\n\n: 2\\. Function argument\n\n# Type\n\n```\ngetOutput :: String -> :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getOutput` usage example\n\n```nix\n\"${getOutput \"dev\" pkgs.openssl}\"\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1922,"column":3},"path":["lib","attrsets","getOutput"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.getStatic","path":["lib","attrsets","getStatic"],"aliases":[["lib","getStatic"]],"signature":"getStatic :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2051,"column":3},"attr_expr":"getStatic = getFirstOutput [\n    \"static\"\n    \"lib\"\n    \"out\"\n  ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1959,"column":17},"lambda_expr":"pkg:\n    let\n      outputs = builtins.filter (name: hasAttr name pkg) candidates;\n      output = builtins.head outputs;\n    in\n    if pkg.outputSpecified or false || outputs == [ ] then pkg else pkg.${output}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2051,"column":3},"path":["lib","attrsets","getStatic"],"pos_type":"Attribute"}},"content":{"content":"\nGet a package's `static` output.\nIf the output does not exist, fallback to `.lib`, then to `.out`, and then to the default.\n\n# Inputs\n\n`pkg`\n\n: The package whose `static` output will be retrieved.\n\n# Type\n\n```\ngetStatic :: Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.getStatic` usage example\n\n```nix\n\"${lib.getStatic pkgs.glibc}\"\n=> \"/nix/store/00000000000000000000000000000000-glibc-2.39-52-static\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2051,"column":3},"path":["lib","attrsets","getStatic"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.hasAttr","path":["lib","attrsets","hasAttr"],"aliases":[["builtins","hasAttr"],["lib","hasAttr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hasAttr","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":33,"column":5},"attr_expr":"hasAttr","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrsets","hasAttr"],"pos_type":"Lambda"}},"content":{"content":"\n`hasAttr` returns `true` if *set* has an attribute named *s*, and\n`false` otherwise. This is a dynamic version of the `?` operator,\nsince *s* is an expression rather than an identifier.\n","source":{"position":null,"path":["lib","attrsets","hasAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrsets.hasAttrByPath","path":["lib","attrsets","hasAttrByPath"],"aliases":[["lib","hasAttrByPath"]],"signature":"hasAttrByPath :: [String] -> AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":155,"column":3},"attr_expr":"hasAttrByPath =\n    attrPath: e:\n    let\n      lenAttrPath = length attrPath;\n      hasAttrByPath' =\n        n: s:\n        (\n          n == lenAttrPath\n          || (\n            let\n              attr = elemAt attrPath n;\n            in\n            if s ? ${attr} then hasAttrByPath' (n + 1) s.${attr} else false\n          )\n        );\n    in\n    hasAttrByPath' 0 e;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":156,"column":5},"lambda_expr":"hasAttrByPath =\n    attrPath: e:\n    let\n      lenAttrPath = length attrPath;\n      hasAttrByPath' =\n        n: s:\n        (\n          n == lenAttrPath\n          || (\n            let\n              attr = elemAt attrPath n;\n            in\n            if s ? ${attr} then hasAttrByPath' (n + 1) s.${attr} else false\n          )\n        );\n    in\n    hasAttrByPath' 0 e;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":155,"column":3},"path":["lib","attrsets","hasAttrByPath"],"pos_type":"Attribute"}},"content":{"content":"\nReturns if an attribute from nested attribute set exists.\n\nNix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:\n\n```nix\n(x?a.b) == hasAttrByPath [\"a\" \"b\"] x\n# and\n(x?${f p}.\"example.com\") == hasAttrByPath [ (f p) \"example.com\" ] x\n```\n\n**Laws**:\n 1.  ```nix\n     hasAttrByPath [] x == true\n     ```\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to check from `set`\n\n`set`\n\n: The nested attribute set to check\n\n# Type\n\n```\nhasAttrByPath :: [String] -> AttrSet -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.hasAttrByPath` usage example\n\n```nix\nx = { a = { b = 3; }; }\nhasAttrByPath [\"a\" \"b\"] x\n=> true\nhasAttrByPath [\"z\" \"z\"] x\n=> false\nhasAttrByPath [] (throw \"no need\")\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":155,"column":3},"path":["lib","attrsets","hasAttrByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.intersectAttrs","path":["lib","attrsets","intersectAttrs"],"aliases":[["builtins","intersectAttrs"],["lib","intersectAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"intersectAttrs","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":37,"column":5},"attr_expr":"intersectAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrsets","intersectAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a set consisting of the attributes in the set *e2* which have the\nsame name as some attribute in *e1*.\n\nPerforms in O(*n* log *m*) where *n* is the size of the smaller set and *m* the larger set's size.\n","source":{"position":null,"path":["lib","attrsets","intersectAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrsets.isAttrs","path":["lib","attrsets","isAttrs"],"aliases":[["builtins","isAttrs"],["lib","isAttrs"],["lib","strings","isAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isAttrs","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":34,"column":5},"attr_expr":"isAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrsets","isAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a set, and `false` otherwise.\n","source":{"position":null,"path":["lib","attrsets","isAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrsets.isDerivation","path":["lib","attrsets","isDerivation"],"aliases":[["lib","isDerivation"]],"signature":"isDerivation :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1412,"column":3},"attr_expr":"isDerivation = value: value.type or null == \"derivation\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1412,"column":18},"lambda_expr":"isDerivation = value: value.type or null == \"derivation\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1412,"column":3},"path":["lib","attrsets","isDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether the argument is a derivation. Any set with\n`{ type = \"derivation\"; }` counts as a derivation.\n\n# Inputs\n\n`value`\n\n: Value to check.\n\n# Type\n\n```\nisDerivation :: Any -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.isDerivation` usage example\n\n```nix\nnixpkgs = import <nixpkgs> {}\nisDerivation nixpkgs.ruby\n=> true\nisDerivation \"foobar\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1412,"column":3},"path":["lib","attrsets","isDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.listToAttrs","path":["lib","attrsets","listToAttrs"],"aliases":[["builtins","listToAttrs"],["lib","listToAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"listToAttrs","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":32,"column":5},"attr_expr":"listToAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrsets","listToAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nConstruct a set from a list specifying the names and values of each\nattribute. Each element of the list should be a set consisting of a\nstring-valued attribute `name` specifying the name of the attribute,\nand an attribute `value` specifying its value.\n\nIn case of duplicate occurrences of the same name, the first\ntakes precedence.\n\nExample:\n\n```nix\nbuiltins.listToAttrs\n  [ { name = \"foo\"; value = 123; }\n    { name = \"bar\"; value = 456; }\n    { name = \"bar\"; value = 420; }\n  ]\n```\n\nevaluates to\n\n```nix\n{ foo = 123; bar = 456; }\n```\n","source":{"position":null,"path":["lib","attrsets","listToAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrsets.longestValidPathPrefix","path":["lib","attrsets","longestValidPathPrefix"],"aliases":[],"signature":"longestValidPathPrefix :: [String] -> AttrSet -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":224,"column":3},"attr_expr":"longestValidPathPrefix =\n    attrPath: v:\n    let\n      lenAttrPath = length attrPath;\n      getPrefixForSetAtIndex =\n        # The nested attribute set to check, if it is an attribute set, which\n        # is not a given.\n        remainingSet:\n        # The index of the attribute we're about to check, as well as\n        # the length of the prefix we've already checked.\n        remainingPathIndex:\n\n        if remainingPathIndex == lenAttrPath then\n          # All previously checked attributes exist, and no attr names left,\n          # so we return the whole path.\n          attrPath\n        else\n          let\n            attr = elemAt attrPath remainingPathIndex;\n          in\n          if remainingSet ? ${attr} then\n            getPrefixForSetAtIndex remainingSet.${attr} # advance from the set to the attribute value\n              (remainingPathIndex + 1) # advance the path\n          else\n            # The attribute doesn't exist, so we return the prefix up to the\n            # previously checked length.\n            take remainingPathIndex attrPath;\n    in\n    getPrefixForSetAtIndex v 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":225,"column":5},"lambda_expr":"longestValidPathPrefix =\n    attrPath: v:\n    let\n      lenAttrPath = length attrPath;\n      getPrefixForSetAtIndex =\n        # The nested attribute set to check, if it is an attribute set, which\n        # is not a given.\n        remainingSet:\n        # The index of the attribute we're about to check, as well as\n        # the length of the prefix we've already checked.\n        remainingPathIndex:\n\n        if remainingPathIndex == lenAttrPath then\n          # All previously checked attributes exist, and no attr names left,\n          # so we return the whole path.\n          attrPath\n        else\n          let\n            attr = elemAt attrPath remainingPathIndex;\n          in\n          if remainingSet ? ${attr} then\n            getPrefixForSetAtIndex remainingSet.${attr} # advance from the set to the attribute value\n              (remainingPathIndex + 1) # advance the path\n          else\n            # The attribute doesn't exist, so we return the prefix up to the\n            # previously checked length.\n            take remainingPathIndex attrPath;\n    in\n    getPrefixForSetAtIndex v 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":224,"column":3},"path":["lib","attrsets","longestValidPathPrefix"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the longest prefix of an attribute path that refers to an existing attribute in a nesting of attribute sets.\n\nCan be used after [`mapAttrsRecursiveCond`](#function-library-lib.attrsets.mapAttrsRecursiveCond) to apply a condition,\nalthough this will evaluate the predicate function on sibling attributes as well.\n\nNote that the empty attribute path is valid for all values, so this function only throws an exception if any of its inputs does.\n\n**Laws**:\n1.  ```nix\n    attrsets.longestValidPathPrefix [] x == []\n    ```\n\n2.  ```nix\n    hasAttrByPath (attrsets.longestValidPathPrefix p x) x == true\n    ```\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the longest possible path that may be returned.\n\n`v`\n\n: The nested attribute set to check.\n\n# Type\n\n```\nlongestValidPathPrefix :: [String] -> AttrSet -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.longestValidPathPrefix` usage example\n\n```nix\nx = { a = { b = 3; }; }\nattrsets.longestValidPathPrefix [\"a\" \"b\" \"c\"] x\n=> [\"a\" \"b\"]\nattrsets.longestValidPathPrefix [\"a\"] x\n=> [\"a\"]\nattrsets.longestValidPathPrefix [\"z\" \"z\"] x\n=> []\nattrsets.longestValidPathPrefix [\"z\" \"z\"] (throw \"no need\")\n=> []\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":224,"column":3},"path":["lib","attrsets","longestValidPathPrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapAttrs","path":["lib","attrsets","mapAttrs"],"aliases":[["builtins","mapAttrs"],["lib","mapAttrs"]],"signature":"mapAttrs :: (String -> a -> b) -> { [String] :: a } -> { [String] :: b }\n","is_primop":true,"primop_meta":{"name":"mapAttrs","args":["f","attrset"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1015,"column":3},"attr_expr":"mapAttrs = builtins.mapAttrs;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1015,"column":3},"path":["lib","attrsets","mapAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nApply a function to each element in an attribute set, creating a new attribute set.\n\n# Inputs\n\n`f`\n\n: A function that takes an attribute name and its value, and returns the new value for the attribute.\n\n`attrset`\n\n: The attribute set to iterate through.\n\n# Type\n\n```\nmapAttrs :: (String -> a -> b) -> { [String] :: a } -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrs` usage example\n\n```nix\nmapAttrs (name: value: name + \"-\" + value)\n   { x = \"foo\"; y = \"bar\"; }\n=> { x = \"x-foo\"; y = \"y-bar\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1015,"column":3},"path":["lib","attrsets","mapAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapAttrs' (Prime)","path":["lib","attrsets","mapAttrs'"],"aliases":[["lib","mapAttrs'"]],"signature":"mapAttrs' :: (String -> a -> { name :: String; value :: b; }) -> { [String] :: a } -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1050,"column":3},"attr_expr":"mapAttrs' = f: set: listToAttrs (mapAttrsToList f set);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1050,"column":15},"lambda_expr":"mapAttrs' = f: set: listToAttrs (mapAttrsToList f set);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1050,"column":3},"path":["lib","attrsets","mapAttrs'"],"pos_type":"Attribute"}},"content":{"content":"\nLike `mapAttrs`, but allows the name of each attribute to be\nchanged in addition to the value.  The applied function should\nreturn both the new name and value as a `nameValuePair`.\n\n# Inputs\n\n`f`\n\n: A function, given an attribute's name and value, returns a new `nameValuePair`.\n\n`set`\n\n: Attribute set to map over.\n\n# Type\n\n```\nmapAttrs' :: (String -> a -> { name :: String; value :: b; }) -> { [String] :: a } -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrs'` usage example\n\n```nix\nmapAttrs' (name: value: nameValuePair (\"foo_\" + name) (\"bar-\" + value))\n   { x = \"a\"; y = \"b\"; }\n=> { foo_x = \"bar-a\"; foo_y = \"bar-b\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1050,"column":3},"path":["lib","attrsets","mapAttrs'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapAttrsRecursive","path":["lib","attrsets","mapAttrsRecursive"],"aliases":[["lib","mapAttrsRecursive"]],"signature":"mapAttrsRecursive :: ([String] -> a -> b) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1156,"column":3},"attr_expr":"mapAttrsRecursive = f: set: mapAttrsRecursiveCond (as: true) f set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1156,"column":23},"lambda_expr":"mapAttrsRecursive = f: set: mapAttrsRecursiveCond (as: true) f set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1156,"column":3},"path":["lib","attrsets","mapAttrsRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nLike `mapAttrs`, except that it recursively applies itself to the *leaf* attributes of a potentially-nested attribute set:\nthe second argument of the function will never be an attrset.\nAlso, the first argument of the mapping function is a *list* of the attribute names that form the path to the leaf attribute.\n\nFor a function that gives you control over what counts as a leaf, see `mapAttrsRecursiveCond`.\n\n:::{#map-attrs-recursive-example .example}\n# Map over leaf attributes\n\n```nix\nmapAttrsRecursive (path: value: concatStringsSep \"-\" (path ++ [value]))\n  { n = { a = \"A\"; m = { b = \"B\"; c = \"C\"; }; }; d = \"D\"; }\n```\nevaluates to\n```nix\n{ n = { a = \"n-a-A\"; m = { b = \"n-m-b-B\"; c = \"n-m-c-C\"; }; }; d = \"d-D\"; }\n```\n:::\n\n# Type\n```\nmapAttrsRecursive :: ([String] -> a -> b) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1156,"column":3},"path":["lib","attrsets","mapAttrsRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapAttrsRecursiveCond","path":["lib","attrsets","mapAttrsRecursiveCond"],"aliases":[["lib","mapAttrsRecursiveCond"]],"signature":"mapAttrsRecursiveCond :: (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1181,"column":3},"attr_expr":"mapAttrsRecursiveCond =\n    cond: f: set:\n    let\n      recurse =\n        path:\n        mapAttrs (\n          name: value:\n          if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value\n        );\n    in\n    recurse [ ] set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1182,"column":5},"lambda_expr":"mapAttrsRecursiveCond =\n    cond: f: set:\n    let\n      recurse =\n        path:\n        mapAttrs (\n          name: value:\n          if isAttrs value && cond value then recurse (path ++ [ name ]) value else f (path ++ [ name ]) value\n        );\n    in\n    recurse [ ] set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1181,"column":3},"path":["lib","attrsets","mapAttrsRecursiveCond"],"pos_type":"Attribute"}},"content":{"content":"\nLike `mapAttrsRecursive`, but it takes an additional predicate that tells it whether to recurse into an attribute set.\nIf the predicate returns false, `mapAttrsRecursiveCond` does not recurse, but instead applies the mapping function.\nIf the predicate returns true, it does recurse, and does not apply the mapping function.\n\n:::{#map-attrs-recursive-cond-example .example}\n# Map over an leaf attributes defined by a condition\n\nMap derivations to their `name` attribute.\nDerivatons are identified as attribute sets that contain `{ type = \"derivation\"; }`.\n```nix\nmapAttrsRecursiveCond\n  (as: !(as ? \"type\" && as.type == \"derivation\"))\n  (path: x: x.name)\n  attrs\n```\n:::\n\n# Type\n```\nmapAttrsRecursiveCond :: (AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1181,"column":3},"path":["lib","attrsets","mapAttrsRecursiveCond"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapAttrsToList","path":["lib","attrsets","mapAttrsToList"],"aliases":[["lib","mapAttrsToList"]],"signature":"mapAttrsToList :: (String -> a -> b) -> { [String] :: a } -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":3},"attr_expr":"mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":20},"lambda_expr":"mapAttrsToList = f: attrs: attrValues (mapAttrs f attrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":3},"path":["lib","attrsets","mapAttrsToList"],"pos_type":"Attribute"}},"content":{"content":"\nCall a function for each attribute in the given set and return\nthe result in a list.\n\n# Inputs\n\n`f`\n\n: A function, given an attribute's name and value, returns a new value.\n\n`attrs`\n\n: Attribute set to map over.\n\n# Type\n\n```\nmapAttrsToList :: (String -> a -> b) -> { [String] :: a } -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrsToList` usage example\n\n```nix\nmapAttrsToList (name: value: name + value)\n   { x = \"a\"; y = \"b\"; }\n=> [ \"xa\" \"yb\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1084,"column":3},"path":["lib","attrsets","mapAttrsToList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapAttrsToListRecursive","path":["lib","attrsets","mapAttrsToListRecursive"],"aliases":[["lib","mapAttrsToListRecursive"]],"signature":"mapAttrsToListRecursive :: ([String] -> a -> b) -> AttrSet -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1236,"column":3},"attr_expr":"mapAttrsToListRecursive = mapAttrsToListRecursiveCond (_: _: true);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1304,"column":11},"lambda_expr":"f: set:\n    let\n      mapRecursive =\n        path: value: if isAttrs value && pred path value then recurse path value else [ (f path value) ];\n      recurse = path: set: concatMap (name: mapRecursive (path ++ [ name ]) set.${name}) (attrNames set);\n    in\n    recurse [ ] set","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1236,"column":3},"path":["lib","attrsets","mapAttrsToListRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nApply a function to each leaf (non‐attribute‐set attribute) of a tree of\nnested attribute sets, returning the results of the function as a list,\nordered lexicographically by their attribute paths.\n\nLike `mapAttrsRecursive`, but concatenates the mapping function results\ninto a list.\n\n# Inputs\n\n`f`\n\n: Mapping function which, given an attribute’s path and value, returns a\n  new value.\n\n  This value will be an element of the list returned by\n  `mapAttrsToListRecursive`.\n\n  The first argument to the mapping function is a list of attribute names\n  forming the path to the leaf attribute. The second argument is the leaf\n  attribute value, which will never be an attribute set.\n\n`set`\n\n: Attribute set to map over.\n\n# Type\n\n```\nmapAttrsToListRecursive :: ([String] -> a -> b) -> AttrSet -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrsToListRecursive` usage example\n\n```nix\nmapAttrsToListRecursive (path: value: \"${concatStringsSep \".\" path}=${value}\")\n  { n = { a = \"A\"; m = { b = \"B\"; c = \"C\"; }; }; d = \"D\"; }\n=> [ \"n.a=A\" \"n.m.b=B\" \"n.m.c=C\" \"d=D\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1236,"column":3},"path":["lib","attrsets","mapAttrsToListRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapAttrsToListRecursiveCond","path":["lib","attrsets","mapAttrsToListRecursiveCond"],"aliases":[["lib","mapAttrsToListRecursiveCond"]],"signature":"mapAttrsToListRecursiveCond :: ([String] -> AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1303,"column":3},"attr_expr":"mapAttrsToListRecursiveCond =\n    pred: f: set:\n    let\n      mapRecursive =\n        path: value: if isAttrs value && pred path value then recurse path value else [ (f path value) ];\n      recurse = path: set: concatMap (name: mapRecursive (path ++ [ name ]) set.${name}) (attrNames set);\n    in\n    recurse [ ] set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1304,"column":5},"lambda_expr":"mapAttrsToListRecursiveCond =\n    pred: f: set:\n    let\n      mapRecursive =\n        path: value: if isAttrs value && pred path value then recurse path value else [ (f path value) ];\n      recurse = path: set: concatMap (name: mapRecursive (path ++ [ name ]) set.${name}) (attrNames set);\n    in\n    recurse [ ] set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1303,"column":3},"path":["lib","attrsets","mapAttrsToListRecursiveCond"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine the nodes of a tree of nested attribute sets by applying a\npredicate, then apply a function to the leaves, returning the results\nas a list, ordered lexicographically by their attribute paths.\n\nLike `mapAttrsToListRecursive`, but takes an additional predicate to\ndecide whether to recurse into an attribute set.\n\nUnlike `mapAttrsRecursiveCond` this predicate receives the attribute path\nas its first argument, in addition to the attribute set.\n\n# Inputs\n\n`pred`\n\n: Predicate to decide whether to recurse into an attribute set.\n\n  If the predicate returns true, `mapAttrsToListRecursiveCond` recurses into\n  the attribute set. If the predicate returns false, it does not recurse\n  but instead applies the mapping function, treating the attribute set as\n  a leaf.\n\n  The first argument to the predicate is a list of attribute names forming\n  the path to the attribute set. The second argument is the attribute set.\n\n`f`\n\n: Mapping function which, given an attribute’s path and value, returns a\n  new value.\n\n  This value will be an element of the list returned by\n  `mapAttrsToListRecursiveCond`.\n\n  The first argument to the mapping function is a list of attribute names\n  forming the path to the leaf attribute. The second argument is the leaf\n  attribute value, which may be an attribute set if the predicate returned\n  false.\n\n`set`\n\n: Attribute set to map over.\n\n# Type\n```\nmapAttrsToListRecursiveCond :: ([String] -> AttrSet -> Bool) -> ([String] -> a -> b) -> AttrSet -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapAttrsToListRecursiveCond` usage example\n\n```nix\nmapAttrsToListRecursiveCond\n  (path: as: !(lib.isDerivation as))\n  (path: value: \"--set=${lib.concatStringsSep \".\" path}=${toString value}\")\n  {\n    rust.optimize = 2;\n    target = {\n      riscv64-unknown-linux-gnu.linker = pkgs.lld;\n    };\n  }\n=> [ \"--set=rust.optimize=2\" \"--set=target.riscv64-unknown-linux-gnu.linker=/nix/store/sjw4h1k…\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1303,"column":3},"path":["lib","attrsets","mapAttrsToListRecursiveCond"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mapCartesianProduct","path":["lib","attrsets","mapCartesianProduct"],"aliases":[["lib","mapCartesianProduct"]],"signature":"mapCartesianProduct :: ({ [String] :: a } -> b) -> { [String] :: a } -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":950,"column":3},"attr_expr":"mapCartesianProduct = f: attrsOfLists: map f (cartesianProduct attrsOfLists);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":950,"column":25},"lambda_expr":"mapCartesianProduct = f: attrsOfLists: map f (cartesianProduct attrsOfLists);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":950,"column":3},"path":["lib","attrsets","mapCartesianProduct"],"pos_type":"Attribute"}},"content":{"content":"\nReturn the result of function `f` applied to the cartesian product of attribute set value combinations.\nEquivalent to using `cartesianProduct` followed by `map`.\n\n# Inputs\n\n`f`\n\n: A function, given an attribute set, it returns a new value.\n\n`attrsOfLists`\n\n: Attribute set with attributes that are lists of values\n\n# Type\n\n```\nmapCartesianProduct :: ({ [String] :: a } -> b) -> { [String] :: a } -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mapCartesianProduct` usage example\n\n```nix\nmapCartesianProduct ({a, b}: \"${a}-${b}\") { a = [ \"1\" \"2\" ]; b = [ \"3\" \"4\" ]; }\n=> [ \"1-3\" \"1-4\" \"2-3\" \"2-4\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":950,"column":3},"path":["lib","attrsets","mapCartesianProduct"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.matchAttrs","path":["lib","attrsets","matchAttrs"],"aliases":[["lib","matchAttrs"]],"signature":"matchAttrs :: AttrSet -> AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1800,"column":3},"attr_expr":"matchAttrs =\n    pattern: attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":5},"lambda_expr":"matchAttrs =\n    pattern: attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1800,"column":3},"path":["lib","attrsets","matchAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nRecurse into every attribute set of the first argument and check that:\n- Each attribute path also exists in the second argument.\n- If the attribute's value is not a nested attribute set, it must have the same value in the right argument.\n\n# Inputs\n\n`pattern`\n\n: Attribute set structure to match\n\n`attrs`\n\n: Attribute set to check\n\n# Type\n\n```\nmatchAttrs :: AttrSet -> AttrSet -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.matchAttrs` usage example\n\n```nix\nmatchAttrs { cpu = {}; } { cpu = { bits = 64; }; }\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1800,"column":3},"path":["lib","attrsets","matchAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.mergeAttrsList","path":["lib","attrsets","mergeAttrsList"],"aliases":[["lib","mergeAttrsList"]],"signature":"mergeAttrsList :: [AttrSet] -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1607,"column":3},"attr_expr":"mergeAttrsList =\n    list:\n    let\n      # `binaryMerge start end` merges the elements at indices `index` of `list` such that `start <= index < end`\n      # Type: Int -> Int -> AttrSet\n      binaryMerge =\n        start: end:\n        # assert start < end; # Invariant\n        if end - start >= 2 then\n          # If there's at least 2 elements, split the range in two, recurse on each part and merge the result\n          # The invariant is satisfied because each half will have at least 1 element\n          binaryMerge start (start + (end - start) / 2) // binaryMerge (start + (end - start) / 2) end\n        else\n          # Otherwise there will be exactly 1 element due to the invariant, in which case we just return it directly\n          elemAt list start;\n    in\n    if list == [ ] then\n      # Calling binaryMerge as below would not satisfy its invariant\n      { }\n    else\n      binaryMerge 0 (length list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1608,"column":5},"lambda_expr":"mergeAttrsList =\n    list:\n    let\n      # `binaryMerge start end` merges the elements at indices `index` of `list` such that `start <= index < end`\n      # Type: Int -> Int -> AttrSet\n      binaryMerge =\n        start: end:\n        # assert start < end; # Invariant\n        if end - start >= 2 then\n          # If there's at least 2 elements, split the range in two, recurse on each part and merge the result\n          # The invariant is satisfied because each half will have at least 1 element\n          binaryMerge start (start + (end - start) / 2) // binaryMerge (start + (end - start) / 2) end\n        else\n          # Otherwise there will be exactly 1 element due to the invariant, in which case we just return it directly\n          elemAt list start;\n    in\n    if list == [ ] then\n      # Calling binaryMerge as below would not satisfy its invariant\n      { }\n    else\n      binaryMerge 0 (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1607,"column":3},"path":["lib","attrsets","mergeAttrsList"],"pos_type":"Attribute"}},"content":{"content":"\nMerge a list of attribute sets together using the `//` operator.\nIn case of duplicate attributes, values from later list elements take precedence over earlier ones.\nThe result is the same as `foldl mergeAttrs { }`, but the performance is better for large inputs.\nFor n list elements, each with an attribute set containing m unique attributes, the complexity of this operation is O(nm log n).\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmergeAttrsList :: [AttrSet] -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.mergeAttrsList` usage example\n\n```nix\nmergeAttrsList [ { a = 0; b = 1; } { c = 2; d = 3; } ]\n=> { a = 0; b = 1; c = 2; d = 3; }\nmergeAttrsList [ { a = 0; } { a = 1; } ]\n=> { a = 1; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1607,"column":3},"path":["lib","attrsets","mergeAttrsList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.nameValuePair","path":["lib","attrsets","nameValuePair"],"aliases":[["lib","nameValuePair"]],"signature":"nameValuePair :: String -> a -> { name :: String; value :: a; }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":3},"attr_expr":"nameValuePair = name: value: { inherit name value; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":19},"lambda_expr":"nameValuePair = name: value: { inherit name value; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":3},"path":["lib","attrsets","nameValuePair"],"pos_type":"Attribute"}},"content":{"content":"\nUtility function that creates a `{name, value}` pair as expected by `builtins.listToAttrs`.\n\n# Inputs\n\n`name`\n\n: Attribute name\n\n`value`\n\n: Attribute value\n\n# Type\n\n```\nnameValuePair :: String -> a -> { name :: String; value :: a; }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.nameValuePair` usage example\n\n```nix\nnameValuePair \"some\" 6\n=> { name = \"some\"; value = 6; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":3},"path":["lib","attrsets","nameValuePair"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.optionalAttrs","path":["lib","attrsets","optionalAttrs"],"aliases":[["lib","optionalAttrs"]],"signature":"optionalAttrs :: Bool -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1477,"column":3},"attr_expr":"optionalAttrs = cond: as: if cond then as else { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1477,"column":19},"lambda_expr":"optionalAttrs = cond: as: if cond then as else { };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1477,"column":3},"path":["lib","attrsets","optionalAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nIf `cond` is true, return the attribute set `as`,\notherwise an empty attribute set.\n\n# Inputs\n\n`cond`\n\n: Condition under which the `as` attribute set is returned.\n\n`as`\n\n: The attribute set to return if `cond` is `true`.\n\n# Type\n\n```\noptionalAttrs :: Bool -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.optionalAttrs` usage example\n\n```nix\noptionalAttrs (true) { my = \"set\"; }\n=> { my = \"set\"; }\noptionalAttrs (false) { my = \"set\"; }\n=> { }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1477,"column":3},"path":["lib","attrsets","optionalAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.overrideExisting","path":["lib","attrsets","overrideExisting"],"aliases":[["lib","overrideExisting"]],"signature":"overrideExisting :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1853,"column":3},"attr_expr":"overrideExisting = old: new: mapAttrs (name: value: new.${name} or value) old;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1853,"column":22},"lambda_expr":"overrideExisting = old: new: mapAttrs (name: value: new.${name} or value) old;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1853,"column":3},"path":["lib","attrsets","overrideExisting"],"pos_type":"Attribute"}},"content":{"content":"\nOverride only the attributes that are already present in the old set\nuseful for deep-overriding.\n\n# Inputs\n\n`old`\n\n: Original attribute set\n\n`new`\n\n: Attribute set with attributes to override in `old`.\n\n# Type\n\n```\noverrideExisting :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.overrideExisting` usage example\n\n```nix\noverrideExisting {} { a = 1; }\n=> {}\noverrideExisting { b = 2; } { a = 1; }\n=> { b = 2; }\noverrideExisting { a = 3; b = 2; } { a = 1; }\n=> { a = 1; b = 2; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1853,"column":3},"path":["lib","attrsets","overrideExisting"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.recurseIntoAttrs","path":["lib","attrsets","recurseIntoAttrs"],"aliases":[["lib","recurseIntoAttrs"]],"signature":"recurseIntoAttrs :: AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2199,"column":3},"attr_expr":"recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2199,"column":22},"lambda_expr":"recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2199,"column":3},"path":["lib","attrsets","recurseIntoAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMake various Nix tools consider the contents of the resulting\nattribute set when looking for what to build, find, etc.\n\nThis function only affects a single attribute set; it does not\napply itself recursively for nested attribute sets.\n\n# Inputs\n\n`attrs`\n\n: An attribute set to scan for derivations.\n\n# Type\n\n```\nrecurseIntoAttrs :: AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.recurseIntoAttrs` usage example\n\n```nix\n{ pkgs ? import <nixpkgs> {} }:\n{\n  myTools = pkgs.lib.recurseIntoAttrs {\n    inherit (pkgs) hello figlet;\n  };\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2199,"column":3},"path":["lib","attrsets","recurseIntoAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.recursiveUpdate","path":["lib","attrsets","recursiveUpdate"],"aliases":[["lib","recursiveUpdate"]],"signature":"recursiveUpdate :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1761,"column":3},"attr_expr":"recursiveUpdate =\n    lhs: rhs:\n    recursiveUpdateUntil (\n      path: lhs: rhs:\n      !(isAttrs lhs && isAttrs rhs)\n    ) lhs rhs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1762,"column":5},"lambda_expr":"recursiveUpdate =\n    lhs: rhs:\n    recursiveUpdateUntil (\n      path: lhs: rhs:\n      !(isAttrs lhs && isAttrs rhs)\n    ) lhs rhs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1761,"column":3},"path":["lib","attrsets","recursiveUpdate"],"pos_type":"Attribute"}},"content":{"content":"\nA recursive variant of the update operator `//`.  The recursion\nstops when one of the attribute values is not an attribute set,\nin which case the right hand side value takes precedence over the\nleft hand side value.\n\n# Inputs\n\n`lhs`\n\n: Left attribute set of the merge.\n\n`rhs`\n\n: Right attribute set of the merge.\n\n# Type\n\n```\nrecursiveUpdate :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.recursiveUpdate` usage example\n\n```nix\nrecursiveUpdate {\n  boot.loader.grub.enable = true;\n  boot.loader.grub.device = \"/dev/hda\";\n} {\n  boot.loader.grub.device = \"\";\n}\n\nreturns: {\n  boot.loader.grub.enable = true;\n  boot.loader.grub.device = \"\";\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1761,"column":3},"path":["lib","attrsets","recursiveUpdate"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.recursiveUpdateUntil","path":["lib","attrsets","recursiveUpdateUntil"],"aliases":[["lib","recursiveUpdateUntil"]],"signature":"recursiveUpdateUntil :: ([String] -> AttrSet -> AttrSet -> Bool) -> AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1701,"column":3},"attr_expr":"recursiveUpdateUntil =\n    pred: lhs: rhs:\n    let\n      f =\n        attrPath:\n        zipAttrsWith (\n          name: values:\n          let\n            here = attrPath ++ [ name ];\n          in\n          if length values == 1 || pred here (elemAt values 1) (head values) then\n            head values\n          else\n            f here values\n        );\n    in\n    f [ ] [ rhs lhs ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1702,"column":5},"lambda_expr":"recursiveUpdateUntil =\n    pred: lhs: rhs:\n    let\n      f =\n        attrPath:\n        zipAttrsWith (\n          name: values:\n          let\n            here = attrPath ++ [ name ];\n          in\n          if length values == 1 || pred here (elemAt values 1) (head values) then\n            head values\n          else\n            f here values\n        );\n    in\n    f [ ] [ rhs lhs ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1701,"column":3},"path":["lib","attrsets","recursiveUpdateUntil"],"pos_type":"Attribute"}},"content":{"content":"\nUpdate `lhs` so that `rhs` wins for any given attribute path that occurs in both.\n\nUnlike the `//` (update) operator, which operates on a single attribute set,\nThis function views its operands `lhs` and `rhs` as a mapping from attribute *paths*\nto values.\n\nThe caller-provided function `pred` decides whether any given path is one of the following:\n\n- `true`: a value in the mapping\n- `false`: an attribute set whose purpose is to create the nesting structure.\n\n# Inputs\n\n`pred`\n\n: Predicate function (of type `List String -> Any -> Any -> Bool`)\n\n  Inputs:\n\n  - `path : List String`: the path to the current attribute as a list of strings for attribute names\n  - `lhsAtPath : Any`: the value at that path in `lhs`; same as `getAttrFromPath path lhs`\n  - `rhsAtPath : Any`: the value at that path in `rhs`; same as `getAttrFromPath path rhs`\n\n  Output:\n\n  - `true`: `path` points to a value in the mapping, and `rhsAtPath` will appear in the return value of `recursiveUpdateUntil`\n  - `false`: `path` is part of the nesting structure and will be an attrset in the return value of `recursiveUpdateUntil`\n\n  `pred` is only called for `path`s that extend prefixes for which `pred` returned `false`.\n\n`lhs`\n\n: Left attribute set of the update.\n\n`rhs`\n\n: Right attribute set of the update.\n\n# Type\n\n```\nrecursiveUpdateUntil :: ([String] -> AttrSet -> AttrSet -> Bool) -> AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.recursiveUpdateUntil` usage example\n\n```nix\nrecursiveUpdateUntil (path: lhs: rhs: path == [\"foo\"]) {\n  # left attribute set\n  foo.bar = 1;\n  foo.baz = 2;\n  bar = 3;\n} {\n  # right attribute set\n  foo.bar = 1;\n  foo.quz = 2;\n  baz = 4;\n}\n\n=> {\n  foo.bar = 1; # 'foo.*' from the 'right' set\n  foo.quz = 2; #\n  bar = 3;     # 'bar' from the 'left' set\n  baz = 4;     # 'baz' from the 'right' set\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1701,"column":3},"path":["lib","attrsets","recursiveUpdateUntil"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.removeAttrs","path":["lib","attrsets","removeAttrs"],"aliases":[["builtins","removeAttrs"],["lib","removeAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"removeAttrs","args":["set","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":36,"column":5},"attr_expr":"removeAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","attrsets","removeAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nRemove the attributes listed in *list* from *set*. The attributes\ndon’t have to exist in *set*. For instance,\n\n```nix\nremoveAttrs { x = 1; y = 2; z = 3; } [ \"a\" \"x\" \"z\" ]\n```\n\nevaluates to `{ y = 2; }`.\n","source":{"position":null,"path":["lib","attrsets","removeAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.attrsets.setAttrByPath","path":["lib","attrsets","setAttrByPath"],"aliases":[["lib","setAttrByPath"]],"signature":"setAttrByPath :: [String] -> Any -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":284,"column":3},"attr_expr":"setAttrByPath =\n    attrPath: value:\n    let\n      len = length attrPath;\n      atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); };\n    in\n    atDepth 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":285,"column":5},"lambda_expr":"setAttrByPath =\n    attrPath: value:\n    let\n      len = length attrPath;\n      atDepth = n: if n == len then value else { ${elemAt attrPath n} = atDepth (n + 1); };\n    in\n    atDepth 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":284,"column":3},"path":["lib","attrsets","setAttrByPath"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a new attribute set with `value` set at the nested attribute location specified in `attrPath`.\n\n# Inputs\n\n`attrPath`\n\n: A list of strings representing the attribute path to set\n\n`value`\n\n: The value to set at the location described by `attrPath`\n\n# Type\n\n```\nsetAttrByPath :: [String] -> Any -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.setAttrByPath` usage example\n\n```nix\nsetAttrByPath [\"a\" \"b\"] 3\n=> { a = { b = 3; }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":284,"column":3},"path":["lib","attrsets","setAttrByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.showAttrPath","path":["lib","attrsets","showAttrPath"],"aliases":[["lib","showAttrPath"]],"signature":"showAttrPath :: [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1886,"column":3},"attr_expr":"showAttrPath =\n    path:\n    if path == [ ] then \"<root attribute path>\" else concatMapStringsSep \".\" escapeNixIdentifier path;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1887,"column":5},"lambda_expr":"showAttrPath =\n    path:\n    if path == [ ] then \"<root attribute path>\" else concatMapStringsSep \".\" escapeNixIdentifier path;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1886,"column":3},"path":["lib","attrsets","showAttrPath"],"pos_type":"Attribute"}},"content":{"content":"\nTurns a list of strings into a human-readable description of those\nstrings represented as an attribute path. The result of this function is\nnot intended to be machine-readable.\nCreate a new attribute set with `value` set at the nested attribute location specified in `attrPath`.\n\n# Inputs\n\n`path`\n\n: Attribute path to render to a string\n\n# Type\n\n```\nshowAttrPath :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.showAttrPath` usage example\n\n```nix\nshowAttrPath [ \"foo\" \"10\" \"bar\" ]\n=> \"foo.\\\"10\\\".bar\"\nshowAttrPath []\n=> \"<root attribute path>\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1886,"column":3},"path":["lib","attrsets","showAttrPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.toDerivation","path":["lib","attrsets","toDerivation"],"aliases":[["lib","toDerivation"]],"signature":"toDerivation :: Path -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1429,"column":3},"attr_expr":"toDerivation =\n    path:\n    let\n      path' = builtins.storePath path;\n      res = {\n        type = \"derivation\";\n        name = sanitizeDerivationName (builtins.substring 33 (-1) (baseNameOf path'));\n        outPath = path';\n        outputs = [ \"out\" ];\n        out = res;\n        outputName = \"out\";\n      };\n    in\n    res;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1430,"column":5},"lambda_expr":"toDerivation =\n    path:\n    let\n      path' = builtins.storePath path;\n      res = {\n        type = \"derivation\";\n        name = sanitizeDerivationName (builtins.substring 33 (-1) (baseNameOf path'));\n        outPath = path';\n        outputs = [ \"out\" ];\n        out = res;\n        outputName = \"out\";\n      };\n    in\n    res;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1429,"column":3},"path":["lib","attrsets","toDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a store path to a fake derivation.\n\n# Inputs\n\n`path`\n\n: A store path to convert to a derivation.\n\n# Type\n\n```\ntoDerivation :: Path -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1429,"column":3},"path":["lib","attrsets","toDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.unionOfDisjoint","path":["lib","attrsets","unionOfDisjoint"],"aliases":[],"signature":"unionOfDisjoint :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2238,"column":3},"attr_expr":"unionOfDisjoint =\n    x: y:\n    let\n      intersection = builtins.intersectAttrs x y;\n      collisions = lib.concatStringsSep \" \" (builtins.attrNames intersection);\n      mask = builtins.mapAttrs (\n        name: value: throw \"unionOfDisjoint: collision on ${name}; complete list: ${collisions}\"\n      ) intersection;\n    in\n    (x // y) // mask;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2239,"column":5},"lambda_expr":"unionOfDisjoint =\n    x: y:\n    let\n      intersection = builtins.intersectAttrs x y;\n      collisions = lib.concatStringsSep \" \" (builtins.attrNames intersection);\n      mask = builtins.mapAttrs (\n        name: value: throw \"unionOfDisjoint: collision on ${name}; complete list: ${collisions}\"\n      ) intersection;\n    in\n    (x // y) // mask;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2238,"column":3},"path":["lib","attrsets","unionOfDisjoint"],"pos_type":"Attribute"}},"content":{"content":"\n`unionOfDisjoint x y` is equal to `x // y`, but accessing attributes present\nin both `x` and `y` will throw an error.  This operator is commutative, unlike `//`.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nunionOfDisjoint :: AttrSet -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":2238,"column":3},"path":["lib","attrsets","unionOfDisjoint"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.updateManyAttrsByPath","path":["lib","attrsets","updateManyAttrsByPath"],"aliases":[["lib","updateManyAttrsByPath"]],"signature":"updateManyAttrsByPath :: [{ path :: [String]; update :: (Any -> Any); }] -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":431,"column":3},"attr_expr":"updateManyAttrsByPath =\n    let\n      # When recursing into attributes, instead of updating the `path` of each\n      # update using `tail`, which needs to allocate an entirely new list,\n      # we just pass a prefix length to use and make sure to only look at the\n      # path without the prefix length, so that we can reuse the original list\n      # entries.\n      go =\n        prefixLength: hasValue: value: updates:\n        let\n          # Splits updates into ones on this level (split.right)\n          # And ones on levels further down (split.wrong)\n          split = partition (el: length el.path == prefixLength) updates;\n\n          # Groups updates on further down levels into the attributes they modify\n          nested = groupBy (el: elemAt el.path prefixLength) split.wrong;\n\n          # Applies only nested modification to the input value\n          withNestedMods =\n            # Return the value directly if we don't have any nested modifications\n            if split.wrong == [ ] then\n              if hasValue then\n                value\n              else\n                # Throw an error if there is no value. This `head` call here is\n                # safe, but only in this branch since `go` could only be called\n                # with `hasValue == false` for nested updates, in which case\n                # it's also always called with at least one update\n                let\n                  updatePath = (head split.right).path;\n                in\n                throw (\n                  \"updateManyAttrsByPath: Path '${showAttrPath updatePath}' does \"\n                  + \"not exist in the given value, but the first update to this \"\n                  + \"path tries to access the existing value.\"\n                )\n            else\n            # If there are nested modifications, try to apply them to the value\n            if !hasValue then\n              # But if we don't have a value, just use an empty attribute set\n              # as the value, but simplify the code a bit\n              mapAttrs (name: go (prefixLength + 1) false null) nested\n            else if isAttrs value then\n              # If we do have a value and it's an attribute set, override it\n              # with the nested modifications\n              value // mapAttrs (name: go (prefixLength + 1) (value ? ${name}) value.${name}) nested\n            else\n              # However if it's not an attribute set, we can't apply the nested\n              # modifications, throw an error\n              let\n                updatePath = (head split.wrong).path;\n              in\n              throw (\n                \"updateManyAttrsByPath: Path '${showAttrPath updatePath}' needs to \"\n                + \"be updated, but path '${showAttrPath (take prefixLength updatePath)}' \"\n                + \"of the given value is not an attribute set, so we can't \"\n                + \"update an attribute inside of it.\"\n              );\n\n          # We get the final result by applying all the updates on this level\n          # after having applied all the nested updates\n          # We use foldl instead of foldl' so that in case of multiple updates,\n          # intermediate values aren't evaluated if not needed\n        in\n        foldl (acc: el: el.update acc) withNestedMods split.right;\n\n    in\n    updates: value: go 0 true value updates;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":498,"column":5},"lambda_expr":"updates: value: go 0 true value updates","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":431,"column":3},"path":["lib","attrsets","updateManyAttrsByPath"],"pos_type":"Attribute"}},"content":{"content":"\nUpdate or set specific paths of an attribute set.\n\nTakes a list of updates to apply and an attribute set to apply them to,\nand returns the attribute set with the updates applied. Updates are\nrepresented as `{ path = ...; update = ...; }` values, where `path` is a\nlist of strings representing the attribute path that should be updated,\nand `update` is a function that takes the old value at that attribute path\nas an argument and returns the new\nvalue it should be.\n\nProperties:\n\n- Updates to deeper attribute paths are applied before updates to more\n  shallow attribute paths\n\n- Multiple updates to the same attribute path are applied in the order\n  they appear in the update list\n\n- If any but the last `path` element leads into a value that is not an\n  attribute set, an error is thrown\n\n- If there is an update for an attribute path that doesn't exist,\n  accessing the argument in the update function causes an error, but\n  intermediate attribute sets are implicitly created as needed\n\n# Type\n\n```\nupdateManyAttrsByPath :: [{ path :: [String]; update :: (Any -> Any); }] -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.updateManyAttrsByPath` usage example\n\n```nix\nupdateManyAttrsByPath [\n  {\n    path = [ \"a\" \"b\" ];\n    update = old: { d = old.c; };\n  }\n  {\n    path = [ \"a\" \"b\" \"c\" ];\n    update = old: old + 1;\n  }\n  {\n    path = [ \"x\" \"y\" ];\n    update = old: \"xy\";\n  }\n] { a.b.c = 0; }\n=> { a = { b = { d = 1; }; }; x = { y = \"xy\"; }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":431,"column":3},"path":["lib","attrsets","updateManyAttrsByPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.zipAttrs","path":["lib","attrsets","zipAttrs"],"aliases":[["lib","zipAttrs"]],"signature":"zipAttrs :: [{ [String] :: a }] -> { [String] :: [a] }\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1574,"column":3},"attr_expr":"zipAttrs = zipAttrsWith (name: values: values);","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1574,"column":3},"path":["lib","attrsets","zipAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge sets of attributes and combine each attribute value in to a list.\n\nLike `lib.attrsets.zipAttrsWith` with `(name: values: values)` as the function.\n\n# Type\n\n```\nzipAttrs :: [{ [String] :: a }] -> { [String] :: [a] }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.zipAttrs` usage example\n\n```nix\nzipAttrs [{a = \"x\";} {a = \"y\"; b = \"z\";}]\n=> { a = [\"x\" \"y\"]; b = [\"z\"]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1574,"column":3},"path":["lib","attrsets","zipAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.zipAttrsWith","path":["lib","attrsets","zipAttrsWith"],"aliases":[["builtins","zipAttrsWith"],["lib","zipAttrsWith"]],"signature":"zipAttrsWith :: (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n","is_primop":true,"primop_meta":{"name":"zipAttrsWith","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1549,"column":3},"attr_expr":"zipAttrsWith =\n    builtins.zipAttrsWith or (f: sets: zipAttrsWithNames (concatMap attrNames sets) f sets);","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1549,"column":3},"path":["lib","attrsets","zipAttrsWith"],"pos_type":"Attribute"}},"content":{"content":"\nMerge sets of attributes and use the function `f` to merge attribute values.\nLike `lib.attrsets.zipAttrsWithNames` with all key names are passed for `names`.\n\nImplementation note: Common names appear multiple times in the list of\nnames, hopefully this does not affect the system because the maximal\nlaziness avoid computing twice the same expression and `listToAttrs` does\nnot care about duplicated attribute names.\n\n# Type\n\n```\nzipAttrsWith :: (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.zipAttrsWith` usage example\n\n```nix\nzipAttrsWith (name: values: values) [{a = \"x\";} {a = \"y\"; b = \"z\";}]\n=> { a = [\"x\" \"y\"]; b = [\"z\"]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1549,"column":3},"path":["lib","attrsets","zipAttrsWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.attrsets.zipAttrsWithNames","path":["lib","attrsets","zipAttrsWithNames"],"aliases":[["lib","zipAttrsWithNames"]],"signature":"zipAttrsWithNames :: [String] -> (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1514,"column":3},"attr_expr":"zipAttrsWithNames =\n    names: f: sets:\n    listToAttrs (\n      map (name: {\n        inherit name;\n        value = f name (catAttrs name sets);\n      }) names\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1515,"column":5},"lambda_expr":"zipAttrsWithNames =\n    names: f: sets:\n    listToAttrs (\n      map (name: {\n        inherit name;\n        value = f name (catAttrs name sets);\n      }) names\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1514,"column":3},"path":["lib","attrsets","zipAttrsWithNames"],"pos_type":"Attribute"}},"content":{"content":"\nMerge sets of attributes and use the function `f` to merge attributes\nvalues.\n\n# Inputs\n\n`names`\n\n: List of attribute names to zip.\n\n`f`\n\n: A function, accepts an attribute name, all the values, and returns a combined value.\n\n`sets`\n\n: List of values from the list of attribute sets.\n\n# Type\n\n```\nzipAttrsWithNames :: [String] -> (String -> [a] -> b) -> [{ [String] :: a }] -> { [String] :: b }\n```\n\n# Examples\n:::{.example}\n## `lib.attrsets.zipAttrsWithNames` usage example\n\n```nix\nzipAttrsWithNames [\"a\"] (name: vs: vs) [{a = \"x\";} {a = \"y\"; b = \"z\";}]\n=> { a = [\"x\" \"y\"]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1514,"column":3},"path":["lib","attrsets","zipAttrsWithNames"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cli.toCommandLine","path":["lib","cli","toCommandLine"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":423,"column":3},"attr_expr":"toCommandLine =\n    optionFormat: attrs:\n    let\n      handlePair =\n        k: v:\n        if k == \"\" then\n          lib.throw \"lib.cli.toCommandLine only accepts non-empty option names.\"\n        else if builtins.isList v then\n          builtins.concatMap (handleOption k) v\n        else\n          handleOption k v;\n\n      handleOption = k: renderOption (optionFormat k) k;\n\n      renderOption =\n        {\n          option,\n          sep,\n          explicitBool,\n          formatArg ? lib.generators.mkValueStringDefault { },\n        }:\n        k: v:\n        if v == null || (!explicitBool && v == false) then\n          [ ]\n        else if !explicitBool && v == true then\n          [ option ]\n        else\n          let\n            arg = formatArg v;\n          in\n          if sep != null then\n            [ \"${option}${sep}${arg}\" ]\n          else\n            [\n              option\n              arg\n            ];\n    in\n    builtins.concatLists (lib.mapAttrsToList handlePair attrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":424,"column":5},"lambda_expr":"toCommandLine =\n    optionFormat: attrs:\n    let\n      handlePair =\n        k: v:\n        if k == \"\" then\n          lib.throw \"lib.cli.toCommandLine only accepts non-empty option names.\"\n        else if builtins.isList v then\n          builtins.concatMap (handleOption k) v\n        else\n          handleOption k v;\n\n      handleOption = k: renderOption (optionFormat k) k;\n\n      renderOption =\n        {\n          option,\n          sep,\n          explicitBool,\n          formatArg ? lib.generators.mkValueStringDefault { },\n        }:\n        k: v:\n        if v == null || (!explicitBool && v == false) then\n          [ ]\n        else if !explicitBool && v == true then\n          [ option ]\n        else\n          let\n            arg = formatArg v;\n          in\n          if sep != null then\n            [ \"${option}${sep}${arg}\" ]\n          else\n            [\n              option\n              arg\n            ];\n    in\n    builtins.concatLists (lib.mapAttrsToList handlePair attrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":423,"column":3},"path":["lib","cli","toCommandLine"],"pos_type":"Attribute"}},"content":{"content":"\nConverts an attribute set into a list of command-line arguments.\n\nThis is the most general command-line construction helper in `lib.cli`.\nIt is parameterized by an `optionFormat` function, which defines how each\noption name and its value are rendered.\n\nAll other helpers in this file are thin wrappers around this function.\n\n`toCommandLine` returns a *flat list of strings*, suitable for use as `argv`\narguments or for further processing (e.g. shell escaping).\n\n# Inputs\n\n`optionFormat`\n\n: A function that takes the option name and returns an option spec, where\n  the option spec is an attribute set describing how the option should be\n  rendered.\n\n  The returned attribute set must contain:\n\n  - `option` (string):\n    The option flag itself, e.g. `\"-v\"` or `\"--verbose\"`.\n\n  - `sep` (string or null):\n    How to separate the option from its argument.\n    If `null`, the option and its argument are returned as two separate\n    list elements.\n    If a string (e.g. `\"=\"`), the option and argument are concatenated.\n\n  - `explicitBool` (bool):\n    Controls how boolean values are handled:\n    - `false`:\n      `true` emits only the option flag, `false` emits nothing.\n    - `true`:\n      both `true` and `false` are rendered as explicit arguments via\n      `formatArg`.\n\n  Optional fields:\n\n  - `formatArg`:\n    Converts the option value to a string.\n    Defaults to `lib.generators.mkValueStringDefault { }`.\n\n`attrs`\n\n: An attribute set mapping option names to values.\n\n  Supported value types:\n  - null: omitted entirely\n  - bool: handled according to `explicitBool`\n  - list: each element is rendered as a separate occurrence of the option\n  - any other value: rendered as a single option argument\n\n  Empty attribute names are rejected.\n\n# Examples\n\n:::{.example}\n## `lib.cli.toCommandLine` basic usage example\n\n```nix\nlet\n  optionFormat = optionName: {\n    option = \"-${optionName}\";\n    sep = \"=\";\n    explicitBool = true;\n  };\nin\nlib.cli.toCommandLine optionFormat {\n  v = true;\n  verbose = [\n    true\n    true\n    false\n    null\n  ];\n  i = \".bak\";\n  testsuite = [\n    \"unit\"\n    \"integration\"\n  ];\n  e = [\n    \"s/a/b/\"\n    \"s/b/c/\"\n  ];\n  n = false;\n  data = builtins.toJSON { id = 0; };\n}\n=> [\n  \"-data={\\\"id\\\":0}\"\n  \"-e=s/a/b/\"\n  \"-e=s/b/c/\"\n  \"-i=.bak\"\n  \"-n=false\"\n  \"-testsuite=unit\"\n  \"-testsuite=integration\"\n  \"-v=true\"\n  \"-verbose=true\"\n  \"-verbose=true\"\n  \"-verbose=false\"\n]\n```\n:::\n\n:::{.example}\n## `lib.cli.toCommandLine` usage with a more complex option format\n\n```nix\nlet\n  optionFormat =\n    optionName:\n    let\n      isLong = builtins.stringLength optionName > 1;\n    in\n    {\n      option = if isLong then \"--${optionName}\" else \"-${optionName}\";\n      sep = if isLong then \"=\" else null;\n      explicitBool = true;\n      formatArg =\n        value:\n        if builtins.isAttrs value then\n          builtins.toJSON value\n        else\n          lib.generators.mkValueStringDefault { } value;\n    };\nin\nlib.cli.toCommandLine optionFormat {\n  v = true;\n  verbose = [\n    true\n    true\n    false\n    null\n  ];\n  n = false;\n  output = \"result.txt\";\n  testsuite = [\n    \"unit\"\n    \"integration\"\n  ];\n  data = {\n    id = 0;\n    name = \"test\";\n  };\n}\n=> [\n  \"--data={\\\"id\\\":0,\\\"name\\\":\\\"test\\\"}\"\n  \"-n\"\n  \"false\"\n  \"--output=result.txt\"\n  \"--testsuite=unit\"\n  \"--testsuite=integration\"\n  \"-v\"\n  \"true\"\n  \"--verbose=true\"\n  \"--verbose=true\"\n  \"--verbose=false\"\n]\n```\n:::\n\n# See also\n\n- `lib.cli.toCommandLineShell`\n- `lib.cli.toCommandLineGNU`\n- `lib.cli.toCommandLineShellGNU`\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":423,"column":3},"path":["lib","cli","toCommandLine"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cli.toCommandLineGNU","path":["lib","cli","toCommandLineGNU"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":228,"column":3},"attr_expr":"toCommandLineGNU =\n    {\n      isLong ? optionName: builtins.stringLength optionName > 1,\n      explicitBool ? false,\n      formatArg ? lib.generators.mkValueStringDefault { },\n    }:\n    let\n      optionFormat = optionName: {\n        option = if isLong optionName then \"--${optionName}\" else \"-${optionName}\";\n        sep = if isLong optionName then \"=\" else \"\";\n        inherit explicitBool formatArg;\n      };\n    in\n    lib.cli.toCommandLine optionFormat;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":229,"column":5},"lambda_expr":"toCommandLineGNU =\n    {\n      isLong ? optionName: builtins.stringLength optionName > 1,\n      explicitBool ? false,\n      formatArg ? lib.generators.mkValueStringDefault { },\n    }:\n    let\n      optionFormat = optionName: {\n        option = if isLong optionName then \"--${optionName}\" else \"-${optionName}\";\n        sep = if isLong optionName then \"=\" else \"\";\n        inherit explicitBool formatArg;\n      };\n    in\n    lib.cli.toCommandLine optionFormat;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":228,"column":3},"path":["lib","cli","toCommandLineGNU"],"pos_type":"Attribute"}},"content":{"content":"\nConverts an attribute set into a list of GNU-style command-line arguments.\n\n`toCommandLineGNU` returns a list of string arguments.\n\n# Inputs\n\n`options`\n\n: Options, see below.\n\n`attrs`\n\n: The attributes to transform into arguments.\n\n## Options\n\n`isLong`\n\n: A function that determines whether an option is long or short.\n\n`explicitBool`\n\n: Whether or not boolean option arguments should be formatted explicitly.\n\n`formatArg`\n\n: A function that turns the option argument into a string.\n\n# Examples\n\n:::{.example}\n## `lib.cli.toCommandLineGNU` usage example\n\n```nix\nlib.cli.toCommandLineGNU {} {\n  v = true;\n  verbose = [true true false null];\n  i = \".bak\";\n  testsuite = [\"unit\" \"integration\"];\n  e = [\"s/a/b/\" \"s/b/c/\"];\n  n = false;\n  data = builtins.toJSON {id = 0;};\n}\n=> [\n  \"--data={\\\"id\\\":0}\"\n  \"-es/a/b/\"\n  \"-es/b/c/\"\n  \"-i.bak\"\n  \"--testsuite=unit\"\n  \"--testsuite=integration\"\n  \"-v\"\n  \"--verbose\"\n  \"--verbose\"\n]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":228,"column":3},"path":["lib","cli","toCommandLineGNU"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cli.toCommandLineShell","path":["lib","cli","toCommandLineShell"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":251,"column":3},"attr_expr":"toCommandLineShell =\n    optionFormat: attrs: lib.escapeShellArgs (lib.cli.toCommandLine optionFormat attrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":252,"column":5},"lambda_expr":"toCommandLineShell =\n    optionFormat: attrs: lib.escapeShellArgs (lib.cli.toCommandLine optionFormat attrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":251,"column":3},"path":["lib","cli","toCommandLineShell"],"pos_type":"Attribute"}},"content":{"content":"\nConverts the given attributes into a single shell-escaped command-line\nstring.\nSimilar to `toCommandLine`, but returns a single escaped string instead of\na list of arguments.\nFor further reference see:\n[`lib.cli.toCommandLine`](#function-library-lib.cli.toCommandLine)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":251,"column":3},"path":["lib","cli","toCommandLineShell"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cli.toCommandLineShellGNU","path":["lib","cli","toCommandLineShellGNU"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":166,"column":3},"attr_expr":"toCommandLineShellGNU =\n    options: attrs: lib.escapeShellArgs (lib.cli.toCommandLineGNU options attrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":167,"column":5},"lambda_expr":"toCommandLineShellGNU =\n    options: attrs: lib.escapeShellArgs (lib.cli.toCommandLineGNU options attrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":166,"column":3},"path":["lib","cli","toCommandLineShellGNU"],"pos_type":"Attribute"}},"content":{"content":"\nConverts the given attributes into a single shell-escaped command-line\nstring.\nSimilar to `toCommandLineGNU`, but returns a single escaped string instead\nof a list of arguments.\nFor further reference see:\n[`lib.cli.toCommandLineGNU`](#function-library-lib.cli.toCommandLineGNU)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":166,"column":3},"path":["lib","cli","toCommandLineShellGNU"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cli.toGNUCommandLine","path":["lib","cli","toGNUCommandLine"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":118,"column":3},"attr_expr":"toGNUCommandLine =\n    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2511)\n      \"lib.cli.toGNUCommandLine is deprecated, please use lib.cli.toCommandLine or lib.cli.toCommandLineShellGNU instead.\"\n      (\n        {\n          mkOptionName ? k: if builtins.stringLength k == 1 then \"-${k}\" else \"--${k}\",\n\n          mkBool ? k: v: lib.optional v (mkOptionName k),\n\n          mkList ? k: v: lib.concatMap (mkOption k) v,\n\n          mkOption ?\n            k: v:\n            if v == null then\n              [ ]\n            else if optionValueSeparator == null then\n              [\n                (mkOptionName k)\n                (lib.generators.mkValueStringDefault { } v)\n              ]\n            else\n              [ \"${mkOptionName k}${optionValueSeparator}${lib.generators.mkValueStringDefault { } v}\" ],\n\n          optionValueSeparator ? null,\n        }:\n        options:\n        let\n          render =\n            k: v:\n            if builtins.isBool v then\n              mkBool k v\n            else if builtins.isList v then\n              mkList k v\n            else\n              mkOption k v;\n\n        in\n        builtins.concatLists (lib.mapAttrsToList render options)\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":122,"column":9},"lambda_expr":"{\n          mkOptionName ? k: if builtins.stringLength k == 1 then \"-${k}\" else \"--${k}\",\n\n          mkBool ? k: v: lib.optional v (mkOptionName k),\n\n          mkList ? k: v: lib.concatMap (mkOption k) v,\n\n          mkOption ?\n            k: v:\n            if v == null then\n              [ ]\n            else if optionValueSeparator == null then\n              [\n                (mkOptionName k)\n                (lib.generators.mkValueStringDefault { } v)\n              ]\n            else\n              [ \"${mkOptionName k}${optionValueSeparator}${lib.generators.mkValueStringDefault { } v}\" ],\n\n          optionValueSeparator ? null,\n        }:\n        options:\n        let\n          render =\n            k: v:\n            if builtins.isBool v then\n              mkBool k v\n            else if builtins.isList v then\n              mkList k v\n            else\n              mkOption k v;\n\n        in\n        builtins.concatLists (lib.mapAttrsToList render options)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":118,"column":3},"path":["lib","cli","toGNUCommandLine"],"pos_type":"Attribute"}},"content":{"content":"\nAutomatically convert an attribute set to a list of command-line options.\n\n`toGNUCommandLine` returns a list of string arguments.\n\n# Inputs\n\n`options`\n\n: How to format the arguments, see below.\n\n`attrs`\n\n: The attributes to transform into arguments.\n\n## Options\n\n`mkOptionName`\n\n: How to string-format the option name;\nBy default one character is a short option (`-`), more than one characters a long option (`--`).\n\n`mkBool`\n\n: How to format a boolean value to a command list;\nBy default it’s a flag option (only the option name if true, left out completely if false).\n\n`mkList`\n\n: How to format a list value to a command list;\nBy default the option name is repeated for each value and `mkOption` is applied to the values themselves.\n\n`mkOption`\n\n: How to format any remaining value to a command list;\nOn the toplevel, booleans and lists are handled by `mkBool` and `mkList`, though they can still appear as values of a list.\nBy default, everything is printed verbatim and complex types are forbidden (lists, attrsets, functions). `null` values are omitted.\n\n`optionValueSeparator`\n\n: How to separate an option from its flag;\nBy default, there is no separator, so option `-c` and value `5` would become `[\"-c\" \"5\"]`.\nThis is useful if the command requires equals, for example, `-c=5`.\n\n# Examples\n\n:::{.example}\n## `lib.cli.toGNUCommandLine` usage example\n\n```nix\ncli.toGNUCommandLine {} {\n  data = builtins.toJSON { id = 0; };\n  X = \"PUT\";\n  retry = 3;\n  retry-delay = null;\n  url = [ \"https://example.com/foo\" \"https://example.com/bar\" ];\n  silent = false;\n  verbose = true;\n}\n=> [\n  \"-X\" \"PUT\"\n  \"--data\" \"{\\\"id\\\":0}\"\n  \"--retry\" \"3\"\n  \"--url\" \"https://example.com/foo\"\n  \"--url\" \"https://example.com/bar\"\n  \"--verbose\"\n]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":118,"column":3},"path":["lib","cli","toGNUCommandLine"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.cli.toGNUCommandLineShell","path":["lib","cli","toGNUCommandLineShell"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":42,"column":3},"attr_expr":"toGNUCommandLineShell =\n    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2511)\n      \"lib.cli.toGNUCommandLineShell is deprecated, please use lib.cli.toCommandLineShell or lib.cli.toCommandLineShellGNU instead.\"\n      (options: attrs: lib.escapeShellArgs (lib.cli.toGNUCommandLine options attrs));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":45,"column":8},"lambda_expr":"options: attrs: lib.escapeShellArgs (lib.cli.toGNUCommandLine options attrs)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":42,"column":3},"path":["lib","cli","toGNUCommandLineShell"],"pos_type":"Attribute"}},"content":{"content":"\nAutomatically convert an attribute set to command-line options.\n\nThis helps protect against malformed command lines and also to reduce\nboilerplate related to command-line construction for simple use cases.\n\n`toGNUCommandLineShell` returns an escaped shell string.\n\n# Inputs\n\n`options`\n\n: How to format the arguments, see `toGNUCommandLine`\n\n`attrs`\n\n: The attributes to transform into arguments.\n\n# Examples\n\n:::{.example}\n## `lib.cli.toGNUCommandLineShell` usage example\n\n```nix\ncli.toGNUCommandLineShell {} {\n  data = builtins.toJSON { id = 0; };\n  X = \"PUT\";\n  retry = 3;\n  retry-delay = null;\n  url = [ \"https://example.com/foo\" \"https://example.com/bar\" ];\n  silent = false;\n  verbose = true;\n}\n=> \"'-X' 'PUT' '--data' '{\\\"id\\\":0}' '--retry' '3' '--url' 'https://example.com/foo' '--url' 'https://example.com/bar' '--verbose'\";\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/cli.nix","line":42,"column":3},"path":["lib","cli","toGNUCommandLineShell"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.callPackageWith","path":["lib","customisation","callPackageWith"],"aliases":[["lib","callPackageWith"]],"signature":"callPackageWith :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":266,"column":3},"attr_expr":"callPackageWith =\n    let\n      makeErrorMessage =\n        autoArgs: fn: args: fargs: unpassedArgs:\n        let\n          # The first missing arg\n          arg = head (\n            # Filter out the default args. We did a similar computation in the\n            # happy path, but we're okay recomputing it in an error case\n            filter (name: !fargs.${name}) (attrNames unpassedArgs)\n          );\n          # Get a list of suggested argument names for a given missing one\n          getSuggestions =\n            arg:\n            pipe (autoArgs // args) [\n              attrNames\n              # Only use ones that are at most 2 edits away. While mork would work,\n              # levenshteinAtMost is only fast for 2 or less.\n              (filter (levenshteinAtMost 2 arg))\n              # Put strings with shorter distance first\n              (sortOn (levenshtein arg))\n              # Only take the first couple results\n              (take 3)\n              # Quote all entries\n              (map (x: \"\\\"\" + x + \"\\\"\"))\n            ];\n\n          prettySuggestions =\n            suggestions:\n            if suggestions == [ ] then\n              \"\"\n            else if length suggestions == 1 then\n              \", did you mean ${elemAt suggestions 0}?\"\n            else\n              \", did you mean ${concatStringsSep \", \" (lib.init suggestions)} or ${lib.last suggestions}?\";\n\n          loc = unsafeGetAttrPos arg fargs;\n          loc' = if loc != null then loc.file + \":\" + toString loc.line else \"<unknown location>\";\n        in\n        \"lib.customisation.callPackageWith: Function called without required argument \\\"${arg}\\\" at ${loc'}${prettySuggestions (getSuggestions arg)}\";\n    in\n    autoArgs: fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":5},"lambda_expr":"autoArgs: fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":266,"column":3},"path":["lib","customisation","callPackageWith"],"pos_type":"Attribute"}},"content":{"content":"\nCall the package function in the file `fn` with the required\narguments automatically.  The function is called with the\narguments `args`, but any missing arguments are obtained from\n`autoArgs`.  This function is intended to be partially\nparameterised, e.g.,\n\n  ```nix\n  callPackage = callPackageWith pkgs;\n  pkgs = {\n    libfoo = callPackage ./foo.nix { };\n    libbar = callPackage ./bar.nix { };\n  };\n  ```\n\nIf the `libbar` function expects an argument named `libfoo`, it is\nautomatically passed as an argument.  Overrides or missing\narguments can be supplied in `args`, e.g.\n\n  ```nix\n  libbar = callPackage ./bar.nix {\n    libfoo = null;\n    enableX11 = true;\n  };\n  ```\n\n<!-- TODO: Apply \"Example:\" tag to the examples above -->\n\n# Inputs\n\n`autoArgs`\n\n: 1\\. Function argument\n\n`fn`\n\n: 2\\. Function argument\n\n`args`\n\n: 3\\. Function argument\n\n# Type\n\n```\ncallPackageWith :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":266,"column":3},"path":["lib","customisation","callPackageWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.callPackagesWith","path":["lib","customisation","callPackagesWith"],"aliases":[["lib","callPackagesWith"]],"signature":"callPackagesWith :: AttrSet -> ((AttrSet -> AttrSet) | Path) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":356,"column":3},"attr_expr":"callPackagesWith =\n    autoArgs: fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      auto = intersectAttrs (functionArgs f) autoArgs;\n      mirrorArgs = mirrorFunctionArgs f;\n      origArgs = auto // args;\n      pkgs = f origArgs;\n      mkAttrOverridable = name: _: makeOverridable (mirrorArgs (newArgs: (f newArgs).${name})) origArgs;\n    in\n    if isDerivation pkgs then\n      throw (\n        \"function `callPackages` was called on a *single* derivation \"\n        + ''\"${pkgs.name or \"<unknown-name>\"}\";''\n        + \" did you mean to use `callPackage` instead?\"\n      )\n    else\n      mapAttrs mkAttrOverridable pkgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":357,"column":5},"lambda_expr":"callPackagesWith =\n    autoArgs: fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      auto = intersectAttrs (functionArgs f) autoArgs;\n      mirrorArgs = mirrorFunctionArgs f;\n      origArgs = auto // args;\n      pkgs = f origArgs;\n      mkAttrOverridable = name: _: makeOverridable (mirrorArgs (newArgs: (f newArgs).${name})) origArgs;\n    in\n    if isDerivation pkgs then\n      throw (\n        \"function `callPackages` was called on a *single* derivation \"\n        + ''\"${pkgs.name or \"<unknown-name>\"}\";''\n        + \" did you mean to use `callPackage` instead?\"\n      )\n    else\n      mapAttrs mkAttrOverridable pkgs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":356,"column":3},"path":["lib","customisation","callPackagesWith"],"pos_type":"Attribute"}},"content":{"content":"\nLike `callPackage`, but for a function that returns an attribute\nset of derivations. The override function is added to the\nindividual attributes.\n\n# Inputs\n\n`autoArgs`\n\n: 1\\. Function argument\n\n`fn`\n\n: 2\\. Function argument\n\n`args`\n\n: 3\\. Function argument\n\n# Type\n\n```\ncallPackagesWith :: AttrSet -> ((AttrSet -> AttrSet) | Path) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":356,"column":3},"path":["lib","customisation","callPackagesWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.extendDerivation","path":["lib","customisation","extendDerivation"],"aliases":[["lib","extendDerivation"]],"signature":"extendDerivation :: Bool -> Any -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":399,"column":3},"attr_expr":"extendDerivation =\n    condition: passthru: drv:\n    let\n      commonAttrs =\n        drv\n        // listToAttrs (\n          outputsList\n          ++ [\n            {\n              name = \"all\";\n              value = map (x: x.value) outputsList;\n            }\n          ]\n        )\n        // passthru\n        // {\n          drvPath =\n            assert condition;\n            drv.drvPath;\n          outPath =\n            assert condition;\n            drv.outPath;\n        };\n\n      outputsList = map (outputName: {\n        name = outputName;\n        value = commonAttrs // {\n          inherit (drv.${outputName}) type outputName;\n          outputSpecified = true;\n          drvPath =\n            assert condition;\n            drv.${outputName}.drvPath;\n          outPath =\n            assert condition;\n            drv.${outputName}.outPath;\n          # TODO: give the derivation control over the outputs.\n          #       `overrideAttrs` may not be the only attribute that needs\n          #       updating when switching outputs.\n          # TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.\n          ${if passthru ? overrideAttrs then \"overrideAttrs\" else null} =\n            f: (passthru.overrideAttrs f).${outputName};\n        };\n      }) (drv.outputs or [ \"out\" ]);\n    in\n    commonAttrs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":400,"column":5},"lambda_expr":"extendDerivation =\n    condition: passthru: drv:\n    let\n      commonAttrs =\n        drv\n        // listToAttrs (\n          outputsList\n          ++ [\n            {\n              name = \"all\";\n              value = map (x: x.value) outputsList;\n            }\n          ]\n        )\n        // passthru\n        // {\n          drvPath =\n            assert condition;\n            drv.drvPath;\n          outPath =\n            assert condition;\n            drv.outPath;\n        };\n\n      outputsList = map (outputName: {\n        name = outputName;\n        value = commonAttrs // {\n          inherit (drv.${outputName}) type outputName;\n          outputSpecified = true;\n          drvPath =\n            assert condition;\n            drv.${outputName}.drvPath;\n          outPath =\n            assert condition;\n            drv.${outputName}.outPath;\n          # TODO: give the derivation control over the outputs.\n          #       `overrideAttrs` may not be the only attribute that needs\n          #       updating when switching outputs.\n          # TODO: also add overrideAttrs when overrideAttrs is not custom, e.g. when not splicing.\n          ${if passthru ? overrideAttrs then \"overrideAttrs\" else null} =\n            f: (passthru.overrideAttrs f).${outputName};\n        };\n      }) (drv.outputs or [ \"out\" ]);\n    in\n    commonAttrs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":399,"column":3},"path":["lib","customisation","extendDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nAdd attributes to each output of a derivation without changing\nthe derivation itself and check a given condition when evaluating.\n\n# Inputs\n\n`condition`\n\n: 1\\. Function argument\n\n`passthru`\n\n: 2\\. Function argument\n\n`drv`\n\n: 3\\. Function argument\n\n# Type\n\n```\nextendDerivation :: Bool -> Any -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":399,"column":3},"path":["lib","customisation","extendDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.extendMkDerivation","path":["lib","customisation","extendMkDerivation"],"aliases":[["lib","extendMkDerivation"]],"signature":"extendMkDerivation ::\n  {\n    constructDrv :: (FixedPointArgs | AttrSet) -> Derivation;\n    excludeDrvArgNames :: [String];\n    excludeFunctionArgNames :: [String];\n    extendDrvArgs :: AttrSet -> AttrSet -> AttrSet;\n    inheritFunctionArgs :: Bool;\n    transformDrv :: Derivation -> Derivation;\n  }\n  -> ((FixedPointArgs | AttrSet) -> Derivation)\n\nFixedPointArgs :: AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":853,"column":3},"attr_expr":"extendMkDerivation =\n    {\n      constructDrv,\n      excludeDrvArgNames ? [ ],\n      excludeFunctionArgNames ? [ ],\n      extendDrvArgs,\n      inheritFunctionArgs ? true,\n      transformDrv ? id,\n    }:\n    {\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":854,"column":5},"lambda_expr":"extendMkDerivation =\n    {\n      constructDrv,\n      excludeDrvArgNames ? [ ],\n      excludeFunctionArgNames ? [ ],\n      extendDrvArgs,\n      inheritFunctionArgs ? true,\n      transformDrv ? id,\n    }:\n    {\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":853,"column":3},"path":["lib","customisation","extendMkDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nDefine a `mkDerivation`-like function based on another `mkDerivation`-like function.\n\n[`stdenv.mkDerivation`](#part-stdenv) gives access to\nits final set of derivation attributes when it is passed a function,\nor when it is passed an overlay-style function in `overrideAttrs`.\n\nInstead of composing new `stdenv.mkDerivation`-like build helpers\nusing normal function composition,\n`extendMkDerivation` makes sure that the returned build helper\nsupports such first class recursion like `mkDerivation` does.\n\n`extendMkDerivation` takes an extra attribute set to configure its behaviour.\nOne can optionally specify\n`transformDrv` to specify a function to apply to the result derivation,\nor `inheritFunctionArgs` to decide whether to inherit the `__functionArgs`\nfrom the base build helper.\n\n# Inputs\n\n`extendMkDerivation`-specific configurations\n: `constructDrv` (required)\n  : Base build helper, the `mkDerivation`-like build helper to extend.\n\n  `excludeDrvArgNames` (default to `[ ]`)\n  : Argument names not to pass from the input fixed-point arguments to `constructDrv`.\n    It doesn't apply to the updating arguments returned by `extendDrvArgs`.\n\n  `excludeFunctionArgNames` (default to `[ ]`)\n  : `__functionArgs` attribute names to remove from the result build helper.\n    `excludeFunctionArgNames` is useful for argument deprecation while avoiding ellipses.\n\n  `extendDrvArgs` (required)\n  : An extension (overlay) of the argument set, like the one taken by [`overrideAttrs`](#sec-pkg-overrideAttrs) but applied before passing to `constructDrv`.\n\n  `inheritFunctionArgs` (default to `true`)\n  : Whether to inherit `__functionArgs` from the base build helper.\n    Set `inheritFunctionArgs` to `false` when `extendDrvArgs`'s `args` set pattern does not contain an ellipsis.\n\n  `transformDrv` (default to `lib.id`)\n  : Function to apply to the result derivation.\n\n# Type\n\n```\nextendMkDerivation ::\n  {\n    constructDrv :: (FixedPointArgs | AttrSet) -> Derivation;\n    excludeDrvArgNames :: [String];\n    excludeFunctionArgNames :: [String];\n    extendDrvArgs :: AttrSet -> AttrSet -> AttrSet;\n    inheritFunctionArgs :: Bool;\n    transformDrv :: Derivation -> Derivation;\n  }\n  -> ((FixedPointArgs | AttrSet) -> Derivation)\n\nFixedPointArgs :: AttrSet -> AttrSet\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.extendMkDerivation` usage example\n```nix-repl\nmkLocalDerivation = lib.extendMkDerivation {\n  constructDrv = pkgs.stdenv.mkDerivation;\n  excludeDrvArgNames = [ \"specialArg\" ];\n  extendDrvArgs =\n    finalAttrs: args@{ preferLocalBuild ? true, allowSubstitute ? false, specialArg ? (_: false), ... }:\n    { inherit preferLocalBuild allowSubstitute; passthru = { inherit specialArg; } // args.passthru or { }; };\n}\n\nmkLocalDerivation.__functionArgs\n=> { allowSubstitute = true; preferLocalBuild = true; specialArg = true; }\n\nmkLocalDerivation { inherit (pkgs.hello) pname version src; specialArg = _: false; }\n=> «derivation /nix/store/xirl67m60ahg6jmzicx43a81g635g8z8-hello-2.12.1.drv»\n\nmkLocalDerivation (finalAttrs: { inherit (pkgs.hello) pname version src; specialArg = _: false; })\n=> «derivation /nix/store/xirl67m60ahg6jmzicx43a81g635g8z8-hello-2.12.1.drv»\n\n(mkLocalDerivation (finalAttrs: { inherit (pkgs.hello) pname version src; passthru = { foo = \"a\"; bar = \"${finalAttrs.passthru.foo}b\"; }; })).bar\n=> \"ab\"\n```\n:::\n\n:::{.note}\nIf `transformDrv` is specified,\nit should take care of existing attributes that perform overriding\n(e.g., [`overrideAttrs`](#sec-pkg-overrideAttrs))\nto ensure that the overriding functionality of the result derivation\nwork as expected.\nModifications that breaks the overriding include\ndirect [attribute set update](https://nixos.org/manual/nix/stable/language/operators#update)\nand [`lib.extendDerivation`](#function-library-lib.customisation.extendDerivation).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":853,"column":3},"path":["lib","customisation","extendMkDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.hydraJob","path":["lib","customisation","hydraJob"],"aliases":[["lib","hydraJob"]],"signature":"hydraJob :: (Derivation | Null) -> (Derivation | Null)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":463,"column":3},"attr_expr":"hydraJob =\n    drv:\n    let\n      outputs = drv.outputs or [ \"out\" ];\n\n      commonAttrs = {\n        inherit (drv) name system meta;\n        inherit outputs;\n      }\n      // optionalAttrs (drv._hydraAggregate or false) {\n        _hydraAggregate = true;\n        constituents = map hydraJob (flatten drv.constituents);\n      }\n      // (listToAttrs outputsList);\n\n      makeOutput =\n        outputName:\n        let\n          output = drv.${outputName};\n        in\n        {\n          name = outputName;\n          value = commonAttrs // {\n            outPath = output.outPath;\n            drvPath = output.drvPath;\n            type = \"derivation\";\n            inherit outputName;\n          };\n        };\n\n      outputsList = map makeOutput outputs;\n\n      drv' = (head outputsList).value;\n    in\n    if drv == null then null else deepSeq drv' drv';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":464,"column":5},"lambda_expr":"hydraJob =\n    drv:\n    let\n      outputs = drv.outputs or [ \"out\" ];\n\n      commonAttrs = {\n        inherit (drv) name system meta;\n        inherit outputs;\n      }\n      // optionalAttrs (drv._hydraAggregate or false) {\n        _hydraAggregate = true;\n        constituents = map hydraJob (flatten drv.constituents);\n      }\n      // (listToAttrs outputsList);\n\n      makeOutput =\n        outputName:\n        let\n          output = drv.${outputName};\n        in\n        {\n          name = outputName;\n          value = commonAttrs // {\n            outPath = output.outPath;\n            drvPath = output.drvPath;\n            type = \"derivation\";\n            inherit outputName;\n          };\n        };\n\n      outputsList = map makeOutput outputs;\n\n      drv' = (head outputsList).value;\n    in\n    if drv == null then null else deepSeq drv' drv';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":463,"column":3},"path":["lib","customisation","hydraJob"],"pos_type":"Attribute"}},"content":{"content":"\nStrip a derivation of all non-essential attributes, returning\nonly those needed by hydra-eval-jobs. Also strictly evaluate the\nresult to ensure that there are no thunks kept alive to prevent\ngarbage collection.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhydraJob :: (Derivation | Null) -> (Derivation | Null)\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":463,"column":3},"path":["lib","customisation","hydraJob"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.makeOverridable","path":["lib","customisation","makeOverridable"],"aliases":[["lib","makeOverridable"]],"signature":"makeOverridable :: (AttrSet -> a) -> AttrSet -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":151,"column":3},"attr_expr":"makeOverridable =\n    f:\n    let\n      # Creates a functor with the same arguments as f\n      mirrorArgs = mirrorFunctionArgs f;\n\n      f' =\n        origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result;\n    in\n    # Recover overrider and additional attributes for f\n    # When f is a callable attribute set,\n    # it may contain its own `f.override` and additional attributes.\n    # This recovers those attributes and decorates the overrider.\n    if isAttrs f then\n      # Preserve additional attributes for f\n      f\n      // (mirrorArgs f')\n      # Decorate f.override if presented\n      // {\n        ${if f ? override then \"override\" else null} = fdrv: makeOverridable (f.override fdrv);\n      }\n\n    else\n      mirrorArgs f';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":152,"column":5},"lambda_expr":"makeOverridable =\n    f:\n    let\n      # Creates a functor with the same arguments as f\n      mirrorArgs = mirrorFunctionArgs f;\n\n      f' =\n        origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result;\n    in\n    # Recover overrider and additional attributes for f\n    # When f is a callable attribute set,\n    # it may contain its own `f.override` and additional attributes.\n    # This recovers those attributes and decorates the overrider.\n    if isAttrs f then\n      # Preserve additional attributes for f\n      f\n      // (mirrorArgs f')\n      # Decorate f.override if presented\n      // {\n        ${if f ? override then \"override\" else null} = fdrv: makeOverridable (f.override fdrv);\n      }\n\n    else\n      mirrorArgs f';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":151,"column":3},"path":["lib","customisation","makeOverridable"],"pos_type":"Attribute"}},"content":{"content":"\n`makeOverridable` takes a function from attribute set to attribute set and\ninjects `override` attribute which can be used to override arguments of\nthe function.\n\nPlease refer to  documentation on [`<pkg>.overrideDerivation`](#sec-pkg-overrideDerivation) to learn about `overrideDerivation` and caveats\nrelated to its use.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmakeOverridable :: (AttrSet -> a) -> AttrSet -> a\n```\n\n# Examples\n:::{.example}\n## `lib.customisation.makeOverridable` usage example\n\n```nix\nnix-repl> x = {a, b}: { result = a + b; }\n\nnix-repl> y = lib.makeOverridable x { a = 1; b = 2; }\n\nnix-repl> y\n{ override = «lambda»; overrideDerivation = «lambda»; result = 3; }\n\nnix-repl> y.override { a = 10; }\n{ override = «lambda»; overrideDerivation = «lambda»; result = 12; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":151,"column":3},"path":["lib","customisation","makeOverridable"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.makeScope","path":["lib","customisation","makeScope"],"aliases":[["lib","makeScope"]],"signature":"makeScope :: (AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a) -> (AttrSet -> AttrSet) -> Scope\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":623,"column":3},"attr_expr":"makeScope =\n    newScope: f:\n    let\n      self = {\n        callPackage = self.newScope { };\n      }\n      // f self\n      // {\n        newScope = scope: newScope (self // scope);\n        overrideScope = g: makeScope newScope (extends g f);\n        packages = f;\n      };\n    in\n    self;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":624,"column":5},"lambda_expr":"makeScope =\n    newScope: f:\n    let\n      self = {\n        callPackage = self.newScope { };\n      }\n      // f self\n      // {\n        newScope = scope: newScope (self // scope);\n        overrideScope = g: makeScope newScope (extends g f);\n        packages = f;\n      };\n    in\n    self;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":623,"column":3},"path":["lib","customisation","makeScope"],"pos_type":"Attribute"}},"content":{"content":"\nMake an attribute set (a \"scope\") from functions that take arguments from that same attribute set.\nSee [](#ex-makeScope) for how to use it.\n\n# Inputs\n\n1. `newScope` (`AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a`)\n\n   A function that takes an attribute set `attrs` and returns what ends up as `callPackage` in the output.\n\n   Typical values are `callPackageWith` or the output attribute `newScope`.\n\n2. `f` (`AttrSet -> AttrSet`)\n\n   A function that takes an attribute set as returned by `makeScope newScope f` (a \"scope\") and returns any attribute set.\n\n   This function is used to compute the fixpoint of the resulting scope using `callPackage`.\n   Its argument is the lazily evaluated reference to the value of that fixpoint, and is typically called `self` or `final`.\n\n   See [](#ex-makeScope) for how to use it.\n   See [](#sec-functions-library-fixedPoints) for details on fixpoint computation.\n\n# Output\n\n`makeScope` returns an attribute set of a form called `scope`, which also contains the final attributes produced by `f`:\n\n```\nscope :: {\n  callPackage :: ((AttrSet -> a) | Path) -> AttrSet -> a\n  newScope = AttrSet -> scope\n  overrideScope = (scope -> scope -> AttrSet) -> scope\n  packages :: AttrSet -> AttrSet\n}\n```\n\n- `callPackage` (`((AttrSet -> a) | Path) -> AttrSet -> a`)\n\n  A function that\n\n  1. Takes a function `p`, or a path to a Nix file that contains a function `p`, which takes an attribute set and returns value of arbitrary type `a`,\n  2. Takes an attribute set `args` with explicit attributes to pass to `p`,\n  3. Calls `f` with attributes from the original attribute set `attrs` passed to `newScope` updated with `args`, i.e. `attrs // args`, if they match the attributes in the argument of `p`.\n\n  All such functions `p` will be called with the same value for `attrs`.\n\n  See [](#ex-makeScope-callPackage) for how to use it.\n\n- `newScope` (`AttrSet -> scope`)\n\n  Takes an attribute set `attrs` and returns a scope that extends the original scope.\n\n- `overrideScope` (`(scope -> scope -> AttrSet) -> scope`)\n\n  Takes a function `g` of the form `final: prev: { # attributes }` to act as an overlay on `f`, and returns a new scope with values determined by `extends g f`.\n  See [](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.fixedPoints.extends) for details.\n\n  This allows subsequent modification of the final attribute set in a consistent way, i.e. all functions `p` invoked with `callPackage` will be called with the modified values.\n\n- `packages` (`AttrSet -> AttrSet`)\n\n  The value of the argument `f` to `makeScope`.\n\n- final attributes\n\n  The final values returned by `f`.\n\n# Examples\n\n:::{#ex-makeScope .example}\n# Create an interdependent package set on top of `pkgs`\n\nThe functions in `foo.nix` and `bar.nix` can depend on each other, in the sense that `foo.nix` can contain a function that expects `bar` as an attribute in its argument.\n\n```nix\nlet\n  pkgs = import <nixpkgs> { };\nin\npkgs.lib.makeScope pkgs.newScope (self: {\n  foo = self.callPackage ./foo.nix { };\n  bar = self.callPackage ./bar.nix { };\n})\n```\n\nevaluates to\n\n```nix\n{\n  callPackage = «lambda»;\n  newScope = «lambda»;\n  overrideScope = «lambda»;\n  packages = «lambda»;\n  foo = «derivation»;\n  bar = «derivation»;\n}\n```\n:::\n\n:::{#ex-makeScope-callPackage .example}\n# Using `callPackage` from a scope\n\n```nix\nlet\n  pkgs = import <nixpkgs> { };\n  inherit (pkgs) lib;\n  scope = lib.makeScope lib.callPackageWith (self: { a = 1; b = 2; });\n  three = scope.callPackage ({ a, b }: a + b) { };\n  four = scope.callPackage ({ a, b }: a + b) { a = 2; };\nin\n[ three four ]\n```\n\nevaluates to\n\n```nix\n[ 3 4 ]\n```\n:::\n\n# Type\n\n```\nmakeScope :: (AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a) -> (AttrSet -> AttrSet) -> Scope\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":623,"column":3},"path":["lib","customisation","makeScope"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.makeScopeWithSplicing","path":["lib","customisation","makeScopeWithSplicing"],"aliases":[["lib","makeScopeWithSplicing"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":667,"column":3},"attr_expr":"makeScopeWithSplicing =\n    splicePackages: newScope: otherSplices: keep: extra: f:\n    makeScopeWithSplicing' { inherit splicePackages newScope; } {\n      inherit\n        otherSplices\n        keep\n        extra\n        f\n        ;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":668,"column":5},"lambda_expr":"makeScopeWithSplicing =\n    splicePackages: newScope: otherSplices: keep: extra: f:\n    makeScopeWithSplicing' { inherit splicePackages newScope; } {\n      inherit\n        otherSplices\n        keep\n        extra\n        f\n        ;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":667,"column":3},"path":["lib","customisation","makeScopeWithSplicing"],"pos_type":"Attribute"}},"content":{"content":"\nbackward compatibility with old uncurried form; deprecated\n\n# Inputs\n\n`splicePackages`\n\n: 1\\. Function argument\n\n`newScope`\n\n: 2\\. Function argument\n\n`otherSplices`\n\n: 3\\. Function argument\n\n`keep`\n\n: 4\\. Function argument\n\n`extra`\n\n: 5\\. Function argument\n\n`f`\n\n: 6\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":667,"column":3},"path":["lib","customisation","makeScopeWithSplicing"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.makeScopeWithSplicing' (Prime)","path":["lib","customisation","makeScopeWithSplicing'"],"aliases":[["lib","makeScopeWithSplicing'"]],"signature":"makeScopeWithSplicing' ::\n  { splicePackages :: Splice -> AttrSet;\n    newScope :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a;\n  }\n  -> { otherSplices :: Splice; keep :: AttrSet -> AttrSet; extra :: AttrSet -> AttrSet; }\n  -> AttrSet\n\nSplice :: {\n  pkgsBuildBuild :: AttrSet;\n  pkgsBuildHost :: AttrSet;\n  pkgsBuildTarget :: AttrSet;\n  pkgsHostHost :: AttrSet;\n  pkgsHostTarget :: AttrSet;\n  pkgsTargetTarget :: AttrSet;\n}\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":702,"column":3},"attr_expr":"makeScopeWithSplicing' =\n    {\n      splicePackages,\n      newScope,\n    }:\n    {\n      otherSplices,\n      # Attrs from `self` which won't be spliced.\n      # Avoid using keep, it's only used for a python hook workaround, added in PR #104201.\n      # ex: `keep = (self: { inherit (self) aAttr; })`\n      keep ? (_self: { }),\n      # Additional attrs to add to the sets `callPackage`.\n      # When the package is from a subset (but not a subset within a package IS #211340)\n      # within `spliced0` it will be spliced.\n      # When using an package outside the set but it's available from `pkgs`, use the package from `pkgs.__splicedPackages`.\n      # If the package is not available within the set or in `pkgs`, such as a package in a let binding, it will not be spliced\n      # ex:\n      # ```\n      # nix-repl> darwin.apple_sdk.frameworks.CoreFoundation\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # nix-repl> darwin.CoreFoundation\n      #   error: attribute 'CoreFoundation' missing\n      # nix-repl> darwin.callPackage ({ CoreFoundation }: CoreFoundation) { }\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # ```\n      extra ? (_spliced0: { }),\n      f,\n    }:\n    let\n      spliced0 = splicePackages {\n        pkgsBuildBuild = otherSplices.selfBuildBuild;\n        pkgsBuildHost = otherSplices.selfBuildHost;\n        pkgsBuildTarget = otherSplices.selfBuildTarget;\n        pkgsHostHost = otherSplices.selfHostHost;\n        pkgsHostTarget = self; # Not `otherSplices.selfHostTarget`;\n        pkgsTargetTarget = otherSplices.selfTargetTarget;\n      };\n      spliced = extra spliced0 // spliced0 // keep self;\n      self = f self // {\n        newScope = scope: newScope (spliced // scope);\n        callPackage = newScope spliced; # == self.newScope {};\n        # N.B. the other stages of the package set spliced in are *not*\n        # overridden.\n        overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });\n        packages = f;\n      };\n    in\n    self;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":703,"column":5},"lambda_expr":"makeScopeWithSplicing' =\n    {\n      splicePackages,\n      newScope,\n    }:\n    {\n      otherSplices,\n      # Attrs from `self` which won't be spliced.\n      # Avoid using keep, it's only used for a python hook workaround, added in PR #104201.\n      # ex: `keep = (self: { inherit (self) aAttr; })`\n      keep ? (_self: { }),\n      # Additional attrs to add to the sets `callPackage`.\n      # When the package is from a subset (but not a subset within a package IS #211340)\n      # within `spliced0` it will be spliced.\n      # When using an package outside the set but it's available from `pkgs`, use the package from `pkgs.__splicedPackages`.\n      # If the package is not available within the set or in `pkgs`, such as a package in a let binding, it will not be spliced\n      # ex:\n      # ```\n      # nix-repl> darwin.apple_sdk.frameworks.CoreFoundation\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # nix-repl> darwin.CoreFoundation\n      #   error: attribute 'CoreFoundation' missing\n      # nix-repl> darwin.callPackage ({ CoreFoundation }: CoreFoundation) { }\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # ```\n      extra ? (_spliced0: { }),\n      f,\n    }:\n    let\n      spliced0 = splicePackages {\n        pkgsBuildBuild = otherSplices.selfBuildBuild;\n        pkgsBuildHost = otherSplices.selfBuildHost;\n        pkgsBuildTarget = otherSplices.selfBuildTarget;\n        pkgsHostHost = otherSplices.selfHostHost;\n        pkgsHostTarget = self; # Not `otherSplices.selfHostTarget`;\n        pkgsTargetTarget = otherSplices.selfTargetTarget;\n      };\n      spliced = extra spliced0 // spliced0 // keep self;\n      self = f self // {\n        newScope = scope: newScope (spliced // scope);\n        callPackage = newScope spliced; # == self.newScope {};\n        # N.B. the other stages of the package set spliced in are *not*\n        # overridden.\n        overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });\n        packages = f;\n      };\n    in\n    self;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":702,"column":3},"path":["lib","customisation","makeScopeWithSplicing'"],"pos_type":"Attribute"}},"content":{"content":"\nLike `makeScope`, but aims to support cross compilation. It's still ugly, but\nhopefully it helps a little bit.\n\n# Type\n\n```\nmakeScopeWithSplicing' ::\n  { splicePackages :: Splice -> AttrSet;\n    newScope :: AttrSet -> ((AttrSet -> a) | Path) -> AttrSet -> a;\n  }\n  -> { otherSplices :: Splice; keep :: AttrSet -> AttrSet; extra :: AttrSet -> AttrSet; }\n  -> AttrSet\n\nSplice :: {\n  pkgsBuildBuild :: AttrSet;\n  pkgsBuildHost :: AttrSet;\n  pkgsBuildTarget :: AttrSet;\n  pkgsHostHost :: AttrSet;\n  pkgsHostTarget :: AttrSet;\n  pkgsTargetTarget :: AttrSet;\n}\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":702,"column":3},"path":["lib","customisation","makeScopeWithSplicing'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.mapCrossIndex","path":["lib","customisation","mapCrossIndex"],"aliases":[["lib","mapCrossIndex"]],"signature":"mapCrossIndex :: (a -> b) -> {\n  buildBuild :: a;\n  buildHost :: a;\n  buildTarget :: a;\n  hostHost :: a;\n  hostTarget :: a;\n  targetTarget :: a;\n} -> {\n  buildBuild :: b;\n  buildHost :: b;\n  buildTarget :: b;\n  hostHost :: b;\n  hostTarget :: b;\n  targetTarget :: b;\n}\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":1022,"column":3},"attr_expr":"mapCrossIndex =\n    f:\n    {\n      buildBuild,\n      buildHost,\n      buildTarget,\n      hostHost,\n      hostTarget,\n      targetTarget,\n    }:\n    {\n      buildBuild = f buildBuild;\n      buildHost = f buildHost;\n      buildTarget = f buildTarget;\n      hostHost = f hostHost;\n      hostTarget = f hostTarget;\n      targetTarget = f targetTarget;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":1023,"column":5},"lambda_expr":"mapCrossIndex =\n    f:\n    {\n      buildBuild,\n      buildHost,\n      buildTarget,\n      hostHost,\n      hostTarget,\n      targetTarget,\n    }:\n    {\n      buildBuild = f buildBuild;\n      buildHost = f buildHost;\n      buildTarget = f buildTarget;\n      hostHost = f hostHost;\n      hostTarget = f hostTarget;\n      targetTarget = f targetTarget;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":1022,"column":3},"path":["lib","customisation","mapCrossIndex"],"pos_type":"Attribute"}},"content":{"content":"\nTakes a function and applies it pointwise to each field of a cross index.\n\nA cross index (short for \"Cross Platform Pair Index\") is a 6-field structure\norganizing values by cross-compilation platform relationships.\n\n# Inputs\n\n`f`\n: Function to apply to each cross index value\n\n`crossIndex`\n: A cross index to transform\n\n# Type\n\n```\nmapCrossIndex :: (a -> b) -> {\n  buildBuild :: a;\n  buildHost :: a;\n  buildTarget :: a;\n  hostHost :: a;\n  hostTarget :: a;\n  targetTarget :: a;\n} -> {\n  buildBuild :: b;\n  buildHost :: b;\n  buildTarget :: b;\n  hostHost :: b;\n  hostTarget :: b;\n  targetTarget :: b;\n}\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.mapCrossIndex` usage example\n\n```nix\nmapCrossIndex (x: x * 10) { buildBuild = 1; buildHost = 2; ... }\n=> { buildBuild = 10; buildHost = 20; ... }\n```\n\n```nix\n# Extract a package from package sets\nmapCrossIndex (pkgs: pkgs.hello) crossIndexedPackageSets\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":1022,"column":3},"path":["lib","customisation","mapCrossIndex"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.overrideDerivation","path":["lib","customisation","overrideDerivation"],"aliases":[["lib","overrideDerivation"]],"signature":"overrideDerivation :: Derivation -> ( Derivation -> AttrSet ) -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":98,"column":3},"attr_expr":"overrideDerivation =\n    drv: f:\n    (extendDerivation (seq drv.drvPath true)) (\n      {\n        meta = drv.meta or { };\n        passthru = drv.passthru or { };\n      }\n      // (drv.passthru or { })\n      // {\n        ${if drv ? __spliced then \"__spliced\" else null} = mapAttrs (\n          _: sDrv: overrideDerivation sDrv f\n        ) drv.__spliced;\n      }\n    ) (derivation (drv.drvAttrs // (f drv)));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":99,"column":5},"lambda_expr":"overrideDerivation =\n    drv: f:\n    (extendDerivation (seq drv.drvPath true)) (\n      {\n        meta = drv.meta or { };\n        passthru = drv.passthru or { };\n      }\n      // (drv.passthru or { })\n      // {\n        ${if drv ? __spliced then \"__spliced\" else null} = mapAttrs (\n          _: sDrv: overrideDerivation sDrv f\n        ) drv.__spliced;\n      }\n    ) (derivation (drv.drvAttrs // (f drv)));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":98,"column":3},"path":["lib","customisation","overrideDerivation"],"pos_type":"Attribute"}},"content":{"content":"\n`overrideDerivation drv f` takes a derivation (i.e., the result\nof a call to the builtin function `derivation`) and returns a new\nderivation in which the attributes of the original are overridden\naccording to the function `f`.  The function `f` is called with\nthe original derivation attributes.\n\n`overrideDerivation` allows certain \"ad-hoc\" customisation\nscenarios (e.g. in ~/.config/nixpkgs/config.nix).  For instance,\nif you want to \"patch\" the derivation returned by a package\nfunction in Nixpkgs to build another version than what the\nfunction itself provides.\n\nFor another application, see build-support/vm, where this\nfunction is used to build arbitrary derivations inside a QEMU\nvirtual machine.\n\nNote that in order to preserve evaluation errors, the new derivation's\noutPath depends on the old one's, which means that this function cannot\nbe used in circular situations when the old derivation also depends on the\nnew one.\n\nYou should in general prefer `drv.overrideAttrs` over this function;\nsee the nixpkgs manual for more information on overriding.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n`f`\n\n: 2\\. Function argument\n\n# Type\n\n```\noverrideDerivation :: Derivation -> ( Derivation -> AttrSet ) -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.customisation.overrideDerivation` usage example\n\n```nix\nmySed = overrideDerivation pkgs.gnused (oldAttrs: {\n  name = \"sed-4.2.2-pre\";\n  src = fetchurl {\n    url = ftp://alpha.gnu.org/gnu/sed/sed-4.2.2-pre.tar.bz2;\n    hash = \"sha256-MxBJRcM2rYzQYwJ5XKxhXTQByvSg5jZc5cSHEZoB2IY=\";\n  };\n  patches = [];\n});\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":98,"column":3},"path":["lib","customisation","overrideDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.renameCrossIndexFrom","path":["lib","customisation","renameCrossIndexFrom"],"aliases":[["lib","renameCrossIndexFrom"]],"signature":"renameCrossIndexFrom :: String -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":923,"column":3},"attr_expr":"renameCrossIndexFrom = prefix: x: {\n    buildBuild = x.\"${prefix}BuildBuild\";\n    buildHost = x.\"${prefix}BuildHost\";\n    buildTarget = x.\"${prefix}BuildTarget\";\n    hostHost = x.\"${prefix}HostHost\";\n    hostTarget = x.\"${prefix}HostTarget\";\n    targetTarget = x.\"${prefix}TargetTarget\";\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":923,"column":26},"lambda_expr":"renameCrossIndexFrom = prefix: x: {\n    buildBuild = x.\"${prefix}BuildBuild\";\n    buildHost = x.\"${prefix}BuildHost\";\n    buildTarget = x.\"${prefix}BuildTarget\";\n    hostHost = x.\"${prefix}HostHost\";\n    hostTarget = x.\"${prefix}HostTarget\";\n    targetTarget = x.\"${prefix}TargetTarget\";\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":923,"column":3},"path":["lib","customisation","renameCrossIndexFrom"],"pos_type":"Attribute"}},"content":{"content":"\nRemoves a prefix from the attribute names of a cross index.\n\nA cross index (short for \"Cross Platform Pair Index\") is a 6-field structure\norganizing values by cross-compilation platform relationships.\n\n# Inputs\n\n`prefix`\n: The prefix to remove from cross index attribute names\n\n`crossIndex`\n: A cross index with prefixed names\n\n# Type\n\n```\nrenameCrossIndexFrom :: String -> AttrSet -> AttrSet\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.renameCrossIndexFrom` usage example\n\n```nix\nrenameCrossIndexFrom \"pkgs\" { pkgsBuildBuild = ...; pkgsBuildHost = ...; ... }\n=> { buildBuild = ...; buildHost = ...; ... }\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":923,"column":3},"path":["lib","customisation","renameCrossIndexFrom"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.customisation.renameCrossIndexTo","path":["lib","customisation","renameCrossIndexTo"],"aliases":[["lib","renameCrossIndexTo"]],"signature":"renameCrossIndexTo :: String -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":963,"column":3},"attr_expr":"renameCrossIndexTo = prefix: x: {\n    \"${prefix}BuildBuild\" = x.buildBuild;\n    \"${prefix}BuildHost\" = x.buildHost;\n    \"${prefix}BuildTarget\" = x.buildTarget;\n    \"${prefix}HostHost\" = x.hostHost;\n    \"${prefix}HostTarget\" = x.hostTarget;\n    \"${prefix}TargetTarget\" = x.targetTarget;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":963,"column":24},"lambda_expr":"renameCrossIndexTo = prefix: x: {\n    \"${prefix}BuildBuild\" = x.buildBuild;\n    \"${prefix}BuildHost\" = x.buildHost;\n    \"${prefix}BuildTarget\" = x.buildTarget;\n    \"${prefix}HostHost\" = x.hostHost;\n    \"${prefix}HostTarget\" = x.hostTarget;\n    \"${prefix}TargetTarget\" = x.targetTarget;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":963,"column":3},"path":["lib","customisation","renameCrossIndexTo"],"pos_type":"Attribute"}},"content":{"content":"\nAdds a prefix to the attribute names of a cross index.\n\nA cross index (short for \"Cross Platform Pair Index\") is a 6-field structure\norganizing values by cross-compilation platform relationships.\n\n# Inputs\n\n`prefix`\n: The prefix to add to cross index attribute names\n\n`crossIndex`\n: A cross index to be prefixed\n\n# Type\n\n```\nrenameCrossIndexTo :: String -> AttrSet -> AttrSet\n```\n\n# Examples\n\n:::{.example}\n## `lib.customisation.renameCrossIndexTo` usage example\n\n```nix\nrenameCrossIndexTo \"self\" { buildBuild = ...; buildHost = ...; ... }\n=> { selfBuildBuild = ...; selfBuildHost = ...; ... }\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":963,"column":3},"path":["lib","customisation","renameCrossIndexTo"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.addErrorContext","path":["lib","debug","addErrorContext"],"aliases":[["builtins","addErrorContext"],["lib","addErrorContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"addErrorContext","args":[],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":37,"column":5},"attr_expr":"addErrorContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","debug","addErrorContext"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":null,"path":["lib","debug","addErrorContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.debug.runTests","path":["lib","debug","runTests"],"aliases":[["lib","runTests"]],"signature":"runTests :: {\n  tests :: [String];\n  ${testName} :: {\n    expr :: a;\n    expected :: a;\n  };\n}\n->\n[\n  {\n    name :: String;\n    expected :: a;\n    result :: a;\n  }\n]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":512,"column":3},"attr_expr":"runTests =\n    tests:\n    concatLists (\n      attrValues (\n        mapAttrs (\n          name: test:\n          let\n            testsToRun = if tests ? tests then tests.tests else [ ];\n          in\n          if\n            (substring 0 4 name == \"test\" || elem name testsToRun)\n            && ((testsToRun == [ ]) || elem name tests.tests)\n            && (test.expr != test.expected)\n\n          then\n            [\n              {\n                inherit name;\n                expected = test.expected;\n                result = test.expr;\n              }\n            ]\n          else\n            [ ]\n        ) tests\n      )\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":513,"column":5},"lambda_expr":"runTests =\n    tests:\n    concatLists (\n      attrValues (\n        mapAttrs (\n          name: test:\n          let\n            testsToRun = if tests ? tests then tests.tests else [ ];\n          in\n          if\n            (substring 0 4 name == \"test\" || elem name testsToRun)\n            && ((testsToRun == [ ]) || elem name tests.tests)\n            && (test.expr != test.expected)\n\n          then\n            [\n              {\n                inherit name;\n                expected = test.expected;\n                result = test.expr;\n              }\n            ]\n          else\n            [ ]\n        ) tests\n      )\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":512,"column":3},"path":["lib","debug","runTests"],"pos_type":"Attribute"}},"content":{"content":"\nEvaluates a set of tests.\n\nA test is an attribute set `{expr, expected}`,\ndenoting an expression and its expected result.\n\nThe result is a `list` of __failed tests__, each represented as\n`{name, expected, result}`,\n\n- expected\n  - What was passed as `expected`\n- result\n  - The actual `result` of the test\n\nUsed for regression testing of the functions in lib; see\ntests.nix for more examples.\n\nImportant: Only attributes that start with `test` are executed.\n\n- If you want to run only a subset of the tests add the attribute `tests = [\"testName\"];`\n\n# Inputs\n\n`tests`\n\n: Tests to run\n\n# Type\n\n```\nrunTests :: {\n  tests :: [String];\n  ${testName} :: {\n    expr :: a;\n    expected :: a;\n  };\n}\n->\n[\n  {\n    name :: String;\n    expected :: a;\n    result :: a;\n  }\n]\n```\n\n# Examples\n:::{.example}\n## `lib.debug.runTests` usage example\n\n```nix\nrunTests {\n  testAndOk = {\n    expr = lib.and true false;\n    expected = false;\n  };\n  testAndFail = {\n    expr = lib.and true false;\n    expected = true;\n  };\n}\n->\n[\n  {\n    name = \"testAndFail\";\n    expected = true;\n    result = false;\n  }\n]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":512,"column":3},"path":["lib","debug","runTests"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.testAllTrue","path":["lib","debug","testAllTrue"],"aliases":[["lib","testAllTrue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":682,"column":3},"attr_expr":"testAllTrue = expr: {\n    inherit expr;\n    expected = map (x: true) expr;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":682,"column":17},"lambda_expr":"testAllTrue = expr: {\n    inherit expr;\n    expected = map (x: true) expr;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":682,"column":3},"path":["lib","debug","testAllTrue"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a test assuming that list elements are `true`.\n\n# Inputs\n\n`expr`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `lib.debug.testAllTrue` usage example\n\n```nix\n{ testX = allTrue [ true ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":682,"column":3},"path":["lib","debug","testAllTrue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.throwTestFailures","path":["lib","debug","throwTestFailures"],"aliases":[],"signature":"throwTestFailures :: {\n  failures = [\n    {\n      name :: String;\n      expected :: a;\n      result :: a;\n    }\n  ];\n}\n->\nNull\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":619,"column":3},"attr_expr":"throwTestFailures =\n    {\n      failures,\n      description ? \"tests\",\n      ...\n    }:\n    if failures == [ ] then\n      null\n    else\n      let\n        toPretty =\n          value:\n          # Thanks to @Ma27 for this:\n          #\n          # > The `unsafeDiscardStringContext` is useful when the `toPretty`\n          # > stumbles upon a derivation that would be realized without it (I\n          # > ran into the problem when writing a test for a flake helper where\n          # > I creating a bunch of \"mock\" derivations for different systems\n          # > and Nix then tried to build those when the error-string got\n          # > forced).\n          #\n          # See: https://github.com/NixOS/nixpkgs/pull/416207#discussion_r2145942389\n          builtins.unsafeDiscardStringContext (generators.toPretty { allowPrettyValues = true; } value);\n\n        failureToPretty = failure: ''\n          FAIL ${toPretty failure.name}:\n          Expected:\n          ${toPretty failure.expected}\n\n          Result:\n          ${toPretty failure.result}\n        '';\n\n        traceFailures = foldl' (_accumulator: failure: traceVal (failureToPretty failure)) null failures;\n      in\n      throw (\n        builtins.seq traceFailures (\n          \"${builtins.toString (builtins.length failures)} ${description} failed:\\n- \"\n          + (concatMapStringsSep \"\\n- \" (failure: failure.name) failures)\n          + \"\\n\\n\"\n          + builtins.toJSON failures\n        )\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":620,"column":5},"lambda_expr":"throwTestFailures =\n    {\n      failures,\n      description ? \"tests\",\n      ...\n    }:\n    if failures == [ ] then\n      null\n    else\n      let\n        toPretty =\n          value:\n          # Thanks to @Ma27 for this:\n          #\n          # > The `unsafeDiscardStringContext` is useful when the `toPretty`\n          # > stumbles upon a derivation that would be realized without it (I\n          # > ran into the problem when writing a test for a flake helper where\n          # > I creating a bunch of \"mock\" derivations for different systems\n          # > and Nix then tried to build those when the error-string got\n          # > forced).\n          #\n          # See: https://github.com/NixOS/nixpkgs/pull/416207#discussion_r2145942389\n          builtins.unsafeDiscardStringContext (generators.toPretty { allowPrettyValues = true; } value);\n\n        failureToPretty = failure: ''\n          FAIL ${toPretty failure.name}:\n          Expected:\n          ${toPretty failure.expected}\n\n          Result:\n          ${toPretty failure.result}\n        '';\n\n        traceFailures = foldl' (_accumulator: failure: traceVal (failureToPretty failure)) null failures;\n      in\n      throw (\n        builtins.seq traceFailures (\n          \"${builtins.toString (builtins.length failures)} ${description} failed:\\n- \"\n          + (concatMapStringsSep \"\\n- \" (failure: failure.name) failures)\n          + \"\\n\\n\"\n          + builtins.toJSON failures\n        )\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":619,"column":3},"path":["lib","debug","throwTestFailures"],"pos_type":"Attribute"}},"content":{"content":"\nPretty-print a list of test failures.\n\nThis takes an attribute set containing `failures` (a list of test failures\nproduced by `runTests`) and pretty-prints each failing test, before\nthrowing an error containing the raw test data as JSON.\n\nIf the input list is empty, `null` is returned.\n\n# Inputs\n\n`failures`\n\n: A list of test failures (produced `runTests`), each containing `name`,\n  `expected`, and `result` attributes.\n\n# Type\n\n```\nthrowTestFailures :: {\n  failures = [\n    {\n      name :: String;\n      expected :: a;\n      result :: a;\n    }\n  ];\n}\n->\nNull\n```\n\n# Examples\n:::{.example}\n\n## `lib.debug.throwTestFailures` usage example\n\n```nix\nthrowTestFailures {\n  failures = [\n    {\n      name = \"testDerivation\";\n      expected = derivation {\n        name = \"a\";\n        builder = \"bash\";\n        system = \"x86_64-linux\";\n      };\n      result = derivation {\n        name = \"b\";\n        builder = \"bash\";\n        system = \"x86_64-linux\";\n      };\n    }\n  ];\n}\n->\ntrace: FAIL testDerivation:\n  Expected: <derivation a>\n    Result: <derivation b>\n\nerror:\n       … while evaluating the file '...':\n\n       … caused by explicit throw\n         at /nix/store/.../lib/debug.nix:528:7:\n          527|       in\n          528|       throw (\n             |       ^\n          529|         builtins.seq traceFailures (\n\n       error: 1 tests failed:\n       - testDerivation\n\n       [{\"expected\":\"/nix/store/xh7kyqp69mxkwspmi81a94m9xx74r8dr-a\",\"name\":\"testDerivation\",\"result\":\"/nix/store/503l84nir4zw57d1shfhai25bxxn16c6-b\"}]\nnull\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":619,"column":3},"path":["lib","debug","throwTestFailures"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.trace","path":["lib","debug","trace"],"aliases":[["builtins","trace"],["lib","trace"]],"signature":null,"is_primop":true,"primop_meta":{"name":"trace","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":36,"column":5},"attr_expr":"trace","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","debug","trace"],"pos_type":"Lambda"}},"content":{"content":"\nEvaluate *e1* and print its abstract syntax representation on\nstandard error. Then return *e2*. This function is useful for\ndebugging.\n\nIf the\n[`debugger-on-trace`](@docroot@/command-ref/conf-file.md#conf-debugger-on-trace)\noption is set to `true` and the `--debugger` flag is given, the\ninteractive debugger is started when `trace` is called (like\n[`break`](@docroot@/language/builtins.md#builtins-break)).\n","source":{"position":null,"path":["lib","debug","trace"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.debug.traceFnSeqN","path":["lib","debug","traceFnSeqN"],"aliases":[["lib","traceFnSeqN"]],"signature":"traceFnSeqN :: Int -> String -> (a -> b) -> a -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":425,"column":3},"attr_expr":"traceFnSeqN =\n    depth: name: f: v:\n    let\n      res = f v;\n    in\n    lib.traceSeqN (depth + 1) {\n      fn = name;\n      from = v;\n      to = res;\n    } res;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":426,"column":5},"lambda_expr":"traceFnSeqN =\n    depth: name: f: v:\n    let\n      res = f v;\n    in\n    lib.traceSeqN (depth + 1) {\n      fn = name;\n      from = v;\n      to = res;\n    } res;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":425,"column":3},"path":["lib","debug","traceFnSeqN"],"pos_type":"Attribute"}},"content":{"content":"\nTrace the input and output of a function `f` named `name`,\nboth down to `depth`.\n\nThis is useful for adding around a function call,\nto see the before/after of values as they are transformed.\n\n# Inputs\n\n`depth`\n\n: 1\\. Function argument\n\n`name`\n\n: 2\\. Function argument\n\n`f`\n\n: 3\\. Function argument\n\n`v`\n\n: 4\\. Function argument\n\n# Type\n\n```\ntraceFnSeqN :: Int -> String -> (a -> b) -> a -> b\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceFnSeqN` usage example\n\n```nix\ntraceFnSeqN 2 \"id\" (x: x) { a.b.c = 3; }\ntrace: { fn = \"id\"; from = { a.b = {…}; }; to = { a.b = {…}; }; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":425,"column":3},"path":["lib","debug","traceFnSeqN"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceIf","path":["lib","debug","traceIf"],"aliases":[["lib","traceIf"]],"signature":"traceIf :: Bool -> String -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":78,"column":3},"attr_expr":"traceIf =\n    pred: msg: x:\n    if pred then trace msg x else x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":79,"column":5},"lambda_expr":"traceIf =\n    pred: msg: x:\n    if pred then trace msg x else x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":78,"column":3},"path":["lib","debug","traceIf"],"pos_type":"Attribute"}},"content":{"content":"\nConditionally trace the supplied message, based on a predicate.\n\n# Inputs\n\n`pred`\n\n: Predicate to check\n\n`msg`\n\n: Message that should be traced\n\n`x`\n\n: Value to return\n\n# Type\n\n```\ntraceIf :: Bool -> String -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceIf` usage example\n\n```nix\ntraceIf true \"hello\" 3\ntrace: hello\n=> 3\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":78,"column":3},"path":["lib","debug","traceIf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceSeq","path":["lib","debug","traceSeq"],"aliases":[["lib","traceSeq"]],"signature":"traceSeq :: a -> b -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":179,"column":3},"attr_expr":"traceSeq = x: y: trace (builtins.deepSeq x x) y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":179,"column":14},"lambda_expr":"traceSeq = x: y: trace (builtins.deepSeq x x) y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":179,"column":3},"path":["lib","debug","traceSeq"],"pos_type":"Attribute"}},"content":{"content":"\n`builtins.trace`, but the value is `builtins.deepSeq`ed first.\n\n# Inputs\n\n`x`\n\n: The value to trace\n\n`y`\n\n: The value to return\n\n# Type\n\n```\ntraceSeq :: a -> b -> b\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceSeq` usage example\n\n```nix\ntrace { a.b.c = 3; } null\ntrace: { a = <thunk>; }\n=> null\ntraceSeq { a.b.c = 3; } null\ntrace: { a = { b = { c = 3; }; }; }\n=> null\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":179,"column":3},"path":["lib","debug","traceSeq"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceSeqN","path":["lib","debug","traceSeqN"],"aliases":[["lib","traceSeqN"]],"signature":"traceSeqN :: Int -> a -> b -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":218,"column":3},"attr_expr":"traceSeqN =\n    depth: x: y:\n    let\n      snip =\n        v:\n        if isList v then\n          noQuotes \"[…]\" v\n        else if isAttrs v then\n          noQuotes \"{…}\" v\n        else\n          v;\n      noQuotes = str: v: {\n        __pretty = const str;\n        val = v;\n      };\n      modify =\n        n: fn: v:\n        if (n == 0) then\n          fn v\n        else if isList v then\n          map (modify (n - 1) fn) v\n        else if isAttrs v then\n          mapAttrs (const (modify (n - 1) fn)) v\n        else\n          v;\n    in\n    trace (generators.toPretty { allowPrettyValues = true; } (modify depth snip x)) y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":219,"column":5},"lambda_expr":"traceSeqN =\n    depth: x: y:\n    let\n      snip =\n        v:\n        if isList v then\n          noQuotes \"[…]\" v\n        else if isAttrs v then\n          noQuotes \"{…}\" v\n        else\n          v;\n      noQuotes = str: v: {\n        __pretty = const str;\n        val = v;\n      };\n      modify =\n        n: fn: v:\n        if (n == 0) then\n          fn v\n        else if isList v then\n          map (modify (n - 1) fn) v\n        else if isAttrs v then\n          mapAttrs (const (modify (n - 1) fn)) v\n        else\n          v;\n    in\n    trace (generators.toPretty { allowPrettyValues = true; } (modify depth snip x)) y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":218,"column":3},"path":["lib","debug","traceSeqN"],"pos_type":"Attribute"}},"content":{"content":"\nLike `traceSeq`, but only evaluate down to depth n.\nThis is very useful because lots of `traceSeq` usages\nlead to an infinite recursion.\n\n# Inputs\n\n`depth`\n\n: 1\\. Function argument\n\n`x`\n\n: 2\\. Function argument\n\n`y`\n\n: 3\\. Function argument\n\n# Type\n\n```\ntraceSeqN :: Int -> a -> b -> b\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceSeqN` usage example\n\n```nix\ntraceSeqN 2 { a.b.c = 3; } null\ntrace: { a = { b = {…}; }; }\n=> null\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":218,"column":3},"path":["lib","debug","traceSeqN"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceVal","path":["lib","debug","traceVal"],"aliases":[["lib","traceVal"]],"signature":"traceVal :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":143,"column":3},"attr_expr":"traceVal = traceValFn id;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":19},"lambda_expr":"x: trace (f x) x","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":143,"column":3},"path":["lib","debug","traceVal"],"pos_type":"Attribute"}},"content":{"content":"\nTrace the supplied value and return it.\n\n# Inputs\n\n`x`\n\n: Value to trace and return\n\n# Type\n\n```\ntraceVal :: a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceVal` usage example\n\n```nix\ntraceVal 42\n# trace: 42\n=> 42\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":143,"column":3},"path":["lib","debug","traceVal"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceValFn","path":["lib","debug","traceValFn"],"aliases":[["lib","traceValFn"]],"signature":"traceValFn :: (a -> b) -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":3},"attr_expr":"traceValFn = f: x: trace (f x) x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":16},"lambda_expr":"traceValFn = f: x: trace (f x) x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":3},"path":["lib","debug","traceValFn"],"pos_type":"Attribute"}},"content":{"content":"\nTrace the supplied value after applying a function to it, and\nreturn the original value.\n\n# Inputs\n\n`f`\n\n: Function to apply\n\n`x`\n\n: Value to trace and return\n\n# Type\n\n```\ntraceValFn :: (a -> b) -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValFn` usage example\n\n```nix\ntraceValFn (v: \"mystring ${v}\") \"foo\"\ntrace: mystring foo\n=> \"foo\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":114,"column":3},"path":["lib","debug","traceValFn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceValSeq","path":["lib","debug","traceValSeq"],"aliases":[["lib","traceValSeq"]],"signature":"traceValSeq :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":307,"column":3},"attr_expr":"traceValSeq = traceValSeqFn id;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":22},"lambda_expr":"v: traceValFn f (builtins.deepSeq v v)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":307,"column":3},"path":["lib","debug","traceValSeq"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeq`.\n\n# Inputs\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeq :: a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeq` usage example\n\n```nix\ntraceValSeq { a.b.c = 3; }\ntrace: { a = { b = { c = 3; }; }; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":307,"column":3},"path":["lib","debug","traceValSeq"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceValSeqFn","path":["lib","debug","traceValSeqFn"],"aliases":[["lib","traceValSeqFn"]],"signature":"traceValSeqFn :: (a -> b) -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":3},"attr_expr":"traceValSeqFn = f: v: traceValFn f (builtins.deepSeq v v);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":19},"lambda_expr":"traceValSeqFn = f: v: traceValFn f (builtins.deepSeq v v);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":3},"path":["lib","debug","traceValSeqFn"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeq` that applies a\nprovided function to the value to be traced after `deepSeq`ing\nit.\n\n# Inputs\n\n`f`\n\n: Function to apply\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeqFn :: (a -> b) -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeqFn` usage example\n\n```nix\ntraceValSeqFn (v: v // { d = \"foo\";}) { a.b.c = 3; }\ntrace: { a = { b = { c = 3; }; }; d = \"foo\"; }\n=> { a = { ... }; }\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":278,"column":3},"path":["lib","debug","traceValSeqFn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceValSeqN","path":["lib","debug","traceValSeqN"],"aliases":[["lib","traceValSeqN"]],"signature":"traceValSeqN :: Int -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":380,"column":3},"attr_expr":"traceValSeqN = traceValSeqNFn id;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":346,"column":8},"lambda_expr":"depth: v:\n    traceSeqN depth (f v) v","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":380,"column":3},"path":["lib","debug","traceValSeqN"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeqN`.\n\n# Inputs\n\n`depth`\n\n: 1\\. Function argument\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeqN :: Int -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeqN` usage example\n\n```nix\ntraceValSeqN 2 { a.b.c = 3; }\ntrace: { a = { b = {…}; }; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":380,"column":3},"path":["lib","debug","traceValSeqN"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.traceValSeqNFn","path":["lib","debug","traceValSeqNFn"],"aliases":[["lib","traceValSeqNFn"]],"signature":"traceValSeqNFn :: (a -> b) -> Int -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":345,"column":3},"attr_expr":"traceValSeqNFn =\n    f: depth: v:\n    traceSeqN depth (f v) v;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":346,"column":5},"lambda_expr":"traceValSeqNFn =\n    f: depth: v:\n    traceSeqN depth (f v) v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":345,"column":3},"path":["lib","debug","traceValSeqNFn"],"pos_type":"Attribute"}},"content":{"content":"\nA combination of `traceVal` and `traceSeqN` that applies a\nprovided function to the value to be traced.\n\n# Inputs\n\n`f`\n\n: Function to apply\n\n`depth`\n\n: 2\\. Function argument\n\n`v`\n\n: Value to trace\n\n# Type\n\n```\ntraceValSeqNFn :: (a -> b) -> Int -> a -> a\n```\n\n# Examples\n:::{.example}\n## `lib.debug.traceValSeqNFn` usage example\n\n```nix\ntraceValSeqNFn (v: v // { d = \"foo\";}) 2 { a.b.c = 3; }\ntrace: { a = { b = {…}; }; d = \"foo\"; }\n=> { a = { ... }; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":345,"column":3},"path":["lib","debug","traceValSeqNFn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.debug.unsafeGetAttrPos","path":["lib","debug","unsafeGetAttrPos"],"aliases":[["builtins","unsafeGetAttrPos"],["lib","unsafeGetAttrPos"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeGetAttrPos","args":["s","set"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/debug.nix","line":38,"column":5},"attr_expr":"unsafeGetAttrPos","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","debug","unsafeGetAttrPos"],"pos_type":"Lambda"}},"content":{"content":"\n`unsafeGetAttrPos` returns the position of the attribute named *s*\nfrom *set*. This is used by Nixpkgs to provide location information\nin error messages.\n","source":{"position":null,"path":["lib","debug","unsafeGetAttrPos"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.derivations.addDrvOutputDependencies","path":["lib","derivations","addDrvOutputDependencies"],"aliases":[["builtins","addDrvOutputDependencies"],["lib","addDrvOutputDependencies"]],"signature":null,"is_primop":true,"primop_meta":{"name":"addDrvOutputDependencies","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":25,"column":5},"attr_expr":"addDrvOutputDependencies","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","derivations","addDrvOutputDependencies"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a copy of the given string where a single\n[constant](@docroot@/language/string-context.md#string-context-element-constant)\nstring context element is turned into a\n[derivation deep](@docroot@/language/string-context.md#string-context-element-derivation-deep)\nstring context element.\n\nThe store path that is the constant string context element should point to a valid derivation, and end in `.drv`.\n\nThe original string context element must not be empty or have multiple elements, and it must not have any other type of element other than a constant or derivation deep element.\nThe latter is supported so this function is idempotent.\n\nThis is the opposite of [`builtins.unsafeDiscardOutputDependency`](#builtins-unsafeDiscardOutputDependency).\n","source":{"position":null,"path":["lib","derivations","addDrvOutputDependencies"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.derivations.lazyDerivation","path":["lib","derivations","lazyDerivation"],"aliases":[["lib","lazyDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":99,"column":3},"attr_expr":"lazyDerivation =\n    args@{\n      derivation,\n      meta ? null,\n      passthru ? { },\n      outputs ? [ \"out\" ],\n    }:\n    let\n      # These checks are strict in `drv` and some `drv` attributes, but the\n      # attrset spine returned by lazyDerivation does not depend on it.\n      # Instead, the individual derivation attributes do depend on it.\n      checked =\n        throwIfNot (derivation.type or null == \"derivation\") \"lazyDerivation: input must be a derivation.\"\n          throwIfNot\n          # NOTE: Technically we could require our outputs to be a subset of the\n          # actual ones, or even leave them unchecked and fail on a lazy basis.\n          # However, consider the case where an output is added in the underlying\n          # derivation, such as dev. lazyDerivation would remove it and cause it\n          # to fail as a buildInputs item, without any indication as to what\n          # happened. Hence the more stringent condition. We could consider\n          # adding a flag to control this behavior if there's a valid case for it,\n          # but the documentation must have a note like this.\n          (derivation.outputs == outputs)\n          ''\n            lib.lazyDerivation: The derivation ${derivation.name or \"<unknown>\"} has outputs that don't match the assumed outputs.\n\n            Assumed outputs passed to lazyDerivation${showMaybeAttrPosPre \",\\n    at \" \"outputs\" args}:\n                ${lib.generators.toPretty { multiline = false; } outputs};\n\n            Actual outputs of the derivation${showMaybePackagePosPre \",\\n    defined at \" derivation}:\n                ${lib.generators.toPretty { multiline = false; } derivation.outputs}\n\n            If the outputs are known ahead of evaluating the derivation,\n            then update the lazyDerivation call to match the actual outputs, in the same order.\n            If lazyDerivation is passed a literal value, just change it to the actual outputs.\n            As a result it will work as before / as intended.\n\n            Otherwise, when the outputs are dynamic and can't be known ahead of time, it won't\n            be possible to add laziness, but lib.lazyDerivation may still be useful for trimming\n            the attributes.\n            If you want to keep trimming the attributes, make sure that the package is in a\n            variable (don't evaluate it twice!) and pass the variable and its outputs attribute\n            to lib.lazyDerivation. This largely defeats laziness, but keeps the trimming.\n            If none of the above works for you, replace the lib.lazyDerivation call by the\n            expression in the derivation argument.\n          ''\n          derivation;\n    in\n    {\n      # Hardcoded `type`\n      #\n      # `lazyDerivation` requires its `derivation` argument to be a derivation,\n      # so if it is not, that is a programming error by the caller and not\n      # something that `lazyDerivation` consumers should be able to correct\n      # for after the fact.\n      # So, to improve laziness, we assume correctness here and check it only\n      # when actual derivation values are accessed later.\n      type = \"derivation\";\n\n      # A fixed set of derivation values, so that `lazyDerivation` can return\n      # its attrset before evaluating `derivation`.\n      # This must only list attributes that are available on _all_ derivations.\n      inherit (checked)\n        outPath\n        outputName\n        drvPath\n        name\n        system\n        ;\n      inherit outputs;\n\n      # The meta attribute can either be taken from the derivation, or if the\n      # `lazyDerivation` caller knew a shortcut, be taken from there.\n      meta = args.meta or checked.meta;\n    }\n    // genAttrs outputs (outputName: checked.${outputName})\n    // passthru;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":100,"column":5},"lambda_expr":"lazyDerivation =\n    args@{\n      derivation,\n      meta ? null,\n      passthru ? { },\n      outputs ? [ \"out\" ],\n    }:\n    let\n      # These checks are strict in `drv` and some `drv` attributes, but the\n      # attrset spine returned by lazyDerivation does not depend on it.\n      # Instead, the individual derivation attributes do depend on it.\n      checked =\n        throwIfNot (derivation.type or null == \"derivation\") \"lazyDerivation: input must be a derivation.\"\n          throwIfNot\n          # NOTE: Technically we could require our outputs to be a subset of the\n          # actual ones, or even leave them unchecked and fail on a lazy basis.\n          # However, consider the case where an output is added in the underlying\n          # derivation, such as dev. lazyDerivation would remove it and cause it\n          # to fail as a buildInputs item, without any indication as to what\n          # happened. Hence the more stringent condition. We could consider\n          # adding a flag to control this behavior if there's a valid case for it,\n          # but the documentation must have a note like this.\n          (derivation.outputs == outputs)\n          ''\n            lib.lazyDerivation: The derivation ${derivation.name or \"<unknown>\"} has outputs that don't match the assumed outputs.\n\n            Assumed outputs passed to lazyDerivation${showMaybeAttrPosPre \",\\n    at \" \"outputs\" args}:\n                ${lib.generators.toPretty { multiline = false; } outputs};\n\n            Actual outputs of the derivation${showMaybePackagePosPre \",\\n    defined at \" derivation}:\n                ${lib.generators.toPretty { multiline = false; } derivation.outputs}\n\n            If the outputs are known ahead of evaluating the derivation,\n            then update the lazyDerivation call to match the actual outputs, in the same order.\n            If lazyDerivation is passed a literal value, just change it to the actual outputs.\n            As a result it will work as before / as intended.\n\n            Otherwise, when the outputs are dynamic and can't be known ahead of time, it won't\n            be possible to add laziness, but lib.lazyDerivation may still be useful for trimming\n            the attributes.\n            If you want to keep trimming the attributes, make sure that the package is in a\n            variable (don't evaluate it twice!) and pass the variable and its outputs attribute\n            to lib.lazyDerivation. This largely defeats laziness, but keeps the trimming.\n            If none of the above works for you, replace the lib.lazyDerivation call by the\n            expression in the derivation argument.\n          ''\n          derivation;\n    in\n    {\n      # Hardcoded `type`\n      #\n      # `lazyDerivation` requires its `derivation` argument to be a derivation,\n      # so if it is not, that is a programming error by the caller and not\n      # something that `lazyDerivation` consumers should be able to correct\n      # for after the fact.\n      # So, to improve laziness, we assume correctness here and check it only\n      # when actual derivation values are accessed later.\n      type = \"derivation\";\n\n      # A fixed set of derivation values, so that `lazyDerivation` can return\n      # its attrset before evaluating `derivation`.\n      # This must only list attributes that are available on _all_ derivations.\n      inherit (checked)\n        outPath\n        outputName\n        drvPath\n        name\n        system\n        ;\n      inherit outputs;\n\n      # The meta attribute can either be taken from the derivation, or if the\n      # `lazyDerivation` caller knew a shortcut, be taken from there.\n      meta = args.meta or checked.meta;\n    }\n    // genAttrs outputs (outputName: checked.${outputName})\n    // passthru;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":99,"column":3},"path":["lib","derivations","lazyDerivation"],"pos_type":"Attribute"}},"content":{"content":"\nRestrict a derivation to a predictable set of attribute names, so\nthat the returned attrset is not strict in the actual derivation,\nsaving a lot of computation when the derivation is non-trivial.\n\nThis is useful in situations where a derivation might only be used for its\npassthru attributes, improving evaluation performance.\n\nThe returned attribute set is lazy in `derivation`. Specifically, this\nmeans that the derivation will not be evaluated in at least the\nsituations below.\n\nFor illustration and/or testing, we define derivation such that its\nevaluation is very noticeable.\n\n    let derivation = throw \"This won't be evaluated.\";\n\nIn the following expressions, `derivation` will _not_ be evaluated:\n\n    (lazyDerivation { inherit derivation; }).type\n\n    attrNames (lazyDerivation { inherit derivation; })\n\n    (lazyDerivation { inherit derivation; } // { foo = true; }).foo\n\n    (lazyDerivation { inherit derivation; meta.foo = true; }).meta\n\nIn these expressions, `derivation` _will_ be evaluated:\n\n    \"${lazyDerivation { inherit derivation }}\"\n\n    (lazyDerivation { inherit derivation }).outPath\n\n    (lazyDerivation { inherit derivation }).meta\n\nAnd the following expressions are not valid, because the refer to\nimplementation details and/or attributes that may not be present on\nsome derivations:\n\n    (lazyDerivation { inherit derivation }).buildInputs\n\n    (lazyDerivation { inherit derivation }).passthru\n\n    (lazyDerivation { inherit derivation }).pythonPath\n\n# Inputs\n\nTakes an attribute set with the following attributes\n\n`derivation`\n: The derivation to be wrapped.\n\n`meta`\n: Optional meta attribute.\n\n  While this function is primarily about derivations, it can improve\n  the `meta` package attribute, which is usually specified through\n  `mkDerivation`.\n\n`passthru`\n: Optional extra values to add to the returned attrset.\n\n  This can be used for adding package attributes, such as `tests`.\n\n`outputs`\n: Optional list of assumed outputs. Default: `[ \"out\" ]`\n\n  This must match the set of outputs that the returned derivation has.\n  You must use this when the derivation has multiple outputs.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":99,"column":3},"path":["lib","derivations","lazyDerivation"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.derivations.optionalDrvAttr","path":["lib","derivations","optionalDrvAttr"],"aliases":[["lib","optionalDrvAttr"]],"signature":"optionalDrvAttr :: Bool -> a -> (a | Null)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":219,"column":3},"attr_expr":"optionalDrvAttr = cond: value: if cond then value else null;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":219,"column":21},"lambda_expr":"optionalDrvAttr = cond: value: if cond then value else null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":219,"column":3},"path":["lib","derivations","optionalDrvAttr"],"pos_type":"Attribute"}},"content":{"content":"\nConditionally set a derivation attribute.\n\nBecause `mkDerivation` sets `__ignoreNulls = true`, a derivation\nattribute set to `null` will not impact the derivation output hash.\nThus, this function passes through its `value` argument if the `cond`\nis `true`, but returns `null` if not.\n\n# Inputs\n\n`cond`\n\n: Condition\n\n`value`\n\n: Attribute value\n\n# Type\n\n```\noptionalDrvAttr :: Bool -> a -> (a | Null)\n```\n\n# Examples\n:::{.example}\n## `lib.derivations.optionalDrvAttr` usage example\n\n```nix\n(stdenv.mkDerivation {\n  name = \"foo\";\n  x = optionalDrvAttr true 1;\n  y = optionalDrvAttr false 1;\n}).drvPath == (stdenv.mkDerivation {\n  name = \"foo\";\n  x = 1;\n}).drvPath\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":219,"column":3},"path":["lib","derivations","optionalDrvAttr"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.derivations.unsafeDiscardOutputDependency","path":["lib","derivations","unsafeDiscardOutputDependency"],"aliases":[["builtins","unsafeDiscardOutputDependency"],["lib","unsafeDiscardOutputDependency"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeDiscardOutputDependency","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":26,"column":5},"attr_expr":"unsafeDiscardOutputDependency","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","derivations","unsafeDiscardOutputDependency"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a copy of the given string where every\n[derivation deep](@docroot@/language/string-context.md#string-context-element-derivation-deep)\nstring context element is turned into a\n[constant](@docroot@/language/string-context.md#string-context-element-constant)\nstring context element.\n\nThis is the opposite of [`builtins.addDrvOutputDependencies`](#builtins-addDrvOutputDependencies).\n\nThis is unsafe because it allows us to \"forget\" store objects we would have otherwise referred to with the string context,\nwhereas Nix normally tracks all dependencies consistently.\nSafe operations \"grow\" but never \"shrink\" string contexts.\n[`builtins.addDrvOutputDependencies`] in contrast is safe because \"derivation deep\" string context element always refers to the underlying derivation (among many more things).\nReplacing a constant string context element with a \"derivation deep\" element is a safe operation that just enlargens the string context without forgetting anything.\n\n[`builtins.addDrvOutputDependencies`]: #builtins-addDrvOutputDependencies\n","source":{"position":null,"path":["lib","derivations","unsafeDiscardOutputDependency"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.derivations.warnOnInstantiate","path":["lib","derivations","warnOnInstantiate"],"aliases":[["lib","warnOnInstantiate"]],"signature":"warnOnInstantiate :: String -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":254,"column":3},"attr_expr":"warnOnInstantiate =\n    msg: drv:\n    let\n      drvToWrap = removeAttrs drv [\n        \"meta\"\n        \"name\"\n        \"type\"\n        \"outputName\"\n      ];\n    in\n    drv\n    // mapAttrs (_: lib.warn msg) drvToWrap\n    // (\n      if drv ? overrideAttrs && builtins.isFunction drv.overrideAttrs then\n        { overrideAttrs = x: lib.derivations.warnOnInstantiate msg (drv.overrideAttrs x); }\n      else\n        { }\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":255,"column":5},"lambda_expr":"warnOnInstantiate =\n    msg: drv:\n    let\n      drvToWrap = removeAttrs drv [\n        \"meta\"\n        \"name\"\n        \"type\"\n        \"outputName\"\n      ];\n    in\n    drv\n    // mapAttrs (_: lib.warn msg) drvToWrap\n    // (\n      if drv ? overrideAttrs && builtins.isFunction drv.overrideAttrs then\n        { overrideAttrs = x: lib.derivations.warnOnInstantiate msg (drv.overrideAttrs x); }\n      else\n        { }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":254,"column":3},"path":["lib","derivations","warnOnInstantiate"],"pos_type":"Attribute"}},"content":{"content":"\nWrap a derivation such that instantiating it produces a warning.\n\nAll attributes will be wrapped with `lib.warn` except from `.meta`, `.name`,\nand `.type` which are used by `nix search`, and `.outputName` which avoids\ndouble warnings with `nix-instantiate` and `nix-build`.\n\n# Inputs\n\n`msg`\n: The warning message to emit (via `lib.warn`).\n\n`drv`\n: The derivation to wrap.\n\n# Type\n\n```\nwarnOnInstantiate :: String -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.derivations.warnOnInstantiate` usage example\n\n```nix\n{\n  myPackage = warnOnInstantiate \"myPackage has been renamed to my-package\" my-package;\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/derivations.nix","line":254,"column":3},"path":["lib","derivations","warnOnInstantiate"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fetchers.normalizeHash","path":["lib","fetchers","normalizeHash"],"aliases":[],"signature":"normalizeHash :: { hashTypes :: [String]; required :: Bool; } -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":113,"column":3},"attr_expr":"normalizeHash =\n    {\n      hashTypes ? defaultHashTypes,\n      required ? true,\n    }:\n    let\n      inherit (commonH hashTypes) hashNames hashSet;\n    in\n    args:\n    if args ? outputHash then\n      args\n    else\n      let\n        # The argument hash, as a {name, value} pair\n        h =\n          # All hashes passed in arguments (possibly 0 or >1) as a list of {name, value} pairs\n          let\n            hashesAsNVPairs = attrsToList (intersectAttrs hashSet args);\n          in\n          if hashesAsNVPairs == [ ] then\n            throwIf required \"fetcher called without `hash`\" null\n          else if length hashesAsNVPairs != 1 then\n            throw \"fetcher called with mutually-incompatible arguments: ${\n              concatMapStringsSep \", \" (a: a.name) hashesAsNVPairs\n            }\"\n          else\n            head hashesAsNVPairs;\n      in\n      removeAttrs args hashNames\n      // (optionalAttrs (h != null) {\n        outputHashAlgo = if h.name == \"hash\" then null else h.name;\n        outputHash =\n          if h.value == \"\" then\n            fakeH.${h.name} or (throw \"no “fake hash” defined for ${h.name}\")\n          else\n            h.value;\n      });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":114,"column":5},"lambda_expr":"normalizeHash =\n    {\n      hashTypes ? defaultHashTypes,\n      required ? true,\n    }:\n    let\n      inherit (commonH hashTypes) hashNames hashSet;\n    in\n    args:\n    if args ? outputHash then\n      args\n    else\n      let\n        # The argument hash, as a {name, value} pair\n        h =\n          # All hashes passed in arguments (possibly 0 or >1) as a list of {name, value} pairs\n          let\n            hashesAsNVPairs = attrsToList (intersectAttrs hashSet args);\n          in\n          if hashesAsNVPairs == [ ] then\n            throwIf required \"fetcher called without `hash`\" null\n          else if length hashesAsNVPairs != 1 then\n            throw \"fetcher called with mutually-incompatible arguments: ${\n              concatMapStringsSep \", \" (a: a.name) hashesAsNVPairs\n            }\"\n          else\n            head hashesAsNVPairs;\n      in\n      removeAttrs args hashNames\n      // (optionalAttrs (h != null) {\n        outputHashAlgo = if h.name == \"hash\" then null else h.name;\n        outputHash =\n          if h.value == \"\" then\n            fakeH.${h.name} or (throw \"no “fake hash” defined for ${h.name}\")\n          else\n            h.value;\n      });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":113,"column":3},"path":["lib","fetchers","normalizeHash"],"pos_type":"Attribute"}},"content":{"content":"\nConverts an attrset containing one of `hash`, `sha256` or `sha512`,\ninto one containing `outputHash{,Algo}` as accepted by `mkDerivation`.\n\nAn appropriate “fake hash” is substituted when the hash value is `\"\"`,\nas is the [convention for fetchers](#sec-pkgs-fetchers-updating-source-hashes-fakehash-method).\n\nAll other attributes in the set remain as-is.\n\n# Type\n```\nnormalizeHash :: { hashTypes :: [String]; required :: Bool; } -> AttrSet -> AttrSet\n```\n\n# Arguments\n\nhashTypes\n: the set of attribute names accepted as hash inputs, in addition to `hash`\n\nrequired\n: whether to throw if no hash was present in the input; otherwise returns the original input, unmodified\n\n# Example\n::: {.example}\n## `lib.fetchers.normalizeHash` usage example\n```nix\nnormalizeHash { } { hash = \"\"; foo = \"bar\"; }\n=>\n{\n  outputHash = lib.fakeHash;\n  outputHashAlgo = null;\n  foo = \"bar\";\n}\n```\n\n```nix\nnormalizeHash { } { sha256 = lib.fakeSha256; }\n=>\n{\n  outputHash = lib.fakeSha256;\n  outputHashAlgo = \"sha256\";\n}\n```\n\n```nix\nnormalizeHash { } { sha512 = lib.fakeSha512; }\n=>\n{\n  outputHash = lib.fakeSha512;\n  outputHashAlgo = \"sha512\";\n}\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":113,"column":3},"path":["lib","fetchers","normalizeHash"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fetchers.withNormalizedHash","path":["lib","fetchers","withNormalizedHash"],"aliases":[],"signature":"withNormalizedHash :: { hashTypes :: [String]; } -> (AttrSet -> a) -> (AttrSet -> a)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":201,"column":3},"attr_expr":"withNormalizedHash =\n    let\n      removedAttributes = [\n        \"outputHash\"\n        \"outputHashAlgo\"\n      ];\n    in\n    {\n      hashTypes ? defaultHashTypes,\n    }:\n    let\n      inherit (commonH hashTypes) hashSet;\n    in\n    fetcher:\n    let\n      fArgs = functionArgs fetcher;\n\n      normalize = normalizeHash {\n        inherit hashTypes;\n        required = !fArgs.outputHash;\n      };\n    in\n    # The o.g. fetcher must *only* accept outputHash and outputHashAlgo\n    assert fArgs ? outputHash && fArgs ? outputHashAlgo;\n    assert intersectAttrs fArgs hashSet == { };\n\n    setFunctionArgs (args: fetcher (normalize args)) (\n      removeAttrs fArgs removedAttributes\n      // {\n        hash = fArgs.outputHash;\n      }\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":208,"column":5},"lambda_expr":"{\n      hashTypes ? defaultHashTypes,\n    }:\n    let\n      inherit (commonH hashTypes) hashSet;\n    in\n    fetcher:\n    let\n      fArgs = functionArgs fetcher;\n\n      normalize = normalizeHash {\n        inherit hashTypes;\n        required = !fArgs.outputHash;\n      };\n    in\n    # The o.g. fetcher must *only* accept outputHash and outputHashAlgo\n    assert fArgs ? outputHash && fArgs ? outputHashAlgo;\n    assert intersectAttrs fArgs hashSet == { };\n\n    setFunctionArgs (args: fetcher (normalize args)) (\n      removeAttrs fArgs removedAttributes\n      // {\n        hash = fArgs.outputHash;\n      }\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":201,"column":3},"path":["lib","fetchers","withNormalizedHash"],"pos_type":"Attribute"}},"content":{"content":"\nWraps a function which accepts `outputHash{,Algo}` into one which accepts `hash` or `sha{256,512}`\n\n# Example\n```nix\nwithNormalizedHash { hashTypes = [ \"sha256\" \"sha512\" ]; } (\n  { outputHash, outputHashAlgo, ... }:\n  ...\n)\n```\nis a function which accepts one of `hash`, `sha256`, or `sha512` (or the original's `outputHash` and `outputHashAlgo`).\n\nIts `functionArgs` metadata only lists `hash` as a parameter, optional iff. `outputHash` was an optional parameter of\nthe original function.  `sha256`, `sha512`, `outputHash`, or `outputHashAlgo` are not mentioned in the `functionArgs`\nmetadata.\n\n# Type\n```\nwithNormalizedHash :: { hashTypes :: [String]; } -> (AttrSet -> a) -> (AttrSet -> a)\n```\n\n# Arguments\n\nhashTypes\n: the set of attribute names accepted as hash inputs, in addition to `hash`\n: they must correspond to a valid value for `outputHashAlgo`, currently one of: `md5`, `sha1`, `sha256`, or `sha512`.\n\nf\n: the function to be wrapped\n\n::: {.note}\nIn nixpkgs, `mkDerivation` rejects MD5 `outputHash`es, and SHA-1 is being deprecated.\n\nAs such, there is no reason to add `md5` to `hashTypes`, and\n`sha1` should only ever be included for backwards compatibility.\n:::\n\n# Output\n\n`withNormalizedHash { inherit hashTypes; } f` is functionally equivalent to\n```nix\nargs: f (normalizeHash {\n  inherit hashTypes;\n  required = !(lib.functionArgs f).outputHash;\n} args)\n```\n\nHowever, `withNormalizedHash` preserves `functionArgs` metadata insofar as possible,\nand is implemented somewhat more efficiently.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":201,"column":3},"path":["lib","fetchers","withNormalizedHash"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.difference","path":["lib","fileset","difference"],"aliases":[],"signature":"difference :: FileSet -> FileSet -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":727,"column":3},"attr_expr":"difference =\n    positive: negative:\n    let\n      filesets = _coerceMany \"lib.fileset.difference\" [\n        {\n          context = \"First argument (positive set)\";\n          value = positive;\n        }\n        {\n          context = \"Second argument (negative set)\";\n          value = negative;\n        }\n      ];\n    in\n    _difference (elemAt filesets 0) (elemAt filesets 1);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":728,"column":5},"lambda_expr":"difference =\n    positive: negative:\n    let\n      filesets = _coerceMany \"lib.fileset.difference\" [\n        {\n          context = \"First argument (positive set)\";\n          value = positive;\n        }\n        {\n          context = \"Second argument (negative set)\";\n          value = negative;\n        }\n      ];\n    in\n    _difference (elemAt filesets 0) (elemAt filesets 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":727,"column":3},"path":["lib","fileset","difference"],"pos_type":"Attribute"}},"content":{"content":"\nThe file set containing all files from the first file set that are not in the second file set.\nSee also [Difference (set theory)](https://en.wikipedia.org/wiki/Complement_(set_theory)#Relative_complement).\n\nThe given file sets are evaluated as lazily as possible,\nwith the first argument being evaluated first if needed.\n\n# Inputs\n\n`positive`\n\n: The positive file set. The result can only contain files that are also in this file set.  This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n`negative`\n\n: The negative file set. The result will never contain files that are also in this file set.  This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n# Type\n\n```\ndifference :: FileSet -> FileSet -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.difference` usage example\n\n```nix\n# Create a file set containing all files from the current directory,\n# except ones under ./tests\ndifference ./. ./tests\n\nlet\n  # A set of Nix-related files\n  nixFiles = unions [ ./default.nix ./nix ./tests/default.nix ];\nin\n# Create a file set containing all files under ./tests, except ones in `nixFiles`,\n# meaning only without ./tests/default.nix\ndifference ./tests nixFiles\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":727,"column":3},"path":["lib","fileset","difference"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.fileFilter","path":["lib","fileset","fileFilter"],"aliases":[],"signature":"fileFilter ::\n  ({\n    name :: String,\n    type :: String,\n    hasExt :: String -> Bool,\n    ...\n  } -> Bool)\n  -> Path\n  -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":806,"column":3},"attr_expr":"fileFilter =\n    predicate: path:\n    if !isFunction predicate then\n      throw \"lib.fileset.fileFilter: First argument is of type ${typeOf predicate}, but it should be a function instead.\"\n    else if !isPath path then\n      if path._type or \"\" == \"fileset\" then\n        throw ''\n          lib.fileset.fileFilter: Second argument is a file set, but it should be a path instead.\n              If you need to filter files in a file set, use `intersection fileset (fileFilter pred ./.)` instead.''\n      else\n        throw \"lib.fileset.fileFilter: Second argument is of type ${typeOf path}, but it should be a path instead.\"\n    else if !pathExists path then\n      throw \"lib.fileset.fileFilter: Second argument (${toString path}) is a path that does not exist.\"\n    else\n      _fileFilter predicate path;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":807,"column":5},"lambda_expr":"fileFilter =\n    predicate: path:\n    if !isFunction predicate then\n      throw \"lib.fileset.fileFilter: First argument is of type ${typeOf predicate}, but it should be a function instead.\"\n    else if !isPath path then\n      if path._type or \"\" == \"fileset\" then\n        throw ''\n          lib.fileset.fileFilter: Second argument is a file set, but it should be a path instead.\n              If you need to filter files in a file set, use `intersection fileset (fileFilter pred ./.)` instead.''\n      else\n        throw \"lib.fileset.fileFilter: Second argument is of type ${typeOf path}, but it should be a path instead.\"\n    else if !pathExists path then\n      throw \"lib.fileset.fileFilter: Second argument (${toString path}) is a path that does not exist.\"\n    else\n      _fileFilter predicate path;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":806,"column":3},"path":["lib","fileset","fileFilter"],"pos_type":"Attribute"}},"content":{"content":"\nFilter a file set to only contain files matching some predicate.\n\n# Inputs\n\n`predicate`\n\n: The predicate function to call on all files contained in given file set.\n  A file is included in the resulting file set if this function returns true for it.\n\n  This function is called with an attribute set containing these attributes:\n\n  - `name` (String): The name of the file\n\n  - `type` (String, one of `\"regular\"`, `\"symlink\"` or `\"unknown\"`): The type of the file.\n    This matches result of calling [`builtins.readFileType`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-readFileType) on the file's path.\n\n  - `hasExt` (String -> Bool): Whether the file has a certain file extension.\n    `hasExt ext` is true only if `hasSuffix \".${ext}\" name`.\n\n    This also means that e.g. for a file with name `.gitignore`,\n    `hasExt \"gitignore\"` is true.\n\n  Other attributes may be added in the future.\n\n`path`\n\n: The path whose files to filter\n\n# Type\n\n```\nfileFilter ::\n  ({\n    name :: String,\n    type :: String,\n    hasExt :: String -> Bool,\n    ...\n  } -> Bool)\n  -> Path\n  -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.fileFilter` usage example\n\n```nix\n# Include all regular `default.nix` files in the current directory\nfileFilter (file: file.name == \"default.nix\") ./.\n\n# Include all non-Nix files from the current directory\nfileFilter (file: ! file.hasExt \"nix\") ./.\n\n# Include all files that start with a \".\" in the current directory\nfileFilter (file: hasPrefix \".\" file.name) ./.\n\n# Include all regular files (not symlinks or others) in the current directory\nfileFilter (file: file.type == \"regular\") ./.\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":806,"column":3},"path":["lib","fileset","fileFilter"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.fromSource","path":["lib","fileset","fromSource"],"aliases":[],"signature":"fromSource :: SourceLike -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":880,"column":3},"attr_expr":"fromSource =\n    source:\n    let\n      # This function uses `._isLibCleanSourceWith`, `.origSrc` and `.filter`,\n      # which are technically internal to lib.sources,\n      # but we'll allow this since both libraries are in the same code base\n      # and this function is a bridge between them.\n      isFiltered = source ? _isLibCleanSourceWith;\n      path = if isFiltered then source.origSrc else source;\n    in\n    # We can only support sources created from paths\n    if !isPath path then\n      if isStringLike path then\n        throw ''\n          lib.fileset.fromSource: The source origin of the argument is a string-like value (\"${toString path}\"), but it should be a path instead.\n              Sources created from paths in strings cannot be turned into file sets, use `lib.sources` or derivations instead.''\n      else\n        throw \"lib.fileset.fromSource: The source origin of the argument is of type ${typeOf path}, but it should be a path instead.\"\n    else if !pathExists path then\n      throw \"lib.fileset.fromSource: The source origin (${toString path}) of the argument is a path that does not exist.\"\n    else if isFiltered then\n      _fromSourceFilter path source.filter\n    else\n      # If there's no filter, no need to run the expensive conversion, all subpaths will be included\n      _singleton path;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":881,"column":5},"lambda_expr":"fromSource =\n    source:\n    let\n      # This function uses `._isLibCleanSourceWith`, `.origSrc` and `.filter`,\n      # which are technically internal to lib.sources,\n      # but we'll allow this since both libraries are in the same code base\n      # and this function is a bridge between them.\n      isFiltered = source ? _isLibCleanSourceWith;\n      path = if isFiltered then source.origSrc else source;\n    in\n    # We can only support sources created from paths\n    if !isPath path then\n      if isStringLike path then\n        throw ''\n          lib.fileset.fromSource: The source origin of the argument is a string-like value (\"${toString path}\"), but it should be a path instead.\n              Sources created from paths in strings cannot be turned into file sets, use `lib.sources` or derivations instead.''\n      else\n        throw \"lib.fileset.fromSource: The source origin of the argument is of type ${typeOf path}, but it should be a path instead.\"\n    else if !pathExists path then\n      throw \"lib.fileset.fromSource: The source origin (${toString path}) of the argument is a path that does not exist.\"\n    else if isFiltered then\n      _fromSourceFilter path source.filter\n    else\n      # If there's no filter, no need to run the expensive conversion, all subpaths will be included\n      _singleton path;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":880,"column":3},"path":["lib","fileset","fromSource"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a file set with the same files as a `lib.sources`-based value.\nThis does not import any of the files into the store.\n\nThis can be used to gradually migrate from `lib.sources`-based filtering to `lib.fileset`.\n\nA file set can be turned back into a source using [`toSource`](#function-library-lib.fileset.toSource).\n\n:::{.note}\nFile sets cannot represent empty directories.\nTurning the result of this function back into a source using `toSource` will therefore not preserve empty directories.\n:::\n\n# Inputs\n\n`source`\n\n: 1\\. Function argument\n\n# Type\n\n```\nfromSource :: SourceLike -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.fromSource` usage example\n\n```nix\n# There's no cleanSource-like function for file sets yet,\n# but we can just convert cleanSource to a file set and use it that way\ntoSource {\n  root = ./.;\n  fileset = fromSource (lib.sources.cleanSource ./.);\n}\n\n# Keeping a previous sourceByRegex (which could be migrated to `lib.fileset.unions`),\n# but removing a subdirectory using file set functions\ndifference\n  (fromSource (lib.sources.sourceByRegex ./. [\n    \"^README\\\\.md$\"\n    # This regex includes everything in ./doc\n    \"^doc(/.*)?$\"\n  ])\n  ./doc/generated\n\n# Use cleanSource, but limit it to only include ./Makefile and files under ./src\nintersection\n  (fromSource (lib.sources.cleanSource ./.))\n  (unions [\n    ./Makefile\n    ./src\n  ]);\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":880,"column":3},"path":["lib","fileset","fromSource"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.gitTracked","path":["lib","fileset","gitTracked"],"aliases":[],"signature":"gitTracked :: Path -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":939,"column":3},"attr_expr":"gitTracked = path: _fromFetchGit \"gitTracked\" \"argument\" path { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":939,"column":16},"lambda_expr":"gitTracked = path: _fromFetchGit \"gitTracked\" \"argument\" path { };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":939,"column":3},"path":["lib","fileset","gitTracked"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a file set containing all [Git-tracked files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) in a repository.\n\nThis function behaves like [`gitTrackedWith { }`](#function-library-lib.fileset.gitTrackedWith) - using the defaults.\n\n# Inputs\n\n`path`\n\n: The [path](https://nixos.org/manual/nix/stable/language/values#type-path) to the working directory of a local Git repository.\n  This directory must contain a `.git` file or subdirectory.\n\n# Type\n\n```\ngitTracked :: Path -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.gitTracked` usage example\n\n```nix\n# Include all files tracked by the Git repository in the current directory\ngitTracked ./.\n\n# Include only files tracked by the Git repository in the parent directory\n# that are also in the current directory\nintersection ./. (gitTracked ../.)\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":939,"column":3},"path":["lib","fileset","gitTracked"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.gitTrackedWith","path":["lib","fileset","gitTrackedWith"],"aliases":[],"signature":"gitTrackedWith :: { recurseSubmodules :: Bool ? false } -> Path -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":994,"column":3},"attr_expr":"gitTrackedWith =\n    {\n      recurseSubmodules ? false,\n    }:\n    path:\n    if !isBool recurseSubmodules then\n      throw \"lib.fileset.gitTrackedWith: Expected the attribute `recurseSubmodules` of the first argument to be a boolean, but it's a ${typeOf recurseSubmodules} instead.\"\n    else\n      _fromFetchGit \"gitTrackedWith\" \"second argument\" path\n        # This is the only `fetchGit` parameter that makes sense in this context.\n        {\n          submodules = recurseSubmodules;\n        };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":995,"column":5},"lambda_expr":"gitTrackedWith =\n    {\n      recurseSubmodules ? false,\n    }:\n    path:\n    if !isBool recurseSubmodules then\n      throw \"lib.fileset.gitTrackedWith: Expected the attribute `recurseSubmodules` of the first argument to be a boolean, but it's a ${typeOf recurseSubmodules} instead.\"\n    else\n      _fromFetchGit \"gitTrackedWith\" \"second argument\" path\n        # This is the only `fetchGit` parameter that makes sense in this context.\n        {\n          submodules = recurseSubmodules;\n        };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":994,"column":3},"path":["lib","fileset","gitTrackedWith"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a file set containing all [Git-tracked files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) in a repository.\nThe first argument allows configuration with an attribute set,\nwhile the second argument is the path to the Git working tree.\n\n`gitTrackedWith` does not perform any filtering when the path is a [Nix store path](https://nixos.org/manual/nix/stable/store/store-path.html#store-path) and not a repository.\nIn this way, it accommodates the use case where the expression that makes the `gitTracked` call does not reside in an actual git repository anymore,\nand has presumably already been fetched in a way that excludes untracked files.\nFetchers with such equivalent behavior include `builtins.fetchGit`, `builtins.fetchTree` (experimental), and `pkgs.fetchgit` when used without `leaveDotGit`.\n\nIf you don't need the configuration,\nyou can use [`gitTracked`](#function-library-lib.fileset.gitTracked) instead.\n\nThis is equivalent to the result of [`unions`](#function-library-lib.fileset.unions) on all files returned by [`git ls-files`](https://git-scm.com/docs/git-ls-files)\n(which uses [`--cached`](https://git-scm.com/docs/git-ls-files#Documentation/git-ls-files.txt--c) by default).\n\n:::{.warning}\nCurrently this function is based on [`builtins.fetchGit`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchGit)\nAs such, this function causes all Git-tracked files to be unnecessarily added to the Nix store,\nwithout being re-usable by [`toSource`](#function-library-lib.fileset.toSource).\n\nThis may change in the future.\n:::\n\n# Inputs\n\n`options` (attribute set)\n: `recurseSubmodules` (optional, default: `false`)\n  : Whether to recurse into [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to also include their tracked files.\n    If `true`, this is equivalent to passing the [--recurse-submodules](https://git-scm.com/docs/git-ls-files#Documentation/git-ls-files.txt---recurse-submodules) flag to `git ls-files`.\n\n  `path`\n  : The [path](https://nixos.org/manual/nix/stable/language/values#type-path) to the working directory of a local Git repository.\n    This directory must contain a `.git` file or subdirectory.\n\n# Type\n\n```\ngitTrackedWith :: { recurseSubmodules :: Bool ? false } -> Path -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.gitTrackedWith` usage example\n\n```nix\n# Include all files tracked by the Git repository in the current directory\n# and any submodules under it\ngitTracked { recurseSubmodules = true; } ./.\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":994,"column":3},"path":["lib","fileset","gitTrackedWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.intersection","path":["lib","fileset","intersection"],"aliases":[],"signature":"intersection :: FileSet -> FileSet -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":668,"column":3},"attr_expr":"intersection =\n    fileset1: fileset2:\n    let\n      filesets = _coerceMany \"lib.fileset.intersection\" [\n        {\n          context = \"First argument\";\n          value = fileset1;\n        }\n        {\n          context = \"Second argument\";\n          value = fileset2;\n        }\n      ];\n    in\n    _intersection (elemAt filesets 0) (elemAt filesets 1);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":669,"column":5},"lambda_expr":"intersection =\n    fileset1: fileset2:\n    let\n      filesets = _coerceMany \"lib.fileset.intersection\" [\n        {\n          context = \"First argument\";\n          value = fileset1;\n        }\n        {\n          context = \"Second argument\";\n          value = fileset2;\n        }\n      ];\n    in\n    _intersection (elemAt filesets 0) (elemAt filesets 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":668,"column":3},"path":["lib","fileset","intersection"],"pos_type":"Attribute"}},"content":{"content":"\nThe file set containing all files that are in both of two given file sets.\nSee also [Intersection (set theory)](https://en.wikipedia.org/wiki/Intersection_(set_theory)).\n\nThe given file sets are evaluated as lazily as possible,\nwith the first argument being evaluated first if needed.\n\n# Inputs\n\n`fileset1`\n\n: The first file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n`fileset2`\n\n: The second file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n# Type\n\n```\nintersection :: FileSet -> FileSet -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.intersection` usage example\n\n```nix\n# Limit the selected files to the ones in ./., so only ./src and ./Makefile\nintersection ./. (unions [ ../LICENSE ./src ./Makefile ])\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":668,"column":3},"path":["lib","fileset","intersection"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.isFileset","path":["lib","fileset","isFileset"],"aliases":[],"signature":"isFileset :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":1051,"column":3},"attr_expr":"isFileset = x: (_coerceResult \"\" x).success;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":1051,"column":15},"lambda_expr":"isFileset = x: (_coerceResult \"\" x).success;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":1051,"column":3},"path":["lib","fileset","isFileset"],"pos_type":"Attribute"}},"content":{"content":"\nTests whether a given value is a fileset, or can be used in place of a fileset.\n\n# Inputs\n\n`value`\n\n: The value to test\n\n# Type\n\n```\nisFileset :: Any -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.isFileset` usage example\n\n```nix\nisFileset ./.\n=> true\n\nisFileset (unions [  ])\n=> true\n\nisFileset 1\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":1051,"column":3},"path":["lib","fileset","isFileset"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.maybeMissing","path":["lib","fileset","maybeMissing"],"aliases":[],"signature":"maybeMissing :: Path -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":186,"column":3},"attr_expr":"maybeMissing =\n    path:\n    if !isPath path then\n      if isStringLike path then\n        throw ''lib.fileset.maybeMissing: Argument (\"${toString path}\") is a string-like value, but it should be a path instead.''\n      else\n        throw \"lib.fileset.maybeMissing: Argument is of type ${typeOf path}, but it should be a path instead.\"\n    else if !pathExists path then\n      _emptyWithoutBase\n    else\n      _singleton path;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":187,"column":5},"lambda_expr":"maybeMissing =\n    path:\n    if !isPath path then\n      if isStringLike path then\n        throw ''lib.fileset.maybeMissing: Argument (\"${toString path}\") is a string-like value, but it should be a path instead.''\n      else\n        throw \"lib.fileset.maybeMissing: Argument is of type ${typeOf path}, but it should be a path instead.\"\n    else if !pathExists path then\n      _emptyWithoutBase\n    else\n      _singleton path;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":186,"column":3},"path":["lib","fileset","maybeMissing"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a file set from a path that may or may not exist:\n- If the path does exist, the path is [coerced to a file set](#sec-fileset-path-coercion).\n- If the path does not exist, a file set containing no files is returned.\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmaybeMissing :: Path -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.maybeMissing` usage example\n\n```nix\n# All files in the current directory, but excluding main.o if it exists\ndifference ./. (maybeMissing ./main.o)\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":186,"column":3},"path":["lib","fileset","maybeMissing"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.toList","path":["lib","fileset","toList"],"aliases":[],"signature":"toList :: FileSet -> [ Path ]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":512,"column":3},"attr_expr":"toList = fileset: _toList (_coerce \"lib.fileset.toList: Argument\" fileset);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":512,"column":12},"lambda_expr":"toList = fileset: _toList (_coerce \"lib.fileset.toList: Argument\" fileset);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":512,"column":3},"path":["lib","fileset","toList"],"pos_type":"Attribute"}},"content":{"content":"\nThe list of file paths contained in the given file set.\n\n:::{.note}\nThis function is strict in the entire file set.\nThis is in contrast with combinators [`lib.fileset.union`](#function-library-lib.fileset.union),\n[`lib.fileset.intersection`](#function-library-lib.fileset.intersection) and [`lib.fileset.difference`](#function-library-lib.fileset.difference).\n\nThus it is recommended to call `toList` on file sets created using the combinators,\ninstead of doing list processing on the result of `toList`.\n:::\n\nThe resulting list of files can be turned back into a file set using [`lib.fileset.unions`](#function-library-lib.fileset.unions).\n\n# Inputs\n\n`fileset`\n\n: The file set whose file paths to return. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n# Type\n\n```\ntoList :: FileSet -> [ Path ]\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.toList` usage example\n\n```nix\ntoList ./.\n[ ./README.md ./Makefile ./src/main.c ./src/main.h ]\n\ntoList (difference ./. ./src)\n[ ./README.md ./Makefile ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":512,"column":3},"path":["lib","fileset","toList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.toSource","path":["lib","fileset","toSource"],"aliases":[],"signature":"toSource :: {\n  root :: Path,\n  fileset :: FileSet,\n} -> SourceLike\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":418,"column":3},"attr_expr":"toSource =\n    {\n      root,\n      fileset,\n    }:\n    let\n      # We cannot rename matched attribute arguments, so let's work around it with an extra `let in` statement\n      filesetArg = fileset;\n    in\n    let\n      fileset = _coerce \"lib.fileset.toSource: `fileset`\" filesetArg;\n      rootFilesystemRoot = (splitRoot root).root;\n      filesetFilesystemRoot = (splitRoot fileset._internalBase).root;\n      sourceFilter = _toSourceFilter fileset;\n    in\n    if !isPath root then\n      if root ? _isLibCleanSourceWith then\n        throw ''\n          lib.fileset.toSource: `root` is a `lib.sources`-based value, but it should be a path instead.\n              To use a `lib.sources`-based value, convert it to a file set using `lib.fileset.fromSource` and pass it as `fileset`.\n              Note that this only works for sources created from paths.''\n      else if isStringLike root then\n        throw ''\n          lib.fileset.toSource: `root` (${toString root}) is a string-like value, but it should be a path instead.\n              Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''\n      else\n        throw \"lib.fileset.toSource: `root` is of type ${typeOf root}, but it should be a path instead.\"\n    # Currently all Nix paths have the same filesystem root, but this could change in the future.\n    # See also ../path/README.md\n    else if !fileset._internalIsEmptyWithoutBase && rootFilesystemRoot != filesetFilesystemRoot then\n      throw ''\n        lib.fileset.toSource: Filesystem roots are not the same for `fileset` and `root` (${toString root}):\n            `root`: Filesystem root is \"${toString rootFilesystemRoot}\"\n            `fileset`: Filesystem root is \"${toString filesetFilesystemRoot}\"\n            Different filesystem roots are not supported.''\n    else if !pathExists root then\n      throw \"lib.fileset.toSource: `root` (${toString root}) is a path that does not exist.\"\n    else if pathType root != \"directory\" then\n      throw ''\n        lib.fileset.toSource: `root` (${toString root}) is a file, but it should be a directory instead. Potential solutions:\n            - If you want to import the file into the store _without_ a containing directory, use string interpolation or `builtins.path` instead of this function.\n            - If you want to import the file into the store _with_ a containing directory, set `root` to the containing directory, such as ${toString (dirOf root)}, and set `fileset` to the file path.''\n    else if !fileset._internalIsEmptyWithoutBase && !hasPrefix root fileset._internalBase then\n      throw ''\n        lib.fileset.toSource: `fileset` could contain files in ${toString fileset._internalBase}, which is not under the `root` (${toString root}). Potential solutions:\n            - Set `root` to ${toString fileset._internalBase} or any directory higher up. This changes the layout of the resulting store path.\n            - Set `fileset` to a file set that cannot contain files outside the `root` (${toString root}). This could change the files included in the result.''\n    else\n      seq sourceFilter cleanSourceWith {\n        name = \"source\";\n        src = root;\n        filter = sourceFilter;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":419,"column":5},"lambda_expr":"toSource =\n    {\n      root,\n      fileset,\n    }:\n    let\n      # We cannot rename matched attribute arguments, so let's work around it with an extra `let in` statement\n      filesetArg = fileset;\n    in\n    let\n      fileset = _coerce \"lib.fileset.toSource: `fileset`\" filesetArg;\n      rootFilesystemRoot = (splitRoot root).root;\n      filesetFilesystemRoot = (splitRoot fileset._internalBase).root;\n      sourceFilter = _toSourceFilter fileset;\n    in\n    if !isPath root then\n      if root ? _isLibCleanSourceWith then\n        throw ''\n          lib.fileset.toSource: `root` is a `lib.sources`-based value, but it should be a path instead.\n              To use a `lib.sources`-based value, convert it to a file set using `lib.fileset.fromSource` and pass it as `fileset`.\n              Note that this only works for sources created from paths.''\n      else if isStringLike root then\n        throw ''\n          lib.fileset.toSource: `root` (${toString root}) is a string-like value, but it should be a path instead.\n              Paths in strings are not supported by `lib.fileset`, use `lib.sources` or derivations instead.''\n      else\n        throw \"lib.fileset.toSource: `root` is of type ${typeOf root}, but it should be a path instead.\"\n    # Currently all Nix paths have the same filesystem root, but this could change in the future.\n    # See also ../path/README.md\n    else if !fileset._internalIsEmptyWithoutBase && rootFilesystemRoot != filesetFilesystemRoot then\n      throw ''\n        lib.fileset.toSource: Filesystem roots are not the same for `fileset` and `root` (${toString root}):\n            `root`: Filesystem root is \"${toString rootFilesystemRoot}\"\n            `fileset`: Filesystem root is \"${toString filesetFilesystemRoot}\"\n            Different filesystem roots are not supported.''\n    else if !pathExists root then\n      throw \"lib.fileset.toSource: `root` (${toString root}) is a path that does not exist.\"\n    else if pathType root != \"directory\" then\n      throw ''\n        lib.fileset.toSource: `root` (${toString root}) is a file, but it should be a directory instead. Potential solutions:\n            - If you want to import the file into the store _without_ a containing directory, use string interpolation or `builtins.path` instead of this function.\n            - If you want to import the file into the store _with_ a containing directory, set `root` to the containing directory, such as ${toString (dirOf root)}, and set `fileset` to the file path.''\n    else if !fileset._internalIsEmptyWithoutBase && !hasPrefix root fileset._internalBase then\n      throw ''\n        lib.fileset.toSource: `fileset` could contain files in ${toString fileset._internalBase}, which is not under the `root` (${toString root}). Potential solutions:\n            - Set `root` to ${toString fileset._internalBase} or any directory higher up. This changes the layout of the resulting store path.\n            - Set `fileset` to a file set that cannot contain files outside the `root` (${toString root}). This could change the files included in the result.''\n    else\n      seq sourceFilter cleanSourceWith {\n        name = \"source\";\n        src = root;\n        filter = sourceFilter;\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":418,"column":3},"path":["lib","fileset","toSource"],"pos_type":"Attribute"}},"content":{"content":"\nAdd the local files contained in `fileset` to the store as a single [store path](https://nixos.org/manual/nix/stable/glossary#gloss-store-path) rooted at `root`.\n\nThe result is the store path as a string-like value, making it usable e.g. as the `src` of a derivation, or in string interpolation:\n```nix\nstdenv.mkDerivation {\n  src = lib.fileset.toSource { ... };\n  # ...\n}\n```\n\nThe name of the store path is always `source`.\n\n# Inputs\n\nTakes an attribute set with the following attributes\n\n`root` (Path; _required_)\n\n: The local directory [path](https://nixos.org/manual/nix/stable/language/values.html#type-path) that will correspond to the root of the resulting store path.\n  Paths in [strings](https://nixos.org/manual/nix/stable/language/values.html#type-string), including Nix store paths, cannot be passed as `root`.\n  `root` has to be a directory.\n\n  :::{.note}\n  Changing `root` only affects the directory structure of the resulting store path, it does not change which files are added to the store.\n  The only way to change which files get added to the store is by changing the `fileset` attribute.\n  :::\n\n`fileset` (FileSet; _required_)\n\n: The file set whose files to import into the store.\n  File sets can be created using other functions in this library.\n  This argument can also be a path,\n  which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n  :::{.note}\n  If a directory does not recursively contain any file, it is omitted from the store path contents.\n  :::\n\n# Type\n\n```\ntoSource :: {\n  root :: Path,\n  fileset :: FileSet,\n} -> SourceLike\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.toSource` usage example\n\n```nix\n# Import the current directory into the store\n# but only include files under ./src\ntoSource {\n  root = ./.;\n  fileset = ./src;\n}\n=> \"/nix/store/...-source\"\n\n# Import the current directory into the store\n# but only include ./Makefile and all files under ./src\ntoSource {\n  root = ./.;\n  fileset = union\n    ./Makefile\n    ./src;\n}\n=> \"/nix/store/...-source\"\n\n# Trying to include a file outside the root will fail\ntoSource {\n  root = ./.;\n  fileset = unions [\n    ./Makefile\n    ./src\n    ../LICENSE\n  ];\n}\n=> <error>\n\n# The root needs to point to a directory that contains all the files\ntoSource {\n  root = ../.;\n  fileset = unions [\n    ./Makefile\n    ./src\n    ../LICENSE\n  ];\n}\n=> \"/nix/store/...-source\"\n\n# The root has to be a local filesystem path\ntoSource {\n  root = \"/nix/store/...-source\";\n  fileset = ./.;\n}\n=> <error>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":418,"column":3},"path":["lib","fileset","toSource"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.trace","path":["lib","fileset","trace"],"aliases":[],"signature":"trace :: FileSet -> Any -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":245,"column":3},"attr_expr":"trace =\n    fileset:\n    let\n      # \"fileset\" would be a better name, but that would clash with the argument name,\n      # and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76\n      actualFileset = _coerce \"lib.fileset.trace: Argument\" fileset;\n    in\n    seq (_printFileset actualFileset) (x: x);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":246,"column":5},"lambda_expr":"trace =\n    fileset:\n    let\n      # \"fileset\" would be a better name, but that would clash with the argument name,\n      # and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76\n      actualFileset = _coerce \"lib.fileset.trace: Argument\" fileset;\n    in\n    seq (_printFileset actualFileset) (x: x);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":245,"column":3},"path":["lib","fileset","trace"],"pos_type":"Attribute"}},"content":{"content":"\nIncrementally evaluate and trace a file set in a pretty way.\nThis function is only intended for debugging purposes.\nThe exact tracing format is unspecified and may change.\n\nThis function takes a final argument to return.\nIn comparison, [`traceVal`](#function-library-lib.fileset.traceVal) returns\nthe given file set argument.\n\nThis variant is useful for tracing file sets in the Nix repl.\n\n# Inputs\n\n`fileset`\n\n: The file set to trace.\n\n  This argument can also be a path,\n  which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n`val`\n\n: The value to return.\n\n# Type\n\n```\ntrace :: FileSet -> Any -> Any\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.trace` usage example\n\n```nix\ntrace (unions [ ./Makefile ./src ./tests/run.sh ]) null\n=>\ntrace: /home/user/src/myProject\ntrace: - Makefile (regular)\ntrace: - src (all files in directory)\ntrace: - tests\ntrace:   - run.sh (regular)\nnull\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":245,"column":3},"path":["lib","fileset","trace"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.traceVal","path":["lib","fileset","traceVal"],"aliases":[],"signature":"traceVal :: FileSet -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":303,"column":3},"attr_expr":"traceVal =\n    fileset:\n    let\n      # \"fileset\" would be a better name, but that would clash with the argument name,\n      # and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76\n      actualFileset = _coerce \"lib.fileset.traceVal: Argument\" fileset;\n    in\n    seq (_printFileset actualFileset)\n      # We could also return the original fileset argument here,\n      # but that would then duplicate work for consumers of the fileset, because then they have to coerce it again\n      actualFileset;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":304,"column":5},"lambda_expr":"traceVal =\n    fileset:\n    let\n      # \"fileset\" would be a better name, but that would clash with the argument name,\n      # and we cannot change that because of https://github.com/nix-community/nixdoc/issues/76\n      actualFileset = _coerce \"lib.fileset.traceVal: Argument\" fileset;\n    in\n    seq (_printFileset actualFileset)\n      # We could also return the original fileset argument here,\n      # but that would then duplicate work for consumers of the fileset, because then they have to coerce it again\n      actualFileset;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":303,"column":3},"path":["lib","fileset","traceVal"],"pos_type":"Attribute"}},"content":{"content":"\nIncrementally evaluate and trace a file set in a pretty way.\nThis function is only intended for debugging purposes.\nThe exact tracing format is unspecified and may change.\n\nThis function returns the given file set.\nIn comparison, [`trace`](#function-library-lib.fileset.trace) takes another argument to return.\n\nThis variant is useful for tracing file sets passed as arguments to other functions.\n\n# Inputs\n\n`fileset`\n\n: The file set to trace and return.\n\n  This argument can also be a path,\n  which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n# Type\n\n```\ntraceVal :: FileSet -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.traceVal` usage example\n\n```nix\ntoSource {\n  root = ./.;\n  fileset = traceVal (unions [\n    ./Makefile\n    ./src\n    ./tests/run.sh\n  ]);\n}\n=>\ntrace: /home/user/src/myProject\ntrace: - Makefile (regular)\ntrace: - src (all files in directory)\ntrace: - tests\ntrace:   - run.sh (regular)\n\"/nix/store/...-source\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":303,"column":3},"path":["lib","fileset","traceVal"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.union","path":["lib","fileset","union"],"aliases":[],"signature":"union :: FileSet -> FileSet -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":555,"column":3},"attr_expr":"union =\n    fileset1: fileset2:\n    _unionMany (\n      _coerceMany \"lib.fileset.union\" [\n        {\n          context = \"First argument\";\n          value = fileset1;\n        }\n        {\n          context = \"Second argument\";\n          value = fileset2;\n        }\n      ]\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":556,"column":5},"lambda_expr":"union =\n    fileset1: fileset2:\n    _unionMany (\n      _coerceMany \"lib.fileset.union\" [\n        {\n          context = \"First argument\";\n          value = fileset1;\n        }\n        {\n          context = \"Second argument\";\n          value = fileset2;\n        }\n      ]\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":555,"column":3},"path":["lib","fileset","union"],"pos_type":"Attribute"}},"content":{"content":"\nThe file set containing all files that are in either of two given file sets.\nThis is the same as [`unions`](#function-library-lib.fileset.unions),\nbut takes just two file sets instead of a list.\nSee also [Union (set theory)](https://en.wikipedia.org/wiki/Union_(set_theory)).\n\nThe given file sets are evaluated as lazily as possible,\nwith the first argument being evaluated first if needed.\n\n# Inputs\n\n`fileset1`\n\n: The first file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n`fileset2`\n\n: The second file set. This argument can also be a path, which gets [implicitly coerced to a file set](#sec-fileset-path-coercion).\n\n# Type\n\n```\nunion :: FileSet -> FileSet -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.union` usage example\n\n```nix\n# Create a file set containing the file `Makefile`\n# and all files recursively in the `src` directory\nunion ./Makefile ./src\n\n# Create a file set containing the file `Makefile`\n# and the LICENSE file from the parent directory\nunion ./Makefile ../LICENSE\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":555,"column":3},"path":["lib","fileset","union"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fileset.unions","path":["lib","fileset","unions"],"aliases":[],"signature":"unions :: [ FileSet ] -> FileSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":617,"column":3},"attr_expr":"unions =\n    filesets:\n    if !isList filesets then\n      throw \"lib.fileset.unions: Argument is of type ${typeOf filesets}, but it should be a list instead.\"\n    else\n      pipe filesets [\n        # Annotate the elements with context, used by _coerceMany for better errors\n        (imap0 (\n          i: el: {\n            context = \"Element ${toString i}\";\n            value = el;\n          }\n        ))\n        (_coerceMany \"lib.fileset.unions\")\n        _unionMany\n      ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":618,"column":5},"lambda_expr":"unions =\n    filesets:\n    if !isList filesets then\n      throw \"lib.fileset.unions: Argument is of type ${typeOf filesets}, but it should be a list instead.\"\n    else\n      pipe filesets [\n        # Annotate the elements with context, used by _coerceMany for better errors\n        (imap0 (\n          i: el: {\n            context = \"Element ${toString i}\";\n            value = el;\n          }\n        ))\n        (_coerceMany \"lib.fileset.unions\")\n        _unionMany\n      ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":617,"column":3},"path":["lib","fileset","unions"],"pos_type":"Attribute"}},"content":{"content":"\nThe file set containing all files that are in any of the given file sets.\nThis is the same as [`union`](#function-library-lib.fileset.unions),\nbut takes a list of file sets instead of just two.\nSee also [Union (set theory)](https://en.wikipedia.org/wiki/Union_(set_theory)).\n\nThe given file sets are evaluated as lazily as possible,\nwith earlier elements being evaluated first if needed.\n\n# Inputs\n\n`filesets`\n\n: A list of file sets. The elements can also be paths, which get [implicitly coerced to file sets](#sec-fileset-path-coercion).\n\n# Type\n\n```\nunions :: [ FileSet ] -> FileSet\n```\n\n# Examples\n:::{.example}\n## `lib.fileset.unions` usage example\n\n```nix\n# Create a file set containing selected files\nunions [\n  # Include the single file `Makefile` in the current directory\n  # This errors if the file doesn't exist\n  ./Makefile\n\n  # Recursively include all files in the `src/code` directory\n  # If this directory is empty this has no effect\n  ./src/code\n\n  # Include the files `run.sh` and `unit.c` from the `tests` directory\n  ./tests/run.sh\n  ./tests/unit.c\n\n  # Include the `LICENSE` file from the parent directory\n  ../LICENSE\n]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fileset/default.nix","line":617,"column":3},"path":["lib","fileset","unions"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.baseNameOf","path":["lib","filesystem","baseNameOf"],"aliases":[["builtins","baseNameOf"],["lib","baseNameOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"baseNameOf","args":["x"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":27,"column":5},"attr_expr":"baseNameOf","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","filesystem","baseNameOf"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the *base name* of either a [path value](@docroot@/language/types.md#type-path) *x* or a string *x*, depending on which type is passed, and according to the following rules.\n\nFor a path value, the *base name* is considered to be the part of the path after the last directory separator, including any file extensions.\nThis is the simple case, as path values don't have trailing slashes.\n\nWhen the argument is a string, a more involved logic applies. If the string ends with a `/`, only this one final slash is removed.\n\nAfter this, the *base name* is returned as previously described, assuming `/` as the directory separator. (Note that evaluation must be platform independent.)\n\nThis is somewhat similar to the [GNU `basename`](https://www.gnu.org/software/coreutils/manual/html_node/basename-invocation.html) command, but GNU `basename` strips any number of trailing slashes.\n","source":{"position":null,"path":["lib","filesystem","baseNameOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.filesystem.dirOf","path":["lib","filesystem","dirOf"],"aliases":[["builtins","dirOf"],["lib","dirOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"dirOf","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":28,"column":5},"attr_expr":"dirOf","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","filesystem","dirOf"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the directory part of the string *s*, that is, everything\nbefore the final slash in the string. This is similar to the GNU\n`dirname` command.\n","source":{"position":null,"path":["lib","filesystem","dirOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.filesystem.hashFile","path":["lib","filesystem","hashFile"],"aliases":[["builtins","hashFile"],["lib","hashFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hashFile","args":["type","p"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":35,"column":5},"attr_expr":"hashFile","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","filesystem","hashFile"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a base-16 representation of the cryptographic hash of the\nfile at path *p*. The hash algorithm specified by *type* must be one\nof `\"md5\"`, `\"sha1\"`, `\"sha256\"` or `\"sha512\"`.\n","source":{"position":null,"path":["lib","filesystem","hashFile"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.filesystem.haskellPathsInDir","path":["lib","filesystem","haskellPathsInDir"],"aliases":[],"signature":"haskellPathsInDir :: Path -> { [String] :: Path }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":156,"column":3},"attr_expr":"haskellPathsInDir =\n    root:\n    let\n      # Files in the root\n      root-files = builtins.attrNames (builtins.readDir root);\n      # Files with their full paths\n      root-files-with-paths = map (file: {\n        name = file;\n        value = root + \"/${file}\";\n      }) root-files;\n      # Subdirectories of the root with a cabal file.\n      cabal-subdirs = builtins.filter (\n        { name, value }: builtins.pathExists (value + \"/${name}.cabal\")\n      ) root-files-with-paths;\n    in\n    builtins.listToAttrs cabal-subdirs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":157,"column":5},"lambda_expr":"haskellPathsInDir =\n    root:\n    let\n      # Files in the root\n      root-files = builtins.attrNames (builtins.readDir root);\n      # Files with their full paths\n      root-files-with-paths = map (file: {\n        name = file;\n        value = root + \"/${file}\";\n      }) root-files;\n      # Subdirectories of the root with a cabal file.\n      cabal-subdirs = builtins.filter (\n        { name, value }: builtins.pathExists (value + \"/${name}.cabal\")\n      ) root-files-with-paths;\n    in\n    builtins.listToAttrs cabal-subdirs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":156,"column":3},"path":["lib","filesystem","haskellPathsInDir"],"pos_type":"Attribute"}},"content":{"content":"\nA map of all haskell packages defined in the given path,\nidentified by having a cabal file with the same name as the\ndirectory itself.\n\n# Inputs\n\n`root`\n\n: The directory within to search\n\n# Type\n\n```\nhaskellPathsInDir :: Path -> { [String] :: Path }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":156,"column":3},"path":["lib","filesystem","haskellPathsInDir"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.isPath","path":["lib","filesystem","isPath"],"aliases":[["builtins","isPath"],["lib","isPath"],["lib","strings","isPath"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isPath","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":29,"column":5},"attr_expr":"isPath","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","filesystem","isPath"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a path, and `false` otherwise.\n","source":{"position":null,"path":["lib","filesystem","isPath"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.filesystem.listFilesRecursive","path":["lib","filesystem","listFilesRecursive"],"aliases":[],"signature":"listFilesRecursive :: Path -> [Path]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":233,"column":3},"attr_expr":"listFilesRecursive =\n    let\n      # We only flatten at the very end, as flatten is recursive.\n      internalFunc =\n        dir:\n        (lib.mapAttrsToList (\n          name: type: if type == \"directory\" then internalFunc (dir + \"/${name}\") else dir + \"/${name}\"\n        ) (builtins.readDir dir));\n    in\n    dir: lib.flatten (internalFunc dir);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":242,"column":5},"lambda_expr":"dir: lib.flatten (internalFunc dir)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":233,"column":3},"path":["lib","filesystem","listFilesRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nGiven a directory, return a flattened list of all files within it recursively.\n\n# Inputs\n\n`dir`\n\n: The path to recursively list\n\n# Type\n\n```\nlistFilesRecursive :: Path -> [Path]\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":233,"column":3},"path":["lib","filesystem","listFilesRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.locateDominatingFile","path":["lib","filesystem","locateDominatingFile"],"aliases":[],"signature":"locateDominatingFile :: RegExp -> Path -> ({ path :: Path; matches :: [MatchResults]; } | Null)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":193,"column":3},"attr_expr":"locateDominatingFile =\n    pattern: file:\n    let\n      go =\n        path:\n        let\n          files = builtins.attrNames (builtins.readDir path);\n          matches = builtins.filter (match: match != null) (map (builtins.match pattern) files);\n        in\n        if builtins.length matches != 0 then\n          { inherit path matches; }\n        else if toString path == \"/\" then\n          null\n        else\n          go (dirOf path);\n      parent = dirOf file;\n      isDir =\n        let\n          base = baseNameOf file;\n          type = (builtins.readDir parent).${base} or null;\n        in\n        toString file == \"/\" || type == \"directory\";\n    in\n    go (if isDir then file else parent);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":194,"column":5},"lambda_expr":"locateDominatingFile =\n    pattern: file:\n    let\n      go =\n        path:\n        let\n          files = builtins.attrNames (builtins.readDir path);\n          matches = builtins.filter (match: match != null) (map (builtins.match pattern) files);\n        in\n        if builtins.length matches != 0 then\n          { inherit path matches; }\n        else if toString path == \"/\" then\n          null\n        else\n          go (dirOf path);\n      parent = dirOf file;\n      isDir =\n        let\n          base = baseNameOf file;\n          type = (builtins.readDir parent).${base} or null;\n        in\n        toString file == \"/\" || type == \"directory\";\n    in\n    go (if isDir then file else parent);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":193,"column":3},"path":["lib","filesystem","locateDominatingFile"],"pos_type":"Attribute"}},"content":{"content":"\nFind the first directory containing a file matching `pattern`\nupward from a given `file`.\nReturns `null` if no directories contain a file matching `pattern`.\n\n# Inputs\n\n`pattern`\n\n: The pattern to search for\n\n`file`\n\n: The file to start searching upward from\n\n# Type\n\n```\nlocateDominatingFile :: RegExp -> Path -> ({ path :: Path; matches :: [MatchResults]; } | Null)\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":193,"column":3},"path":["lib","filesystem","locateDominatingFile"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.packagesFromDirectoryRecursive","path":["lib","filesystem","packagesFromDirectoryRecursive"],"aliases":[["lib","packagesFromDirectoryRecursive"]],"signature":"packagesFromDirectoryRecursive :: {\n  callPackage :: Path -> AttrSet -> Any;\n  newScope? :: AttrSet -> Scope;\n  directory :: Path;\n} -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":370,"column":3},"attr_expr":"packagesFromDirectoryRecursive =\n    let\n      inherit (lib)\n        concatMapAttrs\n        makeScope\n        recurseIntoAttrs\n        removeSuffix\n        ;\n\n      # Generate an attrset corresponding to a given directory.\n      # This function is outside `packagesFromDirectoryRecursive`'s lambda expression,\n      #  to prevent accidentally using its parameters.\n      processDir =\n        { callPackage, directory, ... }@args:\n        concatMapAttrs (\n          name: type:\n          # for each directory entry\n          let\n            path = directory + \"/${name}\";\n          in\n          if type == \"directory\" then\n            {\n              # recurse into directories\n              \"${name}\" = packagesFromDirectoryRecursive (\n                args\n                // {\n                  directory = path;\n                }\n              );\n            }\n          else if type == \"regular\" && hasSuffix \".nix\" name then\n            {\n              # call .nix files\n              \"${removeSuffix \".nix\" name}\" = callPackage path { };\n            }\n          else if type == \"regular\" then\n            {\n              # ignore non-nix files\n            }\n          else\n            throw ''\n              lib.filesystem.packagesFromDirectoryRecursive: Unsupported file type ${type} at path ${toString path}\n            ''\n        ) (builtins.readDir directory);\n    in\n    {\n      callPackage,\n      newScope ? throw \"lib.packagesFromDirectoryRecursive: newScope wasn't passed in args\",\n      directory,\n    }@args:\n    let\n      defaultPath = directory + \"/package.nix\";\n    in\n    if pathExists defaultPath then\n      # if `${directory}/package.nix` exists, call it directly\n      callPackage defaultPath { }\n    else if args ? newScope then\n      # Create a new scope and mark it `recurseForDerivations`.\n      # This lets the packages refer to each other.\n      # See:\n      #  [lib.makeScope](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.makeScope) and\n      #  [lib.recurseIntoAttrs](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.makeScope)\n      recurseIntoAttrs (\n        makeScope newScope (\n          self:\n          # generate the attrset representing the directory, using the new scope's `callPackage` and `newScope`\n          processDir (\n            args\n            // {\n              inherit (self) callPackage newScope;\n            }\n          )\n        )\n      )\n    else\n      processDir args;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":415,"column":5},"lambda_expr":"{\n      callPackage,\n      newScope ? throw \"lib.packagesFromDirectoryRecursive: newScope wasn't passed in args\",\n      directory,\n    }@args:\n    let\n      defaultPath = directory + \"/package.nix\";\n    in\n    if pathExists defaultPath then\n      # if `${directory}/package.nix` exists, call it directly\n      callPackage defaultPath { }\n    else if args ? newScope then\n      # Create a new scope and mark it `recurseForDerivations`.\n      # This lets the packages refer to each other.\n      # See:\n      #  [lib.makeScope](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.makeScope) and\n      #  [lib.recurseIntoAttrs](https://nixos.org/manual/nixpkgs/unstable/#function-library-lib.customisation.makeScope)\n      recurseIntoAttrs (\n        makeScope newScope (\n          self:\n          # generate the attrset representing the directory, using the new scope's `callPackage` and `newScope`\n          processDir (\n            args\n            // {\n              inherit (self) callPackage newScope;\n            }\n          )\n        )\n      )\n    else\n      processDir args","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":370,"column":3},"path":["lib","filesystem","packagesFromDirectoryRecursive"],"pos_type":"Attribute"}},"content":{"content":"\nTransform a directory tree containing package files suitable for\n`callPackage` into a matching nested attribute set of derivations.\n\nFor a directory tree like this:\n\n```\nmy-packages\n├── a.nix\n├── b.nix\n├── c\n│  ├── my-extra-feature.patch\n│  ├── package.nix\n│  └── support-definitions.nix\n└── my-namespace\n   ├── d.nix\n   ├── e.nix\n   └── f\n      └── package.nix\n```\n\n`packagesFromDirectoryRecursive` will produce an attribute set like this:\n\n```nix\n# packagesFromDirectoryRecursive {\n#   callPackage = pkgs.callPackage;\n#   directory = ./my-packages;\n# }\n{\n  a = pkgs.callPackage ./my-packages/a.nix { };\n  b = pkgs.callPackage ./my-packages/b.nix { };\n  c = pkgs.callPackage ./my-packages/c/package.nix { };\n  my-namespace = {\n    d = pkgs.callPackage ./my-packages/my-namespace/d.nix { };\n    e = pkgs.callPackage ./my-packages/my-namespace/e.nix { };\n    f = pkgs.callPackage ./my-packages/my-namespace/f/package.nix { };\n  };\n}\n```\n\nIn particular:\n- If the input directory contains a `package.nix` file, then\n  `callPackage <directory>/package.nix { }` is returned.\n- Otherwise, the input directory's contents are listed and transformed into\n  an attribute set.\n  - If a regular file's name has the `.nix` extension, it is turned into attribute\n    where:\n    - The attribute name is the file name without the `.nix` extension\n    - The attribute value is `callPackage <file path> { }`\n  - Directories are turned into an attribute where:\n    - The attribute name is the name of the directory\n    - The attribute value is the result of calling\n      `packagesFromDirectoryRecursive { ... }` on the directory.\n\n    As a result, directories with no `.nix` files (including empty\n    directories) will be transformed into empty attribute sets.\n  - Other files are ignored, including symbolic links to directories and to regular `.nix`\n    files; this is because nixlang code cannot distinguish the type of a link's target.\n\n# Inputs\n\n`callPackage`\n: The function used to convert a Nix file's path into a leaf of the attribute set.\n  It is typically the `callPackage` function, taken from either `pkgs` or a new scope corresponding to the `directory`.\n\n`newScope`\n: If present, this function is used when recursing into a directory, to generate a new scope.\n  The arguments are updated with the scope's `callPackage` and `newScope` functions, so packages can require\n  anything in their scope, or in an ancestor of their scope.\n\n`directory`\n: The directory to read package files from.\n\n# Type\n\n```\npackagesFromDirectoryRecursive :: {\n  callPackage :: Path -> AttrSet -> Any;\n  newScope? :: AttrSet -> Scope;\n  directory :: Path;\n} -> AttrSet\n```\n\n# Examples\n:::{.example}\n## Basic use of `lib.packagesFromDirectoryRecursive`\n\n```nix\npackagesFromDirectoryRecursive {\n  inherit (pkgs) callPackage;\n  directory = ./my-packages;\n}\n=> { ... }\n```\n\nIn this case, `callPackage` will only search `pkgs` for a file's input parameters.\nIn other words, a file cannot refer to another file in the directory in its input parameters.\n:::\n\n::::{.example}\n## Create a scope for the nix files found in a directory\n```nix\npackagesFromDirectoryRecursive {\n  inherit (pkgs) callPackage newScope;\n  directory = ./my-packages;\n}\n=> { ... }\n```\n\nFor example, take the following directory structure:\n```\nmy-packages\n├── a.nix    → { b }: assert b ? b1; ...\n└── b\n   ├── b1.nix  → { a }: ...\n   └── b2.nix\n```\n\nHere, `b1.nix` can specify `{ a }` as a parameter, which `callPackage` will resolve as expected.\nLikewise, `a.nix` receive an attrset corresponding to the contents of the `b` directory.\n\n:::{.note}\n`a.nix` cannot directly take as inputs packages defined in a child directory, such as `b1`.\n:::\n::::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":370,"column":3},"path":["lib","filesystem","packagesFromDirectoryRecursive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.pathIsDirectory","path":["lib","filesystem","pathIsDirectory"],"aliases":[["lib","pathIsDirectory"]],"signature":"pathIsDirectory :: Path -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":103,"column":3},"attr_expr":"pathIsDirectory = path: pathExists path && pathType path == \"directory\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":103,"column":21},"lambda_expr":"pathIsDirectory = path: pathExists path && pathType path == \"directory\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":103,"column":3},"path":["lib","filesystem","pathIsDirectory"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a path exists and is a directory.\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\npathIsDirectory :: Path -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathIsDirectory` usage example\n\n```nix\npathIsDirectory /.\n=> true\n\npathIsDirectory /this/does/not/exist\n=> false\n\npathIsDirectory /some/file.nix\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":103,"column":3},"path":["lib","filesystem","pathIsDirectory"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.pathIsRegularFile","path":["lib","filesystem","pathIsRegularFile"],"aliases":[["lib","pathIsRegularFile"]],"signature":"pathIsRegularFile :: Path -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":137,"column":3},"attr_expr":"pathIsRegularFile = path: pathExists path && pathType path == \"regular\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":137,"column":23},"lambda_expr":"pathIsRegularFile = path: pathExists path && pathType path == \"regular\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":137,"column":3},"path":["lib","filesystem","pathIsRegularFile"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a path exists and is a regular file, meaning not a symlink or any other special file type.\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\npathIsRegularFile :: Path -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathIsRegularFile` usage example\n\n```nix\npathIsRegularFile /.\n=> false\n\npathIsRegularFile /this/does/not/exist\n=> false\n\npathIsRegularFile /some/file.nix\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":137,"column":3},"path":["lib","filesystem","pathIsRegularFile"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.pathType","path":["lib","filesystem","pathType"],"aliases":[["builtins","readFileType"],["lib","pathType"],["lib","readFileType"],["lib","filesystem","readFileType"]],"signature":"pathType :: Path -> String\n","is_primop":true,"primop_meta":{"name":"readFileType","args":["p"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"attr_expr":"pathType = builtins.readFileType;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}},"content":{"content":"\nThe type of a path. The path needs to exist and be accessible.\nThe result is either `\"directory\"` for a directory, `\"regular\"` for a\nregular file, `\"symlink\"` for a symlink, or `\"unknown\"` for anything else.\n\n# Inputs\n\npath\n\n: The path to query\n\n# Type\n\n```\npathType :: Path -> String\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathType` usage example\n\n```nix\npathType /.\n=> \"directory\"\n\npathType /some/file.nix\n=> \"regular\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.readDir","path":["lib","filesystem","readDir"],"aliases":[["builtins","readDir"],["lib","readDir"]],"signature":null,"is_primop":true,"primop_meta":{"name":"readDir","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":33,"column":5},"attr_expr":"readDir","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","filesystem","readDir"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the contents of the directory *path* as a set mapping\ndirectory entries to the corresponding file type. For instance, if\ndirectory `A` contains a regular file `B` and another directory\n`C`, then `builtins.readDir ./A` returns the set\n\n```nix\n{ B = \"regular\"; C = \"directory\"; }\n```\n\nThe possible values for the file type are `\"regular\"`,\n`\"directory\"`, `\"symlink\"` and `\"unknown\"`.\n","source":{"position":null,"path":["lib","filesystem","readDir"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.filesystem.readFileType","path":["lib","filesystem","readFileType"],"aliases":[["builtins","readFileType"],["lib","pathType"],["lib","readFileType"],["lib","filesystem","pathType"]],"signature":"pathType :: Path -> String\n","is_primop":true,"primop_meta":{"name":"readFileType","args":["p"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":34,"column":5},"attr_expr":"readFileType","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}},"content":{"content":"\nThe type of a path. The path needs to exist and be accessible.\nThe result is either `\"directory\"` for a directory, `\"regular\"` for a\nregular file, `\"symlink\"` for a symlink, or `\"unknown\"` for anything else.\n\n# Inputs\n\npath\n\n: The path to query\n\n# Type\n\n```\npathType :: Path -> String\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.pathType` usage example\n\n```nix\npathType /.\n=> \"directory\"\n\npathType /some/file.nix\n=> \"regular\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":69,"column":3},"path":["lib","filesystem","pathType"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.filesystem.resolveDefaultNix","path":["lib","filesystem","resolveDefaultNix"],"aliases":[],"signature":"resolveDefaultNix :: (Path | String) -> (Path | String)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":478,"column":3},"attr_expr":"resolveDefaultNix =\n    v:\n    if pathIsDirectory v then\n      v + \"/default.nix\"\n    else if lib.isString v && hasSuffix \"/\" v then\n      # A path ending in `/` can only refer to a directory, so we take the hint, even if we can't verify the validity of the path's `/` assertion.\n      # A `/` is already present, so we don't add another one.\n      v + \"default.nix\"\n    else\n      v;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":479,"column":5},"lambda_expr":"resolveDefaultNix =\n    v:\n    if pathIsDirectory v then\n      v + \"/default.nix\"\n    else if lib.isString v && hasSuffix \"/\" v then\n      # A path ending in `/` can only refer to a directory, so we take the hint, even if we can't verify the validity of the path's `/` assertion.\n      # A `/` is already present, so we don't add another one.\n      v + \"default.nix\"\n    else\n      v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":478,"column":3},"path":["lib","filesystem","resolveDefaultNix"],"pos_type":"Attribute"}},"content":{"content":"\nAppend `/default.nix` if the passed path is a directory.\n\n# Inputs\n\nA single argument which can be a [path](https://nix.dev/manual/nix/stable/language/types#type-path) value or a string containing an absolute path.\n\n# Output\n\nIf the input refers to a directory that exists, the output is that same path with `/default.nix` appended.\nFurthermore, if the input is a string that ends with `/`, `default.nix` is appended to it.\nOtherwise, the input is returned unchanged.\n\n# Type\n\n```\nresolveDefaultNix :: (Path | String) -> (Path | String)\n```\n\n# Examples\n:::{.example}\n## `lib.filesystem.resolveDefaultNix` usage example\n\nThis expression checks whether `a` and `b` refer to the same locally available Nix file path.\n\n```nix\nresolveDefaultNix a == resolveDefaultNix b\n```\n\nFor instance, if `a` is `/some/dir` and `b` is `/some/dir/default.nix`, and `/some/dir/` exists, the expression evaluates to `true`, despite `a` and `b` being different references to the same Nix file.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/filesystem.nix","line":478,"column":3},"path":["lib","filesystem","resolveDefaultNix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.composeExtensions","path":["lib","fixedPoints","composeExtensions"],"aliases":[["lib","composeExtensions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":340,"column":3},"attr_expr":"composeExtensions =\n    f: g: final: prev:\n    let\n      fApplied = f final prev;\n      prev' = prev // fApplied;\n    in\n    fApplied // g final prev';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":341,"column":5},"lambda_expr":"composeExtensions =\n    f: g: final: prev:\n    let\n      fApplied = f final prev;\n      prev' = prev // fApplied;\n    in\n    fApplied // g final prev';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":340,"column":3},"path":["lib","fixedPoints","composeExtensions"],"pos_type":"Attribute"}},"content":{"content":"\nCompose two overlay functions and return a single overlay function that combines them.\nFor more details see: [`composeManyExtensions`](#function-library-lib.fixedPoints.composeManyExtensions).\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":340,"column":3},"path":["lib","fixedPoints","composeExtensions"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.composeManyExtensions","path":["lib","fixedPoints","composeManyExtensions"],"aliases":[["lib","composeManyExtensions"]],"signature":"# Pseudo code\nlet\n  #               final      prev\n  #                 ↓          ↓\n  OverlayFn = { ... } -> { ... } -> { ... };\nin\ncomposeManyExtensions :: [OverlayFn] -> OverlayFn\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":412,"column":3},"attr_expr":"composeManyExtensions = lib.foldr (x: y: composeExtensions x y) (final: prev: { });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":138,"column":14},"lambda_expr":"list:\n    let\n      len = length list;\n      fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));\n    in\n    fold' 0","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":412,"column":3},"path":["lib","fixedPoints","composeManyExtensions"],"pos_type":"Attribute"}},"content":{"content":"\nComposes a list of [`overlays`](#chap-overlays) and returns a single overlay function that combines them.\n\n:::{.note}\nThe result is produced by using the update operator `//`.\nThis means nested values of previous overlays are not merged recursively.\nIn other words, previously defined attributes are replaced, ignoring the previous value, unless referenced by the overlay; for example `final: prev: { foo = final.foo + 1; }`.\n:::\n\n# Inputs\n\n`extensions`\n\n: A list of overlay functions\n  :::{.note}\n  The order of the overlays in the list is important.\n  :::\n\n: Each overlay function takes two arguments, by convention `final` and `prev`, and returns an attribute set.\n  - `final` is the result of the fixed-point function, with all overlays applied.\n  - `prev` is the result of the previous overlay function(s).\n\n# Type\n\n```\n# Pseudo code\nlet\n  #               final      prev\n  #                 ↓          ↓\n  OverlayFn = { ... } -> { ... } -> { ... };\nin\ncomposeManyExtensions :: [OverlayFn] -> OverlayFn\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.composeManyExtensions` usage example\n\n```nix\nlet\n  # The \"original function\" that is extended by the overlays.\n  # Note that it doesn't have prev: as argument since no overlay function precedes it.\n  original = final: { a = 1; };\n\n  # Each overlay function has 'final' and 'prev' as arguments.\n  overlayA = final: prev: { b = final.c; c = 3; };\n  overlayB = final: prev: { c = 10; x = prev.c or 5; };\n\n  extensions = composeManyExtensions [ overlayA overlayB ];\n\n  # Calculate the fixed point of all composed overlays.\n  fixedpoint = lib.fix (lib.extends extensions original );\n\nin fixedpoint\n=>\n{\n  a = 1;\n  b = 10;\n  c = 10;\n  x = 3;\n}\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":412,"column":3},"path":["lib","fixedPoints","composeManyExtensions"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.converge","path":["lib","fixedPoints","converge"],"aliases":[["lib","converge"]],"signature":"converge :: (a -> a) -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":152,"column":3},"attr_expr":"converge =\n    f: x:\n    let\n      x' = f x;\n    in\n    if x' == x then x else converge f x';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":153,"column":5},"lambda_expr":"converge =\n    f: x:\n    let\n      x' = f x;\n    in\n    if x' == x then x else converge f x';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":152,"column":3},"path":["lib","fixedPoints","converge"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the fixpoint that `f` converges to when called iteratively, starting\nwith the input `x`.\n\n```\nnix-repl> converge (x: x / 2) 16\n0\n```\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`x`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconverge :: (a -> a) -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":152,"column":3},"path":["lib","fixedPoints","converge"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.extends","path":["lib","fixedPoints","extends"],"aliases":[["lib","extends"]],"signature":"extends :: (AttrSet -> AttrSet -> AttrSet) # The overlay to apply to the fixed-point function\n        -> (AttrSet -> AttrSet) # A fixed-point function\n        -> (AttrSet -> AttrSet) # The resulting fixed-point function\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":325,"column":3},"attr_expr":"extends =\n    overlay: f:\n    # The result should be thought of as a function, the argument of that function is not an argument to `extends` itself\n    (\n      final:\n      let\n        prev = f final;\n      in\n      prev // overlay final prev\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":326,"column":5},"lambda_expr":"extends =\n    overlay: f:\n    # The result should be thought of as a function, the argument of that function is not an argument to `extends` itself\n    (\n      final:\n      let\n        prev = f final;\n      in\n      prev // overlay final prev\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":325,"column":3},"path":["lib","fixedPoints","extends"],"pos_type":"Attribute"}},"content":{"content":"\nExtend a function using an overlay.\n\nOverlays allow modifying and extending fixed-point functions, specifically ones returning attribute sets.\nA fixed-point function is a function which is intended to be evaluated by passing the result of itself as the argument.\nThis is possible due to Nix's lazy evaluation.\n\nA fixed-point function returning an attribute set has the form\n\n```nix\nfinal: {\n  # attributes\n}\n```\n\nwhere `final` refers to the lazily evaluated attribute set returned by the fixed-point function.\n\nAn overlay to such a fixed-point function has the form\n\n```nix\nfinal: prev: {\n  # attributes\n}\n```\n\nwhere `prev` refers to the result of the original function to `final`, and `final` is the result of the composition of the overlay and the original function.\n\nApplying an overlay is done with `extends`:\n\n```nix\nlet\n  f = final: {\n    # attributes\n  };\n  overlay = final: prev: {\n    # attributes\n  };\nin extends overlay f;\n```\n\nTo get the value of `final`, use `lib.fix`:\n\n```nix\nlet\n  f = final: {\n    # attributes\n  };\n  overlay = final: prev: {\n    # attributes\n  };\n  g = extends overlay f;\nin fix g\n```\n\n:::{.note}\nThe argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function.\n\nThe given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`.\n:::\n\n:::{.example}\n\n# Extend a fixed-point function with an overlay\n\nDefine a fixed-point function `f` that expects its own output as the argument `final`:\n\n```nix-repl\nf = final: {\n  # Constant value a\n  a = 1;\n\n  # b depends on the final value of a, available as final.a\n  b = final.a + 2;\n}\n```\n\nEvaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) to get the final result:\n\n```nix-repl\nfix f\n=> { a = 1; b = 3; }\n```\n\nAn overlay represents a modification or extension of such a fixed-point function.\nHere's an example of an overlay:\n\n```nix-repl\noverlay = final: prev: {\n  # Modify the previous value of a, available as prev.a\n  a = prev.a + 10;\n\n  # Extend the attribute set with c, letting it depend on the final values of a and b\n  c = final.a + final.b;\n}\n```\n\nUse `extends overlay f` to apply the overlay to the fixed-point function `f`.\nThis produces a new fixed-point function `g` with the combined behavior of `f` and `overlay`:\n\n```nix-repl\ng = extends overlay f\n```\n\nThe result is a function, so we can't print it directly, but it's the same as:\n\n```nix-repl\ng' = final: {\n  # The constant from f, but changed with the overlay\n  a = 1 + 10;\n\n  # Unchanged from f\n  b = final.a + 2;\n\n  # Extended in the overlay\n  c = final.a + final.b;\n}\n```\n\nEvaluate this using [`lib.fix`](#function-library-lib.fixedPoints.fix) again to get the final result:\n\n```nix-repl\nfix g\n=> { a = 11; b = 13; c = 24; }\n```\n:::\n\n# Inputs\n\n`overlay`\n\n: The overlay to apply to the fixed-point function\n\n`f`\n\n: The fixed-point function\n\n# Type\n\n```\nextends :: (AttrSet -> AttrSet -> AttrSet) # The overlay to apply to the fixed-point function\n        -> (AttrSet -> AttrSet) # A fixed-point function\n        -> (AttrSet -> AttrSet) # The resulting fixed-point function\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.extends` usage example\n\n```nix\nf = final: { a = 1; b = final.a + 2; }\n\nfix f\n=> { a = 1; b = 3; }\n\nfix (extends (final: prev: { a = prev.a + 10; }) f)\n=> { a = 11; b = 13; }\n\nfix (extends (final: prev: { b = final.a + 5; }) f)\n=> { a = 1; b = 6; }\n\nfix (extends (final: prev: { c = final.a + final.b; }) f)\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":325,"column":3},"path":["lib","fixedPoints","extends"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.fix","path":["lib","fixedPoints","fix"],"aliases":[["lib","fix"]],"signature":"fix :: (a -> a) -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":92,"column":3},"attr_expr":"fix =\n    f:\n    let\n      x = f x;\n    in\n    x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":93,"column":5},"lambda_expr":"fix =\n    f:\n    let\n      x = f x;\n    in\n    x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":92,"column":3},"path":["lib","fixedPoints","fix"],"pos_type":"Attribute"}},"content":{"content":"\n`fix f` computes the fixed point of the given function `f`. In other words, the return value is `x` in `x = f x`.\n\n`f` must be a lazy function.\nThis means that `x` must be a value that can be partially evaluated,\nsuch as an attribute set, a list, or a function.\nThis way, `f` can use one part of `x` to compute another part.\n\n**Relation to syntactic recursion**\n\nThis section explains `fix` by refactoring from syntactic recursion to a call of `fix` instead.\n\nFor context, Nix lets you define attributes in terms of other attributes syntactically using the [`rec { }` syntax](https://nixos.org/manual/nix/stable/language/constructs.html#recursive-sets).\n\n```nix\nnix-repl> rec {\n  foo = \"foo\";\n  bar = \"bar\";\n  foobar = foo + bar;\n}\n{ bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n```\n\nThis is convenient when constructing a value to pass to a function for example,\nbut an equivalent effect can be achieved with the `let` binding syntax:\n\n```nix\nnix-repl> let self = {\n  foo = \"foo\";\n  bar = \"bar\";\n  foobar = self.foo + self.bar;\n}; in self\n{ bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n```\n\nBut in general you can get more reuse out of `let` bindings by refactoring them to a function.\n\n```nix\nnix-repl> f = self: {\n  foo = \"foo\";\n  bar = \"bar\";\n  foobar = self.foo + self.bar;\n}\n```\n\nThis is where `fix` comes in, it contains the syntactic recursion that's not in `f` anymore.\n\n```nix\nnix-repl> fix = f:\n  let self = f self; in self;\n```\n\nBy applying `fix` we get the final result.\n\n```nix\nnix-repl> fix f\n{ bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n```\n\nSuch a refactored `f` using `fix` is not useful by itself.\nSee [`extends`](#function-library-lib.fixedPoints.extends) for an example use case.\nThere `self` is also often called `final`.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nfix :: (a -> a) -> a\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.fix` usage example\n\n```nix\nfix (self: { foo = \"foo\"; bar = \"bar\"; foobar = self.foo + self.bar; })\n=> { bar = \"bar\"; foo = \"foo\"; foobar = \"foobar\"; }\n\nfix (self: [ 1 2 (elemAt self 0 + elemAt self 1) ])\n=> [ 1 2 3 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":92,"column":3},"path":["lib","fixedPoints","fix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.fix' (Prime)","path":["lib","fixedPoints","fix'"],"aliases":[["lib","fix'"]],"signature":"fix' :: (a -> a) -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":118,"column":3},"attr_expr":"fix' =\n    f:\n    let\n      x = f x // {\n        __unfix__ = f;\n      };\n    in\n    x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":119,"column":5},"lambda_expr":"fix' =\n    f:\n    let\n      x = f x // {\n        __unfix__ = f;\n      };\n    in\n    x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":118,"column":3},"path":["lib","fixedPoints","fix'"],"pos_type":"Attribute"}},"content":{"content":"\nA variant of `fix` that records the original recursive attribute set in the\nresult, in an attribute named `__unfix__`.\n\nThis is useful in combination with the `extends` function to\nimplement deep overriding.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nfix' :: (a -> a) -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":118,"column":3},"path":["lib","fixedPoints","fix'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.makeExtensible","path":["lib","fixedPoints","makeExtensible"],"aliases":[["lib","makeExtensible"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":434,"column":3},"attr_expr":"makeExtensible = makeExtensibleWithCustomName \"extend\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":451,"column":19},"lambda_expr":"rattrs:\n    fix' (\n      self:\n      (rattrs self)\n      // {\n        ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);\n      }\n    )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":434,"column":3},"path":["lib","fixedPoints","makeExtensible"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an overridable, recursive attribute set. For example:\n\n```\nnix-repl> obj = makeExtensible (final: { })\n\nnix-repl> obj\n{ __unfix__ = «lambda»; extend = «lambda»; }\n\nnix-repl> obj = obj.extend (final: prev: { foo = \"foo\"; })\n\nnix-repl> obj\n{ __unfix__ = «lambda»; extend = «lambda»; foo = \"foo\"; }\n\nnix-repl> obj = obj.extend (final: prev: { foo = prev.foo + \" + \"; bar = \"bar\"; foobar = final.foo + final.bar; })\n\nnix-repl> obj\n{ __unfix__ = «lambda»; bar = \"bar\"; extend = «lambda»; foo = \"foo + \"; foobar = \"foo + bar\"; }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":434,"column":3},"path":["lib","fixedPoints","makeExtensible"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.makeExtensibleWithCustomName","path":["lib","fixedPoints","makeExtensibleWithCustomName"],"aliases":[["lib","makeExtensibleWithCustomName"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":450,"column":3},"attr_expr":"makeExtensibleWithCustomName =\n    extenderName: rattrs:\n    fix' (\n      self:\n      (rattrs self)\n      // {\n        ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);\n      }\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":451,"column":5},"lambda_expr":"makeExtensibleWithCustomName =\n    extenderName: rattrs:\n    fix' (\n      self:\n      (rattrs self)\n      // {\n        ${extenderName} = f: makeExtensibleWithCustomName extenderName (extends f rattrs);\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":450,"column":3},"path":["lib","fixedPoints","makeExtensibleWithCustomName"],"pos_type":"Attribute"}},"content":{"content":"\nSame as `makeExtensible` but the name of the extending attribute is\ncustomized.\n\n# Inputs\n\n`extenderName`\n\n: 1\\. Function argument\n\n`rattrs`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":450,"column":3},"path":["lib","fixedPoints","makeExtensibleWithCustomName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.fixedPoints.toExtension","path":["lib","fixedPoints","toExtension"],"aliases":[["lib","toExtension"]],"signature":"toExtension :: b' -> Any -> Any -> b'\nor\ntoExtension :: (a -> b') -> Any -> a -> b'\nor\ntoExtension :: (a -> a -> b) -> a -> a -> b\nwhere b' = ! Callable\n\nSet a = b = b' = AttrSet & ! Callable to make toExtension return an extending function.\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":512,"column":3},"attr_expr":"toExtension =\n    f:\n    if lib.isFunction f then\n      final: prev:\n      let\n        fPrev = f prev;\n      in\n      if lib.isFunction fPrev then\n        # f is (final: prev: { ... })\n        f final prev\n      else\n        # f is (prev: { ... })\n        fPrev\n    else\n      # f is not a function; probably { ... }\n      final: prev: f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":513,"column":5},"lambda_expr":"toExtension =\n    f:\n    if lib.isFunction f then\n      final: prev:\n      let\n        fPrev = f prev;\n      in\n      if lib.isFunction fPrev then\n        # f is (final: prev: { ... })\n        f final prev\n      else\n        # f is (prev: { ... })\n        fPrev\n    else\n      # f is not a function; probably { ... }\n      final: prev: f;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":512,"column":3},"path":["lib","fixedPoints","toExtension"],"pos_type":"Attribute"}},"content":{"content":"\nConvert to an extending function (overlay).\n\n`toExtension` is the `toFunction` for extending functions (a.k.a. extensions or overlays).\nIt converts a non-function or a single-argument function to an extending function,\nwhile returning a two-argument function as-is.\n\nThat is, it takes a value of the shape `x`, `prev: x`, or `final: prev: x`,\nand returns `final: prev: x`, assuming `x` is not a function.\n\nThis function takes care of the input to `stdenv.mkDerivation`'s\n`overrideAttrs` function.\nIt bridges the gap between `<pkg>.overrideAttrs`\nbefore and after the overlay-style support.\n\n# Inputs\n\n`f`\n: The function or value to convert to an extending function.\n\n# Type\n\n```\ntoExtension :: b' -> Any -> Any -> b'\nor\ntoExtension :: (a -> b') -> Any -> a -> b'\nor\ntoExtension :: (a -> a -> b) -> a -> a -> b\nwhere b' = ! Callable\n\nSet a = b = b' = AttrSet & ! Callable to make toExtension return an extending function.\n```\n\n# Examples\n:::{.example}\n## `lib.fixedPoints.toExtension` usage example\n\n```nix\nfix (final: { a = 0; c = final.a; })\n=> { a = 0; c = 0; };\n\nfix (extends (toExtension { a = 1; b = 2; }) (final: { a = 0; c = final.a; }))\n=> { a = 1; b = 2; c = 1; };\n\nfix (extends (toExtension (prev: { a = 1; b = prev.a; })) (final: { a = 0; c = final.a; }))\n=> { a = 1; b = 0; c = 1; };\n\nfix (extends (toExtension (final: prev: { a = 1; b = prev.a; c = final.a + 1 })) (final: { a = 0; c = final.a; }))\n=> { a = 1; b = 0; c = 2; };\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":512,"column":3},"path":["lib","fixedPoints","toExtension"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.flakes.flakeRefToString","path":["lib","flakes","flakeRefToString"],"aliases":[["builtins","flakeRefToString"],["lib","flakeRefToString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"flakeRefToString","args":["attrs"],"experimental":true,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/flakes.nix","line":9,"column":5},"attr_expr":"flakeRefToString","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","flakes","flakeRefToString"],"pos_type":"Lambda"}},"content":{"content":"\nConvert a flake reference from attribute set format to URL format.\n\nFor example:\n\n```nix\nbuiltins.flakeRefToString {\n  dir = \"lib\"; owner = \"NixOS\"; ref = \"23.05\"; repo = \"nixpkgs\"; type = \"github\";\n}\n```\n\nevaluates to\n\n```nix\n\"github:NixOS/nixpkgs/23.05?dir=lib\"\n```\n","source":{"position":null,"path":["lib","flakes","flakeRefToString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.flakes.parseFlakeRef","path":["lib","flakes","parseFlakeRef"],"aliases":[["builtins","parseFlakeRef"],["lib","parseFlakeRef"]],"signature":null,"is_primop":true,"primop_meta":{"name":"parseFlakeRef","args":["flake-ref"],"experimental":true,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/flakes.nix","line":8,"column":5},"attr_expr":"parseFlakeRef","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","flakes","parseFlakeRef"],"pos_type":"Lambda"}},"content":{"content":"\nParse a flake reference, and return its exploded form.\n\nFor example:\n\n```nix\nbuiltins.parseFlakeRef \"github:NixOS/nixpkgs/23.05?dir=lib\"\n```\n\nevaluates to:\n\n```nix\n{ dir = \"lib\"; owner = \"NixOS\"; ref = \"23.05\"; repo = \"nixpkgs\"; type = \"github\"; }\n```\n","source":{"position":null,"path":["lib","flakes","parseFlakeRef"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.generators.mkDconfKeyValue","path":["lib","generators","mkDconfKeyValue"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":436,"column":3},"attr_expr":"mkDconfKeyValue = mkKeyValueDefault { mkValueString = v: toString (gvariant.mkValue v); } \"=\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":165,"column":10},"lambda_expr":"k: v:\n    \"${escape [ sep ] k}${sep}${mkValueString v}\"","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":436,"column":3},"path":["lib","generators","mkDconfKeyValue"],"pos_type":"Attribute"}},"content":{"content":"\n`mkKeyValueDefault` wrapper that handles dconf INI quirks.\nThe main differences of the format is that it requires strings to be quoted.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":436,"column":3},"path":["lib","generators","mkDconfKeyValue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.mkKeyValueDefault","path":["lib","generators","mkKeyValueDefault"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":161,"column":3},"attr_expr":"mkKeyValueDefault =\n    {\n      mkValueString ? mkValueStringDefault { },\n    }:\n    sep: k: v:\n    \"${escape [ sep ] k}${sep}${mkValueString v}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":162,"column":5},"lambda_expr":"mkKeyValueDefault =\n    {\n      mkValueString ? mkValueStringDefault { },\n    }:\n    sep: k: v:\n    \"${escape [ sep ] k}${sep}${mkValueString v}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":161,"column":3},"path":["lib","generators","mkKeyValueDefault"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate a line of key `k` and value `v`, separated by\ncharacter `sep`. If `sep` appears in `k`, it is escaped.\nHelper for syntaxes with different separators.\n\n`mkValueString` specifies how values should be formatted.\n\n```nix\nmkKeyValueDefault {} \":\" \"f:oo\" \"bar\"\n> \"f\\:oo:bar\"\n```\n\n# Inputs\n\nStructured function argument\n: mkValueString (optional, default: `mkValueStringDefault {}`)\n  : Function to convert values to strings\n\n`sep`\n\n: 2\\. Function argument\n\n`k`\n\n: 3\\. Function argument\n\n`v`\n\n: 4\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":161,"column":3},"path":["lib","generators","mkKeyValueDefault"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.mkLuaInline","path":["lib","generators","mkLuaInline"],"aliases":[["lib","mkLuaInline"]],"signature":"mkLuaInline :: String -> { _type = \"lua-inline\"; expr :: String; }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":885,"column":3},"attr_expr":"mkLuaInline = expr: {\n    _type = \"lua-inline\";\n    inherit expr;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":885,"column":17},"lambda_expr":"mkLuaInline = expr: {\n    _type = \"lua-inline\";\n    inherit expr;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":885,"column":3},"path":["lib","generators","mkLuaInline"],"pos_type":"Attribute"}},"content":{"content":"\nMark string as Lua expression to be inlined when processed by `toLua`.\n\n# Inputs\n\n`expr`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkLuaInline :: String -> { _type = \"lua-inline\"; expr :: String; }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":885,"column":3},"path":["lib","generators","mkLuaInline"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.mkValueStringDefault","path":["lib","generators","mkValueStringDefault"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":92,"column":3},"attr_expr":"mkValueStringDefault =\n    { }:\n    v:\n    let\n      err = t: v: abort (\"generators.mkValueStringDefault: \" + \"${t} not supported: ${toPretty { } v}\");\n    in\n    if isInt v then\n      toString v\n    # convert derivations to store paths\n    else if isDerivation v then\n      toString v\n    # we default to not quoting strings\n    else if isString v then\n      v\n    # isString returns \"1\", which is not a good default\n    else if true == v then\n      \"true\"\n    # here it returns to \"\", which is even less of a good default\n    else if false == v then\n      \"false\"\n    else if null == v then\n      \"null\"\n    # if you have lists you probably want to replace this\n    else if isList v then\n      err \"lists\" v\n    # same as for lists, might want to replace\n    else if isAttrs v then\n      err \"attrsets\" v\n    # functions can’t be printed of course\n    else if isFunction v then\n      err \"functions\" v\n    # Floats currently can't be converted to precise strings,\n    # condition warning on nix version once this isn't a problem anymore\n    # See https://github.com/NixOS/nix/pull/3480\n    else if isFloat v then\n      floatToString v\n    else\n      err \"this value is\" (toString v);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":93,"column":5},"lambda_expr":"mkValueStringDefault =\n    { }:\n    v:\n    let\n      err = t: v: abort (\"generators.mkValueStringDefault: \" + \"${t} not supported: ${toPretty { } v}\");\n    in\n    if isInt v then\n      toString v\n    # convert derivations to store paths\n    else if isDerivation v then\n      toString v\n    # we default to not quoting strings\n    else if isString v then\n      v\n    # isString returns \"1\", which is not a good default\n    else if true == v then\n      \"true\"\n    # here it returns to \"\", which is even less of a good default\n    else if false == v then\n      \"false\"\n    else if null == v then\n      \"null\"\n    # if you have lists you probably want to replace this\n    else if isList v then\n      err \"lists\" v\n    # same as for lists, might want to replace\n    else if isAttrs v then\n      err \"attrsets\" v\n    # functions can’t be printed of course\n    else if isFunction v then\n      err \"functions\" v\n    # Floats currently can't be converted to precise strings,\n    # condition warning on nix version once this isn't a problem anymore\n    # See https://github.com/NixOS/nix/pull/3480\n    else if isFloat v then\n      floatToString v\n    else\n      err \"this value is\" (toString v);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":92,"column":3},"path":["lib","generators","mkValueStringDefault"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a value to a sensible default string representation.\nThe builtin `toString` function has some strange defaults,\nsuitable for bash scripts but not much else.\n\n# Inputs\n\nOptions\n: Empty set, there may be configuration options in the future\n\n`v`\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":92,"column":3},"path":["lib","generators","mkValueStringDefault"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toDconfINI","path":["lib","generators","toDconfINI"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":442,"column":3},"attr_expr":"toDconfINI = toINI { mkKeyValue = mkDconfKeyValue; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":250,"column":5},"lambda_expr":"attrsOfAttrs:\n    let\n      # map function to string for each key val\n      mapAttrsToStringsSep =\n        sep: mapFn: attrs:\n        concatStringsSep sep (mapAttrsToList mapFn attrs);\n      mkSection =\n        sectName: sectValues:\n        ''\n          [${mkSectionName sectName}]\n        ''\n        + toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } sectValues;\n    in\n    # map input to ini sections\n    mapAttrsToStringsSep \"\\n\" mkSection attrsOfAttrs","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":442,"column":3},"path":["lib","generators","toDconfINI"],"pos_type":"Attribute"}},"content":{"content":"\nGenerates INI in dconf keyfile style. See the [GNOME documentation](https://help.gnome.org/system-admin-guide/dconf-keyfiles.html)\nfor details.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":442,"column":3},"path":["lib","generators","toDconfINI"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toDhall","path":["lib","generators","toDhall"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":728,"column":3},"attr_expr":"toDhall =\n    { }@args:\n    v:\n    let\n      concatItems = concatStringsSep \", \";\n    in\n    if isAttrs v then\n      \"{ ${concatItems (mapAttrsToList (key: value: \"${key} = ${toDhall args value}\") v)} }\"\n    else if isList v then\n      \"[ ${concatItems (map (toDhall args) v)} ]\"\n    else if isInt v then\n      \"${if v < 0 then \"\" else \"+\"}${toString v}\"\n    else if isBool v then\n      (if v then \"True\" else \"False\")\n    else if isFunction v then\n      abort \"generators.toDhall: cannot convert a function to Dhall\"\n    else if v == null then\n      abort \"generators.toDhall: cannot convert a null to Dhall\"\n    else\n      toJSON v;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":729,"column":5},"lambda_expr":"toDhall =\n    { }@args:\n    v:\n    let\n      concatItems = concatStringsSep \", \";\n    in\n    if isAttrs v then\n      \"{ ${concatItems (mapAttrsToList (key: value: \"${key} = ${toDhall args value}\") v)} }\"\n    else if isList v then\n      \"[ ${concatItems (map (toDhall args) v)} ]\"\n    else if isInt v then\n      \"${if v < 0 then \"\" else \"+\"}${toString v}\"\n    else if isBool v then\n      (if v then \"True\" else \"False\")\n    else if isFunction v then\n      abort \"generators.toDhall: cannot convert a function to Dhall\"\n    else if v == null then\n      abort \"generators.toDhall: cannot convert a null to Dhall\"\n    else\n      toJSON v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":728,"column":3},"path":["lib","generators","toDhall"],"pos_type":"Attribute"}},"content":{"content":"\nTranslate a simple Nix expression to Dhall notation.\n\nNote that integers are translated to Integer and never\nthe Natural type.\n\n# Inputs\n\nOptions\n\n: Empty set, there may be configuration options in the future\n\nValue\n\n: The value to be converted to Dhall\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":728,"column":3},"path":["lib","generators","toDhall"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toGitINI","path":["lib","generators","toGitINI"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":381,"column":3},"attr_expr":"toGitINI =\n    attrs:\n    let\n      mkSectionName =\n        name:\n        let\n          containsQuote = hasInfix ''\"'' name;\n          sections = splitString \".\" name;\n          section = head sections;\n          subsections = tail sections;\n          subsection = concatStringsSep \".\" subsections;\n        in\n        if containsQuote || subsections == [ ] then name else ''${section} \"${subsection}\"'';\n\n      mkValueString =\n        v:\n        let\n          escapedV = ''\"${replaceStrings [ \"\\n\" \"\t\" ''\"'' \"\\\\\" ] [ \"\\\\n\" \"\\\\t\" ''\\\"'' \"\\\\\\\\\" ] v}\"'';\n        in\n        mkValueStringDefault { } (if isString v then escapedV else v);\n\n      # generation for multiple ini values\n      mkKeyValue =\n        k: v:\n        let\n          mkKeyValue = mkKeyValueDefault { inherit mkValueString; } \" = \" k;\n        in\n        concatStringsSep \"\\n\" (map (kv: \"\\t\" + mkKeyValue kv) (toList v));\n\n      # converts { a.b.c = 5; } to { \"a.b\".c = 5; } for toINI\n      gitFlattenAttrs =\n        let\n          recurse =\n            path: value:\n            if isAttrs value && !isDerivation value then\n              mapAttrsToList (name: value: recurse ([ name ] ++ path) value) value\n            else if length path > 1 then\n              {\n                ${concatStringsSep \".\" (reverseList (tail path))}.${head path} = value;\n              }\n            else\n              {\n                ${head path} = value;\n              };\n        in\n        attrs: foldl recursiveUpdate { } (flatten (recurse [ ] attrs));\n\n      toINI_ = toINI { inherit mkKeyValue mkSectionName; };\n    in\n    toINI_ (gitFlattenAttrs attrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":382,"column":5},"lambda_expr":"toGitINI =\n    attrs:\n    let\n      mkSectionName =\n        name:\n        let\n          containsQuote = hasInfix ''\"'' name;\n          sections = splitString \".\" name;\n          section = head sections;\n          subsections = tail sections;\n          subsection = concatStringsSep \".\" subsections;\n        in\n        if containsQuote || subsections == [ ] then name else ''${section} \"${subsection}\"'';\n\n      mkValueString =\n        v:\n        let\n          escapedV = ''\"${replaceStrings [ \"\\n\" \"\t\" ''\"'' \"\\\\\" ] [ \"\\\\n\" \"\\\\t\" ''\\\"'' \"\\\\\\\\\" ] v}\"'';\n        in\n        mkValueStringDefault { } (if isString v then escapedV else v);\n\n      # generation for multiple ini values\n      mkKeyValue =\n        k: v:\n        let\n          mkKeyValue = mkKeyValueDefault { inherit mkValueString; } \" = \" k;\n        in\n        concatStringsSep \"\\n\" (map (kv: \"\\t\" + mkKeyValue kv) (toList v));\n\n      # converts { a.b.c = 5; } to { \"a.b\".c = 5; } for toINI\n      gitFlattenAttrs =\n        let\n          recurse =\n            path: value:\n            if isAttrs value && !isDerivation value then\n              mapAttrsToList (name: value: recurse ([ name ] ++ path) value) value\n            else if length path > 1 then\n              {\n                ${concatStringsSep \".\" (reverseList (tail path))}.${head path} = value;\n              }\n            else\n              {\n                ${head path} = value;\n              };\n        in\n        attrs: foldl recursiveUpdate { } (flatten (recurse [ ] attrs));\n\n      toINI_ = toINI { inherit mkKeyValue mkSectionName; };\n    in\n    toINI_ (gitFlattenAttrs attrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":381,"column":3},"path":["lib","generators","toGitINI"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate a git-config file from an attrset.\n\nIt has two major differences from the regular INI format:\n\n1. values are indented with tabs\n2. sections can have sub-sections\n\nFurther: [git-config examples](https://git-scm.com/docs/git-config#EXAMPLES)\n\n# Examples\n:::{.example}\n## `lib.generators.toGitINI` usage example\n\n```nix\ngenerators.toGitINI {\n  url.\"ssh://git@github.com/\".insteadOf = \"https://github.com\";\n  user.name = \"edolstra\";\n}\n\n> [url \"ssh://git@github.com/\"]\n>   insteadOf = \"https://github.com\"\n>\n> [user]\n>   name = \"edolstra\"\n```\n\n:::\n\n# Inputs\n\n`attrs`\n\n: Key-value pairs to be converted to a git-config file.\n  See the [git-config documentation](https://git-scm.com/docs/git-config#_variables) for possible values.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":381,"column":3},"path":["lib","generators","toGitINI"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toINI","path":["lib","generators","toINI"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":244,"column":3},"attr_expr":"toINI =\n    {\n      mkSectionName ? (name: escape [ \"[\" \"]\" ] name),\n      mkKeyValue ? mkKeyValueDefault { } \"=\",\n      listsAsDuplicateKeys ? false,\n    }:\n    attrsOfAttrs:\n    let\n      # map function to string for each key val\n      mapAttrsToStringsSep =\n        sep: mapFn: attrs:\n        concatStringsSep sep (mapAttrsToList mapFn attrs);\n      mkSection =\n        sectName: sectValues:\n        ''\n          [${mkSectionName sectName}]\n        ''\n        + toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } sectValues;\n    in\n    # map input to ini sections\n    mapAttrsToStringsSep \"\\n\" mkSection attrsOfAttrs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":245,"column":5},"lambda_expr":"toINI =\n    {\n      mkSectionName ? (name: escape [ \"[\" \"]\" ] name),\n      mkKeyValue ? mkKeyValueDefault { } \"=\",\n      listsAsDuplicateKeys ? false,\n    }:\n    attrsOfAttrs:\n    let\n      # map function to string for each key val\n      mapAttrsToStringsSep =\n        sep: mapFn: attrs:\n        concatStringsSep sep (mapAttrsToList mapFn attrs);\n      mkSection =\n        sectName: sectValues:\n        ''\n          [${mkSectionName sectName}]\n        ''\n        + toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } sectValues;\n    in\n    # map input to ini sections\n    mapAttrsToStringsSep \"\\n\" mkSection attrsOfAttrs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":244,"column":3},"path":["lib","generators","toINI"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate an INI-style config file from an\nattrset of sections to an attrset of key-value pairs.\n\n# Inputs\n\nStructured function argument\n\n: mkSectionName (optional, default: `(name: escape [ \"[\" \"]\" ] name)`)\n  : apply transformations (e.g. escapes) to section names\n\n: mkKeyValue (optional, default: `{} \"=\"`)\n  : format a setting line from key and value\n\n: listsAsDuplicateKeys (optional, default: `false`)\n  : allow lists as values for duplicate keys\n\n# Examples\n:::{.example}\n## `lib.generators.toINI` usage example\n\n```nix\ngenerators.toINI {} {\n  foo = { hi = \"${pkgs.hello}\"; ciao = \"bar\"; };\n  baz = { \"also, integers\" = 42; };\n}\n\n> [baz]\n> also, integers=42\n>\n> [foo]\n> ciao=bar\n> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10\n```\n\nThe mk* configuration attributes can generically change\nthe way sections and key-value strings are generated.\n\nFor more examples see the test cases in ./tests/misc.nix.\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":244,"column":3},"path":["lib","generators","toINI"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toINIWithGlobalSection","path":["lib","generators","toINIWithGlobalSection"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":327,"column":3},"attr_expr":"toINIWithGlobalSection =\n    {\n      mkSectionName ? (name: escape [ \"[\" \"]\" ] name),\n      mkKeyValue ? mkKeyValueDefault { } \"=\",\n      listsAsDuplicateKeys ? false,\n    }:\n    {\n      globalSection,\n      sections ? { },\n    }:\n    (\n      if globalSection == { } then\n        \"\"\n      else\n        (toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } globalSection) + \"\\n\"\n    )\n    + (toINI { inherit mkSectionName mkKeyValue listsAsDuplicateKeys; } sections);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":328,"column":5},"lambda_expr":"toINIWithGlobalSection =\n    {\n      mkSectionName ? (name: escape [ \"[\" \"]\" ] name),\n      mkKeyValue ? mkKeyValueDefault { } \"=\",\n      listsAsDuplicateKeys ? false,\n    }:\n    {\n      globalSection,\n      sections ? { },\n    }:\n    (\n      if globalSection == { } then\n        \"\"\n      else\n        (toKeyValue { inherit mkKeyValue listsAsDuplicateKeys; } globalSection) + \"\\n\"\n    )\n    + (toINI { inherit mkSectionName mkKeyValue listsAsDuplicateKeys; } sections);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":327,"column":3},"path":["lib","generators","toINIWithGlobalSection"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate an INI-style config file from an attrset\nspecifying the global section (no header), and an\nattrset of sections to an attrset of key-value pairs.\n\n# Inputs\n\n1\\. Structured function argument\n\n: mkSectionName (optional, default: `(name: escape [ \"[\" \"]\" ] name)`)\n  : apply transformations (e.g. escapes) to section names\n\n: mkKeyValue (optional, default: `{} \"=\"`)\n  : format a setting line from key and value\n\n: listsAsDuplicateKeys (optional, default: `false`)\n  : allow lists as values for duplicate keys\n\n2\\. Structured function argument\n\n: globalSection (required)\n  : global section key-value pairs\n\n: sections (optional, default: `{}`)\n  : attrset of sections to key-value pairs\n\n# Examples\n:::{.example}\n## `lib.generators.toINIWithGlobalSection` usage example\n\n```nix\ngenerators.toINIWithGlobalSection {} {\n  globalSection = {\n    someGlobalKey = \"hi\";\n  };\n  sections = {\n    foo = { hi = \"${pkgs.hello}\"; ciao = \"bar\"; };\n    baz = { \"also, integers\" = 42; };\n}\n\n> someGlobalKey=hi\n>\n> [baz]\n> also, integers=42\n>\n> [foo]\n> ciao=bar\n> hi=/nix/store/y93qql1p5ggfnaqjjqhxcw0vqw95rlz0-hello-2.10\n```\n\nThe mk* configuration attributes can generically change\nthe way sections and key-value strings are generated.\n\nFor more examples see the test cases in ./tests/misc.nix.\n\n:::\n\nIf you don’t need a global section, you can also use\n`generators.toINI` directly, which only takes\nthe part in `sections`.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":327,"column":3},"path":["lib","generators","toINIWithGlobalSection"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toJSON","path":["lib","generators","toJSON"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":905,"column":3},"attr_expr":"toJSON = { }: lib.strings.toJSON;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":905,"column":12},"lambda_expr":"toJSON = { }: lib.strings.toJSON;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":905,"column":3},"path":["lib","generators","toJSON"],"pos_type":"Attribute"}},"content":{"content":"\nGenerates JSON from an arbitrary (non-function) value.\nFor more information see the documentation of the builtin.\n\n# Inputs\n\nOptions\n\n: Empty set, there may be configuration options in the future\n\nValue\n\n: The value to be converted to JSON\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":905,"column":3},"path":["lib","generators","toJSON"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toKeyValue","path":["lib","generators","toKeyValue"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":186,"column":3},"attr_expr":"toKeyValue =\n    {\n      mkKeyValue ? mkKeyValueDefault { } \"=\",\n      listsAsDuplicateKeys ? false,\n      indent ? \"\",\n    }:\n    let\n      mkLine = k: v: indent + mkKeyValue k v + \"\\n\";\n      mkLines =\n        if listsAsDuplicateKeys then\n          k: v: map (mkLine k) (if isList v then v else [ v ])\n        else\n          k: v: [ (mkLine k v) ];\n    in\n    attrs: concatStrings (concatLists (mapAttrsToList mkLines attrs));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":187,"column":5},"lambda_expr":"toKeyValue =\n    {\n      mkKeyValue ? mkKeyValueDefault { } \"=\",\n      listsAsDuplicateKeys ? false,\n      indent ? \"\",\n    }:\n    let\n      mkLine = k: v: indent + mkKeyValue k v + \"\\n\";\n      mkLines =\n        if listsAsDuplicateKeys then\n          k: v: map (mkLine k) (if isList v then v else [ v ])\n        else\n          k: v: [ (mkLine k v) ];\n    in\n    attrs: concatStrings (concatLists (mapAttrsToList mkLines attrs));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":186,"column":3},"path":["lib","generators","toKeyValue"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate a key-value-style config file from an attrset.\n\n# Inputs\n\nStructured function argument\n\n: mkKeyValue (optional, default: `mkKeyValueDefault {} \"=\"`)\n  : format a setting line from key and value\n\n: listsAsDuplicateKeys (optional, default: `false`)\n  : allow lists as values for duplicate keys\n\n: indent (optional, default: `\"\"`)\n  : Initial indentation level\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":186,"column":3},"path":["lib","generators","toKeyValue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toLua","path":["lib","generators","toLua"],"aliases":[],"signature":"toLua :: { multiline :: Bool; indent :: String; asBindings :: Bool; } -> Any -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":810,"column":3},"attr_expr":"toLua =\n    {\n      multiline ? true,\n      indent ? \"\",\n      asBindings ? false,\n    }@args:\n    v:\n    let\n      innerIndent = \"${indent}  \";\n      introSpace = if multiline then \"\\n${innerIndent}\" else \" \";\n      outroSpace = if multiline then \"\\n${indent}\" else \" \";\n      innerArgs = args // {\n        indent = if asBindings then indent else innerIndent;\n        asBindings = false;\n      };\n      concatItems = concatStringsSep \",${introSpace}\";\n      isLuaInline =\n        {\n          _type ? null,\n          ...\n        }:\n        _type == \"lua-inline\";\n\n      generatedBindings =\n        assert assertMsg (badVarNames == [ ]) \"Bad Lua var names: ${toPretty { } badVarNames}\";\n        concatStrings (mapAttrsToList (key: value: \"${indent}${key} = ${toLua innerArgs value}\\n\") v);\n\n      # https://en.wikibooks.org/wiki/Lua_Programming/variable#Variable_names\n      matchVarName = match \"[[:alpha:]_][[:alnum:]_]*(\\\\.[[:alpha:]_][[:alnum:]_]*)*\";\n      badVarNames = filter (name: matchVarName name == null) (attrNames v);\n    in\n    if asBindings then\n      generatedBindings\n    else if v == null then\n      \"nil\"\n    else if isInt v || isFloat v || isString v || isBool v then\n      toJSON v\n    else if isPath v || isDerivation v then\n      toJSON \"${v}\"\n    else if isList v then\n      (\n        if v == [ ] then\n          \"{}\"\n        else\n          \"{${introSpace}${concatItems (map (value: \"${toLua innerArgs value}\") v)}${outroSpace}}\"\n      )\n    else if isAttrs v then\n      (\n        if isLuaInline v then\n          \"(${v.expr})\"\n        else if v == { } then\n          \"{}\"\n        else\n          \"{${introSpace}${\n            concatItems (mapAttrsToList (key: value: \"[${toJSON key}] = ${toLua innerArgs value}\") v)\n          }${outroSpace}}\"\n      )\n    else\n      abort \"generators.toLua: type ${typeOf v} is unsupported\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":811,"column":5},"lambda_expr":"toLua =\n    {\n      multiline ? true,\n      indent ? \"\",\n      asBindings ? false,\n    }@args:\n    v:\n    let\n      innerIndent = \"${indent}  \";\n      introSpace = if multiline then \"\\n${innerIndent}\" else \" \";\n      outroSpace = if multiline then \"\\n${indent}\" else \" \";\n      innerArgs = args // {\n        indent = if asBindings then indent else innerIndent;\n        asBindings = false;\n      };\n      concatItems = concatStringsSep \",${introSpace}\";\n      isLuaInline =\n        {\n          _type ? null,\n          ...\n        }:\n        _type == \"lua-inline\";\n\n      generatedBindings =\n        assert assertMsg (badVarNames == [ ]) \"Bad Lua var names: ${toPretty { } badVarNames}\";\n        concatStrings (mapAttrsToList (key: value: \"${indent}${key} = ${toLua innerArgs value}\\n\") v);\n\n      # https://en.wikibooks.org/wiki/Lua_Programming/variable#Variable_names\n      matchVarName = match \"[[:alpha:]_][[:alnum:]_]*(\\\\.[[:alpha:]_][[:alnum:]_]*)*\";\n      badVarNames = filter (name: matchVarName name == null) (attrNames v);\n    in\n    if asBindings then\n      generatedBindings\n    else if v == null then\n      \"nil\"\n    else if isInt v || isFloat v || isString v || isBool v then\n      toJSON v\n    else if isPath v || isDerivation v then\n      toJSON \"${v}\"\n    else if isList v then\n      (\n        if v == [ ] then\n          \"{}\"\n        else\n          \"{${introSpace}${concatItems (map (value: \"${toLua innerArgs value}\") v)}${outroSpace}}\"\n      )\n    else if isAttrs v then\n      (\n        if isLuaInline v then\n          \"(${v.expr})\"\n        else if v == { } then\n          \"{}\"\n        else\n          \"{${introSpace}${\n            concatItems (mapAttrsToList (key: value: \"[${toJSON key}] = ${toLua innerArgs value}\") v)\n          }${outroSpace}}\"\n      )\n    else\n      abort \"generators.toLua: type ${typeOf v} is unsupported\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":810,"column":3},"path":["lib","generators","toLua"],"pos_type":"Attribute"}},"content":{"content":"\nTranslate a simple Nix expression to Lua representation with occasional\nLua-inlines that can be constructed by `mkLuaInline` function.\n\nConfiguration:\n\n* `multiline` - by default is true which results in indented block-like view.\n* `indent` - initial indent.\n* `asBindings` - by default generate single value, but with this use attrset to set global vars.\n\n::: {.note}\nRegardless of multiline parameter there is no trailing newline.\n:::\n\n# Inputs\n\nStructured function argument\n\n: multiline (optional, default: `true`)\n  : If this option is true, the output is indented with newlines for attribute sets and lists\n: indent (optional, default: `\"\"`)\n  : Initial indentation level\n: asBindings (optional, default: `false`)\n  : Interpret as variable bindings\n\nValue\n\n: The value to be converted to Lua\n\n# Type\n\n```\ntoLua :: { multiline :: Bool; indent :: String; asBindings :: Bool; } -> Any -> String\n```\n\n# Examples\n:::{.example}\n## `lib.generators.toLua` usage example\n\n```nix\ngenerators.toLua {}\n  {\n    cmd = [ \"typescript-language-server\" \"--stdio\" ];\n    settings.workspace.library = mkLuaInline ''vim.api.nvim_get_runtime_file(\"\", true)'';\n  }\n->\n {\n   [\"cmd\"] = {\n     \"typescript-language-server\",\n     \"--stdio\"\n   },\n   [\"settings\"] = {\n     [\"workspace\"] = {\n       [\"library\"] = (vim.api.nvim_get_runtime_file(\"\", true))\n     }\n   }\n }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":810,"column":3},"path":["lib","generators","toLua"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toPlist","path":["lib","generators","toPlist"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":627,"column":3},"attr_expr":"toPlist =\n    {\n      escape ? false,\n    }:\n    v:\n    let\n      expr =\n        ind: x:\n        if x == null then\n          \"\"\n        else if isBool x then\n          bool ind x\n        else if isInt x then\n          int ind x\n        else if isString x then\n          str ind x\n        else if isList x then\n          list ind x\n        else if isAttrs x then\n          attrs ind x\n        else if isPath x then\n          str ind (toString x)\n        else if isFloat x then\n          float ind x\n        else\n          abort \"generators.toPlist: should never happen (v = ${v})\";\n\n      literal = ind: x: ind + x;\n\n      maybeEscapeXML = if escape then escapeXML else x: x;\n\n      bool = ind: x: literal ind (if x then \"<true/>\" else \"<false/>\");\n      int = ind: x: literal ind \"<integer>${toString x}</integer>\";\n      str = ind: x: literal ind \"<string>${maybeEscapeXML x}</string>\";\n      key = ind: x: literal ind \"<key>${maybeEscapeXML x}</key>\";\n      float = ind: x: literal ind \"<real>${toString x}</real>\";\n\n      indent = ind: expr \"\\t${ind}\";\n\n      item = ind: concatMapStringsSep \"\\n\" (indent ind);\n\n      list =\n        ind: x:\n        concatStringsSep \"\\n\" [\n          (literal ind \"<array>\")\n          (item ind x)\n          (literal ind \"</array>\")\n        ];\n\n      attrs =\n        ind: x:\n        concatStringsSep \"\\n\" [\n          (literal ind \"<dict>\")\n          (attr ind x)\n          (literal ind \"</dict>\")\n        ];\n\n      attr =\n        let\n          attrFilter = name: value: name != \"_module\" && value != null;\n        in\n        ind: x:\n        concatStringsSep \"\\n\" (\n          flatten (\n            mapAttrsToList (\n              name: value:\n              optionals (attrFilter name value) [\n                (key \"\\t${ind}\" name)\n                (expr \"\\t${ind}\" value)\n              ]\n            ) x\n          )\n        );\n\n    in\n    # TODO: As discussed in #356502, deprecated functionality should be removed sometime after 25.11.\n    lib.warnIf (!escape && lib.oldestSupportedReleaseIsAtLeast 2505)\n      \"Using `lib.generators.toPlist` without `escape = true` is deprecated\"\n      ''\n        <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n        <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n        <plist version=\"1.0\">\n        ${expr \"\" v}\n        </plist>'';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":628,"column":5},"lambda_expr":"toPlist =\n    {\n      escape ? false,\n    }:\n    v:\n    let\n      expr =\n        ind: x:\n        if x == null then\n          \"\"\n        else if isBool x then\n          bool ind x\n        else if isInt x then\n          int ind x\n        else if isString x then\n          str ind x\n        else if isList x then\n          list ind x\n        else if isAttrs x then\n          attrs ind x\n        else if isPath x then\n          str ind (toString x)\n        else if isFloat x then\n          float ind x\n        else\n          abort \"generators.toPlist: should never happen (v = ${v})\";\n\n      literal = ind: x: ind + x;\n\n      maybeEscapeXML = if escape then escapeXML else x: x;\n\n      bool = ind: x: literal ind (if x then \"<true/>\" else \"<false/>\");\n      int = ind: x: literal ind \"<integer>${toString x}</integer>\";\n      str = ind: x: literal ind \"<string>${maybeEscapeXML x}</string>\";\n      key = ind: x: literal ind \"<key>${maybeEscapeXML x}</key>\";\n      float = ind: x: literal ind \"<real>${toString x}</real>\";\n\n      indent = ind: expr \"\\t${ind}\";\n\n      item = ind: concatMapStringsSep \"\\n\" (indent ind);\n\n      list =\n        ind: x:\n        concatStringsSep \"\\n\" [\n          (literal ind \"<array>\")\n          (item ind x)\n          (literal ind \"</array>\")\n        ];\n\n      attrs =\n        ind: x:\n        concatStringsSep \"\\n\" [\n          (literal ind \"<dict>\")\n          (attr ind x)\n          (literal ind \"</dict>\")\n        ];\n\n      attr =\n        let\n          attrFilter = name: value: name != \"_module\" && value != null;\n        in\n        ind: x:\n        concatStringsSep \"\\n\" (\n          flatten (\n            mapAttrsToList (\n              name: value:\n              optionals (attrFilter name value) [\n                (key \"\\t${ind}\" name)\n                (expr \"\\t${ind}\" value)\n              ]\n            ) x\n          )\n        );\n\n    in\n    # TODO: As discussed in #356502, deprecated functionality should be removed sometime after 25.11.\n    lib.warnIf (!escape && lib.oldestSupportedReleaseIsAtLeast 2505)\n      \"Using `lib.generators.toPlist` without `escape = true` is deprecated\"\n      ''\n        <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n        <!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n        <plist version=\"1.0\">\n        ${expr \"\" v}\n        </plist>'';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":627,"column":3},"path":["lib","generators","toPlist"],"pos_type":"Attribute"}},"content":{"content":"\nTranslate a simple Nix expression to [Plist notation](https://en.wikipedia.org/wiki/Property_list).\n\n# Inputs\n\nStructured function argument\n\n: escape (optional, default: `false`)\n  : If this option is true, XML special characters are escaped in string values and keys\n\nValue\n  : The value to be converted to Plist\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":627,"column":3},"path":["lib","generators","toPlist"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toPretty","path":["lib","generators","toPretty"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":523,"column":3},"attr_expr":"toPretty =\n    {\n      allowPrettyValues ? false,\n      multiline ? true,\n      indent ? \"\",\n    }:\n    let\n      go =\n        indent: v:\n        let\n          introSpace = if multiline then \"\\n${indent}  \" else \" \";\n          outroSpace = if multiline then \"\\n${indent}\" else \" \";\n        in\n        if isInt v then\n          toString v\n        # toString loses precision on floats, so we use toJSON instead. This isn't perfect\n        # as the resulting string may not parse back as a float (e.g. 42, 1e-06), but for\n        # pretty-printing purposes this is acceptable.\n        else if isFloat v then\n          builtins.toJSON v\n        else if isString v then\n          let\n            lines = filter (v: !isList v) (split \"\\n\" v);\n            escapeSingleline = escape [\n              \"\\\\\"\n              \"\\\"\"\n              \"\\${\"\n            ];\n            escapeMultiline = replaceStrings [ \"\\${\" \"''\" ] [ \"''\\${\" \"'''\" ];\n            singlelineResult = \"\\\"\" + concatStringsSep \"\\\\n\" (map escapeSingleline lines) + \"\\\"\";\n            multilineResult =\n              let\n                escapedLines = map escapeMultiline lines;\n                # The last line gets a special treatment: if it's empty, '' is on its own line at the \"outer\"\n                # indentation level. Otherwise, '' is appended to the last line.\n                lastLine = last escapedLines;\n              in\n              \"''\"\n              + introSpace\n              + concatStringsSep introSpace (init escapedLines)\n              + (if lastLine == \"\" then outroSpace else introSpace + lastLine)\n              + \"''\";\n          in\n          if multiline && length lines > 1 then multilineResult else singlelineResult\n        else if true == v then\n          \"true\"\n        else if false == v then\n          \"false\"\n        else if null == v then\n          \"null\"\n        else if isPath v then\n          toString v\n        else if isList v then\n          if v == [ ] then\n            \"[ ]\"\n          else\n            \"[\" + introSpace + concatMapStringsSep introSpace (go (indent + \"  \")) v + outroSpace + \"]\"\n        else if isFunction v then\n          let\n            fna = functionArgs v;\n            showFnas = concatStringsSep \", \" (\n              mapAttrsToList (name: hasDefVal: if hasDefVal then name + \"?\" else name) fna\n            );\n          in\n          if fna == { } then \"<function>\" else \"<function, args: {${showFnas}}>\"\n        else if isAttrs v then\n          # apply pretty values if allowed\n          if allowPrettyValues && v ? __pretty && v ? val then\n            v.__pretty v.val\n          else if v == { } then\n            \"{ }\"\n          else if v ? type && v.type == \"derivation\" then\n            \"<derivation ${v.name or \"???\"}>\"\n          else\n            \"{\"\n            + introSpace\n            + concatStringsSep introSpace (\n              mapAttrsToList (\n                name: value:\n                \"${escapeNixIdentifier name} = ${\n                  addErrorContext \"while evaluating an attribute `${name}`\" (go (indent + \"  \") value)\n                };\"\n              ) v\n            )\n            + outroSpace\n            + \"}\"\n        else\n          abort \"generators.toPretty: should never happen (v = ${v})\";\n    in\n    go indent;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":524,"column":5},"lambda_expr":"toPretty =\n    {\n      allowPrettyValues ? false,\n      multiline ? true,\n      indent ? \"\",\n    }:\n    let\n      go =\n        indent: v:\n        let\n          introSpace = if multiline then \"\\n${indent}  \" else \" \";\n          outroSpace = if multiline then \"\\n${indent}\" else \" \";\n        in\n        if isInt v then\n          toString v\n        # toString loses precision on floats, so we use toJSON instead. This isn't perfect\n        # as the resulting string may not parse back as a float (e.g. 42, 1e-06), but for\n        # pretty-printing purposes this is acceptable.\n        else if isFloat v then\n          builtins.toJSON v\n        else if isString v then\n          let\n            lines = filter (v: !isList v) (split \"\\n\" v);\n            escapeSingleline = escape [\n              \"\\\\\"\n              \"\\\"\"\n              \"\\${\"\n            ];\n            escapeMultiline = replaceStrings [ \"\\${\" \"''\" ] [ \"''\\${\" \"'''\" ];\n            singlelineResult = \"\\\"\" + concatStringsSep \"\\\\n\" (map escapeSingleline lines) + \"\\\"\";\n            multilineResult =\n              let\n                escapedLines = map escapeMultiline lines;\n                # The last line gets a special treatment: if it's empty, '' is on its own line at the \"outer\"\n                # indentation level. Otherwise, '' is appended to the last line.\n                lastLine = last escapedLines;\n              in\n              \"''\"\n              + introSpace\n              + concatStringsSep introSpace (init escapedLines)\n              + (if lastLine == \"\" then outroSpace else introSpace + lastLine)\n              + \"''\";\n          in\n          if multiline && length lines > 1 then multilineResult else singlelineResult\n        else if true == v then\n          \"true\"\n        else if false == v then\n          \"false\"\n        else if null == v then\n          \"null\"\n        else if isPath v then\n          toString v\n        else if isList v then\n          if v == [ ] then\n            \"[ ]\"\n          else\n            \"[\" + introSpace + concatMapStringsSep introSpace (go (indent + \"  \")) v + outroSpace + \"]\"\n        else if isFunction v then\n          let\n            fna = functionArgs v;\n            showFnas = concatStringsSep \", \" (\n              mapAttrsToList (name: hasDefVal: if hasDefVal then name + \"?\" else name) fna\n            );\n          in\n          if fna == { } then \"<function>\" else \"<function, args: {${showFnas}}>\"\n        else if isAttrs v then\n          # apply pretty values if allowed\n          if allowPrettyValues && v ? __pretty && v ? val then\n            v.__pretty v.val\n          else if v == { } then\n            \"{ }\"\n          else if v ? type && v.type == \"derivation\" then\n            \"<derivation ${v.name or \"???\"}>\"\n          else\n            \"{\"\n            + introSpace\n            + concatStringsSep introSpace (\n              mapAttrsToList (\n                name: value:\n                \"${escapeNixIdentifier name} = ${\n                  addErrorContext \"while evaluating an attribute `${name}`\" (go (indent + \"  \") value)\n                };\"\n              ) v\n            )\n            + outroSpace\n            + \"}\"\n        else\n          abort \"generators.toPretty: should never happen (v = ${v})\";\n    in\n    go indent;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":523,"column":3},"path":["lib","generators","toPretty"],"pos_type":"Attribute"}},"content":{"content":"\nPretty print a value, akin to `builtins.trace`.\n\nShould probably be a builtin as well.\n\nThe pretty-printed string should be suitable for rendering default values\nin the NixOS manual. In particular, it should be as close to a valid Nix expression\nas possible.\n\n# Inputs\n\nStructured function argument\n: allowPrettyValues\n  : If this option is true, attrsets like `{ __pretty = fn; val = …; }`\n    will use `fn` to convert `val` to a pretty printed representation.\n    (This means `fn` is type `Val -> String`.)\n: multiline\n  : If this option is true, the output is indented with newlines for attribute sets and lists\n: indent\n  : Initial indentation level\n\nValue\n: The value to be pretty printed\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":523,"column":3},"path":["lib","generators","toPretty"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.toYAML","path":["lib","generators","toYAML"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":923,"column":3},"attr_expr":"toYAML = { }: lib.strings.toJSON;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":923,"column":12},"lambda_expr":"toYAML = { }: lib.strings.toJSON;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":923,"column":3},"path":["lib","generators","toYAML"],"pos_type":"Attribute"}},"content":{"content":"\nYAML has been a strict superset of JSON since 1.2, so we\nuse toJSON. Before it only had a few differences referring\nto implicit typing rules, so it should work with older\nparsers as well.\n\n# Inputs\n\nOptions\n\n: Empty set, there may be configuration options in the future\n\nValue\n\n: The value to be converted to YAML\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":923,"column":3},"path":["lib","generators","toYAML"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.generators.withRecursion","path":["lib","generators","withRecursion"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":462,"column":3},"attr_expr":"withRecursion =\n    {\n      depthLimit,\n      throwOnDepthLimit ? true,\n    }:\n    assert isInt depthLimit;\n    let\n      specialAttrs = [\n        \"__functor\"\n        \"__functionArgs\"\n        \"__toString\"\n        \"__pretty\"\n      ];\n      stepIntoAttr = evalNext: name: if elem name specialAttrs then id else evalNext;\n      transform =\n        depth:\n        if depthLimit != null && depth > depthLimit then\n          if throwOnDepthLimit then\n            throw \"Exceeded maximum eval-depth limit of ${toString depthLimit} while trying to evaluate with `generators.withRecursion'!\"\n          else\n            const \"<unevaluated>\"\n        else\n          id;\n      mapAny =\n        depth: v:\n        let\n          evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);\n        in\n        if isAttrs v then\n          mapAttrs (stepIntoAttr evalNext) v\n        else if isList v then\n          map evalNext v\n        else\n          transform (depth + 1) v;\n    in\n    mapAny 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":463,"column":5},"lambda_expr":"withRecursion =\n    {\n      depthLimit,\n      throwOnDepthLimit ? true,\n    }:\n    assert isInt depthLimit;\n    let\n      specialAttrs = [\n        \"__functor\"\n        \"__functionArgs\"\n        \"__toString\"\n        \"__pretty\"\n      ];\n      stepIntoAttr = evalNext: name: if elem name specialAttrs then id else evalNext;\n      transform =\n        depth:\n        if depthLimit != null && depth > depthLimit then\n          if throwOnDepthLimit then\n            throw \"Exceeded maximum eval-depth limit of ${toString depthLimit} while trying to evaluate with `generators.withRecursion'!\"\n          else\n            const \"<unevaluated>\"\n        else\n          id;\n      mapAny =\n        depth: v:\n        let\n          evalNext = x: mapAny (depth + 1) (transform (depth + 1) x);\n        in\n        if isAttrs v then\n          mapAttrs (stepIntoAttr evalNext) v\n        else if isList v then\n          map evalNext v\n        else\n          transform (depth + 1) v;\n    in\n    mapAny 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":462,"column":3},"path":["lib","generators","withRecursion"],"pos_type":"Attribute"}},"content":{"content":"\nRecurses through a `Value` limited to a certain depth. (`depthLimit`)\n\nIf the depth is exceeded, an error is thrown, unless `throwOnDepthLimit` is set to `false`.\n\n# Inputs\n\nStructured function argument\n\n: depthLimit (required)\n  : If this option is not null, the given value will stop evaluating at a certain depth\n\n: throwOnDepthLimit (optional, default: `true`)\n  : If this option is true, an error will be thrown, if a certain given depth is exceeded\n\nValue\n: The value to be evaluated recursively\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/generators.nix","line":462,"column":3},"path":["lib","generators","withRecursion"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.isGVariant","path":["lib","gvariant","isGVariant"],"aliases":[],"signature":"isGVariant :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":69,"column":3},"attr_expr":"isGVariant = v: v._type or \"\" == \"gvariant\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":69,"column":16},"lambda_expr":"isGVariant = v: v._type or \"\" == \"gvariant\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":69,"column":3},"path":["lib","gvariant","isGVariant"],"pos_type":"Attribute"}},"content":{"content":"\nCheck if a value is a GVariant value\n\n# Inputs\n\n`v`\n\n: value to check\n\n# Type\n\n```\nisGVariant :: Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":69,"column":3},"path":["lib","gvariant","isGVariant"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkArray","path":["lib","gvariant","mkArray"],"aliases":[],"signature":"mkArray :: [Any] -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":191,"column":3},"attr_expr":"mkArray =\n    elems:\n    let\n      vs = map mkValue (lib.throwIf (elems == [ ]) \"Please create empty array with mkEmptyArray.\" elems);\n      elemType = lib.throwIfNot (lib.all (t: (head vs).type == t) (\n        map (v: v.type) vs\n      )) \"Elements in a list should have same type.\" (head vs).type;\n    in\n    mkPrimitive (type.arrayOf elemType) vs\n    // {\n      __toString = self: \"@${self.type} [${concatMapStringsSep \",\" toString self.value}]\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":192,"column":5},"lambda_expr":"mkArray =\n    elems:\n    let\n      vs = map mkValue (lib.throwIf (elems == [ ]) \"Please create empty array with mkEmptyArray.\" elems);\n      elemType = lib.throwIfNot (lib.all (t: (head vs).type == t) (\n        map (v: v.type) vs\n      )) \"Elements in a list should have same type.\" (head vs).type;\n    in\n    mkPrimitive (type.arrayOf elemType) vs\n    // {\n      __toString = self: \"@${self.type} [${concatMapStringsSep \",\" toString self.value}]\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":191,"column":3},"path":["lib","gvariant","mkArray"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant array from the given type of the elements and a Nix list.\n\n# Inputs\n\n`elems`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkArray :: [Any] -> GVariant\n```\n\n# Examples\n:::{.example}\n## `lib.gvariant.mkArray` usage example\n\n```nix\n# Creating a string array\nlib.gvariant.mkArray [ \"a\" \"b\" \"c\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":191,"column":3},"path":["lib","gvariant","mkArray"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkBoolean","path":["lib","gvariant","mkBoolean"],"aliases":[],"signature":"mkBoolean :: Bool -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":429,"column":3},"attr_expr":"mkBoolean =\n    v:\n    mkPrimitive type.boolean v\n    // {\n      __toString = self: if self.value then \"true\" else \"false\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":430,"column":5},"lambda_expr":"mkBoolean =\n    v:\n    mkPrimitive type.boolean v\n    // {\n      __toString = self: if self.value then \"true\" else \"false\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":429,"column":3},"path":["lib","gvariant","mkBoolean"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant boolean from the given Nix bool value.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkBoolean :: Bool -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":429,"column":3},"path":["lib","gvariant","mkBoolean"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkDictionaryEntry","path":["lib","gvariant","mkDictionaryEntry"],"aliases":[],"signature":"mkDictionaryEntry :: String -> Any -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":310,"column":3},"attr_expr":"mkDictionaryEntry =\n    name: value:\n    let\n      name' = mkValue name;\n      value' = mkValue value;\n      dictionaryType = type.dictionaryEntryOf name'.type value'.type;\n    in\n    mkPrimitive dictionaryType { inherit name value; }\n    // {\n      __toString = self: \"@${self.type} {${name'},${value'}}\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":311,"column":5},"lambda_expr":"mkDictionaryEntry =\n    name: value:\n    let\n      name' = mkValue name;\n      value' = mkValue value;\n      dictionaryType = type.dictionaryEntryOf name'.type value'.type;\n    in\n    mkPrimitive dictionaryType { inherit name value; }\n    // {\n      __toString = self: \"@${self.type} {${name'},${value'}}\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":310,"column":3},"path":["lib","gvariant","mkDictionaryEntry"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant dictionary entry from the given key and value.\n\n# Inputs\n\n`name`\n\n: The key of the entry\n\n`value`\n\n: The value of the entry\n\n# Type\n\n```\nmkDictionaryEntry :: String -> Any -> GVariant\n```\n\n# Examples\n:::{.example}\n## `lib.gvariant.mkDictionaryEntry` usage example\n\n```nix\n# A dictionary describing an Epiphany’s search provider\n[\n  (lib.gvariant.mkDictionaryEntry \"url\" (lib.gvariant.mkVariant \"https://duckduckgo.com/?q=%s&t=epiphany\"))\n  (lib.gvariant.mkDictionaryEntry \"bang\" (lib.gvariant.mkVariant \"!d\"))\n  (lib.gvariant.mkDictionaryEntry \"name\" (lib.gvariant.mkVariant \"DuckDuckGo\"))\n]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":310,"column":3},"path":["lib","gvariant","mkDictionaryEntry"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkDouble","path":["lib","gvariant","mkDouble"],"aliases":[],"signature":"mkDouble :: Float -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":586,"column":3},"attr_expr":"mkDouble =\n    v:\n    mkPrimitive type.double v\n    // {\n      __toString = self: toString self.value;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":587,"column":5},"lambda_expr":"mkDouble =\n    v:\n    mkPrimitive type.double v\n    // {\n      __toString = self: toString self.value;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":586,"column":3},"path":["lib","gvariant","mkDouble"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant double from the given Nix float value.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkDouble :: Float -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":586,"column":3},"path":["lib","gvariant","mkDouble"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkEmptyArray","path":["lib","gvariant","mkEmptyArray"],"aliases":[],"signature":"mkEmptyArray :: GVariantType -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":230,"column":3},"attr_expr":"mkEmptyArray =\n    elemType:\n    mkPrimitive (type.arrayOf elemType) [ ]\n    // {\n      __toString = self: \"@${self.type} []\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":231,"column":5},"lambda_expr":"mkEmptyArray =\n    elemType:\n    mkPrimitive (type.arrayOf elemType) [ ]\n    // {\n      __toString = self: \"@${self.type} []\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":230,"column":3},"path":["lib","gvariant","mkEmptyArray"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant array from the given empty Nix list.\n\n# Inputs\n\n`elemType`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkEmptyArray :: GVariantType -> GVariant\n```\n\n# Examples\n:::{.example}\n## `lib.gvariant.mkEmptyArray` usage example\n\n```nix\n# Creating an empty string array\nlib.gvariant.mkEmptyArray (lib.gvariant.type.string)\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":230,"column":3},"path":["lib","gvariant","mkEmptyArray"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkInt16","path":["lib","gvariant","mkInt16"],"aliases":[],"signature":"mkInt16 :: Int -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":503,"column":3},"attr_expr":"mkInt16 = mkPrimitive type.int16;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":24,"column":20},"lambda_expr":"v: {\n    _type = \"gvariant\";\n    type = t;\n    value = v;\n    __toString = self: \"@${self.type} ${toString self.value}\"; # https://docs.gtk.org/glib/gvariant-text.html\n  }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":503,"column":3},"path":["lib","gvariant","mkInt16"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant int16 from the given Nix int value.\n\n# Type\n\n```\nmkInt16 :: Int -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":503,"column":3},"path":["lib","gvariant","mkInt16"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkInt32","path":["lib","gvariant","mkInt32"],"aliases":[],"signature":"mkInt32 :: Int -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":531,"column":3},"attr_expr":"mkInt32 =\n    v:\n    mkPrimitive type.int32 v\n    // {\n      __toString = self: toString self.value;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":532,"column":5},"lambda_expr":"mkInt32 =\n    v:\n    mkPrimitive type.int32 v\n    // {\n      __toString = self: toString self.value;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":531,"column":3},"path":["lib","gvariant","mkInt32"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant int32 from the given Nix int value.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkInt32 :: Int -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":531,"column":3},"path":["lib","gvariant","mkInt32"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkInt64","path":["lib","gvariant","mkInt64"],"aliases":[],"signature":"mkInt64 :: Int -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":558,"column":3},"attr_expr":"mkInt64 = mkPrimitive type.int64;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":24,"column":20},"lambda_expr":"v: {\n    _type = \"gvariant\";\n    type = t;\n    value = v;\n    __toString = self: \"@${self.type} ${toString self.value}\"; # https://docs.gtk.org/glib/gvariant-text.html\n  }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":558,"column":3},"path":["lib","gvariant","mkInt64"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant int64 from the given Nix int value.\n\n# Type\n\n```\nmkInt64 :: Int -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":558,"column":3},"path":["lib","gvariant","mkInt64"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkJust","path":["lib","gvariant","mkJust"],"aliases":[],"signature":"mkJust :: Any -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":381,"column":3},"attr_expr":"mkJust =\n    elem:\n    let\n      gvarElem = mkValue elem;\n    in\n    mkMaybe gvarElem.type gvarElem;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":382,"column":5},"lambda_expr":"mkJust =\n    elem:\n    let\n      gvarElem = mkValue elem;\n    in\n    mkMaybe gvarElem.type gvarElem;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":381,"column":3},"path":["lib","gvariant","mkJust"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant just from the given Nix value.\n\n# Inputs\n\n`elem`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkJust :: Any -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":381,"column":3},"path":["lib","gvariant","mkJust"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkMaybe","path":["lib","gvariant","mkMaybe"],"aliases":[],"signature":"mkMaybe :: GVariantType -> Any -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":341,"column":3},"attr_expr":"mkMaybe =\n    elemType: elem:\n    mkPrimitive (type.maybeOf elemType) elem\n    // {\n      __toString =\n        self: if self.value == null then \"@${self.type} nothing\" else \"just ${toString self.value}\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":342,"column":5},"lambda_expr":"mkMaybe =\n    elemType: elem:\n    mkPrimitive (type.maybeOf elemType) elem\n    // {\n      __toString =\n        self: if self.value == null then \"@${self.type} nothing\" else \"just ${toString self.value}\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":341,"column":3},"path":["lib","gvariant","mkMaybe"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant maybe from the given element type.\n\n# Inputs\n\n`elemType`\n\n: 1\\. Function argument\n\n`elem`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmkMaybe :: GVariantType -> Any -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":341,"column":3},"path":["lib","gvariant","mkMaybe"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkNothing","path":["lib","gvariant","mkNothing"],"aliases":[],"signature":"mkNothing :: GVariantType -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":364,"column":3},"attr_expr":"mkNothing = elemType: mkMaybe elemType null;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":364,"column":15},"lambda_expr":"mkNothing = elemType: mkMaybe elemType null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":364,"column":3},"path":["lib","gvariant","mkNothing"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant nothing from the given element type.\n\n# Inputs\n\n`elemType`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkNothing :: GVariantType -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":364,"column":3},"path":["lib","gvariant","mkNothing"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkObjectpath","path":["lib","gvariant","mkObjectpath"],"aliases":[],"signature":"mkObjectpath :: String -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":476,"column":3},"attr_expr":"mkObjectpath =\n    v:\n    mkPrimitive type.string v\n    // {\n      __toString = self: \"objectpath '${escape [ \"'\" ] self.value}'\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":477,"column":5},"lambda_expr":"mkObjectpath =\n    v:\n    mkPrimitive type.string v\n    // {\n      __toString = self: \"objectpath '${escape [ \"'\" ] self.value}'\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":476,"column":3},"path":["lib","gvariant","mkObjectpath"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant object path from the given Nix string value.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkObjectpath :: String -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":476,"column":3},"path":["lib","gvariant","mkObjectpath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkString","path":["lib","gvariant","mkString"],"aliases":[],"signature":"mkString :: String -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":451,"column":3},"attr_expr":"mkString =\n    v:\n    let\n      sanitize = s: replaceString \"\\n\" \"\\\\n\" (escape [ \"'\" \"\\\\\" ] s);\n    in\n    mkPrimitive type.string v\n    // {\n      __toString = self: \"'${sanitize self.value}'\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":452,"column":5},"lambda_expr":"mkString =\n    v:\n    let\n      sanitize = s: replaceString \"\\n\" \"\\\\n\" (escape [ \"'\" \"\\\\\" ] s);\n    in\n    mkPrimitive type.string v\n    // {\n      __toString = self: \"'${sanitize self.value}'\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":451,"column":3},"path":["lib","gvariant","mkString"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant string from the given Nix string value.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkString :: String -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":451,"column":3},"path":["lib","gvariant","mkString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkTuple","path":["lib","gvariant","mkTuple"],"aliases":[],"signature":"mkTuple :: [Any] -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":403,"column":3},"attr_expr":"mkTuple =\n    elems:\n    let\n      gvarElems = map mkValue elems;\n      tupleType = type.tupleOf (map (e: e.type) gvarElems);\n    in\n    mkPrimitive tupleType gvarElems\n    // {\n      __toString = self: \"@${self.type} (${concatMapStringsSep \",\" toString self.value})\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":404,"column":5},"lambda_expr":"mkTuple =\n    elems:\n    let\n      gvarElems = map mkValue elems;\n      tupleType = type.tupleOf (map (e: e.type) gvarElems);\n    in\n    mkPrimitive tupleType gvarElems\n    // {\n      __toString = self: \"@${self.type} (${concatMapStringsSep \",\" toString self.value})\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":403,"column":3},"path":["lib","gvariant","mkTuple"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant tuple from the given Nix list.\n\n# Inputs\n\n`elems`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkTuple :: [Any] -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":403,"column":3},"path":["lib","gvariant","mkTuple"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkUchar","path":["lib","gvariant","mkUchar"],"aliases":[],"signature":"mkUchar :: Int -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":492,"column":3},"attr_expr":"mkUchar = mkPrimitive type.uchar;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":24,"column":20},"lambda_expr":"v: {\n    _type = \"gvariant\";\n    type = t;\n    value = v;\n    __toString = self: \"@${self.type} ${toString self.value}\"; # https://docs.gtk.org/glib/gvariant-text.html\n  }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":492,"column":3},"path":["lib","gvariant","mkUchar"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant uchar from the given Nix int value.\n\n# Type\n\n```\nmkUchar :: Int -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":492,"column":3},"path":["lib","gvariant","mkUchar"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkUint16","path":["lib","gvariant","mkUint16"],"aliases":[],"signature":"mkUint16 :: Int -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":514,"column":3},"attr_expr":"mkUint16 = mkPrimitive type.uint16;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":24,"column":20},"lambda_expr":"v: {\n    _type = \"gvariant\";\n    type = t;\n    value = v;\n    __toString = self: \"@${self.type} ${toString self.value}\"; # https://docs.gtk.org/glib/gvariant-text.html\n  }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":514,"column":3},"path":["lib","gvariant","mkUint16"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant uint16 from the given Nix int value.\n\n# Type\n\n```\nmkUint16 :: Int -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":514,"column":3},"path":["lib","gvariant","mkUint16"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkUint32","path":["lib","gvariant","mkUint32"],"aliases":[],"signature":"mkUint32 :: Int -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":547,"column":3},"attr_expr":"mkUint32 = mkPrimitive type.uint32;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":24,"column":20},"lambda_expr":"v: {\n    _type = \"gvariant\";\n    type = t;\n    value = v;\n    __toString = self: \"@${self.type} ${toString self.value}\"; # https://docs.gtk.org/glib/gvariant-text.html\n  }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":547,"column":3},"path":["lib","gvariant","mkUint32"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant uint32 from the given Nix int value.\n\n# Type\n\n```\nmkUint32 :: Int -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":547,"column":3},"path":["lib","gvariant","mkUint32"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkUint64","path":["lib","gvariant","mkUint64"],"aliases":[],"signature":"mkUint64 :: Int -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":569,"column":3},"attr_expr":"mkUint64 = mkPrimitive type.uint64;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":24,"column":20},"lambda_expr":"v: {\n    _type = \"gvariant\";\n    type = t;\n    value = v;\n    __toString = self: \"@${self.type} ${toString self.value}\"; # https://docs.gtk.org/glib/gvariant-text.html\n  }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":569,"column":3},"path":["lib","gvariant","mkUint64"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant uint64 from the given Nix int value.\n\n# Type\n\n```\nmkUint64 :: Int -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":569,"column":3},"path":["lib","gvariant","mkUint64"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkValue","path":["lib","gvariant","mkValue"],"aliases":[],"signature":"mkValue :: Any -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":134,"column":3},"attr_expr":"mkValue =\n    v:\n    if builtins.isBool v then\n      mkBoolean v\n    else if builtins.isFloat v then\n      mkDouble v\n    else if builtins.isString v then\n      mkString v\n    else if builtins.isList v then\n      mkArray v\n    else if isGVariant v then\n      v\n    else if builtins.isInt v then\n      let\n        validConstructors = builtins.filter (\n          { min, max, ... }: (min == null || min <= v) && (max == null || v <= max)\n        ) intConstructors;\n      in\n      throw ''\n        The GVariant type for number “${toString v}” is unclear.\n        Please wrap the value with one of the following, depending on the value type in GSettings schema:\n\n        ${lib.concatMapStringsSep \"\\n\" (\n          { name, type, ... }: \"- `lib.gvariant.${name}` for `${type}`\"\n        ) validConstructors}\n      ''\n    else if builtins.isAttrs v then\n      throw \"Cannot construct GVariant value from an attribute set. If you want to construct a dictionary, you will need to create an array containing items constructed with `lib.gvariant.mkDictionaryEntry`.\"\n    else\n      throw \"The GVariant type of “${builtins.typeOf v}” can't be inferred.\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":135,"column":5},"lambda_expr":"mkValue =\n    v:\n    if builtins.isBool v then\n      mkBoolean v\n    else if builtins.isFloat v then\n      mkDouble v\n    else if builtins.isString v then\n      mkString v\n    else if builtins.isList v then\n      mkArray v\n    else if isGVariant v then\n      v\n    else if builtins.isInt v then\n      let\n        validConstructors = builtins.filter (\n          { min, max, ... }: (min == null || min <= v) && (max == null || v <= max)\n        ) intConstructors;\n      in\n      throw ''\n        The GVariant type for number “${toString v}” is unclear.\n        Please wrap the value with one of the following, depending on the value type in GSettings schema:\n\n        ${lib.concatMapStringsSep \"\\n\" (\n          { name, type, ... }: \"- `lib.gvariant.${name}` for `${type}`\"\n        ) validConstructors}\n      ''\n    else if builtins.isAttrs v then\n      throw \"Cannot construct GVariant value from an attribute set. If you want to construct a dictionary, you will need to create an array containing items constructed with `lib.gvariant.mkDictionaryEntry`.\"\n    else\n      throw \"The GVariant type of “${builtins.typeOf v}” can't be inferred.\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":134,"column":3},"path":["lib","gvariant","mkValue"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant value that most closely matches the given Nix value.\nIf no GVariant value can be found unambiguously then error is thrown.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkValue :: Any -> GVariant\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":134,"column":3},"path":["lib","gvariant","mkValue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.mkVariant","path":["lib","gvariant","mkVariant"],"aliases":[],"signature":"mkVariant :: Any -> GVariant\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":266,"column":3},"attr_expr":"mkVariant =\n    elem:\n    let\n      gvarElem = mkValue elem;\n    in\n    mkPrimitive type.variant gvarElem\n    // {\n      __toString = self: \"<${toString self.value}>\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":267,"column":5},"lambda_expr":"mkVariant =\n    elem:\n    let\n      gvarElem = mkValue elem;\n    in\n    mkPrimitive type.variant gvarElem\n    // {\n      __toString = self: \"<${toString self.value}>\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":266,"column":3},"path":["lib","gvariant","mkVariant"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the GVariant variant from the given Nix value. Variants are containers\nof different GVariant type.\n\n# Inputs\n\n`elem`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmkVariant :: Any -> GVariant\n```\n\n# Examples\n:::{.example}\n## `lib.gvariant.mkVariant` usage example\n\n```nix\nlib.gvariant.mkArray [\n  (lib.gvariant.mkVariant \"a string\")\n  (lib.gvariant.mkVariant (lib.gvariant.mkInt32 1))\n]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":266,"column":3},"path":["lib","gvariant","mkVariant"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.kernel.freeform","path":["lib","kernel","freeform"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":27,"column":3},"attr_expr":"freeform = x: {\n    freeform = x;\n    optional = false;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":27,"column":14},"lambda_expr":"x: {\n    freeform = x;\n    optional = false;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":27,"column":14},"path":["lib","kernel","freeform"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":27,"column":14},"path":["lib","kernel","freeform"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.kernel.option","path":["lib","kernel","option"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":9,"column":3},"attr_expr":"option = x: x // { optional = true; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":9,"column":12},"lambda_expr":"option = x: x // { optional = true; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":9,"column":12},"path":["lib","kernel","option"],"pos_type":"Lambda"}},"content":{"content":"Keeping these around in case we decide to change this horrible implementation :)","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":9,"column":12},"path":["lib","kernel","option"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.kernel.whenHelpers","path":["lib","kernel","whenHelpers"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":33,"column":3},"attr_expr":"whenHelpers = version: {\n    whenAtLeast = ver: mkIf (versionAtLeast version ver);\n    whenOlder = ver: mkIf (versionOlder version ver);\n    # range is (inclusive, exclusive)\n    whenBetween = verLow: verHigh: mkIf (versionAtLeast version verLow && versionOlder version verHigh);\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":33,"column":17},"lambda_expr":"whenHelpers = version: {\n    whenAtLeast = ver: mkIf (versionAtLeast version ver);\n    whenOlder = ver: mkIf (versionOlder version ver);\n    # range is (inclusive, exclusive)\n    whenBetween = verLow: verHigh: mkIf (versionAtLeast version verLow && versionOlder version verHigh);\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":33,"column":17},"path":["lib","kernel","whenHelpers"],"pos_type":"Lambda"}},"content":{"content":"Common patterns/legacy used in common-config/hardened/config.nix","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/kernel.nix","line":33,"column":17},"path":["lib","kernel","whenHelpers"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.licenses.AND","path":["lib","licenses","AND"],"aliases":[],"signature":"AND :: List -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":50,"column":3},"attr_expr":"AND = licenses: {\n    licenseType = \"compound\";\n    operator = \"AND\";\n    inherit licenses;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":50,"column":9},"lambda_expr":"AND = licenses: {\n    licenseType = \"compound\";\n    operator = \"AND\";\n    inherit licenses;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":50,"column":3},"path":["lib","licenses","AND"],"pos_type":"Attribute"}},"content":{"content":"\n Create a compound licenses where the user needs to follow both licenses,\n eqivialent of spdx `and` modifier.\n\n# Example\n\n```nix\nAND [ lib.licenses.mit lib.licenses.asl20 ]\n=> { licenseType = \"compound\"; operator = \"AND\"; licenses = [ lib.licenses.mit lib.licenses.asl20 ] };\n```\n\n# Type\n\n```\nAND :: List -> AttrSet\n```\n\n# Arguments\n\n- [licenses] Licenses required to use\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":50,"column":3},"path":["lib","licenses","AND"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.OR","path":["lib","licenses","OR"],"aliases":[],"signature":"OR :: List -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":23,"column":3},"attr_expr":"OR = licenses: {\n    licenseType = \"compound\";\n    operator = \"OR\";\n    inherit licenses;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":23,"column":8},"lambda_expr":"OR = licenses: {\n    licenseType = \"compound\";\n    operator = \"OR\";\n    inherit licenses;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":23,"column":3},"path":["lib","licenses","OR"],"pos_type":"Attribute"}},"content":{"content":"\nThis should be used when there is a choice of which license expression to use.\nThis is a disjunctive binary \"OR\" operator.\n\n# Example\n\n```nix\nOR [ lib.licenses.mit lib.licenses.asl20 ]\n=> { licenseType = \"compound\"; operator = \"OR\"; licenses = [ lib.licenses.mit lib.licenses.asl20 ] };\n```\n\n# Type\n\n```\nOR :: List -> AttrSet\n```\n\n# Arguments\n\n- [licenses] Possible licenses to choose from\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":23,"column":3},"path":["lib","licenses","OR"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.PLUS","path":["lib","licenses","PLUS"],"aliases":[],"signature":"PLUS :: AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":105,"column":3},"attr_expr":"PLUS = license: {\n    licenseType = \"plus\";\n    operator = \"+\";\n    inherit license;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":105,"column":10},"lambda_expr":"PLUS = license: {\n    licenseType = \"plus\";\n    operator = \"+\";\n    inherit license;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":105,"column":3},"path":["lib","licenses","PLUS"],"pos_type":"Attribute"}},"content":{"content":"\n Create a licenses which can be upgraded to any later version of itself,\n eqivialent of spdx `+` modifier\n\n# Example\n\n```nix\nPLUS lib.licenses.eupl11\n=> { licenseType = \"plus\"; operator = \"+\"; license = lib.licenses.eupl11; };\n```\n\n# Type\n\n```\nPLUS :: AttrSet -> AttrSet\n```\n\n# Arguments\n\n- [license] License to wich apply an exception\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":105,"column":3},"path":["lib","licenses","PLUS"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.WITH","path":["lib","licenses","WITH"],"aliases":[],"signature":"WITH :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":78,"column":3},"attr_expr":"WITH = license: exception: {\n    licenseType = \"exception\";\n    operator = \"WITH\";\n    inherit license exception;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":78,"column":10},"lambda_expr":"WITH = license: exception: {\n    licenseType = \"exception\";\n    operator = \"WITH\";\n    inherit license exception;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":78,"column":3},"path":["lib","licenses","WITH"],"pos_type":"Attribute"}},"content":{"content":"\n Create a licenses exception where a license has a license exception,\n eqivialent of spdx `with` modifier.\n\n# Example\n\n```nix\nWITH lib.licenses.lgpl21Only lib.licenses.ocamlLgplLinkingException\n=> { licenseType = \"exception\"; operator = \"WITH\"; license = lib.licenses.lgpl21Only; exception = lib.licenses.ocamlLgplLinkingException; };\n```\n\n# Type\n\n```\nWITH :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Arguments\n\n- [license] License to which the exception applies\n- [exception] Exception to apply\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/operators.nix","line":78,"column":3},"path":["lib","licenses","WITH"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.containsLicenses","path":["lib","licenses","containsLicenses"],"aliases":[],"signature":"containsLicenses :: List -> AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":148,"column":3},"attr_expr":"containsLicenses = licenses: evaluateProperty (x: elem x licenses) false;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":148,"column":22},"lambda_expr":"containsLicenses = licenses: evaluateProperty (x: elem x licenses) false;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":148,"column":3},"path":["lib","licenses","containsLicenses"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether any of the given licenses is required in the license expression.\n\n# Example\n\n```nix\ncontainsLicenses [ lib.licenses.asl20 ] (with lib.licenses; (AND [ ncsa (WITH asl20 llvm-exception) ]))\n=> true\n```\n\n# Type\n\n```\ncontainsLicenses :: List -> AttrSet -> Bool\n```\n\n# Arguments\n\n- [licenses] List of licenses to look\n- [license] License expression to check\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":148,"column":3},"path":["lib","licenses","containsLicenses"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.evaluateNamedProperty","path":["lib","licenses","evaluateNamedProperty"],"aliases":[],"signature":"evaluateProperty :: String -> Bool -> AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":73,"column":3},"attr_expr":"evaluateNamedProperty =\n    name: permissive:\n    let\n      OR = if permissive then any else all;\n      AND = if permissive then all else any;\n      evaluateComplexProperty = handleComplexProperty (evaluateNamedProperty name permissive) AND OR;\n    in\n    license:\n    if license.licenseType == \"simple\" then license.${name} else evaluateComplexProperty license;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":74,"column":5},"lambda_expr":"evaluateNamedProperty =\n    name: permissive:\n    let\n      OR = if permissive then any else all;\n      AND = if permissive then all else any;\n      evaluateComplexProperty = handleComplexProperty (evaluateNamedProperty name permissive) AND OR;\n    in\n    license:\n    if license.licenseType == \"simple\" then license.${name} else evaluateComplexProperty license;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":73,"column":3},"path":["lib","licenses","evaluateNamedProperty"],"pos_type":"Attribute"}},"content":{"content":"\nEvaluate a license expression for a given property name. The property must\nbe defined as a boolean attribute of all licenses passed.\n\n# Example\n\n```nix\nevaluateNamedProperty \"deprecated\" true (with lib.licenses; AND [ ncsa (WITH asl20 llvm-exception) ])\n```\n# Type\n\n```\nevaluateProperty :: String -> Bool -> AttrSet -> Bool\n```\n\n# Arguments\n\n- [name] name of the attribute to check\n- [permissive] whether to apply checks permissive or reciprocal\n- [license] license expression to check\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":73,"column":3},"path":["lib","licenses","evaluateNamedProperty"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.evaluateProperty","path":["lib","licenses","evaluateProperty"],"aliases":[],"signature":"evaluateProperty :: Function -> Bool -> AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":42,"column":3},"attr_expr":"evaluateProperty =\n    predicate: permissive:\n    let\n      OR = if permissive then any else all;\n      AND = if permissive then all else any;\n      evaluateComplexProperty = handleComplexProperty (evaluateProperty predicate permissive) AND OR;\n    in\n    license:\n    if license.licenseType == \"simple\" then predicate license else evaluateComplexProperty license;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":43,"column":5},"lambda_expr":"evaluateProperty =\n    predicate: permissive:\n    let\n      OR = if permissive then any else all;\n      AND = if permissive then all else any;\n      evaluateComplexProperty = handleComplexProperty (evaluateProperty predicate permissive) AND OR;\n    in\n    license:\n    if license.licenseType == \"simple\" then predicate license else evaluateComplexProperty license;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":42,"column":3},"path":["lib","licenses","evaluateProperty"],"pos_type":"Attribute"}},"content":{"content":"\nEvaluate a license expression for a given predicate.\n\n# Example\n\n```nix\nevaluateProperty (x: x.free) true (with lib.licenses; AND [ ncsa (WITH asl20 llvm-exception) ])\n```\n# Type\n\n```\nevaluateProperty :: Function -> Bool -> AttrSet -> Bool\n```\n\n# Arguments\n\n- [predicate] checks for each license included in the license expression\n- [permissive] whether to apply checks permissive or reciprocal\n- [license] license expression to check\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":42,"column":3},"path":["lib","licenses","evaluateProperty"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.isFree","path":["lib","licenses","isFree"],"aliases":[["lib","licenses","isRedistributable"]],"signature":"isFree :: AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":103,"column":3},"attr_expr":"isFree = evaluateNamedProperty \"free\" true;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":80,"column":5},"lambda_expr":"license:\n    if license.licenseType == \"simple\" then license.${name} else evaluateComplexProperty license","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":103,"column":3},"path":["lib","licenses","isFree"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether a license expression is free.\n\n# Example\n\n```nix\nisFree (with lib.licenses; (AND [ ncsa (WITH asl20 llvm-exception) ]))\n=> true\n```\n\n# Type\n\n```\nisFree :: AttrSet -> Bool\n```\n\n# Arguments\n\n- [license] License expression to check if free\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":103,"column":3},"path":["lib","licenses","isFree"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.isRedistributable","path":["lib","licenses","isRedistributable"],"aliases":[["lib","licenses","isFree"]],"signature":"isRedistributable :: AttrSet -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":125,"column":3},"attr_expr":"isRedistributable = evaluateNamedProperty \"redistributable\" true;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":80,"column":5},"lambda_expr":"license:\n    if license.licenseType == \"simple\" then license.${name} else evaluateComplexProperty license","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":125,"column":3},"path":["lib","licenses","isRedistributable"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether a license expression is redistributable.\n\n# Example\n\n```nix\nisRedistributable (with lib.licenses; (AND [ ncsa (WITH asl20 llvm-exception) ]))\n=> true\n```\n\n# Type\n\n```\nisRedistributable :: AttrSet -> Bool\n```\n\n# Arguments\n\n- [license] License expression to check if redistributable\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":125,"column":3},"path":["lib","licenses","isRedistributable"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.licenses.toSPDX","path":["lib","licenses","toSPDX"],"aliases":[],"signature":"toSPDX :: AttrSet -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":170,"column":3},"attr_expr":"toSPDX =\n    license:\n    let\n      mkBracket =\n        x:\n        if x.licenseType == \"compound\" || x.licenseType == \"exception\" then \"(${toSPDX x})\" else toSPDX x;\n    in\n    if license.licenseType == \"simple\" then\n      license.spdxId or \"LicenseRef-nixos-${license.shortName}\"\n    else if license.licenseType == \"compound\" then\n      lib.concatMapStringsSep \" ${license.operator} \" (x: mkBracket x) license.licenses\n    else if license.licenseType == \"exception\" then\n      \"${mkBracket license.license} ${license.operator} ${mkBracket license.exception}\"\n    else if license.licenseType == \"plus\" then\n      \"${mkBracket license.license}${license.operator}\"\n    else\n      throw \"Unknown license type\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":171,"column":5},"lambda_expr":"toSPDX =\n    license:\n    let\n      mkBracket =\n        x:\n        if x.licenseType == \"compound\" || x.licenseType == \"exception\" then \"(${toSPDX x})\" else toSPDX x;\n    in\n    if license.licenseType == \"simple\" then\n      license.spdxId or \"LicenseRef-nixos-${license.shortName}\"\n    else if license.licenseType == \"compound\" then\n      lib.concatMapStringsSep \" ${license.operator} \" (x: mkBracket x) license.licenses\n    else if license.licenseType == \"exception\" then\n      \"${mkBracket license.license} ${license.operator} ${mkBracket license.exception}\"\n    else if license.licenseType == \"plus\" then\n      \"${mkBracket license.license}${license.operator}\"\n    else\n      throw \"Unknown license type\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":170,"column":3},"path":["lib","licenses","toSPDX"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a license expression to an SPDX license expression string.\n\n# Example\n\n```nix\ntoSPDX (with lib.licenses; AND [ ncsa (WITH asl20 llvm-exception) ])\n=> \"NCSA AND (Apache-2.0 WITH LLVM-exception)\"\n```\n\n# Type\n\n```\ntoSPDX :: AttrSet -> String\n```\n\n# Arguments\n\n- [license] License expression which to convert to spdx expression\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/licenses/helpers.nix","line":170,"column":3},"path":["lib","licenses","toSPDX"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.all","path":["lib","lists","all"],"aliases":[["builtins","all"],["lib","all"]],"signature":"all :: (a -> Bool) -> [a] -> Bool\n","is_primop":true,"primop_meta":{"name":"all","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":720,"column":3},"attr_expr":"all = builtins.all;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":720,"column":3},"path":["lib","lists","all"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if function `pred` returns true for all elements of\n`list`.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\nall :: (a -> Bool) -> [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.all` usage example\n\n```nix\nall (x: x < 3) [ 1 2 ]\n=> true\nall (x: x < 3) [ 1 2 3 ]\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":720,"column":3},"path":["lib","lists","all"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.allUnique","path":["lib","lists","allUnique"],"aliases":[["lib","allUnique"]],"signature":"allUnique :: [a] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1968,"column":3},"attr_expr":"allUnique = list: (length (unique list) == length list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1968,"column":15},"lambda_expr":"allUnique = list: (length (unique list) == length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1968,"column":3},"path":["lib","lists","allUnique"],"pos_type":"Attribute"}},"content":{"content":"\nCheck if list contains only unique elements. O(n^2) complexity.\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\nallUnique :: [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.allUnique` usage example\n\n```nix\nallUnique [ 3 2 3 4 ]\n=> false\nallUnique [ 3 2 4 1 ]\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1968,"column":3},"path":["lib","lists","allUnique"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.any","path":["lib","lists","any"],"aliases":[["builtins","any"],["lib","any"]],"signature":"any :: (a -> Bool) -> [a] -> Bool\n","is_primop":true,"primop_meta":{"name":"any","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":685,"column":3},"attr_expr":"any = builtins.any;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":685,"column":3},"path":["lib","lists","any"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if function `pred` returns true for at least one\nelement of `list`.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\nany :: (a -> Bool) -> [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.any` usage example\n\n```nix\nany isString [ 1 \"a\" { } ]\n=> true\nany isString [ 1 { } ]\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":685,"column":3},"path":["lib","lists","any"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.commonPrefix","path":["lib","lists","commonPrefix"],"aliases":[],"signature":"commonPrefix :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1770,"column":3},"attr_expr":"commonPrefix =\n    list1: list2:\n    let\n      # Zip the lists together into a list of booleans whether each element matches\n      matchings = zipListsWith (fst: snd: fst != snd) list1 list2;\n      # Find the first index where the elements don't match,\n      # which will then also be the length of the common prefix.\n      # If all elements match, we fall back to the length of the zipped list,\n      # which is the same as the length of the smaller list.\n      commonPrefixLength = findFirstIndex id (length matchings) matchings;\n    in\n    take commonPrefixLength list1;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1771,"column":5},"lambda_expr":"commonPrefix =\n    list1: list2:\n    let\n      # Zip the lists together into a list of booleans whether each element matches\n      matchings = zipListsWith (fst: snd: fst != snd) list1 list2;\n      # Find the first index where the elements don't match,\n      # which will then also be the length of the common prefix.\n      # If all elements match, we fall back to the length of the zipped list,\n      # which is the same as the length of the smaller list.\n      commonPrefixLength = findFirstIndex id (length matchings) matchings;\n    in\n    take commonPrefixLength list1;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1770,"column":3},"path":["lib","lists","commonPrefix"],"pos_type":"Attribute"}},"content":{"content":"\nThe common prefix of two lists.\n\n# Inputs\n\n`list1`\n\n: 1\\. Function argument\n\n`list2`\n\n: 2\\. Function argument\n\n# Type\n\n```\ncommonPrefix :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.commonPrefix` usage example\n\n```nix\ncommonPrefix [ 1 2 3 4 5 6 ] [ 1 2 4 8 ]\n=> [ 1 2 ]\ncommonPrefix [ 1 2 3 ] [ 1 2 3 4 5 ]\n=> [ 1 2 3 ]\ncommonPrefix [ 1 2 3 ] [ 4 5 6 ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1770,"column":3},"path":["lib","lists","commonPrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.compareLists","path":["lib","lists","compareLists"],"aliases":[["lib","compareLists"]],"signature":"compareLists :: (a -> a -> Int) -> [a] -> [a] -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1420,"column":3},"attr_expr":"compareLists =\n    cmp: a: b:\n    if a == [ ] then\n      if b == [ ] then 0 else -1\n    else if b == [ ] then\n      1\n    else\n      let\n        rel = cmp (head a) (head b);\n      in\n      if rel == 0 then compareLists cmp (tail a) (tail b) else rel;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1421,"column":5},"lambda_expr":"compareLists =\n    cmp: a: b:\n    if a == [ ] then\n      if b == [ ] then 0 else -1\n    else if b == [ ] then\n      1\n    else\n      let\n        rel = cmp (head a) (head b);\n      in\n      if rel == 0 then compareLists cmp (tail a) (tail b) else rel;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1420,"column":3},"path":["lib","lists","compareLists"],"pos_type":"Attribute"}},"content":{"content":"\nCompare two lists element-by-element with a comparison function `cmp`.\n\nList elements are compared pairwise in order by the provided comparison function `cmp`,\nthe first non-equal pair of elements determines the result.\n\n:::{.note}\nThe `<` operator can also be used to compare lists using a boolean condition. (e.g. `[1 2] < [1 3]` is `true`).\nSee also [language operators](https://nix.dev/manual/nix/stable/language/operators#comparison) for more information.\n:::\n\n# Inputs\n\n`cmp`\n\n: The comparison function `a: b: ...` must return:\n  - `0` if `a` and `b` are equal\n  - `1` if `a` is greater than `b`\n  - `-1` if `a` is less than `b`\n\n  See [lib.compare](#function-library-lib.trivial.compare) for a an example implementation.\n\n`a`\n\n: The first list\n\n`b`\n\n: The second list\n\n# Type\n\n```\ncompareLists :: (a -> a -> Int) -> [a] -> [a] -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.lists.compareLists` usage examples\n\n```nix\ncompareLists lib.compare [] []\n=> 0\ncompareLists lib.compare [] [ \"a\" ]\n=> -1\ncompareLists lib.compare [ \"a\" ] []\n=> 1\ncompareLists lib.compare [ \"a\" \"b\" ] [ \"a\" \"c\" ]\n=> -1\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1420,"column":3},"path":["lib","lists","compareLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.concatAttrValues","path":["lib","lists","concatAttrValues"],"aliases":[["lib","concatAttrValues"]],"signature":"concatAttrValues :: { [String] :: [a] } -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2087,"column":3},"attr_expr":"concatAttrValues = set: concatLists (attrValues set);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2087,"column":22},"lambda_expr":"concatAttrValues = set: concatLists (attrValues set);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2087,"column":3},"path":["lib","lists","concatAttrValues"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate all attributes of an attribute set.\nThis assumes that every attribute of the set is a list.\n\n# Inputs\n\n`set`\n\n: Attribute set with attributes that are lists\n\n# Type\n\n```\nconcatAttrValues :: { [String] :: [a] } -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.concatAttrValues` usage example\n\n```nix\nconcatAttrValues { a = [ 1 2 ]; b = [ 3 ]; }\n=> [ 1 2 3 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2087,"column":3},"path":["lib","lists","concatAttrValues"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.concatLists","path":["lib","lists","concatLists"],"aliases":[["builtins","concatLists"],["lib","concatLists"]],"signature":null,"is_primop":true,"primop_meta":{"name":"concatLists","args":["lists"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":24,"column":5},"attr_expr":"concatLists","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","concatLists"],"pos_type":"Lambda"}},"content":{"content":"\nConcatenate a list of lists into a single list.\n","source":{"position":null,"path":["lib","lists","concatLists"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.concatMap","path":["lib","lists","concatMap"],"aliases":[["builtins","concatMap"],["lib","concatMap"]],"signature":"concatMap :: (a -> [b]) -> [a] -> [b]\n","is_primop":true,"primop_meta":{"name":"concatMap","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":414,"column":3},"attr_expr":"concatMap = builtins.concatMap;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":414,"column":3},"path":["lib","lists","concatMap"],"pos_type":"Attribute"}},"content":{"content":"\nMap and concatenate the result.\n\n# Type\n\n```\nconcatMap :: (a -> [b]) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.concatMap` usage example\n\n```nix\nconcatMap (x: [x] ++ [\"z\"]) [\"a\" \"b\"]\n=> [ \"a\" \"z\" \"b\" \"z\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":414,"column":3},"path":["lib","lists","concatMap"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.count","path":["lib","lists","count"],"aliases":[["lib","count"]],"signature":"count :: (a -> Bool) -> [a] -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":749,"column":3},"attr_expr":"count = pred: foldl' (c: x: if pred x then c + 1 else c) 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":749,"column":11},"lambda_expr":"count = pred: foldl' (c: x: if pred x then c + 1 else c) 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":749,"column":3},"path":["lib","lists","count"],"pos_type":"Attribute"}},"content":{"content":"\nCount how many elements of `list` match the supplied predicate\nfunction.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n# Type\n\n```\ncount :: (a -> Bool) -> [a] -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.lists.count` usage example\n\n```nix\ncount (x: x == 3) [ 3 2 3 4 6 ]\n=> 2\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":749,"column":3},"path":["lib","lists","count"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.crossLists","path":["lib","lists","crossLists"],"aliases":[["lib","crossLists"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1869,"column":3},"attr_expr":"crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [ f ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1869,"column":16},"lambda_expr":"crossLists = f: foldl (fs: args: concatMap (f: map f args) fs) [ f ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1869,"column":3},"path":["lib","lists","crossLists"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the image of the cross product of some lists by a function.\n\n# Examples\n:::{.example}\n## `lib.lists.crossLists` usage example\n\n```nix\ncrossLists (x: y: \"${toString x}${toString y}\") [[1 2] [3 4]]\n=> [ \"13\" \"14\" \"23\" \"24\" ]\n```\n\nIf you have an attrset already, consider mapCartesianProduct:\n\n```nix\nmapCartesianProduct (x: \"${toString x.a}${toString x.b}\") { a = [1 2]; b = [3 4]; }\n=> [ \"13\" \"14\" \"23\" \"24\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1869,"column":3},"path":["lib","lists","crossLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.drop","path":["lib","lists","drop"],"aliases":[["lib","drop"]],"signature":"drop :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1575,"column":3},"attr_expr":"drop = count: list: sublist count (length list) list;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1575,"column":10},"lambda_expr":"drop = count: list: sublist count (length list) list;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1575,"column":3},"path":["lib","lists","drop"],"pos_type":"Attribute"}},"content":{"content":"\nRemove the first (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Number of elements to drop\n\n`list`\n\n: Input list\n\n# Type\n\n```\ndrop :: Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.drop` usage example\n\n```nix\ndrop 2 [ \"a\" \"b\" \"c\" \"d\" ]\n=> [ \"c\" \"d\" ]\ndrop 2 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1575,"column":3},"path":["lib","lists","drop"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.dropEnd","path":["lib","lists","dropEnd"],"aliases":[["lib","dropEnd"]],"signature":"dropEnd :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1609,"column":3},"attr_expr":"dropEnd = n: xs: take (max 0 (length xs - n)) xs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1609,"column":13},"lambda_expr":"dropEnd = n: xs: take (max 0 (length xs - n)) xs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1609,"column":3},"path":["lib","lists","dropEnd"],"pos_type":"Attribute"}},"content":{"content":"\nRemove the last (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Number of elements to drop\n\n`list`\n\n: Input list\n\n# Type\n\n```\ndropEnd :: Int -> [a] -> [a]\n```\n\n# Examples\n\n:::{.example}\n## `lib.lists.dropEnd` usage example\n\n```nix\n  dropEnd 2 [ \"a\" \"b\" \"c\" \"d\" ]\n  => [ \"a\" \"b\" ]\n  dropEnd 2 [ ]\n  => [ ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1609,"column":3},"path":["lib","lists","dropEnd"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.elem","path":["lib","lists","elem"],"aliases":[["builtins","elem"],["lib","elem"],["lib","strings","elem"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elem","args":["x","xs"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":26,"column":5},"attr_expr":"elem","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","elem"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if a value equal to *x* occurs in the list *xs*, and\n`false` otherwise.\n","source":{"position":null,"path":["lib","lists","elem"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.elemAt","path":["lib","lists","elemAt"],"aliases":[["builtins","elemAt"],["lib","elemAt"],["lib","strings","elemAt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elemAt","args":["xs","n"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":23,"column":5},"attr_expr":"elemAt","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","elemAt"],"pos_type":"Lambda"}},"content":{"content":"\nReturn element *n* from the list *xs*. Elements are counted starting\nfrom 0. A fatal error occurs if the index is out of bounds.\n","source":{"position":null,"path":["lib","lists","elemAt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.filter","path":["lib","lists","filter"],"aliases":[["builtins","filter"],["lib","filter"],["lib","strings","filter"]],"signature":null,"is_primop":true,"primop_meta":{"name":"filter","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":25,"column":5},"attr_expr":"filter","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","filter"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a list consisting of the elements of *list* for which the\nfunction *f* returns `true`.\n","source":{"position":null,"path":["lib","lists","filter"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.findFirst","path":["lib","lists","findFirst"],"aliases":[["lib","findFirst"]],"signature":"findFirst :: (a -> Bool) -> a -> [a] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":645,"column":3},"attr_expr":"findFirst =\n    pred: default: list:\n    let\n      index = findFirstIndex pred null list;\n    in\n    if index == null then default else elemAt list index;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":646,"column":5},"lambda_expr":"findFirst =\n    pred: default: list:\n    let\n      index = findFirstIndex pred null list;\n    in\n    if index == null then default else elemAt list index;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":645,"column":3},"path":["lib","lists","findFirst"],"pos_type":"Attribute"}},"content":{"content":"\nFind the first element in the list matching the specified\npredicate or return `default` if no such element exists.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`default`\n\n: Default value to return\n\n`list`\n\n: Input list\n\n# Type\n\n```\nfindFirst :: (a -> Bool) -> a -> [a] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.findFirst` usage example\n\n```nix\nfindFirst (x: x > 3) 7 [ 1 6 4 ]\n=> 6\nfindFirst (x: x > 9) 7 [ 1 6 4 ]\n=> 7\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":645,"column":3},"path":["lib","lists","findFirst"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.findFirstIndex","path":["lib","lists","findFirstIndex"],"aliases":[],"signature":"findFirstIndex :: (a -> Bool) -> b -> [a] -> (Int | b)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":575,"column":3},"attr_expr":"findFirstIndex =\n    pred: default: list:\n    let\n      # A naive recursive implementation would be much simpler, but\n      # would also overflow the evaluator stack. We use `foldl'` as a workaround\n      # because it reuses the same stack space, evaluating the function for one\n      # element after another. We can't return early, so this means that we\n      # sacrifice early cutoff, but that appears to be an acceptable cost. A\n      # clever scheme with \"exponential search\" is possible, but appears over-\n      # engineered for now. See https://github.com/NixOS/nixpkgs/pull/235267\n\n      # Invariant:\n      # - if index < 0 then el == elemAt list (- index - 1) and all elements before el didn't satisfy pred\n      # - if index >= 0 then pred (elemAt list index) and all elements before (elemAt list index) didn't satisfy pred\n      #\n      # We start with index -1 and the 0'th element of the list, which satisfies the invariant\n      resultIndex = foldl' (\n        index: el:\n        if index < 0 then\n          # No match yet before the current index, we need to check the element\n          if pred el then\n            # We have a match! Turn it into the actual index to prevent future iterations from modifying it\n            -index - 1\n          else\n            # Still no match, update the index to the next element (we're counting down, so minus one)\n            index - 1\n        else\n          # There's already a match, propagate the index without evaluating anything\n          index\n      ) (-1) list;\n    in\n    if resultIndex < 0 then default else resultIndex;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":576,"column":5},"lambda_expr":"findFirstIndex =\n    pred: default: list:\n    let\n      # A naive recursive implementation would be much simpler, but\n      # would also overflow the evaluator stack. We use `foldl'` as a workaround\n      # because it reuses the same stack space, evaluating the function for one\n      # element after another. We can't return early, so this means that we\n      # sacrifice early cutoff, but that appears to be an acceptable cost. A\n      # clever scheme with \"exponential search\" is possible, but appears over-\n      # engineered for now. See https://github.com/NixOS/nixpkgs/pull/235267\n\n      # Invariant:\n      # - if index < 0 then el == elemAt list (- index - 1) and all elements before el didn't satisfy pred\n      # - if index >= 0 then pred (elemAt list index) and all elements before (elemAt list index) didn't satisfy pred\n      #\n      # We start with index -1 and the 0'th element of the list, which satisfies the invariant\n      resultIndex = foldl' (\n        index: el:\n        if index < 0 then\n          # No match yet before the current index, we need to check the element\n          if pred el then\n            # We have a match! Turn it into the actual index to prevent future iterations from modifying it\n            -index - 1\n          else\n            # Still no match, update the index to the next element (we're counting down, so minus one)\n            index - 1\n        else\n          # There's already a match, propagate the index without evaluating anything\n          index\n      ) (-1) list;\n    in\n    if resultIndex < 0 then default else resultIndex;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":575,"column":3},"path":["lib","lists","findFirstIndex"],"pos_type":"Attribute"}},"content":{"content":"\nFind the first index in the list matching the specified\npredicate or return `default` if no such element exists.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`default`\n\n: Default value to return\n\n`list`\n\n: Input list\n\n# Type\n\n```\nfindFirstIndex :: (a -> Bool) -> b -> [a] -> (Int | b)\n```\n\n# Examples\n:::{.example}\n## `lib.lists.findFirstIndex` usage example\n\n```nix\nfindFirstIndex (x: x > 3) null [ 0 6 4 ]\n=> 1\nfindFirstIndex (x: x > 9) null [ 0 6 4 ]\n=> null\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":575,"column":3},"path":["lib","lists","findFirstIndex"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.findSingle","path":["lib","lists","findSingle"],"aliases":[["lib","findSingle"]],"signature":"findSingle :: (a -> Bool) -> a -> a -> [a] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":525,"column":3},"attr_expr":"findSingle =\n    pred: default: multiple: list:\n    let\n      found = filter pred list;\n      len = length found;\n    in\n    if len == 0 then\n      default\n    else if len != 1 then\n      multiple\n    else\n      head found;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":526,"column":5},"lambda_expr":"findSingle =\n    pred: default: multiple: list:\n    let\n      found = filter pred list;\n      len = length found;\n    in\n    if len == 0 then\n      default\n    else if len != 1 then\n      multiple\n    else\n      head found;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":525,"column":3},"path":["lib","lists","findSingle"],"pos_type":"Attribute"}},"content":{"content":"\nFind the sole element in the list matching the specified\npredicate.\n\nReturns `default` if no such element exists, or\n`multiple` if there are multiple matching elements.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`default`\n\n: Default value to return if element was not found.\n\n`multiple`\n\n: Default value to return if more than one element was found\n\n`list`\n\n: Input list\n\n# Type\n\n```\nfindSingle :: (a -> Bool) -> a -> a -> [a] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.findSingle` usage example\n\n```nix\nfindSingle (x: x == 3) \"none\" \"multiple\" [ 1 3 3 ]\n=> \"multiple\"\nfindSingle (x: x == 3) \"none\" \"multiple\" [ 1 3 ]\n=> 3\nfindSingle (x: x == 3) \"none\" \"multiple\" [ 1 9 ]\n=> \"none\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":525,"column":3},"path":["lib","lists","findSingle"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.flatten","path":["lib","lists","flatten"],"aliases":[["lib","flatten"]],"signature":"flatten :: [a | [a | [a | ...]]] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":445,"column":3},"attr_expr":"flatten = x: if isList x then concatMap (y: flatten y) x else [ x ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":445,"column":13},"lambda_expr":"flatten = x: if isList x then concatMap (y: flatten y) x else [ x ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":445,"column":3},"path":["lib","lists","flatten"],"pos_type":"Attribute"}},"content":{"content":"\nFlatten the argument into a single list; that is, nested lists are\nspliced into the top-level lists.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\nflatten :: [a | [a | [a | ...]]] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.flatten` usage example\n\n```nix\nflatten [1 [2 [3] 4] 5]\n=> [1 2 3 4 5]\nflatten 1\n=> [1]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":445,"column":3},"path":["lib","lists","flatten"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.fold","path":["lib","lists","fold"],"aliases":[["lib","fold"],["lib","foldr"],["lib","lists","foldr"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":152,"column":3},"attr_expr":"fold = warn \"fold has been deprecated, use foldr instead\" foldr;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":138,"column":5},"lambda_expr":"foldr =\n    op: nul: list:\n    let\n      len = length list;\n      fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));\n    in\n    fold' 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":152,"column":3},"path":["lib","lists","fold"],"pos_type":"Attribute"}},"content":{"content":"\n`fold` is an alias of `foldr` for historic reasons.\n\n::: {.warning}\nThis function will be removed in 26.05.\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":152,"column":3},"path":["lib","lists","fold"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.foldl","path":["lib","lists","foldl"],"aliases":[["lib","foldl"]],"signature":"foldl :: (b -> a -> b) -> b -> [a] -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":195,"column":3},"attr_expr":"foldl =\n    op: nul: list:\n    let\n      foldl' = n: if n == -1 then nul else op (foldl' (n - 1)) (elemAt list n);\n    in\n    foldl' (length list - 1);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":196,"column":5},"lambda_expr":"foldl =\n    op: nul: list:\n    let\n      foldl' = n: if n == -1 then nul else op (foldl' (n - 1)) (elemAt list n);\n    in\n    foldl' (length list - 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":195,"column":3},"path":["lib","lists","foldl"],"pos_type":"Attribute"}},"content":{"content":"\n“left fold”, like `foldr`, but from the left:\n\n`foldl op nul [x_1 x_2 ... x_n] == op (... (op (op nul x_1) x_2) ... x_n)`.\n\n# Inputs\n\n`op`\n\n: 1\\. Function argument\n\n`nul`\n\n: 2\\. Function argument\n\n`list`\n\n: 3\\. Function argument\n\n# Type\n\n```\nfoldl :: (b -> a -> b) -> b -> [a] -> b\n```\n\n# Examples\n:::{.example}\n## `lib.lists.foldl` usage example\n\n```nix\nlconcat = foldl (a: b: a + b) \"z\"\nlconcat [ \"a\" \"b\" \"c\" ]\n=> \"zabc\"\n# different types\nlstrange = foldl (str: int: str + toString (int + 1)) \"a\"\nlstrange [ 1 2 3 4 ]\n=> \"a2345\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":195,"column":3},"path":["lib","lists","foldl"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.foldl' (Prime)","path":["lib","lists","foldl'"],"aliases":[["lib","foldl'"]],"signature":"foldl' :: (a -> b -> a) -> a -> [b] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":278,"column":3},"attr_expr":"foldl' =\n    op: acc:\n    # The builtin `foldl'` is a bit lazier than one might expect.\n    # See https://github.com/NixOS/nix/pull/7158.\n    # In particular, the initial accumulator value is not forced before the first iteration starts.\n    builtins.seq acc (builtins.foldl' op acc);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":279,"column":5},"lambda_expr":"foldl' =\n    op: acc:\n    # The builtin `foldl'` is a bit lazier than one might expect.\n    # See https://github.com/NixOS/nix/pull/7158.\n    # In particular, the initial accumulator value is not forced before the first iteration starts.\n    builtins.seq acc (builtins.foldl' op acc);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":278,"column":3},"path":["lib","lists","foldl'"],"pos_type":"Attribute"}},"content":{"content":"\nReduce a list by applying a binary operator from left to right,\nstarting with an initial accumulator.\n\nBefore each application of the operator, the accumulator value is evaluated.\nThis behavior makes this function stricter than [`foldl`](#function-library-lib.lists.foldl).\n\nUnlike [`builtins.foldl'`](https://nixos.org/manual/nix/unstable/language/builtins.html#builtins-foldl'),\nthe initial accumulator argument is evaluated before the first iteration.\n\nA call like\n\n```nix\nfoldl' op acc₀ [ x₀ x₁ x₂ ... xₙ₋₁ xₙ ]\n```\n\nis (denotationally) equivalent to the following,\nbut with the added benefit that `foldl'` itself will never overflow the stack.\n\n```nix\nlet\n  acc₁   = builtins.seq acc₀   (op acc₀   x₀  );\n  acc₂   = builtins.seq acc₁   (op acc₁   x₁  );\n  acc₃   = builtins.seq acc₂   (op acc₂   x₂  );\n  ...\n  accₙ   = builtins.seq accₙ₋₁ (op accₙ₋₁ xₙ₋₁);\n  accₙ₊₁ = builtins.seq accₙ   (op accₙ   xₙ  );\nin\naccₙ₊₁\n\n# Or ignoring builtins.seq\nop (op (... (op (op (op acc₀ x₀) x₁) x₂) ...) xₙ₋₁) xₙ\n```\n\n# Inputs\n\n`op`\n\n: The binary operation to run, where the two arguments are:\n\n1. `acc`: The current accumulator value: Either the initial one for the first iteration, or the result of the previous iteration\n2. `x`: The corresponding list element for this iteration\n\n`acc`\n\n: The initial accumulator value.\n\n  The accumulator value is evaluated in any case before the first iteration starts.\n\n  To avoid evaluation even before the `list` argument is given an eta expansion can be used:\n\n  ```nix\n  list: lib.foldl' op acc list\n  ```\n\n`list`\n\n: The list to fold\n\n# Type\n\n```\nfoldl' :: (a -> b -> a) -> a -> [b] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.foldl'` usage example\n\n```nix\nfoldl' (acc: x: acc + x) 0 [1 2 3]\n=> 6\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":278,"column":3},"path":["lib","lists","foldl'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.foldr","path":["lib","lists","foldr"],"aliases":[["lib","fold"],["lib","foldr"],["lib","lists","fold"]],"signature":"foldr :: (a -> b -> b) -> b -> [a] -> b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":137,"column":3},"attr_expr":"foldr =\n    op: nul: list:\n    let\n      len = length list;\n      fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));\n    in\n    fold' 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":138,"column":5},"lambda_expr":"foldr =\n    op: nul: list:\n    let\n      len = length list;\n      fold' = n: if n == len then nul else op (elemAt list n) (fold' (n + 1));\n    in\n    fold' 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":137,"column":3},"path":["lib","lists","foldr"],"pos_type":"Attribute"}},"content":{"content":"\n“right fold” a binary function `op` between successive elements of\n`list` with `nul` as the starting value, i.e.,\n`foldr op nul [x_1 x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))`.\n\n# Inputs\n\n`op`\n\n: 1\\. Function argument\n\n`nul`\n\n: 2\\. Function argument\n\n`list`\n\n: 3\\. Function argument\n\n# Type\n\n```\nfoldr :: (a -> b -> b) -> b -> [a] -> b\n```\n\n# Examples\n:::{.example}\n## `lib.lists.foldr` usage example\n\n```nix\nconcat = foldr (a: b: a + b) \"z\"\nconcat [ \"a\" \"b\" \"c\" ]\n=> \"abcz\"\n# different types\nstrange = foldr (int: str: toString (int + 1) + str) \"a\"\nstrange [ 1 2 3 4 ]\n=> \"2345a\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":137,"column":3},"path":["lib","lists","foldr"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.forEach","path":["lib","lists","forEach"],"aliases":[["lib","forEach"]],"signature":"forEach :: [a] -> (a -> b) -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":94,"column":3},"attr_expr":"forEach = xs: f: map f xs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":94,"column":13},"lambda_expr":"forEach = xs: f: map f xs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":94,"column":3},"path":["lib","lists","forEach"],"pos_type":"Attribute"}},"content":{"content":"\nApply the function to each element in the list.\nSame as `map`, but arguments flipped.\n\n# Inputs\n\n`xs`\n\n: 1\\. Function argument\n\n`f`\n\n: 2\\. Function argument\n\n# Type\n\n```\nforEach :: [a] -> (a -> b) -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.forEach` usage example\n\n```nix\nforEach [ 1 2 ] (x:\n  toString x\n)\n=> [ \"1\" \"2\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":94,"column":3},"path":["lib","lists","forEach"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.genList","path":["lib","lists","genList"],"aliases":[["builtins","genList"],["lib","genList"],["lib","strings","genList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"genList","args":["generator","length"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":27,"column":5},"attr_expr":"genList","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","genList"],"pos_type":"Lambda"}},"content":{"content":"\nGenerate list of size *length*, with each element *i* equal to the\nvalue returned by *generator* `i`. For example,\n\n```nix\nbuiltins.genList (x: x * x) 5\n```\n\nreturns the list `[ 0 1 4 9 16 ]`.\n","source":{"position":null,"path":["lib","lists","genList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.groupBy","path":["lib","lists","groupBy"],"aliases":[["builtins","groupBy"],["lib","groupBy"]],"signature":null,"is_primop":true,"primop_meta":{"name":"groupBy","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1011,"column":3},"attr_expr":"groupBy =\n    builtins.groupBy or (\n      pred:\n      foldl' (\n        r: e:\n        let\n          key = pred e;\n        in\n        r // { ${key} = (r.${key} or [ ]) ++ [ e ]; }\n      ) { }\n    );","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","groupBy"],"pos_type":"Lambda"}},"content":{"content":"\nGroups elements of *list* together by the string returned from the\nfunction *f* called on each element. It returns an attribute set\nwhere each attribute value contains the elements of *list* that are\nmapped to the same corresponding attribute name returned by *f*.\n\nFor example,\n\n```nix\nbuiltins.groupBy (builtins.substring 0 1) [\"foo\" \"bar\" \"baz\"]\n```\n\nevaluates to\n\n```nix\n{ b = [ \"bar\" \"baz\" ]; f = [ \"foo\" ]; }\n```\n","source":{"position":null,"path":["lib","lists","groupBy"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.groupBy' (Prime)","path":["lib","lists","groupBy'"],"aliases":[["lib","groupBy'"]],"signature":"groupBy' :: (a -> b -> a) -> a -> (b -> String) -> [b] -> { [String] :: a }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1007,"column":3},"attr_expr":"groupBy' =\n    op: nul: pred: lst:\n    mapAttrs (name: foldl op nul) (groupBy pred lst);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1008,"column":5},"lambda_expr":"groupBy' =\n    op: nul: pred: lst:\n    mapAttrs (name: foldl op nul) (groupBy pred lst);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1007,"column":3},"path":["lib","lists","groupBy'"],"pos_type":"Attribute"}},"content":{"content":"\nSplits the elements of a list into many lists, using the return value of a predicate.\nPredicate should return a string which becomes keys of attrset `groupBy` returns.\n`groupBy'` allows to customise the combining function and initial value\n\n# Inputs\n\n`op`\n\n: 1\\. Function argument\n\n`nul`\n\n: 2\\. Function argument\n\n`pred`\n\n: 3\\. Function argument\n\n`lst`\n\n: 4\\. Function argument\n\n# Type\n\n```\ngroupBy' :: (a -> b -> a) -> a -> (b -> String) -> [b] -> { [String] :: a }\n```\n\n# Examples\n:::{.example}\n## `lib.lists.groupBy'` usage example\n\n```nix\ngroupBy (x: boolToString (x > 2)) [ 5 1 2 3 4 ]\n=> { true = [ 5 3 4 ]; false = [ 1 2 ]; }\ngroupBy (x: x.name) [ {name = \"icewm\"; script = \"icewm &\";}\n                      {name = \"xfce\";  script = \"xfce4-session &\";}\n                      {name = \"icewm\"; script = \"icewmbg &\";}\n                      {name = \"mate\";  script = \"gnome-session &\";}\n                    ]\n=> { icewm = [ { name = \"icewm\"; script = \"icewm &\"; }\n               { name = \"icewm\"; script = \"icewmbg &\"; } ];\n     mate  = [ { name = \"mate\";  script = \"gnome-session &\"; } ];\n     xfce  = [ { name = \"xfce\";  script = \"xfce4-session &\"; } ];\n   }\n\ngroupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ]\n=> { true = 12; false = 3; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1007,"column":3},"path":["lib","lists","groupBy'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.hasPrefix","path":["lib","lists","hasPrefix"],"aliases":[],"signature":"hasPrefix :: [a] -> [a] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1643,"column":3},"attr_expr":"hasPrefix = list1: list2: take (length list1) list2 == list1;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1643,"column":15},"lambda_expr":"hasPrefix = list1: list2: take (length list1) list2 == list1;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1643,"column":3},"path":["lib","lists","hasPrefix"],"pos_type":"Attribute"}},"content":{"content":"\nWhether the first list is a prefix of the second list.\n\n# Inputs\n\n`list1`\n\n: 1\\. Function argument\n\n`list2`\n\n: 2\\. Function argument\n\n# Type\n\n```\nhasPrefix :: [a] -> [a] -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.lists.hasPrefix` usage example\n\n```nix\nhasPrefix [ 1 2 ] [ 1 2 3 4 ]\n=> true\nhasPrefix [ 0 1 ] [ 1 2 3 4 ]\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1643,"column":3},"path":["lib","lists","hasPrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.head","path":["lib","lists","head"],"aliases":[["builtins","head"],["lib","head"],["lib","strings","head"]],"signature":null,"is_primop":true,"primop_meta":{"name":"head","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":19,"column":5},"attr_expr":"head","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","head"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the first element of a list; abort evaluation if the argument\nisn’t a list or is an empty list. You can test whether a list is\nempty by comparing it with `[]`.\n","source":{"position":null,"path":["lib","lists","head"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.ifilter0","path":["lib","lists","ifilter0"],"aliases":[["lib","ifilter0"]],"signature":"ifilter0 :: (Int -> a -> Bool) -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":388,"column":3},"attr_expr":"ifilter0 =\n    ipred: input:\n    map (idx: elemAt input idx) (\n      filter (idx: ipred idx (elemAt input idx)) (genList (x: x) (length input))\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":389,"column":5},"lambda_expr":"ifilter0 =\n    ipred: input:\n    map (idx: elemAt input idx) (\n      filter (idx: ipred idx (elemAt input idx)) (genList (x: x) (length input))\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":388,"column":3},"path":["lib","lists","ifilter0"],"pos_type":"Attribute"}},"content":{"content":"\nFilter a list for elements that satisfy a predicate function.\nThe predicate function is called with both the index and value for each element.\nIt must return `true`/`false` to include/exclude a given element in the result.\nThis function is strict in the result of the predicate function for each element.\nThis function has O(n) complexity.\n\nAlso see [`builtins.filter`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-filter) (available as `lib.lists.filter`),\nwhich can be used instead when the index isn't needed.\n\n# Inputs\n\n`ipred`\n\n: The predicate function, it takes two arguments:\n  - 1. (int): the index of the element.\n  - 2. (a): the value of the element.\n\n  It must return `true`/`false` to include/exclude a given element from the result.\n\n`list`\n\n: The list to filter using the predicate.\n\n# Type\n```\nifilter0 :: (Int -> a -> Bool) -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.ifilter0` usage example\n\n```nix\nifilter0 (i: v: i == 0 || v > 2) [ 1 2 3 ]\n=> [ 1 3 ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":388,"column":3},"path":["lib","lists","ifilter0"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.imap0","path":["lib","lists","imap0"],"aliases":[["lib","imap0"]],"signature":"imap0 :: (Int -> a -> b) -> [a] -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":315,"column":3},"attr_expr":"imap0 = f: list: genList (n: f n (elemAt list n)) (length list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":315,"column":11},"lambda_expr":"imap0 = f: list: genList (n: f n (elemAt list n)) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":315,"column":3},"path":["lib","lists","imap0"],"pos_type":"Attribute"}},"content":{"content":"\nMap with index starting from 0\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nimap0 :: (Int -> a -> b) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.imap0` usage example\n\n```nix\nimap0 (i: v: \"${v}-${toString i}\") [\"a\" \"b\"]\n=> [ \"a-0\" \"b-1\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":315,"column":3},"path":["lib","lists","imap0"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.imap1","path":["lib","lists","imap1"],"aliases":[["lib","imap"],["lib","imap1"],["lib","misc","imap"]],"signature":"imap1 :: (Int -> a -> b) -> [a] -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"attr_expr":"imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":11},"lambda_expr":"imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}},"content":{"content":"\nMap with index starting from 1\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nimap1 :: (Int -> a -> b) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.imap1` usage example\n\n```nix\nimap1 (i: v: \"${v}-${toString i}\") [\"a\" \"b\"]\n=> [ \"a-1\" \"b-2\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.init","path":["lib","lists","init"],"aliases":[["lib","init"]],"signature":"init :: [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1844,"column":3},"attr_expr":"init =\n    list:\n    assert lib.assertMsg (list != [ ]) \"lists.init: list must not be empty!\";\n    take (length list - 1) list;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1845,"column":5},"lambda_expr":"init =\n    list:\n    assert lib.assertMsg (list != [ ]) \"lists.init: list must not be empty!\";\n    take (length list - 1) list;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1844,"column":3},"path":["lib","lists","init"],"pos_type":"Attribute"}},"content":{"content":"\nReturns all elements but the last.\n\nThis function throws an error if the list is empty.\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\ninit :: [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.init` usage example\n\n```nix\ninit [ 1 2 3 ]\n=> [ 1 2 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1844,"column":3},"path":["lib","lists","init"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.intersectLists","path":["lib","lists","intersectLists"],"aliases":[["lib","intersectLists"]],"signature":"intersectLists :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2002,"column":3},"attr_expr":"intersectLists = e: filter (x: elem x e);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2002,"column":20},"lambda_expr":"intersectLists = e: filter (x: elem x e);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2002,"column":3},"path":["lib","lists","intersectLists"],"pos_type":"Attribute"}},"content":{"content":"\nIntersects list `list1` and another list (`list2`).\n\nO(nm) complexity.\n\n# Inputs\n\n`list1`\n\n: First list\n\n`list2`\n\n: Second list\n\n# Type\n\n```\nintersectLists :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.intersectLists` usage example\n\n```nix\nintersectLists [ 1 2 3 ] [ 6 3 2 ]\n=> [ 3 2 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2002,"column":3},"path":["lib","lists","intersectLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.isList","path":["lib","lists","isList"],"aliases":[["builtins","isList"],["lib","isList"],["lib","strings","isList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isList","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":22,"column":5},"attr_expr":"isList","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","isList"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a list, and `false` otherwise.\n","source":{"position":null,"path":["lib","lists","isList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.last","path":["lib","lists","last"],"aliases":[["lib","last"]],"signature":"last :: [a] -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1811,"column":3},"attr_expr":"last =\n    list:\n    assert lib.assertMsg (list != [ ]) \"lists.last: list must not be empty!\";\n    elemAt list (length list - 1);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1812,"column":5},"lambda_expr":"last =\n    list:\n    assert lib.assertMsg (list != [ ]) \"lists.last: list must not be empty!\";\n    elemAt list (length list - 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1811,"column":3},"path":["lib","lists","last"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the last element of a list.\n\nThis function throws an error if the list is empty.\n\n# Inputs\n\n`list`\n\n: 1\\. Function argument\n\n# Type\n\n```\nlast :: [a] -> a\n```\n\n# Examples\n:::{.example}\n## `lib.lists.last` usage example\n\n```nix\nlast [ 1 2 3 ]\n=> 3\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1811,"column":3},"path":["lib","lists","last"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.length","path":["lib","lists","length"],"aliases":[["builtins","length"],["lib","length"]],"signature":null,"is_primop":true,"primop_meta":{"name":"length","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":21,"column":5},"attr_expr":"length","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","length"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the length of the list *e*.\n","source":{"position":null,"path":["lib","lists","length"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.listDfs","path":["lib","lists","listDfs"],"aliases":[["lib","listDfs"]],"signature":"listDfs :: Bool -> (a -> a -> Bool) -> [a] -> ({ minimal :: a; visited :: [a]; rest :: [a]; } | { cycle :: a; loops :: [a]; visited :: [a]; rest :: [a]; })\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1175,"column":3},"attr_expr":"listDfs =\n    stopOnCycles: before: list:\n    let\n      dfs' =\n        us: visited: rest:\n        let\n          c = filter (x: before x us) visited;\n          b = partition (x: before x us) rest;\n        in\n        if stopOnCycles && (length c > 0) then\n          {\n            cycle = us;\n            loops = c;\n            inherit visited rest;\n          }\n        else if length b.right == 0 then\n          # nothing is before us\n          {\n            minimal = us;\n            inherit visited rest;\n          }\n        else\n          # grab the first one before us and continue\n          dfs' (head b.right) ([ us ] ++ visited) (tail b.right ++ b.wrong);\n    in\n    dfs' (head list) [ ] (tail list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1176,"column":5},"lambda_expr":"listDfs =\n    stopOnCycles: before: list:\n    let\n      dfs' =\n        us: visited: rest:\n        let\n          c = filter (x: before x us) visited;\n          b = partition (x: before x us) rest;\n        in\n        if stopOnCycles && (length c > 0) then\n          {\n            cycle = us;\n            loops = c;\n            inherit visited rest;\n          }\n        else if length b.right == 0 then\n          # nothing is before us\n          {\n            minimal = us;\n            inherit visited rest;\n          }\n        else\n          # grab the first one before us and continue\n          dfs' (head b.right) ([ us ] ++ visited) (tail b.right ++ b.wrong);\n    in\n    dfs' (head list) [ ] (tail list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1175,"column":3},"path":["lib","lists","listDfs"],"pos_type":"Attribute"}},"content":{"content":"\nDepth-First Search (DFS) for lists `list != []`.\n\n`before a b == true` means that `b` depends on `a` (there's an\nedge from `b` to `a`).\n\n# Inputs\n\n`stopOnCycles`\n\n: 1\\. Function argument\n\n`before`\n\n: 2\\. Function argument\n\n`list`\n\n: 3\\. Function argument\n\n# Type\n\n```\nlistDfs :: Bool -> (a -> a -> Bool) -> [a] -> ({ minimal :: a; visited :: [a]; rest :: [a]; } | { cycle :: a; loops :: [a]; visited :: [a]; rest :: [a]; })\n```\n\n# Examples\n:::{.example}\n## `lib.lists.listDfs` usage example\n\n```nix\nlistDfs true hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" ]\n  == { minimal = \"/\";                  # minimal element\n       visited = [ \"/home/user\" ];     # seen elements (in reverse order)\n       rest    = [ \"/home\" \"other\" ];  # everything else\n     }\n\nlistDfs true hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" \"/\" ]\n  == { cycle   = \"/\";                  # cycle encountered at this element\n       loops   = [ \"/\" ];              # and continues to these elements\n       visited = [ \"/\" \"/home/user\" ]; # elements leading to the cycle (in reverse order)\n       rest    = [ \"/home\" \"other\" ];  # everything else\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1175,"column":3},"path":["lib","lists","listDfs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.map","path":["lib","lists","map"],"aliases":[["builtins","map"],["lib","map"]],"signature":null,"is_primop":true,"primop_meta":{"name":"map","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":28,"column":5},"attr_expr":"map","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","map"],"pos_type":"Lambda"}},"content":{"content":"\nApply the function *f* to each element in the list *list*. For\nexample,\n\n```nix\nmap (x: \"foo\" + x) [ \"bar\" \"bla\" \"abc\" ]\n```\n\nevaluates to `[ \"foobar\" \"foobla\" \"fooabc\" ]`.\n","source":{"position":null,"path":["lib","lists","map"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.mutuallyExclusive","path":["lib","lists","mutuallyExclusive"],"aliases":[["lib","mutuallyExclusive"]],"signature":"mutuallyExclusive :: [a] -> [a] -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2058,"column":3},"attr_expr":"mutuallyExclusive = a: b: length a == 0 || !(any (x: elem x a) b);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2058,"column":23},"lambda_expr":"mutuallyExclusive = a: b: length a == 0 || !(any (x: elem x a) b);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2058,"column":3},"path":["lib","lists","mutuallyExclusive"],"pos_type":"Attribute"}},"content":{"content":"\nTest if two lists have no common element.\nIt should be slightly more efficient than `intersectLists a b == []`.\n\n# Inputs\n\n`a`\n\n: 1\\. Function argument\n\n`b`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmutuallyExclusive :: [a] -> [a] -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2058,"column":3},"path":["lib","lists","mutuallyExclusive"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.naturalSort","path":["lib","lists","naturalSort"],"aliases":[["lib","naturalSort"]],"signature":"naturalSort :: [String] -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1463,"column":3},"attr_expr":"naturalSort =\n    lst:\n    let\n      vectorise = s: map (x: if isList x then toInt (head x) else x) (builtins.split \"(0|[1-9][0-9]*)\" s);\n      prepared = map (x: [\n        (vectorise x)\n        x\n      ]) lst; # remember vectorised version for O(n) regex splits\n      less = a: b: (compareLists compare (head a) (head b)) < 0;\n    in\n    map (x: elemAt x 1) (sort less prepared);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1464,"column":5},"lambda_expr":"naturalSort =\n    lst:\n    let\n      vectorise = s: map (x: if isList x then toInt (head x) else x) (builtins.split \"(0|[1-9][0-9]*)\" s);\n      prepared = map (x: [\n        (vectorise x)\n        x\n      ]) lst; # remember vectorised version for O(n) regex splits\n      less = a: b: (compareLists compare (head a) (head b)) < 0;\n    in\n    map (x: elemAt x 1) (sort less prepared);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1463,"column":3},"path":["lib","lists","naturalSort"],"pos_type":"Attribute"}},"content":{"content":"\nSort list using \"Natural sorting\".\nNumeric portions of strings are sorted in numeric order.\n\n# Inputs\n\n`lst`\n\n: 1\\. Function argument\n\n# Type\n\n```\nnaturalSort :: [String] -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.naturalSort` usage example\n\n```nix\nnaturalSort [\"disk11\" \"disk8\" \"disk100\" \"disk9\"]\n=> [\"disk8\" \"disk9\" \"disk11\" \"disk100\"]\nnaturalSort [\"10.46.133.149\" \"10.5.16.62\" \"10.54.16.25\"]\n=> [\"10.5.16.62\" \"10.46.133.149\" \"10.54.16.25\"]\nnaturalSort [\"v0.2\" \"v0.15\" \"v0.0.9\"]\n=> [ \"v0.0.9\" \"v0.2\" \"v0.15\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1463,"column":3},"path":["lib","lists","naturalSort"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.optional","path":["lib","lists","optional"],"aliases":[["lib","optional"]],"signature":"optional :: Bool -> a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":785,"column":3},"attr_expr":"optional = cond: elem: if cond then [ elem ] else [ ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":785,"column":14},"lambda_expr":"optional = cond: elem: if cond then [ elem ] else [ ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":785,"column":3},"path":["lib","lists","optional"],"pos_type":"Attribute"}},"content":{"content":"\nReturn a singleton list or an empty list, depending on a boolean\nvalue.  Useful when building lists with optional elements\n(e.g. `++ optional (system == \"i686-linux\") firefox`).\n\n# Inputs\n\n`cond`\n\n: 1\\. Function argument\n\n`elem`\n\n: 2\\. Function argument\n\n# Type\n\n```\noptional :: Bool -> a -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.optional` usage example\n\n```nix\noptional true \"foo\"\n=> [ \"foo\" ]\noptional false \"foo\"\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":785,"column":3},"path":["lib","lists","optional"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.optionals","path":["lib","lists","optionals"],"aliases":[["lib","optionals"]],"signature":"optionals :: Bool -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":819,"column":3},"attr_expr":"optionals = cond: elems: if cond then elems else [ ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":819,"column":15},"lambda_expr":"optionals = cond: elems: if cond then elems else [ ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":819,"column":3},"path":["lib","lists","optionals"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list or an empty list, depending on a boolean value.\n\n# Inputs\n\n`cond`\n\n: Condition\n\n`elems`\n\n: List to return if condition is true\n\n# Type\n\n```\noptionals :: Bool -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.optionals` usage example\n\n```nix\noptionals true [ 2 3 ]\n=> [ 2 3 ]\noptionals false [ 2 3 ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":819,"column":3},"path":["lib","lists","optionals"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.partition","path":["lib","lists","partition"],"aliases":[["builtins","partition"],["lib","partition"]],"signature":"partition :: (a -> Bool) -> [a] -> { right :: [a]; wrong :: [a]; }\n","is_primop":true,"primop_meta":{"name":"partition","args":["pred","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":952,"column":3},"attr_expr":"partition = builtins.partition;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":952,"column":3},"path":["lib","lists","partition"],"pos_type":"Attribute"}},"content":{"content":"\nSplits the elements of a list in two lists, `right` and\n`wrong`, depending on the evaluation of a predicate.\n\n# Inputs\n\n`pred`\n\n: Predicate\n\n`list`\n\n: Input list\n\n# Type\n\n```\npartition :: (a -> Bool) -> [a] -> { right :: [a]; wrong :: [a]; }\n```\n\n# Examples\n:::{.example}\n## `lib.lists.partition` usage example\n\n```nix\npartition (x: x > 2) [ 5 1 2 3 4 ]\n=> { right = [ 5 3 4 ]; wrong = [ 1 2 ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":952,"column":3},"path":["lib","lists","partition"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.range","path":["lib","lists","range"],"aliases":[["lib","range"]],"signature":"range :: Int -> Int -> [Int]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":885,"column":3},"attr_expr":"range = first: last: if first > last then [ ] else genList (n: first + n) (last - first + 1);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":885,"column":11},"lambda_expr":"range = first: last: if first > last then [ ] else genList (n: first + n) (last - first + 1);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":885,"column":3},"path":["lib","lists","range"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list of integers from `first` up to and including `last`.\n\n# Inputs\n\n`first`\n\n: First integer in the range\n\n`last`\n\n: Last integer in the range\n\n# Type\n\n```\nrange :: Int -> Int -> [Int]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.range` usage example\n\n```nix\nrange 2 4\n=> [ 2 3 4 ]\nrange 3 2\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":885,"column":3},"path":["lib","lists","range"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.remove","path":["lib","lists","remove"],"aliases":[["lib","remove"]],"signature":"remove :: a -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":477,"column":3},"attr_expr":"remove = e: filter (x: x != e);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":477,"column":12},"lambda_expr":"remove = e: filter (x: x != e);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":477,"column":3},"path":["lib","lists","remove"],"pos_type":"Attribute"}},"content":{"content":"\nRemove elements equal to `e` from a list.  Useful for `buildInputs`.\n\n# Inputs\n\n`e`\n\n: Element to remove from `list`\n\n`list`\n\n: The list\n\n# Type\n\n```\nremove :: a -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.remove` usage example\n\n```nix\nremove 3 [ 1 3 4 3 ]\n=> [ 1 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":477,"column":3},"path":["lib","lists","remove"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.removePrefix","path":["lib","lists","removePrefix"],"aliases":[],"signature":"removePrefix :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1678,"column":3},"attr_expr":"removePrefix =\n    list1: list2:\n    if hasPrefix list1 list2 then\n      drop (length list1) list2\n    else\n      throw \"lib.lists.removePrefix: First argument is not a list prefix of the second argument\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1679,"column":5},"lambda_expr":"removePrefix =\n    list1: list2:\n    if hasPrefix list1 list2 then\n      drop (length list1) list2\n    else\n      throw \"lib.lists.removePrefix: First argument is not a list prefix of the second argument\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1678,"column":3},"path":["lib","lists","removePrefix"],"pos_type":"Attribute"}},"content":{"content":"\nRemove the first list as a prefix from the second list.\nError if the first list isn't a prefix of the second list.\n\n# Inputs\n\n`list1`\n\n: 1\\. Function argument\n\n`list2`\n\n: 2\\. Function argument\n\n# Type\n\n```\nremovePrefix :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.removePrefix` usage example\n\n```nix\nremovePrefix [ 1 2 ] [ 1 2 3 4 ]\n=> [ 3 4 ]\nremovePrefix [ 0 1 ] [ 1 2 3 4 ]\n=> <error>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1678,"column":3},"path":["lib","lists","removePrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.replaceElemAt","path":["lib","lists","replaceElemAt"],"aliases":[["lib","replaceElemAt"]],"signature":"replaceElemAt :: [a] -> Int -> a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2120,"column":3},"attr_expr":"replaceElemAt =\n    list: idx: newElem:\n    assert lib.assertMsg (idx >= 0 && idx < length list)\n      \"'lists.replaceElemAt' called with index ${toString idx} on a list of size ${toString (length list)}\";\n    genList (i: if i == idx then newElem else elemAt list i) (length list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2121,"column":5},"lambda_expr":"replaceElemAt =\n    list: idx: newElem:\n    assert lib.assertMsg (idx >= 0 && idx < length list)\n      \"'lists.replaceElemAt' called with index ${toString idx} on a list of size ${toString (length list)}\";\n    genList (i: if i == idx then newElem else elemAt list i) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2120,"column":3},"path":["lib","lists","replaceElemAt"],"pos_type":"Attribute"}},"content":{"content":"\nReplaces a list's nth element with a new element\n\n# Inputs\n\n`list`\n: Input list\n\n`idx`\n: index to replace\n\n`newElem`\n: new element to replace with\n\n# Type\n\n```\nreplaceElemAt :: [a] -> Int -> a -> [a]\n```\n\n# Examples\n:::{.example}\n## `replaceElemAt` usage example\n\n```nix\nlib.replaceElemAt` [1 2 3] 0 \"a\"\n=> [\"a\" 2 3]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2120,"column":3},"path":["lib","lists","replaceElemAt"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.replicate","path":["lib","lists","replicate"],"aliases":[["lib","replicate"]],"signature":"replicate :: Int -> a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":919,"column":3},"attr_expr":"replicate = n: elem: genList (_: elem) n;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":919,"column":15},"lambda_expr":"replicate = n: elem: genList (_: elem) n;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":919,"column":3},"path":["lib","lists","replicate"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list with `n` copies of an element.\n\n# Inputs\n\n`n`\n\n: 1\\. Function argument\n\n`elem`\n\n: 2\\. Function argument\n\n# Type\n\n```\nreplicate :: Int -> a -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.replicate` usage example\n\n```nix\nreplicate 3 \"a\"\n=> [ \"a\" \"a\" \"a\" ]\nreplicate 2 true\n=> [ true true ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":919,"column":3},"path":["lib","lists","replicate"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.reverseList","path":["lib","lists","reverseList"],"aliases":[["lib","reverseList"]],"signature":"reverseList :: [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1122,"column":3},"attr_expr":"reverseList =\n    xs:\n    let\n      l = length xs;\n    in\n    genList (n: elemAt xs (l - n - 1)) l;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1123,"column":5},"lambda_expr":"reverseList =\n    xs:\n    let\n      l = length xs;\n    in\n    genList (n: elemAt xs (l - n - 1)) l;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1122,"column":3},"path":["lib","lists","reverseList"],"pos_type":"Attribute"}},"content":{"content":"\nReverse the order of the elements of a list.\n\n# Inputs\n\n`xs`\n\n: 1\\. Function argument\n\n# Type\n\n```\nreverseList :: [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.reverseList` usage example\n\n```nix\nreverseList [ \"b\" \"o\" \"j\" ]\n=> [ \"j\" \"o\" \"b\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1122,"column":3},"path":["lib","lists","reverseList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.singleton","path":["lib","lists","singleton"],"aliases":[["lib","singleton"]],"signature":"singleton :: a -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":59,"column":3},"attr_expr":"singleton = x: [ x ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":59,"column":15},"lambda_expr":"singleton = x: [ x ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":59,"column":3},"path":["lib","lists","singleton"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a list consisting of a single element. `singleton x` is\nsometimes more convenient with respect to indentation than `[x]`\nwhen x spans multiple lines.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\nsingleton :: a -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.singleton` usage example\n\n```nix\nsingleton \"foo\"\n=> [ \"foo\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":59,"column":3},"path":["lib","lists","singleton"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.sort","path":["lib","lists","sort"],"aliases":[["builtins","sort"],["lib","sort"]],"signature":"sort :: (a -> a -> Bool) -> [a] -> [a]\n","is_primop":true,"primop_meta":{"name":"sort","args":["comparator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1305,"column":3},"attr_expr":"sort = builtins.sort;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1305,"column":3},"path":["lib","lists","sort"],"pos_type":"Attribute"}},"content":{"content":"\nSort a list based on a comparator function which compares two\nelements and returns true if the first argument is strictly below\nthe second argument.  The returned list is sorted in an increasing\norder.  The implementation does a quick-sort.\n\nSee also [`sortOn`](#function-library-lib.lists.sortOn), which applies the\ndefault comparison on a function-derived property, and may be more efficient.\n\n# Inputs\n\n`comparator`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsort :: (a -> a -> Bool) -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.sort` usage example\n\n```nix\nsort (p: q: p < q) [ 5 3 7 ]\n=> [ 3 5 7 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1305,"column":3},"path":["lib","lists","sort"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.sortOn","path":["lib","lists","sortOn"],"aliases":[["lib","sortOn"]],"signature":"sortOn :: (a -> b) -> [a] -> [a], for comparable b\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1350,"column":3},"attr_expr":"sortOn =\n    f: list:\n    let\n      # Heterogenous list as pair may be ugly, but requires minimal allocations.\n      pairs = map (x: [\n        (f x)\n        x\n      ]) list;\n    in\n    map (x: builtins.elemAt x 1) (\n      sort\n        # Compare the first element of the pairs\n        # Do not factor out the `<`, to avoid calls in hot code; duplicate instead.\n        (a: b: head a < head b)\n        pairs\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1351,"column":5},"lambda_expr":"sortOn =\n    f: list:\n    let\n      # Heterogenous list as pair may be ugly, but requires minimal allocations.\n      pairs = map (x: [\n        (f x)\n        x\n      ]) list;\n    in\n    map (x: builtins.elemAt x 1) (\n      sort\n        # Compare the first element of the pairs\n        # Do not factor out the `<`, to avoid calls in hot code; duplicate instead.\n        (a: b: head a < head b)\n        pairs\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1350,"column":3},"path":["lib","lists","sortOn"],"pos_type":"Attribute"}},"content":{"content":"\nSort a list based on the default comparison of a derived property `b`.\n\nThe items are returned in `b`-increasing order.\n\n**Performance**:\n\nThe passed function `f` is only evaluated once per item,\nunlike an unprepared [`sort`](#function-library-lib.lists.sort) using\n`f p < f q`.\n\n**Laws**:\n```nix\nsortOn f == sort (p: q: f p < f q)\n```\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsortOn :: (a -> b) -> [a] -> [a], for comparable b\n```\n\n# Examples\n:::{.example}\n## `lib.lists.sortOn` usage example\n\n```nix\nsortOn stringLength [ \"aa\" \"b\" \"cccc\" ]\n=> [ \"b\" \"aa\" \"cccc\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1350,"column":3},"path":["lib","lists","sortOn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.sublist","path":["lib","lists","sublist"],"aliases":[["lib","sublist"]],"signature":"sublist :: Int -> Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1722,"column":3},"attr_expr":"sublist =\n    start: count: list:\n    let\n      len = length list;\n    in\n    genList (n: elemAt list (n + start)) (\n      if start >= len then\n        0\n      else if start + count > len then\n        len - start\n      else\n        count\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1723,"column":5},"lambda_expr":"sublist =\n    start: count: list:\n    let\n      len = length list;\n    in\n    genList (n: elemAt list (n + start)) (\n      if start >= len then\n        0\n      else if start + count > len then\n        len - start\n      else\n        count\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1722,"column":3},"path":["lib","lists","sublist"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a list consisting of at most `count` elements of `list`,\nstarting at index `start`.\n\n# Inputs\n\n`start`\n\n: Index at which to start the sublist\n\n`count`\n\n: Number of elements to take\n\n`list`\n\n: Input list\n\n# Type\n\n```\nsublist :: Int -> Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.sublist` usage example\n\n```nix\nsublist 1 3 [ \"a\" \"b\" \"c\" \"d\" \"e\" ]\n=> [ \"b\" \"c\" \"d\" ]\nsublist 1 3 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1722,"column":3},"path":["lib","lists","sublist"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.subtractLists","path":["lib","lists","subtractLists"],"aliases":[["lib","subtractLists"]],"signature":"subtractLists :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2036,"column":3},"attr_expr":"subtractLists = e: filter (x: !(elem x e));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2036,"column":19},"lambda_expr":"subtractLists = e: filter (x: !(elem x e));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2036,"column":3},"path":["lib","lists","subtractLists"],"pos_type":"Attribute"}},"content":{"content":"\nSubtracts list `e` from another list (`list2`).\n\nO(nm) complexity.\n\n# Inputs\n\n`e`\n\n: First list\n\n`list2`\n\n: Second list\n\n# Type\n\n```\nsubtractLists :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.subtractLists` usage example\n\n```nix\nsubtractLists [ 3 2 ] [ 1 2 3 4 5 3 ]\n=> [ 1 4 5 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":2036,"column":3},"path":["lib","lists","subtractLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.tail","path":["lib","lists","tail"],"aliases":[["builtins","tail"],["lib","tail"],["lib","strings","tail"]],"signature":null,"is_primop":true,"primop_meta":{"name":"tail","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":20,"column":5},"attr_expr":"tail","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","lists","tail"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the list without its first item; abort evaluation if\nthe argument isn’t a list or is an empty list.\n\n> **Warning**\n>\n> This function should generally be avoided since it's inefficient:\n> unlike Haskell's `tail`, it takes O(n) time, so recursing over a\n> list by repeatedly calling `tail` takes O(n^2) time.\n","source":{"position":null,"path":["lib","lists","tail"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.lists.take","path":["lib","lists","take"],"aliases":[["lib","take"]],"signature":"take :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1507,"column":3},"attr_expr":"take = count: sublist 0 count;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1507,"column":10},"lambda_expr":"take = count: sublist 0 count;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1507,"column":3},"path":["lib","lists","take"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the first (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Number of elements to take\n\n`list`\n\n: Input list\n\n# Type\n\n```\ntake :: Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.take` usage example\n\n```nix\ntake 2 [ \"a\" \"b\" \"c\" \"d\" ]\n=> [ \"a\" \"b\" ]\ntake 2 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1507,"column":3},"path":["lib","lists","take"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.takeEnd","path":["lib","lists","takeEnd"],"aliases":[["lib","takeEnd"]],"signature":"takeEnd :: Int -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1541,"column":3},"attr_expr":"takeEnd = n: xs: drop (max 0 (length xs - n)) xs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1541,"column":13},"lambda_expr":"takeEnd = n: xs: drop (max 0 (length xs - n)) xs;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1541,"column":3},"path":["lib","lists","takeEnd"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the last (at most) N elements of a list.\n\n# Inputs\n\n`count`\n\n: Maximum number of elements to pick\n\n`list`\n\n: Input list\n\n# Type\n\n```\ntakeEnd :: Int -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.takeEnd` usage example\n\n```nix\ntakeEnd 2 [ \"a\" \"b\" \"c\" \"d\" ]\n=> [ \"c\" \"d\" ]\ntakeEnd 2 [ ]\n=> [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1541,"column":3},"path":["lib","lists","takeEnd"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.toList","path":["lib","lists","toList"],"aliases":[["lib","toList"]],"signature":"toList :: (a | [a]) -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":851,"column":3},"attr_expr":"toList = x: if isList x then x else [ x ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":851,"column":12},"lambda_expr":"toList = x: if isList x then x else [ x ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":851,"column":3},"path":["lib","lists","toList"],"pos_type":"Attribute"}},"content":{"content":"\nIf argument is a list, return it; else, wrap it in a singleton\nlist. If you're using this, you should almost certainly\nreconsider if there isn't a more \"well-typed\" approach.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\ntoList :: (a | [a]) -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.toList` usage example\n\n```nix\ntoList [ 1 2 ]\n=> [ 1 2 ]\ntoList \"hi\"\n=> [ \"hi\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":851,"column":3},"path":["lib","lists","toList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.toposort","path":["lib","lists","toposort"],"aliases":[["lib","toposort"]],"signature":"toposort :: (a -> a -> Bool) -> [a] -> ({ result :: [a]; } | { cycle :: [a]; loops :: [a]; })\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1246,"column":3},"attr_expr":"toposort =\n    before: list:\n    let\n      dfsthis = listDfs true before list;\n      toporest = toposort before (dfsthis.visited ++ dfsthis.rest);\n    in\n    if length list < 2 then\n      # finish\n      { result = list; }\n    else if dfsthis ? cycle then\n      # there's a cycle, starting from the current vertex, return it\n      {\n        cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited);\n        inherit (dfsthis) loops;\n      }\n    else if toporest ? cycle then\n      # there's a cycle somewhere else in the graph, return it\n      toporest\n    # Slow, but short. Can be made a bit faster with an explicit stack.\n    else\n      # there are no cycles\n      { result = [ dfsthis.minimal ] ++ toporest.result; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1247,"column":5},"lambda_expr":"toposort =\n    before: list:\n    let\n      dfsthis = listDfs true before list;\n      toporest = toposort before (dfsthis.visited ++ dfsthis.rest);\n    in\n    if length list < 2 then\n      # finish\n      { result = list; }\n    else if dfsthis ? cycle then\n      # there's a cycle, starting from the current vertex, return it\n      {\n        cycle = reverseList ([ dfsthis.cycle ] ++ dfsthis.visited);\n        inherit (dfsthis) loops;\n      }\n    else if toporest ? cycle then\n      # there's a cycle somewhere else in the graph, return it\n      toporest\n    # Slow, but short. Can be made a bit faster with an explicit stack.\n    else\n      # there are no cycles\n      { result = [ dfsthis.minimal ] ++ toporest.result; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1246,"column":3},"path":["lib","lists","toposort"],"pos_type":"Attribute"}},"content":{"content":"\nSort a list based on a partial ordering using DFS. This\nimplementation is O(N^2), if your ordering is linear, use `sort`\ninstead.\n\n`before a b == true` means that `b` should be after `a`\nin the result.\n\n# Inputs\n\n`before`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\ntoposort :: (a -> a -> Bool) -> [a] -> ({ result :: [a]; } | { cycle :: [a]; loops :: [a]; })\n```\n\n# Examples\n:::{.example}\n## `lib.lists.toposort` usage example\n\n```nix\ntoposort hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" ]\n  == { result = [ \"/\" \"/home\" \"/home/user\" \"other\" ]; }\n\ntoposort hasPrefix [ \"/home/user\" \"other\" \"/\" \"/home\" \"/\" ]\n  == { cycle = [ \"/home/user\" \"/\" \"/\" ]; # path leading to a cycle\n       loops = [ \"/\" ]; }                # loops back to these elements\n\ntoposort hasPrefix [ \"other\" \"/home/user\" \"/home\" \"/\" ]\n  == { result = [ \"other\" \"/\" \"/home\" \"/home/user\" ]; }\n\ntoposort (a: b: a < b) [ 3 2 1 ] == { result = [ 1 2 3 ]; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1246,"column":3},"path":["lib","lists","toposort"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.unique","path":["lib","lists","unique"],"aliases":[["lib","unique"]],"signature":"unique :: [a] -> [a]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1901,"column":3},"attr_expr":"unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [ ];","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1901,"column":3},"path":["lib","lists","unique"],"pos_type":"Attribute"}},"content":{"content":"\nRemove duplicate elements from the `list`. O(n^2) complexity.\n\n:::{.note}\nIf the list only contains strings and order is not important, the complexity can be reduced to O(n log n) by using [`lib.lists.uniqueStrings`](#function-library-lib.lists.uniqueStrings) instead.\n:::\n\n# Inputs\n\n`list`\n\n: Input list\n\n# Type\n\n```\nunique :: [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.unique` usage example\n\n```nix\nunique [ 3 2 3 4 ]\n=> [ 3 2 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1901,"column":3},"path":["lib","lists","unique"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.uniqueStrings","path":["lib","lists","uniqueStrings"],"aliases":[["lib","uniqueStrings"]],"signature":"uniqueStrings :: [String] -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1938,"column":3},"attr_expr":"uniqueStrings = list: attrNames (groupBy id list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1938,"column":19},"lambda_expr":"uniqueStrings = list: attrNames (groupBy id list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1938,"column":3},"path":["lib","lists","uniqueStrings"],"pos_type":"Attribute"}},"content":{"content":"\nRemoves duplicate strings from the `list`. O(n log n) complexity.\n\n:::{.note}\nOrder is not preserved.\n\nAll elements of the list must be strings without context.\n\nThis function fails when the list contains a non-string element or a [string with context](https://nix.dev/manual/nix/latest/language/string-context.html).\nIn that case use [`lib.lists.unique`](#function-library-lib.lists.unique) instead.\n:::\n\n# Inputs\n\n`list`\n\n: List of strings\n\n# Type\n\n```\nuniqueStrings :: [String] -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.uniqueStrings` usage example\n\n```nix\nuniqueStrings [ \"foo\" \"bar\" \"foo\" ]\n=> [ \"bar\" \"foo\" ] # order is not preserved\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1938,"column":3},"path":["lib","lists","uniqueStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.zipLists","path":["lib","lists","zipLists"],"aliases":[["lib","zipLists"]],"signature":"zipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1094,"column":3},"attr_expr":"zipLists = zipListsWith (fst: snd: { inherit fst snd; });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1060,"column":8},"lambda_expr":"fst: snd:\n    genList (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd))","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1094,"column":3},"path":["lib","lists","zipLists"],"pos_type":"Attribute"}},"content":{"content":"\nMerges two lists of the same size together. If the sizes aren't the same\nthe merging stops at the shortest.\n\n# Inputs\n\n`fst`\n\n: First list\n\n`snd`\n\n: Second list\n\n# Type\n\n```\nzipLists :: [a] -> [b] -> [{ fst :: a; snd :: b; }]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.zipLists` usage example\n\n```nix\nzipLists [ 1 2 ] [ \"a\" \"b\" ]\n=> [ { fst = 1; snd = \"a\"; } { fst = 2; snd = \"b\"; } ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1094,"column":3},"path":["lib","lists","zipLists"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.lists.zipListsWith","path":["lib","lists","zipListsWith"],"aliases":[["lib","zipListsWith"]],"signature":"zipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1059,"column":3},"attr_expr":"zipListsWith =\n    f: fst: snd:\n    genList (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1060,"column":5},"lambda_expr":"zipListsWith =\n    f: fst: snd:\n    genList (n: f (elemAt fst n) (elemAt snd n)) (min (length fst) (length snd));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1059,"column":3},"path":["lib","lists","zipListsWith"],"pos_type":"Attribute"}},"content":{"content":"\nMerges two lists of the same size together. If the sizes aren't the same\nthe merging stops at the shortest. How both lists are merged is defined\nby the first argument.\n\n# Inputs\n\n`f`\n\n: Function to zip elements of both lists\n\n`fst`\n\n: First list\n\n`snd`\n\n: Second list\n\n# Type\n\n```\nzipListsWith :: (a -> b -> c) -> [a] -> [b] -> [c]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.zipListsWith` usage example\n\n```nix\nzipListsWith (a: b: a + b) [\"h\" \"l\"] [\"e\" \"o\"]\n=> [\"he\" \"lo\"]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":1059,"column":3},"path":["lib","lists","zipListsWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.buildInputs","path":["lib","mergeAttrBy","buildInputs"],"aliases":[["lib","concat"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.cfg","path":["lib","mergeAttrBy","cfg"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.configureFlags","path":["lib","mergeAttrBy","configureFlags"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.flags","path":["lib","mergeAttrBy","flags"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.meta","path":["lib","mergeAttrBy","meta"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.nativeBuildInputs","path":["lib","mergeAttrBy","nativeBuildInputs"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.passthru","path":["lib","mergeAttrBy","passthru"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.patches","path":["lib","mergeAttrBy","patches"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.postAll","path":["lib","mergeAttrBy","postAll"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.postInstall","path":["lib","mergeAttrBy","postInstall"],"aliases":[["lib","mergeAttrBy","preConfigure"],["lib","misc","mergeAttrBy","postInstall"],["lib","misc","mergeAttrBy","preConfigure"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"lambda_expr":"a: b: \"${a}\\n${b}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","mergeAttrBy","postInstall"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","mergeAttrBy","postInstall"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeAttrBy.preConfigure","path":["lib","mergeAttrBy","preConfigure"],"aliases":[["lib","mergeAttrBy","postInstall"],["lib","misc","mergeAttrBy","postInstall"],["lib","misc","mergeAttrBy","preConfigure"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"lambda_expr":"a: b: \"${a}\\n${b}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","mergeAttrBy","preConfigure"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","mergeAttrBy","preConfigure"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.mergeAttrBy.prePhases","path":["lib","mergeAttrBy","prePhases"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.mergeAttrBy.propagatedBuildInputs","path":["lib","mergeAttrBy","propagatedBuildInputs"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.addMetaAttrs","path":["lib","meta","addMetaAttrs"],"aliases":[["lib","addMetaAttrs"]],"signature":"addMetaAttrs :: AttrSet -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":57,"column":3},"attr_expr":"addMetaAttrs =\n    newAttrs: drv:\n    if drv ? overrideAttrs then\n      drv.overrideAttrs (old: {\n        meta = (old.meta or { }) // newAttrs;\n      })\n    else\n      drv // { meta = (drv.meta or { }) // newAttrs; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":58,"column":5},"lambda_expr":"addMetaAttrs =\n    newAttrs: drv:\n    if drv ? overrideAttrs then\n      drv.overrideAttrs (old: {\n        meta = (old.meta or { }) // newAttrs;\n      })\n    else\n      drv // { meta = (drv.meta or { }) // newAttrs; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":57,"column":3},"path":["lib","meta","addMetaAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nAdd to or override the meta attributes of the given\nderivation.\n\n# Inputs\n\n`newAttrs`\n\n: 1\\. Function argument\n\n`drv`\n\n: 2\\. Function argument\n\n# Type\n\n```\naddMetaAttrs :: AttrSet -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.meta.addMetaAttrs` usage example\n\n```nix\naddMetaAttrs {description = \"Bla blah\";} somePkg\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":57,"column":3},"path":["lib","meta","addMetaAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.appendToName","path":["lib","meta","appendToName"],"aliases":[["lib","appendToName"]],"signature":"appendToName :: String -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":155,"column":3},"attr_expr":"appendToName =\n    suffix:\n    updateName (\n      name:\n      let\n        x = builtins.parseDrvName name;\n      in\n      \"${x.name}-${suffix}-${x.version}\"\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":156,"column":5},"lambda_expr":"appendToName =\n    suffix:\n    updateName (\n      name:\n      let\n        x = builtins.parseDrvName name;\n      in\n      \"${x.name}-${suffix}-${x.version}\"\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":155,"column":3},"path":["lib","meta","appendToName"],"pos_type":"Attribute"}},"content":{"content":"\nAppend a suffix to the name of a package (before the version\npart).\n\n# Inputs\n\n`suffix`\n\n: 1\\. Function argument\n\n# Type\n\n```\nappendToName :: String -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":155,"column":3},"path":["lib","meta","appendToName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.availableOn","path":["lib","meta","availableOn"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":367,"column":3},"attr_expr":"availableOn =\n    platform: pkg:\n    ((!pkg ? meta.platforms) || any (platformMatch platform) pkg.meta.platforms)\n    && ((!pkg ? meta.badPlatforms) || !(any (platformMatch platform) pkg.meta.badPlatforms));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":368,"column":5},"lambda_expr":"availableOn =\n    platform: pkg:\n    ((!pkg ? meta.platforms) || any (platformMatch platform) pkg.meta.platforms)\n    && ((!pkg ? meta.badPlatforms) || !(any (platformMatch platform) pkg.meta.badPlatforms));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":367,"column":3},"path":["lib","meta","availableOn"],"pos_type":"Attribute"}},"content":{"content":"\nCheck if a package is available on a given platform.\n\nA package is available on a platform if both\n\n1. One of `meta.platforms` pattern matches the given\n    platform, or `meta.platforms` is not present.\n\n2. None of `meta.badPlatforms` pattern matches the given platform.\n\n# Inputs\n\n`platform`\n\n: 1\\. Function argument\n\n`pkg`\n\n: 2\\. Function argument\n\n# Examples\n:::{.example}\n## `lib.meta.availableOn` usage example\n\n```nix\nlib.meta.availableOn { system = \"aarch64-darwin\"; } pkg.zsh\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":367,"column":3},"path":["lib","meta","availableOn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.cpeFullVersionWithVendor","path":["lib","meta","cpeFullVersionWithVendor"],"aliases":[],"signature":"cpeFullVersionWithVendor :: String -> String -> { update :: String; vendor :: String; version :: String; }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":630,"column":3},"attr_expr":"cpeFullVersionWithVendor = vendor: version: {\n    inherit vendor version;\n    update = \"*\";\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":630,"column":30},"lambda_expr":"cpeFullVersionWithVendor = vendor: version: {\n    inherit vendor version;\n    update = \"*\";\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":630,"column":3},"path":["lib","meta","cpeFullVersionWithVendor"],"pos_type":"Attribute"}},"content":{"content":"\nGenerate [CPE parts](#var-meta-identifiers-cpeParts) from inputs. Copies `vendor` and `version` to the output, and sets `update` to `*`.\n\n# Inputs\n\n`vendor`\n\n: package's vendor\n\n`version`\n\n: package's version\n\n# Type\n\n```\ncpeFullVersionWithVendor :: String -> String -> { update :: String; vendor :: String; version :: String; }\n```\n\n# Examples\n:::{.example}\n## `lib.meta.cpeFullVersionWithVendor` usage example\n\n```nix\nlib.meta.cpeFullVersionWithVendor \"gnu\" \"1.2.3\"\n=> {\n  vendor = \"gnu\";\n  version = \"1.2.3\";\n  update = \"*\";\n}\n```\n\n:::\n:::{.example}\n## `lib.meta.cpeFullVersionWithVendor` usage in derivations\n\n```nix\nmkDerivation rec {\n  version = \"1.2.3\";\n  # ...\n  meta = {\n    # ...\n    identifiers.cpeParts = lib.meta.cpeFullVersionWithVendor \"gnu\" version;\n  };\n}\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":630,"column":3},"path":["lib","meta","cpeFullVersionWithVendor"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.dontDistribute","path":["lib","meta","dontDistribute"],"aliases":[["lib","dontDistribute"]],"signature":"dontDistribute :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":81,"column":3},"attr_expr":"dontDistribute = drv: addMetaAttrs { hydraPlatforms = [ ]; } drv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":81,"column":20},"lambda_expr":"dontDistribute = drv: addMetaAttrs { hydraPlatforms = [ ]; } drv;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":81,"column":3},"path":["lib","meta","dontDistribute"],"pos_type":"Attribute"}},"content":{"content":"\nDisable Hydra builds of given derivation.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\ndontDistribute :: Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":81,"column":3},"path":["lib","meta","dontDistribute"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.getExe","path":["lib","meta","getExe"],"aliases":[["lib","getExe"]],"signature":"getExe :: Derivation -> StorePath\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":526,"column":3},"attr_expr":"getExe =\n    x:\n    getExe' x (\n      x.meta.mainProgram or (\n        # This could be turned into an error when 23.05 is at end of life\n        lib.warn\n          \"getExe: Package ${\n            lib.strings.escapeNixIdentifier x.meta.name or x.pname or x.name\n          } does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo \\\"bar\\\".\"\n          lib.getName\n          x\n      )\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":527,"column":5},"lambda_expr":"getExe =\n    x:\n    getExe' x (\n      x.meta.mainProgram or (\n        # This could be turned into an error when 23.05 is at end of life\n        lib.warn\n          \"getExe: Package ${\n            lib.strings.escapeNixIdentifier x.meta.name or x.pname or x.name\n          } does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo \\\"bar\\\".\"\n          lib.getName\n          x\n      )\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":526,"column":3},"path":["lib","meta","getExe"],"pos_type":"Attribute"}},"content":{"content":"\nGet the path to the main program of a package based on `meta.mainProgram`\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n# Type\n\n```\ngetExe :: Derivation -> StorePath\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getExe` usage example\n\n```nix\ngetExe pkgs.hello\n=> \"/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello\"\ngetExe pkgs.mustache-go\n=> \"/nix/store/am9ml4f4ywvivxnkiaqwr0hyxka1xjsf-mustache-go-1.3.0/bin/mustache\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":526,"column":3},"path":["lib","meta","getExe"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.getExe' (Prime)","path":["lib","meta","getExe'"],"aliases":[["lib","getExe'"]],"signature":"getExe' :: Derivation -> String -> StorePath\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":572,"column":3},"attr_expr":"getExe' =\n    x: y:\n    assert assertMsg (isDerivation x)\n      \"lib.meta.getExe': The first argument is of type ${typeOf x}, but it should be a derivation instead.\";\n    assert assertMsg (isString y)\n      \"lib.meta.getExe': The second argument is of type ${typeOf y}, but it should be a string instead.\";\n    assert assertMsg (match \".*/.*\" y == null)\n      \"lib.meta.getExe': The second argument \\\"${y}\\\" is a nested path with a \\\"/\\\" character, but it should just be the name of the executable instead.\";\n    \"${getBin x}/bin/${y}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":573,"column":5},"lambda_expr":"getExe' =\n    x: y:\n    assert assertMsg (isDerivation x)\n      \"lib.meta.getExe': The first argument is of type ${typeOf x}, but it should be a derivation instead.\";\n    assert assertMsg (isString y)\n      \"lib.meta.getExe': The second argument is of type ${typeOf y}, but it should be a string instead.\";\n    assert assertMsg (match \".*/.*\" y == null)\n      \"lib.meta.getExe': The second argument \\\"${y}\\\" is a nested path with a \\\"/\\\" character, but it should just be the name of the executable instead.\";\n    \"${getBin x}/bin/${y}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":572,"column":3},"path":["lib","meta","getExe'"],"pos_type":"Attribute"}},"content":{"content":"\nGet the path of a program of a derivation.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\ngetExe' :: Derivation -> String -> StorePath\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getExe'` usage example\n\n```nix\ngetExe' pkgs.hello \"hello\"\n=> \"/nix/store/g124820p9hlv4lj8qplzxw1c44dxaw1k-hello-2.12/bin/hello\"\ngetExe' pkgs.imagemagick \"convert\"\n=> \"/nix/store/5rs48jamq7k6sal98ymj9l4k2bnwq515-imagemagick-7.1.1-15/bin/convert\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":572,"column":3},"path":["lib","meta","getExe'"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.getLicenseFromSpdxId","path":["lib","meta","getLicenseFromSpdxId"],"aliases":[["lib","getLicenseFromSpdxId"]],"signature":"getLicenseFromSpdxId :: String -> {\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n}\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":433,"column":3},"attr_expr":"getLicenseFromSpdxId =\n    licstr:\n    getLicenseFromSpdxIdOr licstr (\n      lib.warn \"getLicenseFromSpdxId: No license with the given SPDX ID found: ${licstr}\" {\n        shortName = licstr;\n        spdxId = licstr;\n      }\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":434,"column":5},"lambda_expr":"getLicenseFromSpdxId =\n    licstr:\n    getLicenseFromSpdxIdOr licstr (\n      lib.warn \"getLicenseFromSpdxId: No license with the given SPDX ID found: ${licstr}\" {\n        shortName = licstr;\n        spdxId = licstr;\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":433,"column":3},"path":["lib","meta","getLicenseFromSpdxId"],"pos_type":"Attribute"}},"content":{"content":"\nGet the corresponding attribute in lib.licenses from the SPDX ID\nor warn and fallback to `{ shortName = <license string>; }`.\n\nFor SPDX IDs, see https://spdx.org/licenses.\nNote that some SPDX licenses might be missing.\n\n# Type\n\n```\ngetLicenseFromSpdxId :: String -> {\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n}\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getLicenseFromSpdxId` usage example\n\n```nix\nlib.getLicenseFromSpdxId \"MIT\" == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxId \"mIt\" == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxId \"MY LICENSE\"\n=> trace: warning: getLicenseFromSpdxId: No license matches the given SPDX ID: MY LICENSE\n=> { shortName = \"MY LICENSE\"; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":433,"column":3},"path":["lib","meta","getLicenseFromSpdxId"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.getLicenseFromSpdxIdOr","path":["lib","meta","getLicenseFromSpdxIdOr"],"aliases":[["lib","getLicenseFromSpdxIdOr"]],"signature":"getLicenseFromSpdxIdOr :: String -> a -> ({\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n} | a)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":489,"column":3},"attr_expr":"getLicenseFromSpdxIdOr =\n    let\n      lowercaseLicenses = lib.mapAttrs' (name: value: {\n        name = lib.toLower name;\n        inherit value;\n      }) licensesSpdx;\n    in\n    licstr: default: lowercaseLicenses.${lib.toLower licstr} or default;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":496,"column":5},"lambda_expr":"licstr: default: lowercaseLicenses.${lib.toLower licstr} or default","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":489,"column":3},"path":["lib","meta","getLicenseFromSpdxIdOr"],"pos_type":"Attribute"}},"content":{"content":"\nGet the corresponding attribute in lib.licenses from the SPDX ID\nor fallback to the given default value.\n\nFor SPDX IDs, see https://spdx.org/licenses.\nNote that some SPDX licenses might be missing.\n\n# Inputs\n\n`licstr`\n: 1\\. SPDX ID string to find a matching license\n\n`default`\n: 2\\. Fallback value when a match is not found\n\n# Type\n\n```\ngetLicenseFromSpdxIdOr :: String -> a -> ({\n  deprecated :: Bool;\n  free :: Bool;\n  fullName :: String;\n  redistributable :: Bool;\n  shortName :: String;\n  spdxId :: String;\n  url :: String;\n} | a)\n```\n\n# Examples\n:::{.example}\n## `lib.meta.getLicenseFromSpdxIdOr` usage example\n\n```nix\nlib.getLicenseFromSpdxIdOr \"MIT\" null == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxId \"mIt\" null == lib.licenses.mit\n=> true\nlib.getLicenseFromSpdxIdOr \"MY LICENSE\" lib.licenses.free == lib.licenses.free\n=> true\nlib.getLicenseFromSpdxIdOr \"MY LICENSE\" null\n=> null\nlib.getLicenseFromSpdxIdOr \"MY LICENSE\" (throw \"No SPDX ID matches MY LICENSE\")\n=> error: No SPDX ID matches MY LICENSE\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":489,"column":3},"path":["lib","meta","getLicenseFromSpdxIdOr"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.hiPrio","path":["lib","meta","hiPrio"],"aliases":[["lib","hiPrio"]],"signature":"hiPrio :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":262,"column":3},"attr_expr":"hiPrio = setPrio (-10);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":58,"column":15},"lambda_expr":"drv:\n    if drv ? overrideAttrs then\n      drv.overrideAttrs (old: {\n        meta = (old.meta or { }) // newAttrs;\n      })\n    else\n      drv // { meta = (drv.meta or { }) // newAttrs; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":262,"column":3},"path":["lib","meta","hiPrio"],"pos_type":"Attribute"}},"content":{"content":"\nIncrease the nix-env priority of the package, i.e., this\nversion/variant of the package will be preferred.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhiPrio :: Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":262,"column":3},"path":["lib","meta","hiPrio"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.hiPrioSet","path":["lib","meta","hiPrioSet"],"aliases":[["lib","hiPrioSet"]],"signature":"hiPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":279,"column":3},"attr_expr":"hiPrioSet = set: mapDerivationAttrset hiPrio set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":279,"column":15},"lambda_expr":"hiPrioSet = set: mapDerivationAttrset hiPrio set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":279,"column":3},"path":["lib","meta","hiPrioSet"],"pos_type":"Attribute"}},"content":{"content":"\nApply `hiPrio` to an attrset with derivations.\n\n# Inputs\n\n`set`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhiPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":279,"column":3},"path":["lib","meta","hiPrioSet"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.lowPrio","path":["lib","meta","lowPrio"],"aliases":[["lib","lowPrio"]],"signature":"lowPrio :: Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":227,"column":3},"attr_expr":"lowPrio = setPrio 10;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":58,"column":15},"lambda_expr":"drv:\n    if drv ? overrideAttrs then\n      drv.overrideAttrs (old: {\n        meta = (old.meta or { }) // newAttrs;\n      })\n    else\n      drv // { meta = (drv.meta or { }) // newAttrs; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":227,"column":3},"path":["lib","meta","lowPrio"],"pos_type":"Attribute"}},"content":{"content":"\nDecrease the nix-env priority of the package, i.e., other\nversions/variants of the package will be preferred.\n\n# Inputs\n\n`drv`\n\n: 1\\. Function argument\n\n# Type\n\n```\nlowPrio :: Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":227,"column":3},"path":["lib","meta","lowPrio"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.lowPrioSet","path":["lib","meta","lowPrioSet"],"aliases":[["lib","lowPrioSet"]],"signature":"lowPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":244,"column":3},"attr_expr":"lowPrioSet = set: mapDerivationAttrset lowPrio set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":244,"column":16},"lambda_expr":"lowPrioSet = set: mapDerivationAttrset lowPrio set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":244,"column":3},"path":["lib","meta","lowPrioSet"],"pos_type":"Attribute"}},"content":{"content":"\nApply `lowPrio` to an attrset with derivations.\n\n# Inputs\n\n`set`\n\n: 1\\. Function argument\n\n# Type\n\n```\nlowPrioSet :: { [String] :: Derivation } -> { [String] :: Derivation }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":244,"column":3},"path":["lib","meta","lowPrioSet"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.mapDerivationAttrset","path":["lib","meta","mapDerivationAttrset"],"aliases":[["lib","mapDerivationAttrset"]],"signature":"mapDerivationAttrset :: (Derivation -> a) -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":184,"column":3},"attr_expr":"mapDerivationAttrset =\n    f: set: lib.mapAttrs (name: pkg: if lib.isDerivation pkg then (f pkg) else pkg) set;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":185,"column":5},"lambda_expr":"mapDerivationAttrset =\n    f: set: lib.mapAttrs (name: pkg: if lib.isDerivation pkg then (f pkg) else pkg) set;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":184,"column":3},"path":["lib","meta","mapDerivationAttrset"],"pos_type":"Attribute"}},"content":{"content":"\nApply a function to each derivation and only to derivations in an attrset.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`set`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmapDerivationAttrset :: (Derivation -> a) -> AttrSet -> AttrSet\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":184,"column":3},"path":["lib","meta","mapDerivationAttrset"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.platformMatch","path":["lib","meta","platformMatch"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":317,"column":3},"attr_expr":"platformMatch =\n    platform: elem:\n    (\n      # Check with simple string comparison if elem was a string.\n      #\n      # The majority of comparisons done with this function will be against meta.platforms\n      # which contains a simple platform string.\n      #\n      # Avoiding an attrset allocation results in significant  performance gains (~2-30) across the board in OfBorg\n      # because this is a hot path for nixpkgs.\n      if isString elem then\n        platform ? system && elem == platform.system\n      else\n        matchAttrs (\n          # Normalize platform attrset.\n          if elem ? parsed then elem else { parsed = elem; }\n        ) platform\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":318,"column":5},"lambda_expr":"platformMatch =\n    platform: elem:\n    (\n      # Check with simple string comparison if elem was a string.\n      #\n      # The majority of comparisons done with this function will be against meta.platforms\n      # which contains a simple platform string.\n      #\n      # Avoiding an attrset allocation results in significant  performance gains (~2-30) across the board in OfBorg\n      # because this is a hot path for nixpkgs.\n      if isString elem then\n        platform ? system && elem == platform.system\n      else\n        matchAttrs (\n          # Normalize platform attrset.\n          if elem ? parsed then elem else { parsed = elem; }\n        ) platform\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":317,"column":3},"path":["lib","meta","platformMatch"],"pos_type":"Attribute"}},"content":{"content":"\nCheck to see if a platform is matched by the given `meta.platforms`\nelement.\n\nA `meta.platform` pattern is either\n\n1. (legacy) a system string.\n\n2. (modern) a pattern for the entire platform structure (see `lib.systems.inspect.platformPatterns`).\n\n3. (modern) a pattern for the platform `parsed` field (see `lib.systems.inspect.patterns`).\n\nWe can inject these into a pattern for the whole of a structured platform,\nand then match that.\n\n# Inputs\n\n`platform`\n\n: 1\\. Function argument\n\n`elem`\n\n: 2\\. Function argument\n\n# Examples\n:::{.example}\n## `lib.meta.platformMatch` usage example\n\n```nix\nlib.meta.platformMatch { system = \"aarch64-darwin\"; } \"aarch64-darwin\"\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":317,"column":3},"path":["lib","meta","platformMatch"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.setName","path":["lib","meta","setName"],"aliases":[["lib","setName"]],"signature":"setName :: String -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":106,"column":3},"attr_expr":"setName = name: drv: drv // { inherit name; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":106,"column":13},"lambda_expr":"setName = name: drv: drv // { inherit name; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":106,"column":3},"path":["lib","meta","setName"],"pos_type":"Attribute"}},"content":{"content":"\nChange the [symbolic name of a derivation](https://nixos.org/manual/nix/stable/language/derivations.html#attr-name).\n\n:::{.warning}\nDependent derivations will be rebuilt when the symbolic name is changed.\n:::\n\n# Inputs\n\n`name`\n\n: 1\\. Function argument\n\n`drv`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsetName :: String -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":106,"column":3},"path":["lib","meta","setName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.setPrio","path":["lib","meta","setPrio"],"aliases":[["lib","setPrio"]],"signature":"setPrio :: Int -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":209,"column":3},"attr_expr":"setPrio = priority: addMetaAttrs { inherit priority; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":209,"column":13},"lambda_expr":"setPrio = priority: addMetaAttrs { inherit priority; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":209,"column":3},"path":["lib","meta","setPrio"],"pos_type":"Attribute"}},"content":{"content":"\nSet the nix-env priority of the package. Note that higher values are lower priority, and vice versa.\n\n# Inputs\n\n`priority`\n: 1\\. The priority to set.\n\n`drv`\n: 2\\. Function argument\n\n# Type\n\n```\nsetPrio :: Int -> Derivation -> Derivation\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":209,"column":3},"path":["lib","meta","setPrio"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.meta.updateName","path":["lib","meta","updateName"],"aliases":[["lib","updateName"]],"signature":"updateName :: (String -> String) -> Derivation -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":137,"column":3},"attr_expr":"updateName = updater: drv: drv // { name = updater (drv.name); };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":137,"column":16},"lambda_expr":"updateName = updater: drv: drv // { name = updater (drv.name); };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":137,"column":3},"path":["lib","meta","updateName"],"pos_type":"Attribute"}},"content":{"content":"\nLike `setName`, but takes the previous name as an argument.\n\n# Inputs\n\n`updater`\n\n: 1\\. Function argument\n\n`drv`\n\n: 2\\. Function argument\n\n# Type\n\n```\nupdateName :: (String -> String) -> Derivation -> Derivation\n```\n\n# Examples\n:::{.example}\n## `lib.meta.updateName` usage example\n\n```nix\nupdateName (oldName: oldName + \"-experimental\") somePkg\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/meta.nix","line":137,"column":3},"path":["lib","meta","updateName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.checkFlag","path":["lib","misc","checkFlag"],"aliases":[["lib","checkFlag"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":443,"column":5},"attr_expr":"checkFlag","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":85,"column":5},"lambda_expr":"checkFlag =\n    attrSet: name:\n    if name == \"true\" then\n      true\n    else if name == \"false\" then\n      false\n    else if (elem name (attrByPath [ \"flags\" ] [ ] attrSet)) then\n      true\n    else\n      attrByPath [ name ] false attrSet;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":85,"column":5},"path":["lib","misc","checkFlag"],"pos_type":"Lambda"}},"content":{"content":"Returns true only if there is an attribute and it is true.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":85,"column":5},"path":["lib","misc","checkFlag"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.checkReqs","path":["lib","misc","checkReqs"],"aliases":[["lib","checkReqs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":444,"column":5},"attr_expr":"checkReqs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":114,"column":5},"lambda_expr":"checkReqs =\n    attrSet: argList: condList:\n    (foldr and true (\n      map (\n        x:\n        let\n          name = (head x);\n        in\n\n        (\n          (checkFlag attrSet name)\n          -> (foldr and true (\n            map (\n              y:\n              let\n                val = (getValue attrSet argList y);\n              in\n              (val != null) && (val != false)\n            ) (tail x)\n          ))\n        )\n      ) condList\n    ));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":114,"column":5},"path":["lib","misc","checkReqs"],"pos_type":"Lambda"}},"content":{"content":"Output : are reqs satisfied? It's asserted.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":114,"column":5},"path":["lib","misc","checkReqs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.closePropagation","path":["lib","misc","closePropagation"],"aliases":[["lib","closePropagation"],["lib","misc","closePropagationFast"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":445,"column":5},"attr_expr":"closePropagation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"lambda_expr":"closePropagationFast =\n    list:\n    map (x: x.val) (\n      builtins.genericClosure {\n        startSet = map (x: {\n          key = x.outPath;\n          val = x;\n        }) (builtins.filter (x: x != null) list);\n        operator =\n          item:\n          if !builtins.isAttrs item.val then\n            [ ]\n          else\n            builtins.concatMap (\n              x:\n              if x != null then\n                [\n                  {\n                    key = x.outPath;\n                    val = x;\n                  }\n                ]\n              else\n                [ ]\n            ) ((item.val.propagatedBuildInputs or [ ]) ++ (item.val.propagatedNativeBuildInputs or [ ]));\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"path":["lib","misc","closePropagation"],"pos_type":"Lambda"}},"content":{"content":"See https://github.com/NixOS/nixpkgs/pull/194391 for details.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"path":["lib","misc","closePropagation"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.closePropagationFast","path":["lib","misc","closePropagationFast"],"aliases":[["lib","closePropagation"],["lib","misc","closePropagation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":446,"column":5},"attr_expr":"closePropagationFast","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"lambda_expr":"closePropagationFast =\n    list:\n    map (x: x.val) (\n      builtins.genericClosure {\n        startSet = map (x: {\n          key = x.outPath;\n          val = x;\n        }) (builtins.filter (x: x != null) list);\n        operator =\n          item:\n          if !builtins.isAttrs item.val then\n            [ ]\n          else\n            builtins.concatMap (\n              x:\n              if x != null then\n                [\n                  {\n                    key = x.outPath;\n                    val = x;\n                  }\n                ]\n              else\n                [ ]\n            ) ((item.val.propagatedBuildInputs or [ ]) ++ (item.val.propagatedNativeBuildInputs or [ ]));\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"path":["lib","misc","closePropagationFast"],"pos_type":"Lambda"}},"content":{"content":"See https://github.com/NixOS/nixpkgs/pull/194391 for details.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":243,"column":5},"path":["lib","misc","closePropagationFast"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.closePropagationSlow","path":["lib","misc","closePropagationSlow"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":447,"column":5},"attr_expr":"closePropagationSlow","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":234,"column":26},"lambda_expr":"list: (uniqList { inputList = (innerClosePropagation [ ] list); })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":234,"column":26},"path":["lib","misc","closePropagationSlow"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":234,"column":26},"path":["lib","misc","closePropagationSlow"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.condConcat","path":["lib","misc","condConcat"],"aliases":[["lib","condConcat"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":448,"column":5},"attr_expr":"condConcat","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":179,"column":5},"lambda_expr":"name: list: checker:\n    if list == [ ] then\n      name\n    else if checker (head list) then\n      condConcat (name + (head (tail list))) (tail (tail list)) checker\n    else\n      condConcat name (tail (tail list)) checker","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":179,"column":5},"path":["lib","misc","condConcat"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":179,"column":5},"path":["lib","misc","condConcat"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.defaultMerge","path":["lib","misc","defaultMerge"],"aliases":[["lib","defaultMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":449,"column":5},"attr_expr":"defaultMerge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":37,"column":18},"lambda_expr":"x: y: x // (defaultMergeArg x y)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":37,"column":18},"path":["lib","misc","defaultMerge"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":37,"column":18},"path":["lib","misc","defaultMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.defaultMergeArg","path":["lib","misc","defaultMergeArg"],"aliases":[["lib","defaultMergeArg"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":450,"column":5},"attr_expr":"defaultMergeArg","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":36,"column":21},"lambda_expr":"x: y: if builtins.isAttrs y then y else (y x)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":36,"column":21},"path":["lib","misc","defaultMergeArg"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":36,"column":21},"path":["lib","misc","defaultMergeArg"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.foldArgs","path":["lib","misc","foldArgs"],"aliases":[["lib","foldArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":454,"column":5},"attr_expr":"foldArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":39,"column":5},"lambda_expr":"merger: f: init: x:\n    let\n      arg = (merger init (defaultMergeArg init x));\n      # now add the function with composed args already applied to the final attrs\n      base = (\n        setAttrMerge \"passthru\" { } (f arg) (\n          z:\n          z\n          // {\n            function = foldArgs merger f arg;\n            args = (attrByPath [ \"passthru\" \"args\" ] { } z) // x;\n          }\n        )\n      );\n      withStdOverrides = base // {\n        override = base.passthru.function;\n      };\n    in\n    withStdOverrides","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":39,"column":5},"path":["lib","misc","foldArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":39,"column":5},"path":["lib","misc","foldArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.getValue","path":["lib","misc","getValue"],"aliases":[["lib","getValue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":455,"column":5},"attr_expr":"getValue","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":98,"column":5},"lambda_expr":"getValue =\n    attrSet: argList: name:\n    (attrByPath [ name ] (\n      if checkFlag attrSet name then\n        true\n      else if argList == [ ] then\n        null\n      else\n        let\n          x = builtins.head argList;\n        in\n        if (head x) == name then (head (tail x)) else (getValue attrSet (tail argList) name)\n    ) attrSet);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":98,"column":5},"path":["lib","misc","getValue"],"pos_type":"Lambda"}},"content":{"content":"Output : its value or default.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":98,"column":5},"path":["lib","misc","getValue"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.ifEnable","path":["lib","misc","ifEnable"],"aliases":[["lib","ifEnable"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":456,"column":5},"attr_expr":"ifEnable","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":70,"column":5},"lambda_expr":"ifEnable =\n    cond: val:\n    if cond then\n      val\n    else if builtins.isList val then\n      [ ]\n    else if builtins.isAttrs val then\n      { }\n    # else if builtins.isString val then \"\"\n    else if val == true || val == false then\n      false\n    else\n      null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":70,"column":5},"path":["lib","misc","ifEnable"],"pos_type":"Lambda"}},"content":{"content":"of the second argument.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":70,"column":5},"path":["lib","misc","ifEnable"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.imap","path":["lib","misc","imap"],"aliases":[["lib","imap"],["lib","imap1"],["lib","lists","imap1"]],"signature":"imap1 :: (Int -> a -> b) -> [a] -> [b]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":457,"column":5},"attr_expr":"imap","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":11},"lambda_expr":"imap1 = f: list: genList (n: f (n + 1) (elemAt list n)) (length list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}},"content":{"content":"\nMap with index starting from 1\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`list`\n\n: 2\\. Function argument\n\n# Type\n\n```\nimap1 :: (Int -> a -> b) -> [a] -> [b]\n```\n\n# Examples\n:::{.example}\n## `lib.lists.imap1` usage example\n\n```nix\nimap1 (i: v: \"${v}-${toString i}\") [\"a\" \"b\"]\n=> [ \"a-1\" \"b-2\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":347,"column":3},"path":["lib","lists","imap1"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.innerClosePropagation","path":["lib","misc","innerClosePropagation"],"aliases":[["lib","innerClosePropagation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":458,"column":5},"attr_expr":"innerClosePropagation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":212,"column":5},"lambda_expr":"acc: xs:\n    if xs == [ ] then\n      acc\n    else\n      let\n        y = head xs;\n        ys = tail xs;\n      in\n      if !isAttrs y then\n        innerClosePropagation acc ys\n      else\n        let\n          acc' = [ y ] ++ acc;\n        in\n        innerClosePropagation acc' (uniqList {\n          inputList =\n            (maybeAttrNullable \"propagatedBuildInputs\" [ ] y)\n            ++ (maybeAttrNullable \"propagatedNativeBuildInputs\" [ ] y)\n            ++ ys;\n          acc = acc';\n        })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":212,"column":5},"path":["lib","misc","innerClosePropagation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":212,"column":5},"path":["lib","misc","innerClosePropagation"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.innerModifySumArgs","path":["lib","misc","innerModifySumArgs"],"aliases":[["lib","innerModifySumArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":459,"column":5},"attr_expr":"innerModifySumArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":207,"column":5},"lambda_expr":"f: x: a: b:\n    if b == null then (f a b) // x else innerModifySumArgs f x (a // b)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":207,"column":5},"path":["lib","misc","innerModifySumArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":207,"column":5},"path":["lib","misc","innerModifySumArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.lazyGenericClosure","path":["lib","misc","lazyGenericClosure"],"aliases":[["lib","lazyGenericClosure"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":460,"column":5},"attr_expr":"lazyGenericClosure","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":188,"column":5},"lambda_expr":"{ startSet, operator }:\n    let\n      work =\n        list: doneKeys: result:\n        if list == [ ] then\n          result\n        else\n          let\n            x = head list;\n            key = x.key;\n          in\n          if elem key doneKeys then\n            work (tail list) doneKeys result\n          else\n            work (tail list ++ operator x) ([ key ] ++ doneKeys) ([ x ] ++ result);\n    in\n    work startSet [ ] [ ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":188,"column":5},"path":["lib","misc","lazyGenericClosure"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":188,"column":5},"path":["lib","misc","lazyGenericClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.maybeAttr","path":["lib","misc","maybeAttr"],"aliases":[["lib","maybeAttr"],["lib","maybeAttrNullable"],["lib","misc","maybeAttrNullable"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":461,"column":5},"attr_expr":"maybeAttr","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"lambda_expr":"maybeAttr =\n    name: default: attrs:\n    attrs.${name} or default;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","misc","maybeAttr"],"pos_type":"Lambda"}},"content":{"content":"shortcut for attrByPath [\"name\"] default attrs","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","misc","maybeAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.maybeAttrNullable","path":["lib","misc","maybeAttrNullable"],"aliases":[["lib","maybeAttr"],["lib","maybeAttrNullable"],["lib","misc","maybeAttr"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":462,"column":5},"attr_expr":"maybeAttrNullable","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"lambda_expr":"maybeAttr =\n    name: default: attrs:\n    attrs.${name} or default;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","misc","maybeAttrNullable"],"pos_type":"Lambda"}},"content":{"content":"shortcut for attrByPath [\"name\"] default attrs","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":64,"column":5},"path":["lib","misc","maybeAttrNullable"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.maybeEnv","path":["lib","misc","maybeEnv"],"aliases":[["lib","maybeEnv"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":463,"column":5},"attr_expr":"maybeEnv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":30,"column":5},"lambda_expr":"maybeEnv =\n    name: default:\n    let\n      value = builtins.getEnv name;\n    in\n    if value == \"\" then default else value;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":30,"column":5},"path":["lib","misc","maybeEnv"],"pos_type":"Lambda"}},"content":{"content":"returns default if env var is not set","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":30,"column":5},"path":["lib","misc","maybeEnv"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.mergeAttrByFunc","path":["lib","misc","mergeAttrByFunc"],"aliases":[["lib","mergeAttrByFunc"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":465,"column":5},"attr_expr":"mergeAttrByFunc","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":344,"column":5},"lambda_expr":"mergeAttrByFunc =\n    x: y:\n    let\n      mergeAttrBy2 = {\n        mergeAttrBy = mergeAttrs;\n      }\n      // (maybeAttr \"mergeAttrBy\" { } x)\n      // (maybeAttr \"mergeAttrBy\" { } y);\n    in\n    foldr mergeAttrs { } [\n      x\n      y\n      (mapAttrs\n        (\n          a: v: # merge special names using given functions\n          if x ? ${a} then\n            if y ? ${a} then\n              v x.${a} y.${a} # both have attr, use merge func\n            else\n              x.${a} # only x has attr\n          else\n            y.${a} # only y has attr)\n        )\n        (\n          removeAttrs mergeAttrBy2\n            # don't merge attrs which are neither in x nor y\n            (filter (a: !x ? ${a} && !y ? ${a}) (attrNames mergeAttrBy2))\n        )\n      )\n    ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":344,"column":5},"path":["lib","misc","mergeAttrByFunc"],"pos_type":"Lambda"}},"content":{"content":"foldArgs, composedArgsAndFun or applyAndFun. Example: composableDerivation in all-packages.nix","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":344,"column":5},"path":["lib","misc","mergeAttrByFunc"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.mergeAttrsByFuncDefaults","path":["lib","misc","mergeAttrsByFuncDefaults"],"aliases":[["lib","mergeAttrsByFuncDefaults"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":466,"column":5},"attr_expr":"mergeAttrsByFuncDefaults","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/lists.nix","line":196,"column":14},"lambda_expr":"list:\n    let\n      foldl' = n: if n == -1 then nul else op (foldl' (n - 1)) (elemAt list n);\n    in\n    foldl' (length list - 1)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"lib.misc.mergeAttrsByFuncDefaultsClean","path":["lib","misc","mergeAttrsByFuncDefaultsClean"],"aliases":[["lib","mergeAttrsByFuncDefaultsClean"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":467,"column":5},"attr_expr":"mergeAttrsByFuncDefaultsClean","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":374,"column":35},"lambda_expr":"list: removeAttrs (mergeAttrsByFuncDefaults list) [ \"mergeAttrBy\" ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":374,"column":35},"path":["lib","misc","mergeAttrsByFuncDefaultsClean"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":374,"column":35},"path":["lib","misc","mergeAttrsByFuncDefaultsClean"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.mergeAttrsConcatenateValues","path":["lib","misc","mergeAttrsConcatenateValues"],"aliases":[["lib","mergeAttrsConcatenateValues"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":468,"column":5},"attr_expr":"mergeAttrsConcatenateValues","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":8},"lambda_expr":"set1: set2:\n    foldr (n: set: if set ? ${n} then setAttr set n (f set.${n} set2.${n}) else set) (set2 // set1) (\n      attrNames set2\n    )","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.misc.mergeAttrsNoOverride","path":["lib","misc","mergeAttrsNoOverride"],"aliases":[["lib","mergeAttrsNoOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":469,"column":5},"attr_expr":"mergeAttrsNoOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":307,"column":5},"lambda_expr":"mergeAttrsNoOverride =\n    {\n      mergeLists ? [\n        \"buildInputs\"\n        \"propagatedBuildInputs\"\n      ],\n      overrideSnd ? [ \"buildPhase\" ],\n    }:\n    attrs1: attrs2:\n    foldr (\n      n: set:\n      setAttr set n (\n        if set ? ${n} then # merge\n          if\n            elem n mergeLists # attribute contains list, merge them by concatenating\n          then\n            attrs2.${n} ++ attrs1.${n}\n          else if elem n overrideSnd then\n            attrs1.${n}\n          else\n            throw \"error mergeAttrsNoOverride, attribute ${n} given in both attributes - no merge func defined\"\n        else\n          attrs2.${n} # add attribute not existing in attr1\n      )\n    ) attrs1 (attrNames attrs2);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":307,"column":5},"path":["lib","misc","mergeAttrsNoOverride"],"pos_type":"Lambda"}},"content":{"content":"! deprecated, use mergeAttrByFunc instead","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":307,"column":5},"path":["lib","misc","mergeAttrsNoOverride"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.mergeAttrsWithFunc","path":["lib","misc","mergeAttrsWithFunc"],"aliases":[["lib","mergeAttrsWithFunc"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":470,"column":5},"attr_expr":"mergeAttrsWithFunc","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":5},"lambda_expr":"mergeAttrsWithFunc =\n    f: set1: set2:\n    foldr (n: set: if set ? ${n} then setAttr set n (f set.${n} set2.${n}) else set) (set2 // set1) (\n      attrNames set2\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":5},"path":["lib","misc","mergeAttrsWithFunc"],"pos_type":"Lambda"}},"content":{"content":"exists in both sets","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":290,"column":5},"path":["lib","misc","mergeAttrsWithFunc"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.modifySumArgs","path":["lib","misc","modifySumArgs"],"aliases":[["lib","modifySumArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":471,"column":5},"attr_expr":"modifySumArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":209,"column":19},"lambda_expr":"f: x: innerModifySumArgs f x { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":209,"column":19},"path":["lib","misc","modifySumArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":209,"column":19},"path":["lib","misc","modifySumArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.nixType","path":["lib","misc","nixType"],"aliases":[["lib","nixType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":472,"column":5},"attr_expr":"nixType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":405,"column":5},"lambda_expr":"x:\n    if isAttrs x then\n      if x ? outPath then \"derivation\" else \"attrs\"\n    else if isFunction x then\n      \"function\"\n    else if isList x then\n      \"list\"\n    else if x == true then\n      \"bool\"\n    else if x == false then\n      \"bool\"\n    else if x == null then\n      \"null\"\n    else if isInt x then\n      \"int\"\n    else\n      \"string\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":405,"column":5},"path":["lib","misc","nixType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":405,"column":5},"path":["lib","misc","nixType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.nvs","path":["lib","misc","nvs"],"aliases":[["lib","nvs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":473,"column":5},"attr_expr":"nvs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":273,"column":9},"lambda_expr":"nvs = name: value: listToAttrs [ (nameValuePair name value) ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":273,"column":9},"path":["lib","misc","nvs"],"pos_type":"Lambda"}},"content":{"content":"attribute set containing one attribute","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":273,"column":9},"path":["lib","misc","nvs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.setAttr","path":["lib","misc","setAttr"],"aliases":[["lib","setAttr"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":474,"column":5},"attr_expr":"setAttr","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":276,"column":5},"lambda_expr":"setAttr =\n    set: name: v:\n    set // (nvs name v);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":276,"column":5},"path":["lib","misc","setAttr"],"pos_type":"Lambda"}},"content":{"content":"adds / replaces an attribute of an attribute set","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":276,"column":5},"path":["lib","misc","setAttr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.setAttrMerge","path":["lib","misc","setAttrMerge"],"aliases":[["lib","setAttrMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":475,"column":5},"attr_expr":"setAttrMerge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":283,"column":5},"lambda_expr":"setAttrMerge =\n    name: default: attrs: f:\n    setAttr attrs name (f (maybeAttr name default attrs));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":283,"column":5},"path":["lib","misc","setAttrMerge"],"pos_type":"Lambda"}},"content":{"content":"setAttrMerge \"a\" [] {         } (x: x ++ [3]) -> { a = [  3]; }","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":283,"column":5},"path":["lib","misc","setAttrMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.uniqList","path":["lib","misc","uniqList"],"aliases":[["lib","uniqList"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":476,"column":5},"attr_expr":"uniqList","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":139,"column":5},"lambda_expr":"uniqList =\n    {\n      inputList,\n      acc ? [ ],\n    }:\n    let\n      go =\n        xs: acc:\n        if xs == [ ] then\n          [ ]\n        else\n          let\n            x = head xs;\n            y = if elem x acc then [ ] else [ x ];\n          in\n          y ++ go (tail xs) (y ++ acc);\n    in\n    go inputList acc;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":139,"column":5},"path":["lib","misc","uniqList"],"pos_type":"Lambda"}},"content":{"content":"This function has O(n^2) performance.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":139,"column":5},"path":["lib","misc","uniqList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.uniqListExt","path":["lib","misc","uniqListExt"],"aliases":[["lib","uniqListExt"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":477,"column":5},"attr_expr":"uniqListExt","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":158,"column":5},"lambda_expr":"{\n      inputList,\n      outputList ? [ ],\n      getter ? (x: x),\n      compare ? (x: y: x == y),\n    }:\n    if inputList == [ ] then\n      outputList\n    else\n      let\n        x = head inputList;\n        isX = y: (compare (getter y) (getter x));\n        newOutputList = outputList ++ (if any isX outputList then [ ] else [ x ]);\n      in\n      uniqListExt {\n        outputList = newOutputList;\n        inputList = (tail inputList);\n        inherit getter compare;\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":158,"column":5},"path":["lib","misc","uniqListExt"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":158,"column":5},"path":["lib","misc","uniqListExt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.applyModuleArgsIfFunction","path":["lib","modules","applyModuleArgsIfFunction"],"aliases":[["lib","applyModuleArgsIfFunction"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":705,"column":5},"lambda_expr":"key: f: args@{ config, ... }: if isFunction f then applyModuleArgs key f args else f","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":705,"column":5},"path":["lib","modules","applyModuleArgsIfFunction"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":705,"column":5},"path":["lib","modules","applyModuleArgsIfFunction"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.collectModules","path":["lib","modules","collectModules"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":590,"column":5},"lambda_expr":"modulesPath: initialModules: args: {\n      modules = filterModules modulesPath (collectStructuredModules unknownModule \"\" initialModules args);\n      # Intentionally not shared with `modules` above: this allows\n      # the return value of `collectStructuredModules`\n      # to be garbage collected after `filterModules` returns.\n      graph = toGraph modulesPath (collectStructuredModules unknownModule \"\" initialModules args);\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":590,"column":5},"path":["lib","modules","collectModules"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":590,"column":5},"path":["lib","modules","collectModules"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.dischargeProperties","path":["lib","modules","dischargeProperties"],"aliases":[["lib","dischargeProperties"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1396,"column":5},"lambda_expr":"dischargeProperties =\n    def:\n    if def._type or \"\" == \"merge\" then\n      concatMap dischargeProperties def.contents\n    else if def._type or \"\" == \"if\" then\n      if isBool def.condition then\n        if def.condition then dischargeProperties def.content else [ ]\n      else\n        throw \"‘mkIf’ called with a non-Boolean condition\"\n    else\n      [ def ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1396,"column":5},"path":["lib","modules","dischargeProperties"],"pos_type":"Lambda"}},"content":{"content":"\nGiven a config value, expand mkMerge properties, and discharge\nany mkIf conditions.  That is, this is the place where mkIf\nconditions are actually evaluated.  The result is a list of\nconfig values.  For example, ‘mkIf false x’ yields ‘[]’,\n‘mkIf true x’ yields ‘[x]’, and\n\n  mkMerge [ 1 (mkIf true 2) (mkIf true (mkIf false 3)) ]\n\nyields ‘[ 1 2 ]’.\n\n# Inputs\n\n`def`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1396,"column":5},"path":["lib","modules","dischargeProperties"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.doRename","path":["lib","modules","doRename"],"aliases":[["lib","doRename"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2317,"column":5},"attr_expr":"doRename","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1980,"column":5},"lambda_expr":"doRename =\n    {\n      # List of strings representing the attribute path of the old option.\n      from,\n      # List of strings representing the attribute path of the new option.\n      to,\n      # Boolean, whether the old option is to be included in documentation.\n      visible,\n      # Whether to warn when a value is defined for the old option.\n      # NOTE: This requires the NixOS assertions module to be imported, so\n      #        - this generally does not work in submodules\n      #        - this may or may not work outside NixOS\n      warn,\n      # A function that is applied to the option value, to form the value\n      # of the old `from` option.\n      #\n      # For example, the identity function can be passed, to return the option value unchanged.\n      # ```nix\n      # use = x: x;\n      # ```\n      #\n      # To add a warning, you can pass the partially applied `warn` function.\n      # ```nix\n      # use = lib.warn \"Obsolete option `${opt.old}' is used. Use `${opt.to}' instead.\";\n      # ```\n      use,\n      # Legacy option, enabled by default: whether to preserve the priority of definitions in `old`.\n      withPriority ? true,\n      # A boolean that defines the `mkIf` condition for `to`.\n      # If the condition evaluates to `true`, and the `to` path points into an\n      # `attrsOf (submodule ...)`, then `doRename` would cause an empty module to\n      # be created, even if the `from` option is undefined.\n      # By setting this to an expression that may return `false`, you can inhibit\n      # this undesired behavior.\n      #\n      # Example:\n      #\n      # ```nix\n      # { config, lib, ... }:\n      # let\n      #   inherit (lib) mkOption mkEnableOption types doRename;\n      # in\n      # {\n      #   options = {\n      #\n      #     # Old service\n      #     services.foo.enable = mkEnableOption \"foo\";\n      #\n      #     # New multi-instance service\n      #     services.foos = mkOption {\n      #       type = types.attrsOf (types.submodule …);\n      #     };\n      #   };\n      #   imports = [\n      #     (doRename {\n      #       from = [ \"services\" \"foo\" \"bar\" ];\n      #       to = [ \"services\" \"foos\" \"\" \"bar\" ];\n      #       visible = true;\n      #       warn = false;\n      #       use = x: x;\n      #       withPriority = true;\n      #       # Only define services.foos.\"\" if needed. (It's not just about `bar`)\n      #       condition = config.services.foo.enable;\n      #     })\n      #   ];\n      # }\n      # ```\n      condition ? true,\n    }:\n    { config, options, ... }:\n    let\n      fromOpt = getAttrFromPath from options;\n      toOf = attrByPath to (abort \"Renaming error: option `${showOption to}' does not exist.\");\n      toType =\n        let\n          opt = attrByPath to { } options;\n        in\n        opt.type or (types.submodule { });\n    in\n    {\n      options = setAttrByPath from (\n        mkOption {\n          inherit visible;\n          description = \"Alias of {option}`${showOption to}`.\";\n          apply = x: use (toOf config);\n        }\n        // optionalAttrs (toType != null) {\n          type = toType;\n        }\n      );\n      config = mkIf condition (mkMerge [\n        (optionalAttrs (options ? warnings) {\n          warnings =\n            optional (warn && fromOpt.isDefined)\n              \"The option `${showOption from}' defined in ${showFiles fromOpt.files} has been renamed to `${showOption to}'.\";\n        })\n        (\n          if withPriority then\n            mkAliasAndWrapDefsWithPriority (setAttrByPath to) fromOpt\n          else\n            mkAliasAndWrapDefinitions (setAttrByPath to) fromOpt\n        )\n      ]);\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1980,"column":5},"path":["lib","modules","doRename"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that help declares an option that has been renamed.\nWhen a value is defined for the old option, it is forwarded to the `to` option.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1980,"column":5},"path":["lib","modules","doRename"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.evalModules","path":["lib","modules","evalModules"],"aliases":[["lib","evalModules"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2318,"column":5},"attr_expr":"evalModules","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":93,"column":5},"lambda_expr":"evalModules =\n    evalModulesArgs@{\n      modules,\n      prefix ? [ ],\n      # This should only be used for special arguments that need to be evaluated\n      # when resolving module structure (like in imports). For everything else,\n      # there's _module.args. If specialArgs.modulesPath is defined it will be\n      # used as the base path for disabledModules.\n      specialArgs ? { },\n      # `class`:\n      # A nominal type for modules. When set and non-null, this adds a check to\n      # make sure that only compatible modules are imported.\n      class ? null,\n      # This would be remove in the future, Prefer _module.args option instead.\n      args ? { },\n      # This would be remove in the future, Prefer _module.check option instead.\n      check ? true,\n    }:\n    let\n      withWarnings =\n        x:\n        warnIf (evalModulesArgs ? args)\n          \"The args argument to evalModules is deprecated. Please set config._module.args instead.\"\n          warnIf\n          (evalModulesArgs ? check)\n          \"The check argument to evalModules is deprecated. Please set config._module.check instead.\"\n          x;\n\n      legacyModules =\n        optional (evalModulesArgs ? args) {\n          config = {\n            _module.args = args;\n          };\n        }\n        ++ optional (evalModulesArgs ? check) {\n          config = {\n            _module.check = mkDefault check;\n          };\n        };\n      regularModules = modules ++ legacyModules;\n\n      # This internal module declare internal options under the `_module'\n      # attribute.  These options are fragile, as they are used by the\n      # module system to change the interpretation of modules.\n      #\n      # When extended with extendModules or moduleType, a fresh instance of\n      # this module is used, to avoid conflicts and allow chaining of\n      # extendModules.\n      internalModule = rec {\n        _file = \"lib/modules.nix\";\n\n        key = _file;\n\n        options = {\n          _module.args = mkOption {\n            # Because things like `mkIf` are entirely useless for\n            # `_module.args` (because there's no way modules can check which\n            # arguments were passed), we'll use `lazyAttrsOf` which drops\n            # support for that, in turn it's lazy in its values. This means e.g.\n            # a `_module.args.pkgs = import (fetchTarball { ... }) {}` won't\n            # start a download when `pkgs` wasn't evaluated.\n            type = types.lazyAttrsOf types.raw;\n            # Only render documentation once at the root of the option tree,\n            # not for all individual submodules.\n            # Allow merging option decls to make this internal regardless.\n            ${\n              if prefix == [ ] then\n                null # unset => visible\n              else\n                \"internal\"\n            } =\n              true;\n            # TODO: Change the type of this option to a submodule with a\n            # freeformType, so that individual arguments can be documented\n            # separately\n            description = ''\n              Additional arguments passed to each module in addition to ones\n              like `lib`, `config`,\n              and `pkgs`, `modulesPath`.\n\n              This option is also available to all submodules. Submodules do not\n              inherit args from their parent module, nor do they provide args to\n              their parent module or sibling submodules. The sole exception to\n              this is the argument `name` which is provided by\n              parent modules to a submodule and contains the attribute name\n              the submodule is bound to, or a unique generated name if it is\n              not bound to an attribute.\n\n              Some arguments are already passed by default, of which the\n              following *cannot* be changed with this option:\n              - {var}`lib`: The nixpkgs library.\n              - {var}`config`: The results of all options after merging the values from all modules together.\n              - {var}`options`: The options declared in all modules.\n              - {var}`specialArgs`: The `specialArgs` argument passed to `evalModules`.\n              - All attributes of {var}`specialArgs`\n\n                Whereas option values can generally depend on other option values\n                thanks to laziness, this does not apply to `imports`, which\n                must be computed statically before anything else.\n\n                For this reason, callers of the module system can provide `specialArgs`\n                which are available during import resolution.\n\n                For NixOS, `specialArgs` includes\n                {var}`modulesPath`, which allows you to import\n                extra modules from the nixpkgs package tree without having to\n                somehow make the module aware of the location of the\n                `nixpkgs` or NixOS directories.\n                ```\n                { modulesPath, ... }: {\n                  imports = [\n                    (modulesPath + \"/profiles/minimal.nix\")\n                  ];\n                }\n                ```\n\n              For NixOS, the default value for this option includes at least this argument:\n              - {var}`pkgs`: The nixpkgs package set according to\n                the {option}`nixpkgs.pkgs` option.\n            '';\n          };\n\n          _module.check = mkOption {\n            type = types.bool;\n            internal = true;\n            default = true;\n            description = \"Whether to check whether all option definitions have matching declarations.\";\n          };\n\n          _module.freeformType = mkOption {\n            type = types.nullOr types.optionType;\n            internal = true;\n            default = null;\n            description = ''\n              If set, merge all definitions that don't have an associated option\n              together using this type. The result then gets combined with the\n              values of all declared options to produce the final `\n              config` value.\n\n              If this is `null`, definitions without an option\n              will throw an error unless {option}`_module.check` is\n              turned off.\n            '';\n          };\n\n          _module.specialArgs = mkOption {\n            readOnly = true;\n            internal = true;\n            description = ''\n              Externally provided module arguments that can't be modified from\n              within a configuration, but can be used in module imports.\n            '';\n          };\n        };\n\n        config = {\n          _module.args = {\n            inherit extendModules;\n            moduleType = type;\n          };\n          _module.specialArgs = specialArgs;\n        };\n      };\n\n      # This function takes an empty attrset as an argument.\n      # It could theoretically be replaced with its body,\n      # but such a binding is avoided to allow for earlier grabage collection.\n      doCollect =\n        { }:\n        collectModules class (specialArgs.modulesPath or \"\") (regularModules ++ [ internalModule ]) (\n          {\n            inherit\n              lib\n              options\n              specialArgs\n              ;\n            _class = class;\n            _prefix = prefix;\n            config = addErrorContext \"if you get an infinite recursion here, you probably reference `config` in `imports`. If you are trying to achieve a conditional import behavior dependent on `config`, consider importing unconditionally, and using `mkEnableOption` and `mkIf` to control its effect.\" config;\n          }\n          // specialArgs\n        );\n\n      merged = mergeModules prefix (reverseList (doCollect { }).modules);\n\n      options = merged.matchedOptions;\n\n      config =\n        let\n\n          # For definitions that have an associated option\n          declaredConfig = mapAttrsRecursiveCond (v: !isOption v) (_: v: v.value) options;\n\n          # If freeformType is set, this is for definitions that don't have an associated option\n          freeformConfig =\n            let\n              defs = map (def: {\n                file = def.file;\n                value = setAttrByPath def.prefix def.value;\n              }) merged.unmatchedDefns;\n            in\n            if defs == [ ] then { } else declaredConfig._module.freeformType.merge prefix defs;\n\n        in\n        if declaredConfig._module.freeformType == null then\n          declaredConfig\n        # Because all definitions that had an associated option ended in\n        # declaredConfig, freeformConfig can only contain the non-option\n        # paths, meaning recursiveUpdate will never override any value\n        else\n          recursiveUpdate freeformConfig declaredConfig;\n\n      checkUnmatched =\n        if config._module.check && config._module.freeformType == null && merged.unmatchedDefns != [ ] then\n          let\n            firstDef = head merged.unmatchedDefns;\n            baseMsg =\n              let\n                optText = showOption (prefix ++ firstDef.prefix);\n                defText =\n                  addErrorContext\n                    \"while evaluating the error message for definitions for `${optText}', which is an option that does not exist\"\n                    (addErrorContext \"while evaluating a definition from `${firstDef.file}'\" (showDefs [ firstDef ]));\n\n                # absInvalidOptionParent is absolute; other variables are relative to the submodule prefix\n                absInvalidOptionParent = init (prefix ++ firstDef.prefix);\n                invalidOptionParent = init firstDef.prefix;\n                siblingOptionNames = attrNames (attrByPath invalidOptionParent { } options);\n                candidateNames =\n                  if invalidOptionParent == [ ] then remove \"_module\" siblingOptionNames else siblingOptionNames;\n                invalidOptionName = last firstDef.prefix;\n                # For small option sets, check all; for large sets, only check distance ≤ 2\n                suggestions =\n                  if length candidateNames < 100 then\n                    pipe candidateNames [\n                      (sortOn (levenshtein invalidOptionName))\n                      (take 3)\n                    ]\n                  else\n                    pipe candidateNames [\n                      # levenshteinAtMost is only fast for distance ≤ 2\n                      (filter (levenshteinAtMost 2 invalidOptionName))\n                      (sortOn (levenshtein invalidOptionName))\n                      (take 3)\n                    ];\n                suggestion =\n                  if suggestions == [ ] then\n                    \"\"\n                  else if length suggestions == 1 then\n                    \"\\n\\nDid you mean `${showOption (absInvalidOptionParent ++ [ (head suggestions) ])}'?\"\n                  else\n                    \"\\n\\nDid you mean ${\n                      concatStringsSep \", \" (\n                        map (s: \"`${showOption (absInvalidOptionParent ++ [ s ])}'\") (init suggestions)\n                      )\n                    } or `${showOption (absInvalidOptionParent ++ [ (last suggestions) ])}'?\";\n              in\n              \"The option `${optText}' does not exist. Definition values:${defText}${suggestion}\";\n          in\n          if\n            attrNames options == [ \"_module\" ]\n          # No options were declared at all (`_module` is built in)\n          # but we do have unmatched definitions, and no freeformType (earlier conditions)\n          then\n            let\n              optionName = showOption prefix;\n            in\n            if optionName == \"\" then\n              throw ''\n                ${baseMsg}\n\n                It seems as if you're trying to declare an option by placing it into `config' rather than `options'!\n              ''\n            else\n              throw ''\n                ${baseMsg}\n\n                However there are no options defined in `${showOption prefix}'. Are you sure you've\n                declared your options properly? This can happen if you e.g. declared your options in `types.submodule'\n                under `config' rather than `options'.\n              ''\n          else\n            throw baseMsg\n        else\n          null;\n\n      checked = seq checkUnmatched;\n\n      extendModules =\n        extendArgs@{\n          modules ? [ ],\n          specialArgs ? { },\n          prefix ? [ ],\n        }:\n        evalModules (\n          evalModulesArgs\n          // {\n            modules = regularModules ++ modules;\n            specialArgs = evalModulesArgs.specialArgs or { } // specialArgs;\n            prefix = extendArgs.prefix or evalModulesArgs.prefix or [ ];\n          }\n        );\n\n      type = types.submoduleWith {\n        inherit modules specialArgs class;\n      };\n\n      result = withWarnings {\n        _type = \"configuration\";\n        options = checked options;\n        config = checked (removeAttrs config [ \"_module\" ]);\n        _module = checked (config._module);\n        inherit (doCollect { }) graph;\n        inherit extendModules type class;\n      };\n    in\n    result;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":93,"column":5},"path":["lib","modules","evalModules"],"pos_type":"Lambda"}},"content":{"content":"\nSee https://nixos.org/manual/nixpkgs/unstable/#module-system-lib-evalModules\nor file://./../doc/module-system/module-system.chapter.md\n\n!!! Please think twice before adding to this argument list! The more\nthat is specified here instead of in the modules themselves the harder\nit is to transparently move a set of modules to be a submodule of another\nconfig (as the proper arguments need to be replicated at each call to\nevalModules) and the less declarative the module set is.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":93,"column":5},"path":["lib","modules","evalModules"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.evalOptionValue","path":["lib","modules","evalOptionValue"],"aliases":[["lib","evalOptionValue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2319,"column":5},"attr_expr":"evalOptionValue","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1123,"column":5},"lambda_expr":"evalOptionValue =\n    loc: opt: defs:\n    let\n      # Add in the default value for this option, if any.\n      defs' =\n        if opt ? default then\n          [\n            {\n              file = head opt.declarations;\n              value = mkOptionDefault opt.default;\n            }\n          ]\n          ++ defs\n        else\n          defs;\n\n      # Handle properties, check types, and merge everything together.\n      res =\n        if opt.readOnly or false && length defs' > 1 then\n          let\n            # For a better error message, evaluate all readOnly definitions as\n            # if they were the only definition.\n            separateDefs = map (\n              def:\n              def\n              // {\n                value = (mergeDefinitions loc opt.type [ def ]).mergedValue;\n              }\n            ) defs';\n          in\n          throw \"The option `${showOption loc}' is read-only, but it's set multiple times. Definition values:${showDefs separateDefs}\"\n        else\n          mergeDefinitions loc opt.type defs';\n\n      # Apply the 'apply' function to the merged value. This allows options to\n      # yield a value computed from the definitions\n      value = if opt ? apply then opt.apply res.mergedValue else res.mergedValue;\n\n      warnDeprecation =\n        warnIf (opt.type.deprecationMessage != null)\n          \"The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}\";\n\n    in\n    warnDeprecation opt\n    // {\n      value = addErrorContext \"while evaluating the option `${showOption loc}':\" value;\n      inherit (res.defsFinal') highestPrio;\n      definitions = map (def: def.value) res.defsFinal;\n      files = map (def: def.file) res.defsFinal;\n      definitionsWithLocations = res.defsFinal;\n      inherit (res) isDefined;\n      inherit (res.checkedAndMerged) valueMeta;\n      # This allows options to be correctly displayed using `${options.path.to.it}`\n      __toString = _: showOption loc;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1123,"column":5},"path":["lib","modules","evalOptionValue"],"pos_type":"Lambda"}},"content":{"content":"\nMerge all the definitions of an option to produce the final\nconfig value.\n\n# Inputs\n\n`loc`\n\n: 1\\. Function argument\n\n`opt`\n\n: 2\\. Function argument\n\n`defs`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1123,"column":5},"path":["lib","modules","evalOptionValue"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.filterOverrides","path":["lib","modules","filterOverrides"],"aliases":[["lib","filterOverrides"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2320,"column":5},"attr_expr":"filterOverrides","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1433,"column":21},"lambda_expr":"filterOverrides = defs: (filterOverrides' defs).values;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1433,"column":21},"path":["lib","modules","filterOverrides"],"pos_type":"Lambda"}},"content":{"content":"\nGiven a list of config values, process the mkOverride properties,\nthat is, return the values that have the highest (that is,\nnumerically lowest) priority, and strip the mkOverride\nproperties.  For example,\n\n  [ { file = \"/1\"; value = mkOverride 10 \"a\"; }\n    { file = \"/2\"; value = mkOverride 20 \"b\"; }\n    { file = \"/3\"; value = \"z\"; }\n    { file = \"/4\"; value = mkOverride 10 \"d\"; }\n  ]\n\nyields\n\n  [ { file = \"/1\"; value = \"a\"; }\n    { file = \"/4\"; value = \"d\"; }\n  ]\n\nNote that \"z\" has the default priority 100.\n\n# Inputs\n\n`defs`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1433,"column":21},"path":["lib","modules","filterOverrides"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.filterOverrides' (Prime)","path":["lib","modules","filterOverrides'"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2321,"column":5},"attr_expr":"filterOverrides'","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1442,"column":5},"lambda_expr":"defs:\n    # Optimize for the singleton case, equivalent to the `else` clause.\n    if length defs == 1 then\n      {\n        values = map strip defs;\n        highestPrio = getPrio (head defs);\n      }\n    else\n      let\n        highestPrio = foldl' (prio: def: min (getPrio def) prio) 9999 defs;\n      in\n      {\n        values = concatMap (def: if getPrio def == highestPrio then [ (strip def) ] else [ ]) defs;\n        inherit highestPrio;\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1442,"column":5},"path":["lib","modules","filterOverrides'"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1442,"column":5},"path":["lib","modules","filterOverrides'"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.fixMergeModules","path":["lib","modules","fixMergeModules"],"aliases":[["lib","fixMergeModules"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2322,"column":5},"attr_expr":"fixMergeModules","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1679,"column":5},"lambda_expr":"fixMergeModules =\n    modules: args:\n    evalModules {\n      inherit modules args;\n      check = false;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1679,"column":5},"path":["lib","modules","fixMergeModules"],"pos_type":"Lambda"}},"content":{"content":"\nCompatibility.\n\n# Inputs\n\n`modules`\n\n: 1\\. Function argument\n\n`args`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1679,"column":5},"path":["lib","modules","fixMergeModules"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.fixupOptionType","path":["lib","modules","fixupOptionType"],"aliases":[["lib","fixupOptionType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2323,"column":5},"attr_expr":"fixupOptionType","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1491,"column":5},"lambda_expr":"fixupOptionType =\n    loc: opt:\n    if opt.type.getSubModules or null == null then\n      opt // { type = opt.type or types.unspecified; }\n    else\n      opt\n      // {\n        type = opt.type.substSubModules opt.options;\n        options = [ ];\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1491,"column":5},"path":["lib","modules","fixupOptionType"],"pos_type":"Lambda"}},"content":{"content":"TODO: Merge this into mergeOptionDecls","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1491,"column":5},"path":["lib","modules","fixupOptionType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.importApply","path":["lib","modules","importApply"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2324,"column":5},"attr_expr":"importApply","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2132,"column":5},"lambda_expr":"importApply =\n    modulePath: staticArg: lib.setDefaultModuleLocation modulePath (import modulePath staticArg);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2132,"column":5},"path":["lib","modules","importApply"],"pos_type":"Lambda"}},"content":{"content":"\n`importApply file arg :: Path -> a -> Module`,  where `import file :: a -> Module`\n\n`importApply` imports a Nix expression file much like the module system would,\nafter passing an extra positional argument to the function in the file.\n\nThis function should be used when declaring a module in a file that refers to\nvalues from a different scope, such as that in a flake.\n\nIt solves the problems of alternative solutions:\n\n- While `importApply file arg` is _mostly_ equivalent to\n  `import file arg`, the latter returns a module without a location,\n  as `import` only returns the contained expression. This leads to worse\n  error messages.\n\n- Using `specialArgs` to provide arguments to all modules. This effectively\n  creates an incomplete module, and requires the user of the module to\n  manually pass the `specialArgs` to the configuration, which is error-prone,\n  verbose, and unnecessary.\n\nThe nix file must contain a function that returns a module.\nA module may itself be a function, so the file is often a function with two\npositional arguments instead of one. See the example below.\n\nThis function does not add support for deduplication and `disabledModules`,\nalthough that could be achieved by wrapping the returned module and setting\nthe `key` module attribute.\nThe reason for this omission is that the file path is not guaranteed to be\na unique identifier for the module, as two instances of the module may\nreference different `arg`s in their closures.\n\nExample\n\n    # lib.nix\n    imports = [\n      (lib.modules.importApply ./module.nix { bar = bar; })\n    ];\n\n    # module.nix\n    { bar }:\n    { lib, config, ... }:\n    {\n      options = ...;\n      config = ... bar ...;\n    }\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2132,"column":5},"path":["lib","modules","importApply"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.importJSON","path":["lib","modules","importJSON"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2325,"column":5},"attr_expr":"importJSON","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2145,"column":16},"lambda_expr":"importJSON = file: {\n    _file = file;\n    config = lib.importJSON file;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2145,"column":16},"path":["lib","modules","importJSON"],"pos_type":"Lambda"}},"content":{"content":"\nUse this function to import a JSON file as NixOS configuration.\n\nmodules.importJSON :: path -> attrs\n\n# Inputs\n\n`file`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2145,"column":16},"path":["lib","modules","importJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.importTOML","path":["lib","modules","importTOML"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2326,"column":5},"attr_expr":"importTOML","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2161,"column":16},"lambda_expr":"importTOML = file: {\n    _file = file;\n    config = lib.importTOML file;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2161,"column":16},"path":["lib","modules","importTOML"],"pos_type":"Lambda"}},"content":{"content":"\nUse this function to import a TOML file as NixOS configuration.\n\nmodules.importTOML :: path -> attrs\n\n# Inputs\n\n`file`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2161,"column":16},"path":["lib","modules","importTOML"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mapDefinitionValue","path":["lib","modules","mapDefinitionValue"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2327,"column":5},"attr_expr":"mapDefinitionValue","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1606,"column":5},"lambda_expr":"mapDefinitionValue =\n    f: def:\n    if def ? _type then\n      if def._type == \"merge\" then\n        def // { contents = map (mapDefinitionValue f) def.contents; }\n      else if def._type == \"if\" then\n        def // { content = mapDefinitionValue f def.content; }\n      else if def._type == \"override\" then\n        def // { content = mapDefinitionValue f def.content; }\n      else if def._type == \"order\" then\n        def // { content = mapDefinitionValue f def.content; }\n      else if def._type == \"definition\" then\n        def // { value = mapDefinitionValue f def.value; }\n      else\n        f def\n    else\n      f def;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1606,"column":5},"path":["lib","modules","mapDefinitionValue"],"pos_type":"Lambda"}},"content":{"content":"\nApplies a function to the value inside a definition,\npreserving all surrounding properties (`mkForce`, `mkOrder`, `mkIf`, etc.).\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1606,"column":5},"path":["lib","modules","mapDefinitionValue"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mergeAttrDefinitionsWithPrio","path":["lib","modules","mergeAttrDefinitionsWithPrio"],"aliases":[],"signature":"mergeAttrDefinitionsWithPrio :: Option -> { [String] :: { highestPrio :: Int; value :: Any; } }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2329,"column":5},"attr_expr":"mergeAttrDefinitionsWithPrio","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1520,"column":5},"lambda_expr":"mergeAttrDefinitionsWithPrio =\n    opt:\n    let\n      defsByAttr = zipAttrs (\n        concatLists (\n          concatMap (\n            { value, ... }@def:\n            map (mapAttrsToList (\n              k: value: {\n                ${k} = def // {\n                  inherit value;\n                };\n              }\n            )) (pushDownProperties value)\n          ) opt.definitionsWithLocations\n        )\n      );\n    in\n    assert opt.type.name == \"attrsOf\" || opt.type.name == \"lazyAttrsOf\";\n    mapAttrs (\n      k: v:\n      let\n        merging = mergeDefinitions (opt.loc ++ [ k ]) opt.type.nestedTypes.elemType v;\n      in\n      {\n        value = merging.mergedValue;\n        inherit (merging.defsFinal') highestPrio;\n      }\n    ) defsByAttr;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1520,"column":5},"path":["lib","modules","mergeAttrDefinitionsWithPrio"],"pos_type":"Lambda"}},"content":{"content":"\nMerge an option's definitions in a way that preserves the priority of the\nindividual attributes in the option value.\n\nThis does not account for all option semantics, such as readOnly.\n\n# Inputs\n\n`opt`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmergeAttrDefinitionsWithPrio :: Option -> { [String] :: { highestPrio :: Int; value :: Any; } }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1520,"column":5},"path":["lib","modules","mergeAttrDefinitionsWithPrio"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mergeDefinitions","path":["lib","modules","mergeDefinitions"],"aliases":[["lib","mergeDefinitions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2328,"column":5},"attr_expr":"mergeDefinitions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1205,"column":22},"lambda_expr":"mergeDefinitions = loc: type: defs: rec {\n    defsFinal' =\n      let\n        # Process mkMerge and mkIf properties.\n        defsNormalized = concatMap (\n          m:\n          map (\n            value:\n            if value._type or null == \"definition\" then\n              value\n            else\n              {\n                inherit (m) file;\n                inherit value;\n              }\n          ) (addErrorContext \"while evaluating definitions from `${m.file}':\" (dischargeProperties m.value))\n        ) defs;\n\n        # Process mkOverride properties.\n        defsFiltered = filterOverrides' defsNormalized;\n\n        # Sort mkOrder properties.\n        defsSorted =\n          # Avoid sorting if we don't have to.\n          if any (def: def.value._type or \"\" == \"order\") defsFiltered.values then\n            sortProperties defsFiltered.values\n          else\n            defsFiltered.values;\n      in\n      # Fast path: the overwhelming majority of options have exactly one\n      # definition whose value carries no property wrapper\n      # (mkIf/mkMerge/mkOverride/mkOrder/definition). In that case the\n      # discharge/filter/sort pipeline above is a no-op but still allocates\n      # several intermediate lists and closures. Detect it up front and hand\n      # the original singleton straight to the type merge. The let-bindings\n      # above are lazy and thus never forced on this branch.\n      if\n        length defs == 1\n        && (\n          let\n            d = head defs;\n          in\n          addErrorContext \"while evaluating definitions from `${d.file}':\" (\n            !(isAttrs d.value && d.value ? _type)\n          )\n        )\n      then\n        {\n          values = defs;\n          highestPrio = defaultOverridePriority;\n        }\n      else\n        {\n          values = defsSorted;\n          inherit (defsFiltered) highestPrio;\n        };\n    defsFinal = defsFinal'.values;\n\n    # Type-check the remaining definitions, and merge them. Or throw if no definitions.\n    mergedValue =\n      if isDefined then\n        if type.merge ? v2 then\n          # check and merge share the same closure\n          # .headError is either not-present, null, or a string describing the error\n          if checkedAndMerged.headError or null != null then\n            throw \"A definition for option `${showOption loc}' is not of type `${type.description}'. TypeError: ${checkedAndMerged.headError.message}\"\n          else\n            checkedAndMerged.value\n        else if all (def: type.check def.value) defsFinal then\n          type.merge loc defsFinal\n        else\n          let\n            allInvalid = filter (def: !type.check def.value) defsFinal;\n          in\n          throw \"A definition for option `${showOption loc}' is not of type `${type.description}'. Definition values:${showDefs allInvalid}\"\n      else if type.emptyValue ? value then\n        type.emptyValue.value\n      else\n        # (nixos-option detects this specific error message and gives it special\n        # handling.  If changed here, please change it there too.)\n        throw\n          \"The option `${showOption loc}' was accessed but has no value defined. Try setting the option.\";\n\n    checkedAndMerged =\n      (\n        # This function (which is immediately applied) checks that type.merge\n        # returns the proper attrset.\n        # Once use of the merge.v2 feature has propagated, consider removing this\n        # for an estimated one thousandth performance improvement (NixOS by nr.thunks).\n        {\n          headError,\n          value,\n          valueMeta,\n        }@args:\n        args\n      )\n        (\n          if type.merge ? v2 then\n            let\n              # Check for v2 merge coherence\n              r = checkV2MergeCoherence loc type (\n                type.merge.v2 {\n                  inherit loc;\n                  defs = defsFinal;\n                }\n              );\n            in\n            r\n            // {\n              valueMeta = r.valueMeta // {\n                _internal = {\n                  inherit type;\n                };\n              };\n            }\n          else\n            {\n              headError = null;\n              value = mergedValue;\n              valueMeta = { };\n            }\n        );\n\n    isDefined = defsFinal != [ ];\n\n    optionalValue = if isDefined then { value = mergedValue; } else { };\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1205,"column":22},"path":["lib","modules","mergeDefinitions"],"pos_type":"Lambda"}},"content":{"content":"Merge definitions of a value of a given type.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1205,"column":22},"path":["lib","modules","mergeDefinitions"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mergeModules","path":["lib","modules","mergeModules"],"aliases":[["lib","mergeModules"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":774,"column":5},"lambda_expr":"mergeModules =\n    prefix: modules:\n    mergeModules' prefix modules (\n      concatMap (\n        m:\n        map (config: {\n          file = m._file;\n          inherit config;\n        }) (pushDownProperties m.config)\n      ) modules\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":774,"column":5},"path":["lib","modules","mergeModules"],"pos_type":"Lambda"}},"content":{"content":"\nMerge a list of modules.  This will recurse over the option\ndeclarations in all modules, combining them into a single set.\nAt the same time, for each option declaration, it will merge the\ncorresponding option definitions in all machines, returning them\nin the ‘value’ attribute of each option.\n\nThis returns a set like\n  {\n    # A recursive set of options along with their final values\n    matchedOptions = {\n      foo = { _type = \"option\"; value = \"option value of foo\"; ... };\n      bar.baz = { _type = \"option\"; value = \"option value of bar.baz\"; ... };\n      ...\n    };\n    # A list of definitions that weren't matched by any option\n    unmatchedDefns = [\n      { file = \"file.nix\"; prefix = [ \"qux\" ]; value = \"qux\"; }\n      ...\n    ];\n  }\n\n# Inputs\n\n`prefix`\n\n: 1\\. Function argument\n\n`modules`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":774,"column":5},"path":["lib","modules","mergeModules"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mergeModules' (Prime)","path":["lib","modules","mergeModules'"],"aliases":[["lib","mergeModules'"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":786,"column":5},"lambda_expr":"prefix: modules: configs:\n    let\n      # an attrset 'name' => list of submodules that declare ‘name’.\n      declsByName = zipAttrs (\n        map (\n          module:\n          let\n            subtree = module.options;\n          in\n          if !(isAttrs subtree) then\n            throw ''\n              An option declaration for `${concatStringsSep \".\" prefix}' has type\n              `${typeOf subtree}' rather than an attribute set.\n              Did you mean to define this outside of `options'?\n            ''\n          else\n            mapAttrs (n: option: {\n              inherit (module) _file;\n              pos = unsafeGetAttrPos n subtree;\n              options = option;\n            }) subtree\n        ) modules\n      );\n\n      # The root of any module definition must be an attrset.\n      checkedConfigs =\n        assert all (\n          c:\n          # TODO: I have my doubts that this error would occur when option definitions are not matched.\n          #       The implementation of this check used to be tied to a superficially similar check for\n          #       options, so maybe that's why this is here.\n          isAttrs c.config\n          || throw ''\n            In module `${c.file}', you're trying to define a value of type `${typeOf c.config}'\n            rather than an attribute set for the option\n            `${concatStringsSep \".\" prefix}'!\n\n            This usually happens if `${concatStringsSep \".\" prefix}' has option\n            definitions inside that are not matched. Please check how to properly define\n            this option by e.g. referring to `man 5 configuration.nix'!\n          ''\n        ) configs;\n        configs;\n\n      # an attrset 'name' => list of submodules that define ‘name’.\n      pushedDownDefinitionsByName = zipAttrsWith (n: concatLists) (\n        map (\n          module:\n          mapAttrs (\n            n: value:\n            map (config: {\n              inherit (module) file;\n              inherit config;\n            }) (pushDownProperties value)\n          ) module.config\n        ) checkedConfigs\n      );\n      # extract the definitions for each loc\n      rawDefinitionsByName = zipAttrs (\n        map (\n          module:\n          mapAttrs (n: value: {\n            inherit (module) file;\n            inherit value;\n          }) module.config\n        ) checkedConfigs\n      );\n\n      # Convert an option tree decl to a submodule option decl\n      optionTreeToOption =\n        decl:\n        if isOption decl.options then\n          decl\n        else\n          decl\n          // {\n            options = mkOption {\n              type = types.submoduleWith {\n                modules = [ { options = decl.options; } ];\n                # `null` is not intended for use by modules. It is an internal\n                # value that means \"whatever the user has declared elsewhere\".\n                # This might become obsolete with https://github.com/NixOS/nixpkgs/issues/162398\n                shorthandOnlyDefinesConfig = null;\n              };\n            };\n          };\n\n      resultsByName = mapAttrs (\n        name: decls:\n        # We're descending into attribute ‘name’.\n        let\n          loc = prefix ++ [ name ];\n          defns = pushedDownDefinitionsByName.${name} or [ ];\n          defns' = rawDefinitionsByName.${name} or [ ];\n          optionDecls = filter (\n            m:\n            m.options ? _type\n            && (m.options._type == \"option\" || throwDeclarationTypeError loc m.options._type m._file)\n          ) decls;\n        in\n        if length optionDecls == length decls then\n          let\n            opt = fixupOptionType loc (mergeOptionDecls loc decls);\n          in\n          {\n            matchedOptions = evalOptionValue loc opt defns';\n            unmatchedDefns = [ ];\n          }\n        else if optionDecls != [ ] then\n          if\n            all (x: x.options.type.name or null == \"submodule\") optionDecls\n          # Raw options can only be merged into submodules. Merging into\n          # attrsets might be nice, but ambiguous. Suppose we have\n          # attrset as a `attrsOf submodule`. User declares option\n          # attrset.foo.bar, this could mean:\n          #  a. option `bar` is only available in `attrset.foo`\n          #  b. option `foo.bar` is available in all `attrset.*`\n          #  c. reject and require \"<name>\" as a reminder that it behaves like (b).\n          #  d. magically combine (a) and (c).\n          # All of the above are merely syntax sugar though.\n          then\n            let\n              opt = fixupOptionType loc (mergeOptionDecls loc (map optionTreeToOption decls));\n            in\n            {\n              matchedOptions = evalOptionValue loc opt defns';\n              unmatchedDefns = [ ];\n            }\n          else\n            let\n              nonOptions = filter (m: !isOption m.options) decls;\n            in\n            throw \"The option `${showOption loc}' in module `${(head optionDecls)._file}' would be a parent of the following options, but its type `${\n              (head optionDecls).options.type.description or \"<no description>\"\n            }' does not support nested options.\\n${showRawDecls loc nonOptions}\"\n        else\n          mergeModules' loc decls defns\n      ) declsByName;\n\n      matchedOptions = mapAttrs (n: v: v.matchedOptions) resultsByName;\n\n      # an attrset 'name' => list of unmatched definitions for 'name'\n      unmatchedDefnsByName =\n        # Propagate all unmatched definitions from nested option sets\n        mapAttrs (n: v: v.unmatchedDefns) resultsByName\n        # Plus the definitions for the current prefix that don't have a matching option\n        // removeAttrs rawDefinitionsByName (attrNames matchedOptions);\n    in\n    {\n      inherit matchedOptions;\n\n      # Transforms unmatchedDefnsByName into a list of definitions\n      unmatchedDefns =\n        if configs == [ ] then\n          # When no config values exist, there can be no unmatched config, so\n          # we short circuit and avoid evaluating more _options_ than necessary.\n          [ ]\n        else\n          concatLists (\n            mapAttrsToList (\n              name: defs:\n              map (\n                def:\n                def\n                // {\n                  # Set this so we know when the definition first left unmatched territory\n                  prefix = [ name ] ++ (def.prefix or [ ]);\n                }\n              ) defs\n            ) unmatchedDefnsByName\n          );\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":786,"column":5},"path":["lib","modules","mergeModules'"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":786,"column":5},"path":["lib","modules","mergeModules'"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mergeOptionDecls","path":["lib","modules","mergeOptionDecls"],"aliases":[["lib","mergeOptionDecls"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2330,"column":5},"attr_expr":"mergeOptionDecls","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1011,"column":5},"lambda_expr":"mergeOptionDecls =\n    loc: opts:\n    foldl'\n      (\n        res: opt:\n        let\n          t = res.type;\n          t' = opt.options.type;\n          mergedType = t.typeMerge t'.functor;\n          typesMergeable = mergedType != null;\n\n          # TODO: Remove this when all downstream reliances of internals: 'functor.wrapped' are sufficiently migrated.\n          # A function that adds the deprecated wrapped message to a type.\n          addDeprecatedWrapped =\n            t:\n            t\n            // {\n              functor = t.functor // {\n                wrapped = t.functor.wrappedDeprecationMessage {\n                  inherit loc;\n                };\n              };\n            };\n\n          typeSet =\n            if opt.options ? type then\n              if res ? type then\n                if typesMergeable then\n                  {\n                    type =\n                      if mergedType ? functor.wrappedDeprecationMessage then\n                        addDeprecatedWrapped mergedType\n                      else\n                        mergedType;\n                  }\n                else\n                  # Keep in sync with the same error below!\n                  throw\n                    \"The option `${showOption loc}' in `${opt._file}' is already declared in ${showFiles res.declarations}.\"\n              else if opt.options.type ? functor.wrappedDeprecationMessage then\n                { type = addDeprecatedWrapped opt.options.type; }\n              else\n                { }\n            else\n              { };\n\n          bothHave = k: opt.options ? ${k} && res ? ${k};\n        in\n        if bothHave \"default\" || bothHave \"example\" || bothHave \"description\" || bothHave \"apply\" then\n          # Keep in sync with the same error above!\n          throw\n            \"The option `${showOption loc}' in `${opt._file}' is already declared in ${showFiles res.declarations}.\"\n        else\n          let\n            getSubModules = opt.options.type.getSubModules or null;\n            submodules =\n              if getSubModules != null then\n                map (setDefaultModuleLocation opt._file) getSubModules ++ res.options\n              else\n                res.options;\n          in\n          opt.options\n          // res\n          // {\n            declarations = res.declarations ++ [ opt._file ];\n            # In the case of modules that are generated dynamically, we won't\n            # have exact declaration lines; fall back to just the file being\n            # evaluated.\n            declarationPositions =\n              res.declarationPositions\n              ++ (\n                if opt.pos != null then\n                  [ opt.pos ]\n                else\n                  [\n                    {\n                      file = opt._file;\n                      line = null;\n                      column = null;\n                    }\n                  ]\n              );\n            options = submodules;\n          }\n          // typeSet\n      )\n      {\n        inherit loc;\n        declarations = [ ];\n        declarationPositions = [ ];\n        options = [ ];\n      }\n      opts;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1011,"column":5},"path":["lib","modules","mergeOptionDecls"],"pos_type":"Lambda"}},"content":{"content":"\nMerge multiple option declarations into a single declaration.  In\ngeneral, there should be only one declaration of each option.\nThe exception is the ‘options’ attribute, which specifies\nsub-options.  These can be specified multiple times to allow one\nmodule to add sub-options to an option declared somewhere else\n(e.g. multiple modules define sub-options for ‘fileSystems’).\n\n'loc' is the list of attribute names where the option is located.\n\n'opts' is a list of modules.  Each module has an options attribute which\ncorrespond to the definition of 'loc' in 'opt.file'.\n\n# Inputs\n\n`loc`\n\n: 1\\. Function argument\n\n`opts`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1011,"column":5},"path":["lib","modules","mergeOptionDecls"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkAfter","path":["lib","modules","mkAfter"],"aliases":[["lib","mkAfter"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2331,"column":5},"attr_expr":"mkAfter","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":23},"lambda_expr":"content: {\n    _type = \"order\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.mkAliasAndWrapDefinitions","path":["lib","modules","mkAliasAndWrapDefinitions"],"aliases":[["lib","mkAliasAndWrapDefinitions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2332,"column":5},"attr_expr":"mkAliasAndWrapDefinitions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":31},"lambda_expr":"wrap: option: mkIf option.isDefined (wrap (mkMerge option.definitions))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":31},"path":["lib","modules","mkAliasAndWrapDefinitions"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":31},"path":["lib","modules","mkAliasAndWrapDefinitions"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkAliasAndWrapDefsWithPriority","path":["lib","modules","mkAliasAndWrapDefsWithPriority"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2333,"column":5},"attr_expr":"mkAliasAndWrapDefsWithPriority","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1654,"column":5},"lambda_expr":"mkAliasAndWrapDefsWithPriority =\n    wrap: option:\n    let\n      prio = option.highestPrio or defaultOverridePriority;\n      defsWithPrio = map (mkOverride prio) option.definitions;\n    in\n    mkIf option.isDefined (wrap (mkMerge defsWithPrio));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1654,"column":5},"path":["lib","modules","mkAliasAndWrapDefsWithPriority"],"pos_type":"Lambda"}},"content":{"content":"If a priority is not set, it assumes a priority of defaultOverridePriority.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1654,"column":5},"path":["lib","modules","mkAliasAndWrapDefsWithPriority"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkAliasDefinitions","path":["lib","modules","mkAliasDefinitions"],"aliases":[["lib","mkAliasDefinitions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2334,"column":5},"attr_expr":"mkAliasDefinitions","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1647,"column":37},"lambda_expr":"option: mkIf option.isDefined (wrap (mkMerge option.definitions))","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.mkAliasIfDef","path":["lib","modules","mkAliasIfDef"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2335,"column":5},"attr_expr":"mkAliasIfDef","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1663,"column":8},"lambda_expr":"option: mkIf option.isDefined","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1663,"column":8},"path":["lib","modules","mkAliasIfDef"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1663,"column":8},"path":["lib","modules","mkAliasIfDef"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkAliasOptionModule","path":["lib","modules","mkAliasOptionModule"],"aliases":[["lib","mkAliasOptionModule"],["lib","mkAliasOptionModuleMD"],["lib","modules","mkAliasOptionModuleMD"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2336,"column":5},"attr_expr":"mkAliasOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"lambda_expr":"mkAliasOptionModule =\n    from: to:\n    doRename {\n      inherit from to;\n      visible = true;\n      warn = false;\n      use = id;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","modules","mkAliasOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nLike ‘mkRenamedOptionModule’, but doesn't show a warning.\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","modules","mkAliasOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkAliasOptionModuleMD","path":["lib","modules","mkAliasOptionModuleMD"],"aliases":[["lib","mkAliasOptionModule"],["lib","mkAliasOptionModuleMD"],["lib","modules","mkAliasOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2337,"column":5},"attr_expr":"mkAliasOptionModuleMD","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"lambda_expr":"mkAliasOptionModule =\n    from: to:\n    doRename {\n      inherit from to;\n      visible = true;\n      warn = false;\n      use = id;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","modules","mkAliasOptionModuleMD"],"pos_type":"Lambda"}},"content":{"content":"\nLike ‘mkRenamedOptionModule’, but doesn't show a warning.\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1933,"column":5},"path":["lib","modules","mkAliasOptionModuleMD"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkAssert","path":["lib","modules","mkAssert"],"aliases":[["lib","mkAssert"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2338,"column":5},"attr_expr":"mkAssert","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1569,"column":5},"lambda_expr":"assertion: message: content:\n    mkIf (if assertion then true else throw \"\\nFailed assertion: ${message}\") content","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1569,"column":5},"path":["lib","modules","mkAssert"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1569,"column":5},"path":["lib","modules","mkAssert"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkBefore","path":["lib","modules","mkBefore"],"aliases":[["lib","mkBefore"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2339,"column":5},"attr_expr":"mkBefore","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":23},"lambda_expr":"content: {\n    _type = \"order\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.mkChangedOptionModule","path":["lib","modules","mkChangedOptionModule"],"aliases":[["lib","mkChangedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2340,"column":5},"attr_expr":"mkChangedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1916,"column":5},"lambda_expr":"mkChangedOptionModule =\n    from: to: changeFn:\n    mkMergedOptionModule [ from ] to changeFn;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1916,"column":5},"path":["lib","modules","mkChangedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nSingle \"from\" version of mkMergedOptionModule.\nReturns a module that causes a warning to be shown if the \"from\" option is\ndefined; the defined value can be used in the \"mergeFn\" to set the \"to\"\nvalue.\nThis function can be used to change an option into another that has a\ndifferent type.\n\n\"mergeFn\" takes the module \"config\" as a parameter and must return a value of\n\"to\" option type.\n\n  mkChangedOptionModule [ \"a\" \"b\" \"c\" ] [ \"x\" \"y\" \"z\" ]\n    (config:\n      let value = getAttrFromPath [ \"a\" \"b\" \"c\" ] config;\n      in\n      if   value > 100 then \"high\"\n      else \"normal\")\n\n- options.a.b.c is a removed int option\n- options.x.y.z is a new str option that supersedes a.b.c\n\nThis show a warning if a.b.c is set, and set the value of x.y.z to the\nresult of the change function\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n\n`changeFn`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1916,"column":5},"path":["lib","modules","mkChangedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkDefault","path":["lib","modules","mkDefault"],"aliases":[["lib","mkDefault"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2341,"column":5},"attr_expr":"mkDefault","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.mkDefinition","path":["lib","modules","mkDefinition"],"aliases":[["lib","mkDefinition"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2342,"column":5},"attr_expr":"mkDefinition","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1580,"column":18},"lambda_expr":"mkDefinition = args@{ file, value, ... }: args // { _type = \"definition\"; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1580,"column":18},"path":["lib","modules","mkDefinition"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a definition with file location information.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1580,"column":18},"path":["lib","modules","mkDefinition"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkDerivedConfig","path":["lib","modules","mkDerivedConfig"],"aliases":[["lib","mkDerivedConfig"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2343,"column":5},"attr_expr":"mkDerivedConfig","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1973,"column":21},"lambda_expr":"mkDerivedConfig = opt: f: mkOverride (opt.highestPrio or defaultOverridePriority) (f opt.value);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1973,"column":21},"path":["lib","modules","mkDerivedConfig"],"pos_type":"Lambda"}},"content":{"content":"\nmkDerivedConfig : Option a -> (a -> Definition b) -> Definition b\n\nCreate config definitions with the same priority as the definition of another option.\nThis should be used for option definitions where one option sets the value of another as a convenience.\nFor instance a config file could be set with a `text` or `source` option, where text translates to a `source`\nvalue using `mkDerivedConfig options.text (pkgs.writeText \"filename.conf\")`.\n\nIt takes care of setting the right priority using `mkOverride`.\n\n# Inputs\n\n`opt`\n\n: 1\\. Function argument\n\n`f`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1973,"column":21},"path":["lib","modules","mkDerivedConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkFixStrictness","path":["lib","modules","mkFixStrictness"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2344,"column":5},"attr_expr":"mkFixStrictness","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.modules.mkForce","path":["lib","modules","mkForce"],"aliases":[["lib","mkForce"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2345,"column":5},"attr_expr":"mkForce","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.mkIf","path":["lib","modules","mkIf"],"aliases":[["lib","mkIf"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2346,"column":5},"attr_expr":"mkIf","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1563,"column":10},"lambda_expr":"mkIf = condition: content: {\n    _type = \"if\";\n    inherit condition content;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1563,"column":10},"path":["lib","modules","mkIf"],"pos_type":"Lambda"}},"content":{"content":"\nProperties.\n\n# Inputs\n\n`condition`\n\n: 1\\. Function argument\n\n`content`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1563,"column":10},"path":["lib","modules","mkIf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkImageMediaOverride","path":["lib","modules","mkImageMediaOverride"],"aliases":[["lib","mkImageMediaOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2347,"column":5},"attr_expr":"mkImageMediaOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.mkMerge","path":["lib","modules","mkMerge"],"aliases":[["lib","mkMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2348,"column":5},"attr_expr":"mkMerge","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1572,"column":13},"lambda_expr":"contents: {\n    _type = \"merge\";\n    inherit contents;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1572,"column":13},"path":["lib","modules","mkMerge"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1572,"column":13},"path":["lib","modules","mkMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkMergedOptionModule","path":["lib","modules","mkMergedOptionModule"],"aliases":[["lib","mkMergedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2349,"column":5},"attr_expr":"mkMergedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1843,"column":5},"lambda_expr":"mkMergedOptionModule =\n    from: to: mergeFn:\n    { config, options, ... }:\n    {\n      options = foldl' recursiveUpdate { } (\n        map (\n          path:\n          setAttrByPath path (mkOption {\n            visible = false;\n            # To use the value in mergeFn without triggering errors\n            default = \"_mkMergedOptionModule\";\n          })\n        ) from\n      );\n\n      config = {\n        warnings = filter (x: x != \"\") (\n          map (\n            f:\n            let\n              val = getAttrFromPath f config;\n              opt = getAttrFromPath f options;\n            in\n            optionalString (val != \"_mkMergedOptionModule\")\n              \"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.\"\n          ) from\n        );\n      }\n      // setAttrByPath to (\n        mkMerge (\n          optional (any (f: (getAttrFromPath f config) != \"_mkMergedOptionModule\") from) (mergeFn config)\n        )\n      );\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1843,"column":5},"path":["lib","modules","mkMergedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that causes a warning to be shown if any of the \"from\"\noption is defined; the defined values can be used in the \"mergeFn\" to set\nthe \"to\" value.\nThis function can be used to merge multiple options into one that has a\ndifferent type.\n\n\"mergeFn\" takes the module \"config\" as a parameter and must return a value\nof \"to\" option type.\n\n  mkMergedOptionModule\n    [ [ \"a\" \"b\" \"c\" ]\n      [ \"d\" \"e\" \"f\" ] ]\n    [ \"x\" \"y\" \"z\" ]\n    (config:\n      let value = p: getAttrFromPath p config;\n      in\n      if      (value [ \"a\" \"b\" \"c\" ]) == true then \"foo\"\n      else if (value [ \"d\" \"e\" \"f\" ]) == true then \"bar\"\n      else \"baz\")\n\n- options.a.b.c is a removed boolean option\n- options.d.e.f is a removed boolean option\n- options.x.y.z is a new str option that combines a.b.c and d.e.f\n  functionality\n\nThis show a warning if any a.b.c or d.e.f is set, and set the value of\nx.y.z to the result of the merge function\n\n# Inputs\n\n`from`\n\n: 1\\. Function argument\n\n`to`\n\n: 2\\. Function argument\n\n`mergeFn`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1843,"column":5},"path":["lib","modules","mkMergedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkOptionDefault","path":["lib","modules","mkOptionDefault"],"aliases":[["lib","mkOptionDefault"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2350,"column":5},"attr_expr":"mkOptionDefault","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.mkOrder","path":["lib","modules","mkOrder"],"aliases":[["lib","mkOrder"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2351,"column":5},"attr_expr":"mkOrder","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":13},"lambda_expr":"priority: content: {\n    _type = \"order\";\n    inherit priority content;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":13},"path":["lib","modules","mkOrder"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1596,"column":13},"path":["lib","modules","mkOrder"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkOverride","path":["lib","modules","mkOverride"],"aliases":[["lib","mkOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2352,"column":5},"attr_expr":"mkOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":16},"lambda_expr":"priority: content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":16},"path":["lib","modules","mkOverride"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":16},"path":["lib","modules","mkOverride"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkRemovedOptionModule","path":["lib","modules","mkRemovedOptionModule"],"aliases":[["lib","mkRemovedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2353,"column":5},"attr_expr":"mkRemovedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1709,"column":5},"lambda_expr":"mkRemovedOptionModule =\n    optionName: replacementInstructions:\n    { options, ... }:\n    {\n      options = setAttrByPath optionName (mkOption {\n        visible = false;\n        apply =\n          x:\n          throw \"The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}\";\n      });\n      config.assertions =\n        let\n          opt = getAttrFromPath optionName options;\n        in\n        [\n          {\n            assertion = !opt.isDefined;\n            message = ''\n              The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.\n              ${replacementInstructions}\n            '';\n          }\n        ];\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1709,"column":5},"path":["lib","modules","mkRemovedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that causes a warning to be shown if the\nspecified option is defined. For example,\n\n  mkRemovedOptionModule [ \"boot\" \"loader\" \"grub\" \"bootDevice\" ] \"<replacement instructions>\"\n\ncauses a assertion if the user defines boot.loader.grub.bootDevice.\n\nreplacementInstructions is a string that provides instructions on\nhow to achieve the same functionality without the removed option,\nor alternatively a reasoning why the functionality is not needed.\nreplacementInstructions SHOULD be provided!\n\n# Inputs\n\n`optionName`\n\n: 1\\. Function argument\n\n`replacementInstructions`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1709,"column":5},"path":["lib","modules","mkRemovedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkRenamedOptionModule","path":["lib","modules","mkRenamedOptionModule"],"aliases":[["lib","mkRenamedOptionModule"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2354,"column":5},"attr_expr":"mkRenamedOptionModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1768,"column":5},"lambda_expr":"mkRenamedOptionModule =\n    from: to:\n    doRename {\n      inherit from to;\n      visible = false;\n      warn = true;\n      use = trace \"Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'.\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1768,"column":5},"path":["lib","modules","mkRenamedOptionModule"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a module that causes a warning to be shown if the\nspecified \"from\" option is defined; the defined value is however\nforwarded to the \"to\" option. This can be used to rename options\nwhile providing backward compatibility. For example,\n\n  mkRenamedOptionModule [ \"boot\" \"copyKernels\" ] [ \"boot\" \"loader\" \"grub\" \"copyKernels\" ]\n\nforwards any definitions of boot.copyKernels to\nboot.loader.grub.copyKernels while printing a warning.\n\nThis also copies over the priority from the aliased option to the\nnon-aliased option.\n\n# Inputs\n\n`from`\n\n: The \"from\" option path as list of strings.\n  Option must not exist in the current module set.\n\n`to`\n\n: The \"to\" option path as list of strings.\n  Option must already exist in the current module set.\n\n# Limitations\n\n- The \"to\" option must already be declared.\n- The \"from\" option should not be declared, as this function will declare it.\n- \"to\" Options whose types don't support merging at any level of their structure (like `types.raw`,\n  or `types.attrsOf types.raw` where the attribute values can't merge) are not well-supported\n  because this function wraps aliased definitions in `mkMerge`.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1768,"column":5},"path":["lib","modules","mkRenamedOptionModule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkRenamedOptionModuleWith","path":["lib","modules","mkRenamedOptionModuleWith"],"aliases":[["lib","mkRenamedOptionModuleWith"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2355,"column":5},"attr_expr":"mkRenamedOptionModuleWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1777,"column":5},"lambda_expr":"{\n      /**\n        Old option path as list of strings.\n      */\n      from,\n      /**\n        New option path as list of strings.\n      */\n      to,\n      /**\n        Release number of the first release that contains the rename, ignoring backports.\n        Set it to the upcoming release, matching the nixpkgs/.version file.\n      */\n      sinceRelease,\n    }:\n    doRename {\n      inherit from to;\n      visible = false;\n      warn = oldestSupportedReleaseIsAtLeast sinceRelease;\n      use = warnIf (oldestSupportedReleaseIsAtLeast sinceRelease) \"Obsolete option `${showOption from}' is used. It was renamed to `${showOption to}'.\";\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1777,"column":5},"path":["lib","modules","mkRenamedOptionModuleWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1777,"column":5},"path":["lib","modules","mkRenamedOptionModuleWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.mkVMOverride","path":["lib","modules","mkVMOverride"],"aliases":[["lib","mkVMOverride"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2356,"column":5},"attr_expr":"mkVMOverride","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1582,"column":26},"lambda_expr":"content: {\n    _type = \"override\";\n    inherit priority content;\n  }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.modules.pushDownProperties","path":["lib","modules","pushDownProperties"],"aliases":[["lib","pushDownProperties"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1367,"column":5},"lambda_expr":"cfg:\n    if cfg._type or \"\" == \"merge\" then\n      concatMap pushDownProperties cfg.contents\n    else if cfg._type or \"\" == \"if\" then\n      map (mapAttrsIfAttrs (n: v: mkIf cfg.condition v)) (pushDownProperties cfg.content)\n    else if cfg._type or \"\" == \"override\" then\n      map (mapAttrsIfAttrs (n: v: mkOverride cfg.priority v)) (pushDownProperties cfg.content)\n    # FIXME: handle mkOrder?\n    else\n      [ cfg ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1367,"column":5},"path":["lib","modules","pushDownProperties"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1367,"column":5},"path":["lib","modules","pushDownProperties"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.setDefaultModuleLocation","path":["lib","modules","setDefaultModuleLocation"],"aliases":[["lib","setDefaultModuleLocation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2357,"column":5},"attr_expr":"setDefaultModuleLocation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":611,"column":30},"lambda_expr":"setDefaultModuleLocation = file: m: {\n    _file = file;\n    imports = [ m ];\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":611,"column":30},"path":["lib","modules","setDefaultModuleLocation"],"pos_type":"Lambda"}},"content":{"content":"\nWrap a module with a default location for reporting errors.\n\n# Inputs\n\n`file`\n\n: 1\\. Function argument\n\n`m`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":611,"column":30},"path":["lib","modules","setDefaultModuleLocation"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.sortProperties","path":["lib","modules","sortProperties"],"aliases":[["lib","sortProperties"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":2358,"column":5},"attr_expr":"sortProperties","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1470,"column":5},"lambda_expr":"sortProperties =\n    defs:\n    let\n      strip =\n        def:\n        if def.value._type or \"\" == \"order\" then\n          def\n          // {\n            value = def.value.content;\n            inherit (def.value) priority;\n          }\n        else\n          def;\n      defs' = map strip defs;\n      compare = a: b: (a.priority or defaultOrderPriority) < (b.priority or defaultOrderPriority);\n    in\n    sort compare defs';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1470,"column":5},"path":["lib","modules","sortProperties"],"pos_type":"Lambda"}},"content":{"content":"\nSort a list of properties.  The sort priority of a property is\ndefaultOrderPriority by default, but can be overridden by wrapping the property\nusing mkOrder.\n\n# Inputs\n\n`defs`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":1470,"column":5},"path":["lib","modules","sortProperties"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.modules.unifyModuleSyntax","path":["lib","modules","unifyModuleSyntax"],"aliases":[["lib","unifyModuleSyntax"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":635,"column":5},"lambda_expr":"unifyModuleSyntax =\n    file: key: m:\n    let\n      addMeta =\n        config:\n        if m ? meta then\n          mkMerge [\n            config\n            { meta = m.meta; }\n          ]\n        else\n          config;\n      addFreeformType =\n        config:\n        if m ? freeformType then\n          mkMerge [\n            config\n            { _module.freeformType = m.freeformType; }\n          ]\n        else\n          config;\n    in\n    if m ? config || m ? options then\n      let\n        badAttrs = removeAttrs m [\n          \"_class\"\n          \"_file\"\n          \"key\"\n          \"disabledModules\"\n          \"imports\"\n          \"options\"\n          \"config\"\n          \"meta\"\n          \"freeformType\"\n        ];\n      in\n      if badAttrs != { } then\n        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.\"\n      else\n        {\n          _file = toString m._file or file;\n          _class = m._class or null;\n          key = toString m.key or key;\n          disabledModules = m.disabledModules or [ ];\n          imports = m.imports or [ ];\n          options = m.options or { };\n          config = addFreeformType (addMeta (m.config or { }));\n        }\n    else\n      # shorthand syntax\n      throwIfNot (isAttrs m) \"module ${file} (${key}) does not look like a module.\" {\n        _file = toString m._file or file;\n        _class = m._class or null;\n        key = toString m.key or key;\n        disabledModules = m.disabledModules or [ ];\n        imports = m.require or [ ] ++ m.imports or [ ];\n        options = { };\n        config = addFreeformType (\n          removeAttrs m [\n            \"_class\"\n            \"_file\"\n            \"key\"\n            \"disabledModules\"\n            \"require\"\n            \"imports\"\n            \"freeformType\"\n          ]\n        );\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":635,"column":5},"path":["lib","modules","unifyModuleSyntax"],"pos_type":"Lambda"}},"content":{"content":"\nMassage a module into canonical form, that is, a set consisting\nof ‘options’, ‘config’ and ‘imports’ attributes.\n\n# Inputs\n\n`file`\n\n: 1\\. Function argument\n\n`key`\n\n: 2\\. Function argument\n\n`m`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/modules.nix","line":635,"column":5},"path":["lib","modules","unifyModuleSyntax"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.options.getFiles","path":["lib","options","getFiles"],"aliases":[["lib","getFiles"]],"signature":"getFiles :: [{ file :: a; ... }] -> [a]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":564,"column":3},"attr_expr":"getFiles = map (x: x.file);","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":564,"column":3},"path":["lib","options","getFiles"],"pos_type":"Attribute"}},"content":{"content":"\nExtracts values of all `file` keys of the given list\n\n# Type\n\n```\ngetFiles :: [{ file :: a; ... }] -> [a]\n```\n\n# Examples\n:::{.example}\n## `getFiles` usage example\n\n```nix\ngetFiles [ { file = \"file1\"; } { file = \"file2\"; } ] // => [ \"file1\" \"file2\" ]\ngetFiles [ ]                                         // => [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":564,"column":3},"path":["lib","options","getFiles"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.getValues","path":["lib","options","getValues"],"aliases":[["lib","getValues"]],"signature":"getValues :: [{ value :: a; ... }] -> [a]\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":542,"column":3},"attr_expr":"getValues = map (x: x.value);","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":542,"column":3},"path":["lib","options","getValues"],"pos_type":"Attribute"}},"content":{"content":"\nExtracts values of all `value` keys of the given list.\n\n# Type\n\n```\ngetValues :: [{ value :: a; ... }] -> [a]\n```\n\n# Examples\n:::{.example}\n## `getValues` usage example\n\n```nix\ngetValues [ { value = 1; } { value = 2; } ] // => [ 1 2 ]\ngetValues [ ]                               // => [ ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":542,"column":3},"path":["lib","options","getValues"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.isOption","path":["lib","options","isOption"],"aliases":[["lib","isOption"]],"signature":"isOption :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":77,"column":3},"attr_expr":"isOption = lib.isType \"option\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":18},"lambda_expr":"x: (x._type or \"\") == type","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":77,"column":3},"path":["lib","options","isOption"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true when the given argument `a` is an option\n\n# Inputs\n\n`a`\n: Any value to check whether it is an option\n\n# Examples\n:::{.example}\n## `lib.options.isOption` usage example\n\n```nix\nisOption 1             // => false\nisOption (mkOption {}) // => true\n```\n\n:::\n\n# Type\n\n```\nisOption :: Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":77,"column":3},"path":["lib","options","isOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.literalCode","path":["lib","options","literalCode"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":759,"column":3},"attr_expr":"literalCode =\n    languageTag: text:\n    lib.literalMD ''\n      ```${languageTag}\n      ${text}\n      ```\n    '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":760,"column":5},"lambda_expr":"literalCode =\n    languageTag: text:\n    lib.literalMD ''\n      ```${languageTag}\n      ${text}\n      ```\n    '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":759,"column":3},"path":["lib","options","literalCode"],"pos_type":"Attribute"}},"content":{"content":"\nFor use in the `defaultText` and `example` option attributes. Causes the\ngiven string to be rendered verbatim in the documentation as a code\nblock with the language bassed on the provided input tag.\n\nIf you wish to render Nix code, please see `literalExpression`.\n\n# Examples\n:::{.example}\n## `literalCode` usage example\n\n```nix\nmyPythonScript = mkOption {\n  type = types.str;\n  description = ''\n    Example python script used by a module\n  '';\n  example = literalCode \"python\" ''\n    print(\"Hello world!\")\n  '';\n};\n```\n\n:::\n\n# Inputs\n\n`languageTag`\n\n: The language tag to use when producing the code block (i.e. `js`, `rs`, etc).\n\n`text`\n\n: The text to render as a Nix expression\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":759,"column":3},"path":["lib","options","literalCode"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.literalExpression","path":["lib","options","literalExpression"],"aliases":[["lib","literalExpression"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":714,"column":3},"attr_expr":"literalExpression =\n    text:\n    if !isString text then\n      throw \"literalExpression expects a string.\"\n    else\n      {\n        _type = \"literalExpression\";\n        inherit text;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":715,"column":5},"lambda_expr":"literalExpression =\n    text:\n    if !isString text then\n      throw \"literalExpression expects a string.\"\n    else\n      {\n        _type = \"literalExpression\";\n        inherit text;\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":714,"column":3},"path":["lib","options","literalExpression"],"pos_type":"Attribute"}},"content":{"content":"\nFor use in the `defaultText` and `example` option attributes. Causes the\ngiven string to be rendered verbatim in the documentation as Nix code. This\nis necessary for complex values, e.g. functions, or values that depend on\nother values or packages.\n\n# Examples\n:::{.example}\n## `literalExpression` usage example\n\n```nix\nllvmPackages = mkOption {\n  type = types.str;\n  description = ''\n    Version of llvm packages to use for\n    this module\n  '';\n  example = literalExpression ''\n    llvmPackages = pkgs.llvmPackages_20;\n  '';\n};\n```\n\n:::\n\n# Inputs\n\n`text`\n\n: The text to render as a Nix expression\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":714,"column":3},"path":["lib","options","literalExpression"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.literalMD","path":["lib","options","literalMD"],"aliases":[["lib","literalMD"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":778,"column":3},"attr_expr":"literalMD =\n    text:\n    if !isString text then\n      throw \"literalMD expects a string.\"\n    else\n      {\n        _type = \"literalMD\";\n        inherit text;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":779,"column":5},"lambda_expr":"literalMD =\n    text:\n    if !isString text then\n      throw \"literalMD expects a string.\"\n    else\n      {\n        _type = \"literalMD\";\n        inherit text;\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":778,"column":3},"path":["lib","options","literalMD"],"pos_type":"Attribute"}},"content":{"content":"\nFor use in the `defaultText` and `example` option attributes. Causes the\ngiven MD text to be inserted verbatim in the documentation, for when\na `literalExpression` would be too hard to read.\n\n# Inputs\n\n`text`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":778,"column":3},"path":["lib","options","literalMD"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mergeDefaultOption","path":["lib","options","mergeDefaultOption"],"aliases":[["lib","mergeDefaultOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":422,"column":3},"attr_expr":"mergeDefaultOption =\n    loc: defs:\n    let\n      list = getValues defs;\n    in\n    if length list == 1 then\n      head list\n    else if all isFunction list then\n      x: mergeDefaultOption loc (map (f: f x) list)\n    else if all isList list then\n      concatLists list\n    else if all isAttrs list then\n      foldl' lib.mergeAttrs { } list\n    else if all isBool list then\n      foldl' lib.\"or\" false list\n    else if all isString list then\n      lib.concatStrings list\n    else if all isInt list && all (x: x == head list) list then\n      head list\n    else\n      throw \"Cannot merge definitions of `${showOption loc}'. Definition values:${showDefs defs}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":423,"column":5},"lambda_expr":"mergeDefaultOption =\n    loc: defs:\n    let\n      list = getValues defs;\n    in\n    if length list == 1 then\n      head list\n    else if all isFunction list then\n      x: mergeDefaultOption loc (map (f: f x) list)\n    else if all isList list then\n      concatLists list\n    else if all isAttrs list then\n      foldl' lib.mergeAttrs { } list\n    else if all isBool list then\n      foldl' lib.\"or\" false list\n    else if all isString list then\n      lib.concatStrings list\n    else if all isInt list && all (x: x == head list) list then\n      head list\n    else\n      throw \"Cannot merge definitions of `${showOption loc}'. Definition values:${showDefs defs}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":422,"column":3},"path":["lib","options","mergeDefaultOption"],"pos_type":"Attribute"}},"content":{"content":"\nA merge function that merges multiple definitions of an option into a single value\n\n:::{.caution}\nThis function is used as the default merge operation in `lib.types.mkOptionType`. In most cases, explicit usage of this function is unnecessary.\n:::\n\n# Inputs\n\n`loc`\n: location of the option in the configuration as a list of strings.\n\n  e.g. `[\"boot\" \"loader \"grub\" \"enable\"]`\n\n`defs`\n: list of definition values and locations.\n\n  e.g. `[ { file = \"/foo.nix\"; value = 1; } { file = \"/bar.nix\"; value = 2 } ]`\n\n# Example\n:::{.example}\n## `lib.options.mergeDefaultOption` usage example\n\n```nix\nmyType = mkOptionType {\n  name = \"myType\";\n  merge = mergeDefaultOption; # <- This line is redundant. It is the default already.\n};\n```\n\n:::\n\n# Merge behavior\n\nMerging requires all definition values to have the same type.\n\n- If all definitions are booleans, the result of a `foldl'` with the `or` operation is returned.\n- If all definitions are strings, they are concatenated. (`lib.concatStrings`)\n- If all definitions are integers and all are equal, the first one is returned.\n- If all definitions are lists, they are concatenated. (`++`)\n- If all definitions are attribute sets, they are merged. (`lib.mergeAttrs`)\n- If all definitions are functions, the first function is applied to the result of the second function. (`f -> x: f x`)\n- Otherwise, an error is thrown.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":422,"column":3},"path":["lib","options","mergeDefaultOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mergeEqualOption","path":["lib","options","mergeEqualOption"],"aliases":[["lib","mergeEqualOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":499,"column":3},"attr_expr":"mergeEqualOption =\n    loc: defs:\n    if defs == [ ] then\n      abort \"This case should never happen.\"\n    # Returns early if we only have one element\n    # This also makes it work for functions, because the foldl' below would try\n    # to compare the first element with itself, which is false for functions\n    else if length defs == 1 then\n      (head defs).value\n    else\n      (foldl' (\n        first: def:\n        if def.value != first.value then\n          throw \"The option `${showOption loc}' has conflicting definition values:${\n            showDefs [\n              first\n              def\n            ]\n          }\\n${prioritySuggestion}\"\n        else\n          first\n      ) (head defs) (tail defs)).value;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":500,"column":5},"lambda_expr":"mergeEqualOption =\n    loc: defs:\n    if defs == [ ] then\n      abort \"This case should never happen.\"\n    # Returns early if we only have one element\n    # This also makes it work for functions, because the foldl' below would try\n    # to compare the first element with itself, which is false for functions\n    else if length defs == 1 then\n      (head defs).value\n    else\n      (foldl' (\n        first: def:\n        if def.value != first.value then\n          throw \"The option `${showOption loc}' has conflicting definition values:${\n            showDefs [\n              first\n              def\n            ]\n          }\\n${prioritySuggestion}\"\n        else\n          first\n      ) (head defs) (tail defs)).value;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":499,"column":3},"path":["lib","options","mergeEqualOption"],"pos_type":"Attribute"}},"content":{"content":"\n\"Merge\" option definitions by checking that they all have the same value.\n\n# Inputs\n\n`loc`\n\n: 1\\. Function argument\n\n`defs`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":499,"column":3},"path":["lib","options","mergeEqualOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mergeOneOption","path":["lib","options","mergeOneOption"],"aliases":[["lib","mergeOneOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":451,"column":3},"attr_expr":"mergeOneOption = mergeUniqueOption { message = \"\"; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":479,"column":5},"lambda_expr":"loc: defs:\n    if length defs == 1 then\n      merge loc defs\n    else\n      assert length defs > 1;\n      throw \"The option `${showOption loc}' is defined multiple times while it's expected to be unique.\\n${message}\\nDefinition values:${showDefs defs}\\n${prioritySuggestion}\"","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":451,"column":3},"path":["lib","options","mergeOneOption"],"pos_type":"Attribute"}},"content":{"content":"\nRequire a single definition.\n\n::: {.warning}\nDoes not perform nested checks, as this does not run the merge function!\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":451,"column":3},"path":["lib","options","mergeOneOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mergeUniqueOption","path":["lib","options","mergeUniqueOption"],"aliases":[["lib","mergeUniqueOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":470,"column":3},"attr_expr":"mergeUniqueOption =\n    {\n      message,\n      # WARNING: the default merge function assumes that the definition is a valid (option) value. You MUST pass a merge function if the return value needs to be\n      #   - type checked beyond what .check does (which should be very little; only on the value head; not attribute values, etc)\n      #   - if you want attribute values to be checked, or list items\n      #   - if you want coercedTo-like behavior to work\n      merge ? loc: defs: (head defs).value,\n    }:\n    loc: defs:\n    if length defs == 1 then\n      merge loc defs\n    else\n      assert length defs > 1;\n      throw \"The option `${showOption loc}' is defined multiple times while it's expected to be unique.\\n${message}\\nDefinition values:${showDefs defs}\\n${prioritySuggestion}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":471,"column":5},"lambda_expr":"mergeUniqueOption =\n    {\n      message,\n      # WARNING: the default merge function assumes that the definition is a valid (option) value. You MUST pass a merge function if the return value needs to be\n      #   - type checked beyond what .check does (which should be very little; only on the value head; not attribute values, etc)\n      #   - if you want attribute values to be checked, or list items\n      #   - if you want coercedTo-like behavior to work\n      merge ? loc: defs: (head defs).value,\n    }:\n    loc: defs:\n    if length defs == 1 then\n      merge loc defs\n    else\n      assert length defs > 1;\n      throw \"The option `${showOption loc}' is defined multiple times while it's expected to be unique.\\n${message}\\nDefinition values:${showDefs defs}\\n${prioritySuggestion}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":470,"column":3},"path":["lib","options","mergeUniqueOption"],"pos_type":"Attribute"}},"content":{"content":"\nRequire a single definition.\n\n::: {.note}\nWhen the type is not checked completely by check, pass a merge function for further checking (of sub-attributes, etc).\n:::\n\n# Inputs\n\n`loc`\n\n: 2\\. Function argument\n\n`defs`\n\n: 3\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":470,"column":3},"path":["lib","options","mergeUniqueOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mkEnableOption","path":["lib","options","mkEnableOption"],"aliases":[["lib","mkEnableOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":186,"column":3},"attr_expr":"mkEnableOption =\n    name:\n    mkOption {\n      default = false;\n      example = true;\n      description = \"Whether to enable ${name}.\";\n      type = lib.types.bool;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":187,"column":5},"lambda_expr":"mkEnableOption =\n    name:\n    mkOption {\n      default = false;\n      example = true;\n      description = \"Whether to enable ${name}.\";\n      type = lib.types.bool;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":186,"column":3},"path":["lib","options","mkEnableOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreates an option declaration with a default value of `false`, and can be defined to `true`.\n\n# Inputs\n\n`name`\n\n: Name for the created option\n\n# Examples\n:::{.example}\n## `lib.options.mkEnableOption` usage example\n\n```nix\n# module\nlet\n  eval = lib.evalModules {\n    modules = [\n      {\n        options.foo.enable = mkEnableOption \"foo\";\n\n        config.foo.enable = true;\n      }\n    ];\n  };\nin\neval.config\n=> { foo.enable = true; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":186,"column":3},"path":["lib","options","mkEnableOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mkOption","path":["lib","options","mkOption"],"aliases":[["lib","mkOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":139,"column":3},"attr_expr":"mkOption =\n    {\n      default ? null,\n      defaultText ? null,\n      example ? null,\n      description ? null,\n      relatedPackages ? null,\n      type ? null,\n      apply ? null,\n      internal ? null,\n      visible ? null,\n      readOnly ? null,\n    }@attrs:\n    attrs // { _type = \"option\"; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":140,"column":5},"lambda_expr":"mkOption =\n    {\n      default ? null,\n      defaultText ? null,\n      example ? null,\n      description ? null,\n      relatedPackages ? null,\n      type ? null,\n      apply ? null,\n      internal ? null,\n      visible ? null,\n      readOnly ? null,\n    }@attrs:\n    attrs // { _type = \"option\"; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":139,"column":3},"path":["lib","options","mkOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreates an Option declaration for use with the module system.\n\n# Inputs\n\nAttribute set\n: containing none or some of the following attributes.\n\n  `default`\n  : Optional default value used when no definition is given in the configuration.\n\n  `defaultText`\n  : Substitute for documenting the `default`, if evaluating the default value during documentation rendering is not possible.\n  : Can be any nix value that evaluates.\n  : Usage with `lib.literalMD` or `lib.literalExpression` is supported\n\n  `example`\n  : Optional example value used in the manual.\n  : Can be any nix value that evaluates.\n  : Usage with `lib.literalMD` or `lib.literalExpression` is supported\n\n  `description`\n  : Optional string describing the option. This is required if option documentation is generated.\n\n  `relatedPackages`\n  : Optional related packages used in the manual (see `genRelatedPackages` in `../nixos/lib/make-options-doc/default.nix`).\n\n  `type`\n  : Optional option type, providing type-checking and value merging.\n\n  `apply`\n  : Optional function that converts the option value to something else.\n\n  `internal`\n  : Optional boolean indicating whether the option is for NixOS developers only.\n\n  `visible`\n  : Optional, whether the option and/or sub-options show up in the manual.\n    Use false to hide the option and any sub-options from submodules.\n    Use \"shallow\" to hide only sub-options.\n    Use \"transparent\" to hide this option, but not its sub-options.\n    Default: true.\n\n  `readOnly`\n  : Optional boolean indicating whether the option can be set only once.\n\n# Examples\n:::{.example}\n## `lib.options.mkOption` usage example\n\n```nix\nmkOption { }\n# => Empty option; type = types.anything\n\nmkOption { default = \"foo\"; }\n# => Same as above, with a default value\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":139,"column":3},"path":["lib","options","mkOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mkPackageOption","path":["lib","options","mkPackageOption"],"aliases":[["lib","mkPackageOption"]],"signature":"mkPackageOption :: Pkgs -> (String | [String]) -> { nullable? :: Bool; default? :: String | [String]; example? :: Null | String | [String]; extraDescription? :: String; pkgsText? :: String; } -> Option\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":308,"column":3},"attr_expr":"mkPackageOption =\n    pkgs: name:\n    {\n      nullable ? false,\n      default ? name,\n      example ? null,\n      extraDescription ? \"\",\n      pkgsText ? \"pkgs\",\n    }:\n    let\n      name' = if isList name then last name else name;\n      default' = toList default;\n      defaultText = showAttrPath default';\n      defaultValue = attrByPath default' (throw \"${defaultText} cannot be found in ${pkgsText}\") pkgs;\n      defaults =\n        if default != null then\n          {\n            default = defaultValue;\n            defaultText = literalExpression \"${pkgsText}.${defaultText}\";\n          }\n        else\n          optionalAttrs nullable {\n            default = null;\n          };\n    in\n    mkOption (\n      defaults\n      // {\n        description =\n          \"The ${name'} package to use.\" + (if extraDescription == \"\" then \"\" else \" \") + extraDescription;\n        type = with lib.types; (if nullable then nullOr else lib.id) package;\n      }\n      // optionalAttrs (example != null) {\n        example = literalExpression (\n          if isList example then \"${pkgsText}.${showAttrPath example}\" else example\n        );\n      }\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":309,"column":5},"lambda_expr":"mkPackageOption =\n    pkgs: name:\n    {\n      nullable ? false,\n      default ? name,\n      example ? null,\n      extraDescription ? \"\",\n      pkgsText ? \"pkgs\",\n    }:\n    let\n      name' = if isList name then last name else name;\n      default' = toList default;\n      defaultText = showAttrPath default';\n      defaultValue = attrByPath default' (throw \"${defaultText} cannot be found in ${pkgsText}\") pkgs;\n      defaults =\n        if default != null then\n          {\n            default = defaultValue;\n            defaultText = literalExpression \"${pkgsText}.${defaultText}\";\n          }\n        else\n          optionalAttrs nullable {\n            default = null;\n          };\n    in\n    mkOption (\n      defaults\n      // {\n        description =\n          \"The ${name'} package to use.\" + (if extraDescription == \"\" then \"\" else \" \") + extraDescription;\n        type = with lib.types; (if nullable then nullOr else lib.id) package;\n      }\n      // optionalAttrs (example != null) {\n        example = literalExpression (\n          if isList example then \"${pkgsText}.${showAttrPath example}\" else example\n        );\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":308,"column":3},"path":["lib","options","mkPackageOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreates an Option attribute set for an option that specifies the\npackage a module should use for some purpose.\n\nThe package is specified in the third argument under `default` as a list of strings\nrepresenting its attribute path in nixpkgs (or another package set).\nBecause of this, you need to pass nixpkgs itself (usually `pkgs` in a module;\nalternatively to nixpkgs itself, another package set) as the first argument.\n\nIf you pass another package set you should set the `pkgsText` option.\nThis option is used to display the expression for the package set. It is `\"pkgs\"` by default.\nIf your expression is complex you should parenthesize it, as the `pkgsText` argument\nis usually immediately followed by an attribute lookup (`.`).\n\nThe second argument may be either a string or a list of strings.\nIt provides the display name of the package in the description of the generated option\n(using only the last element if the passed value is a list)\nand serves as the fallback value for the `default` argument.\n\nTo include extra information in the description, pass `extraDescription` to\nappend arbitrary text to the generated description.\n\nYou can also pass an `example` value, either a literal string or an attribute path.\n\nThe `default` argument can be omitted if the provided name is\nan attribute of pkgs (if `name` is a string) or a valid attribute path in pkgs (if `name` is a list).\nYou can also set `default` to just a string in which case it is interpreted as an attribute name\n(a singleton attribute path, if you will).\n\nIf you wish to explicitly provide no default, pass `null` as `default`.\n\nIf you want users to be able to set no package, pass `nullable = true`.\nIn this mode a `default = null` will not be interpreted as no default and is interpreted literally.\n\n# Inputs\n\n`pkgs`\n\n: Package set (an instantiation of nixpkgs such as pkgs in modules or another package set)\n\n`name`\n\n: Name for the package, shown in option description\n\nStructured function argument\n: Attribute set containing the following attributes.\n\n  `nullable`\n  : Optional whether the package can be null, for example to disable installing a package altogether. Default: `false`\n\n  `default`\n  : Optional attribute path where the default package is located. Default: `name`\n    If omitted will be copied from `name`\n\n  `example`\n  : Optional string or an attribute path to use as an example. Default: `null`\n\n  `extraDescription`\n  : Optional additional text to include in the option description. Default: `\"\"`\n\n  `pkgsText`\n  : Optional representation of the package set passed as pkgs. Default: `\"pkgs\"`\n\n# Type\n\n```\nmkPackageOption :: Pkgs -> (String | [String]) -> { nullable? :: Bool; default? :: String | [String]; example? :: Null | String | [String]; extraDescription? :: String; pkgsText? :: String; } -> Option\n```\n\n# Examples\n:::{.example}\n## `lib.options.mkPackageOption` usage example\n\n```nix\nmkPackageOption pkgs \"hello\" { }\n=> { ...; default = pkgs.hello; defaultText = literalExpression \"pkgs.hello\"; description = \"The hello package to use.\"; type = package; }\n\nmkPackageOption pkgs \"GHC\" {\n  default = [ \"ghc\" ];\n  example = \"pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])\";\n}\n=> { ...; default = pkgs.ghc; defaultText = literalExpression \"pkgs.ghc\"; description = \"The GHC package to use.\"; example = literalExpression \"pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])\"; type = package; }\n\nmkPackageOption pkgs [ \"python3Packages\" \"pytorch\" ] {\n  extraDescription = \"This is an example and doesn't actually do anything.\";\n}\n=> { ...; default = pkgs.python3Packages.pytorch; defaultText = literalExpression \"pkgs.python3Packages.pytorch\"; description = \"The pytorch package to use. This is an example and doesn't actually do anything.\"; type = package; }\n\nmkPackageOption pkgs \"nushell\" {\n  nullable = true;\n}\n=> { ...; default = pkgs.nushell; defaultText = literalExpression \"pkgs.nushell\"; description = \"The nushell package to use.\"; type = nullOr package; }\n\nmkPackageOption pkgs \"coreutils\" {\n  default = null;\n}\n=> { ...; description = \"The coreutils package to use.\"; type = package; }\n\nmkPackageOption pkgs \"dbus\" {\n  nullable = true;\n  default = null;\n}\n=> { ...; default = null; description = \"The dbus package to use.\"; type = nullOr package; }\n\nmkPackageOption pkgs.javaPackages \"OpenJFX\" {\n  default = \"openjfx20\";\n  pkgsText = \"pkgs.javaPackages\";\n}\n=> { ...; default = pkgs.javaPackages.openjfx20; defaultText = literalExpression \"pkgs.javaPackages.openjfx20\"; description = \"The OpenJFX package to use.\"; type = package; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":308,"column":3},"path":["lib","options","mkPackageOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.mkSinkUndeclaredOptions","path":["lib","options","mkSinkUndeclaredOptions"],"aliases":[["lib","mkSinkUndeclaredOptions"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":360,"column":3},"attr_expr":"mkSinkUndeclaredOptions =\n    attrs:\n    mkOption (\n      {\n        internal = true;\n        visible = false;\n        default = false;\n        description = \"Sink for option definitions.\";\n        type = mkOptionType {\n          name = \"sink\";\n          check = x: true;\n          merge = loc: defs: false;\n        };\n        apply = x: throw \"Option value is not readable because the option is not declared.\";\n      }\n      // attrs\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":361,"column":5},"lambda_expr":"mkSinkUndeclaredOptions =\n    attrs:\n    mkOption (\n      {\n        internal = true;\n        visible = false;\n        default = false;\n        description = \"Sink for option definitions.\";\n        type = mkOptionType {\n          name = \"sink\";\n          check = x: true;\n          merge = loc: defs: false;\n        };\n        apply = x: throw \"Option value is not readable because the option is not declared.\";\n      }\n      // attrs\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":360,"column":3},"path":["lib","options","mkSinkUndeclaredOptions"],"pos_type":"Attribute"}},"content":{"content":"\nThis option accepts arbitrary definitions, but it does not produce an option value.\n\nThis is useful for sharing a module across different module sets\nwithout having to implement similar features as long as the\nvalues of the options are not accessed.\n\n# Inputs\n\n`attrs`\n\n: Attribute set whose attributes override the argument to `mkOption`.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":360,"column":3},"path":["lib","options","mkSinkUndeclaredOptions"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.optionAttrSetToDocList","path":["lib","options","optionAttrSetToDocList"],"aliases":[["lib","optionAttrSetToDocList"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":568,"column":3},"attr_expr":"optionAttrSetToDocList = optionAttrSetToDocList' [ ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":8},"lambda_expr":"options:\n    concatMap (\n      opt:\n      let\n        name = showOption opt.loc;\n        visible = opt.visible or true;\n        docOption = {\n          loc = opt.loc;\n          inherit name;\n          description = opt.description or null;\n          declarations = filter (x: x != unknownModule) opt.declarations;\n          internal = opt.internal or false;\n          visible = if isBool visible then visible else visible == \"shallow\";\n          readOnly = opt.readOnly or false;\n          type = opt.type.description or \"unspecified\";\n        }\n        // optionalAttrs (opt ? example) {\n          example = builtins.addErrorContext \"while evaluating the example of option `${name}`\" (\n            renderOptionValue opt.example\n          );\n        }\n        //\n          optionalAttrs\n            (\n              opt ? defaultText\n              || opt ? default\n              # Render emptyValue-based defaults, but only for types without\n              # submodules (e.g. types.submodule). Submodules may evaluate to\n              # error without user defs, and their sub-options are documented\n              # individually, so best to skip those here.\n              || ((opt.type or { }).emptyValue or { }) ? value && (opt.type or { }).getSubModules or null == null\n            )\n            {\n              default =\n                builtins.addErrorContext\n                  \"while evaluating the ${\n                    if opt ? defaultText then \"defaultText\" else \"default value\"\n                  } of option `${name}`\"\n                  (renderOptionValue (opt.defaultText or opt.default or opt.type.emptyValue.value));\n            }\n        // optionalAttrs (opt ? relatedPackages && opt.relatedPackages != null) {\n          inherit (opt) relatedPackages;\n        };\n\n        subOptions =\n          let\n            ss = opt.type.getSubOptions opt.loc;\n          in\n          if ss != { } then optionAttrSetToDocList' opt.loc ss else [ ];\n        subOptionsVisible = if isBool visible then visible else visible == \"transparent\";\n      in\n      # To find infinite recursion in NixOS option docs:\n      # builtins.trace opt.loc\n      [ docOption ] ++ optionals subOptionsVisible subOptions\n    ) (collect isOption options)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.options.optionAttrSetToDocList' (Prime)","path":["lib","options","optionAttrSetToDocList'"],"aliases":[["lib","optionAttrSetToDocList'"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":570,"column":3},"attr_expr":"optionAttrSetToDocList' =\n    _: options:\n    concatMap (\n      opt:\n      let\n        name = showOption opt.loc;\n        visible = opt.visible or true;\n        docOption = {\n          loc = opt.loc;\n          inherit name;\n          description = opt.description or null;\n          declarations = filter (x: x != unknownModule) opt.declarations;\n          internal = opt.internal or false;\n          visible = if isBool visible then visible else visible == \"shallow\";\n          readOnly = opt.readOnly or false;\n          type = opt.type.description or \"unspecified\";\n        }\n        // optionalAttrs (opt ? example) {\n          example = builtins.addErrorContext \"while evaluating the example of option `${name}`\" (\n            renderOptionValue opt.example\n          );\n        }\n        //\n          optionalAttrs\n            (\n              opt ? defaultText\n              || opt ? default\n              # Render emptyValue-based defaults, but only for types without\n              # submodules (e.g. types.submodule). Submodules may evaluate to\n              # error without user defs, and their sub-options are documented\n              # individually, so best to skip those here.\n              || ((opt.type or { }).emptyValue or { }) ? value && (opt.type or { }).getSubModules or null == null\n            )\n            {\n              default =\n                builtins.addErrorContext\n                  \"while evaluating the ${\n                    if opt ? defaultText then \"defaultText\" else \"default value\"\n                  } of option `${name}`\"\n                  (renderOptionValue (opt.defaultText or opt.default or opt.type.emptyValue.value));\n            }\n        // optionalAttrs (opt ? relatedPackages && opt.relatedPackages != null) {\n          inherit (opt) relatedPackages;\n        };\n\n        subOptions =\n          let\n            ss = opt.type.getSubOptions opt.loc;\n          in\n          if ss != { } then optionAttrSetToDocList' opt.loc ss else [ ];\n        subOptionsVisible = if isBool visible then visible else visible == \"transparent\";\n      in\n      # To find infinite recursion in NixOS option docs:\n      # builtins.trace opt.loc\n      [ docOption ] ++ optionals subOptionsVisible subOptions\n    ) (collect isOption options);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":5},"lambda_expr":"_: options:\n    concatMap (\n      opt:\n      let\n        name = showOption opt.loc;\n        visible = opt.visible or true;\n        docOption = {\n          loc = opt.loc;\n          inherit name;\n          description = opt.description or null;\n          declarations = filter (x: x != unknownModule) opt.declarations;\n          internal = opt.internal or false;\n          visible = if isBool visible then visible else visible == \"shallow\";\n          readOnly = opt.readOnly or false;\n          type = opt.type.description or \"unspecified\";\n        }\n        // optionalAttrs (opt ? example) {\n          example = builtins.addErrorContext \"while evaluating the example of option `${name}`\" (\n            renderOptionValue opt.example\n          );\n        }\n        //\n          optionalAttrs\n            (\n              opt ? defaultText\n              || opt ? default\n              # Render emptyValue-based defaults, but only for types without\n              # submodules (e.g. types.submodule). Submodules may evaluate to\n              # error without user defs, and their sub-options are documented\n              # individually, so best to skip those here.\n              || ((opt.type or { }).emptyValue or { }) ? value && (opt.type or { }).getSubModules or null == null\n            )\n            {\n              default =\n                builtins.addErrorContext\n                  \"while evaluating the ${\n                    if opt ? defaultText then \"defaultText\" else \"default value\"\n                  } of option `${name}`\"\n                  (renderOptionValue (opt.defaultText or opt.default or opt.type.emptyValue.value));\n            }\n        // optionalAttrs (opt ? relatedPackages && opt.relatedPackages != null) {\n          inherit (opt) relatedPackages;\n        };\n\n        subOptions =\n          let\n            ss = opt.type.getSubOptions opt.loc;\n          in\n          if ss != { } then optionAttrSetToDocList' opt.loc ss else [ ];\n        subOptionsVisible = if isBool visible then visible else visible == \"transparent\";\n      in\n      # To find infinite recursion in NixOS option docs:\n      # builtins.trace opt.loc\n      [ docOption ] ++ optionals subOptionsVisible subOptions\n    ) (collect isOption options)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":5},"path":["lib","options","optionAttrSetToDocList'"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":571,"column":5},"path":["lib","options","optionAttrSetToDocList'"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.options.renderOptionValue","path":["lib","options","renderOptionValue"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":671,"column":3},"attr_expr":"renderOptionValue =\n    v:\n    if v ? _type && v ? text then\n      v\n    else\n      literalExpression (\n        lib.generators.toPretty {\n          multiline = true;\n          allowPrettyValues = true;\n        } v\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":672,"column":5},"lambda_expr":"renderOptionValue =\n    v:\n    if v ? _type && v ? text then\n      v\n    else\n      literalExpression (\n        lib.generators.toPretty {\n          multiline = true;\n          allowPrettyValues = true;\n        } v\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":671,"column":3},"path":["lib","options","renderOptionValue"],"pos_type":"Attribute"}},"content":{"content":"\nEnsures that the given option value (default or example) is a `_type`d string\nby rendering Nix values to `literalExpression`s.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":671,"column":3},"path":["lib","options","renderOptionValue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.scrubOptionValue","path":["lib","options","scrubOptionValue"],"aliases":[["lib","scrubOptionValue"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":645,"column":3},"attr_expr":"scrubOptionValue =\n    x:\n    if isDerivation x then\n      {\n        type = \"derivation\";\n        drvPath = x.name;\n        outPath = x.name;\n        name = x.name;\n      }\n    else if isList x then\n      map scrubOptionValue x\n    else if isAttrs x then\n      mapAttrs (n: v: scrubOptionValue v) (removeAttrs x [ \"_args\" ])\n    else\n      x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":646,"column":5},"lambda_expr":"scrubOptionValue =\n    x:\n    if isDerivation x then\n      {\n        type = \"derivation\";\n        drvPath = x.name;\n        outPath = x.name;\n        name = x.name;\n      }\n    else if isList x then\n      map scrubOptionValue x\n    else if isAttrs x then\n      mapAttrs (n: v: scrubOptionValue v) (removeAttrs x [ \"_args\" ])\n    else\n      x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":645,"column":3},"path":["lib","options","scrubOptionValue"],"pos_type":"Attribute"}},"content":{"content":"\nThis function recursively removes all derivation attributes from\n`x` except for the `name` attribute.\n\nThis is to make the generation of `options.xml` much more\nefficient: the XML representation of derivations is very large\n(on the order of megabytes) and is not actually used by the\nmanual generator.\n\nThis function was made obsolete by `renderOptionValue` and is kept for\ncompatibility with out-of-tree code.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":645,"column":3},"path":["lib","options","scrubOptionValue"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.showDefs","path":["lib","options","showDefs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":834,"column":3},"attr_expr":"showDefs =\n    defs:\n    concatMapStrings (\n      def:\n      let\n        # Pretty print the value for display, if successful\n        prettyEval = builtins.tryEval (\n          lib.generators.toPretty { } (\n            lib.generators.withRecursion {\n              depthLimit = 10;\n              throwOnDepthLimit = false;\n            } def.value\n          )\n        );\n        # Split it into its lines\n        lines = filter (v: !isList v) (builtins.split \"\\n\" prettyEval.value);\n        # Only display the first 5 lines, and indent them for better visibility\n        value = concatStringsSep \"\\n    \" (take 5 lines ++ optional (length lines > 5) \"...\");\n        result =\n          # Don't print any value if evaluating the value strictly fails\n          if !prettyEval.success then\n            \"\"\n          # Put it on a new line if it consists of multiple\n          else if length lines > 1 then\n            \":\\n    \" + value\n          else\n            \": \" + value;\n      in\n      \"\\n- In `${def.file}'${result}\"\n    ) defs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":835,"column":5},"lambda_expr":"defs:\n    concatMapStrings (\n      def:\n      let\n        # Pretty print the value for display, if successful\n        prettyEval = builtins.tryEval (\n          lib.generators.toPretty { } (\n            lib.generators.withRecursion {\n              depthLimit = 10;\n              throwOnDepthLimit = false;\n            } def.value\n          )\n        );\n        # Split it into its lines\n        lines = filter (v: !isList v) (builtins.split \"\\n\" prettyEval.value);\n        # Only display the first 5 lines, and indent them for better visibility\n        value = concatStringsSep \"\\n    \" (take 5 lines ++ optional (length lines > 5) \"...\");\n        result =\n          # Don't print any value if evaluating the value strictly fails\n          if !prettyEval.success then\n            \"\"\n          # Put it on a new line if it consists of multiple\n          else if length lines > 1 then\n            \":\\n    \" + value\n          else\n            \": \" + value;\n      in\n      \"\\n- In `${def.file}'${result}\"\n    ) defs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":835,"column":5},"path":["lib","options","showDefs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":835,"column":5},"path":["lib","options","showDefs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.options.showFiles","path":["lib","options","showFiles"],"aliases":[["lib","showFiles"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":832,"column":3},"attr_expr":"showFiles = files: concatStringsSep \" and \" (map (f: \"`${f}'\") files);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":832,"column":15},"lambda_expr":"files: concatStringsSep \" and \" (map (f: \"`${f}'\") files)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":832,"column":15},"path":["lib","options","showFiles"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":832,"column":15},"path":["lib","options","showFiles"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.options.showOption","path":["lib","options","showOption"],"aliases":[["lib","showOption"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":817,"column":3},"attr_expr":"showOption =\n    parts:\n    let\n      # If the part is a named placeholder of the form \"<...>\" don't escape it.\n      # It may cause misleading escaping if somebody uses literally \"<...>\" in their option names.\n      # This is the trade-off to allow for placeholders in option names.\n      isNamedPlaceholder = builtins.match \"<(.*)>\";\n      escapeOptionPart =\n        part:\n        if part == \"*\" || isNamedPlaceholder part != null then\n          part\n        else\n          lib.strings.escapeNixIdentifier part;\n    in\n    (concatStringsSep \".\") (map escapeOptionPart parts);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":818,"column":5},"lambda_expr":"showOption =\n    parts:\n    let\n      # If the part is a named placeholder of the form \"<...>\" don't escape it.\n      # It may cause misleading escaping if somebody uses literally \"<...>\" in their option names.\n      # This is the trade-off to allow for placeholders in option names.\n      isNamedPlaceholder = builtins.match \"<(.*)>\";\n      escapeOptionPart =\n        part:\n        if part == \"*\" || isNamedPlaceholder part != null then\n          part\n        else\n          lib.strings.escapeNixIdentifier part;\n    in\n    (concatStringsSep \".\") (map escapeOptionPart parts);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":817,"column":3},"path":["lib","options","showOption"],"pos_type":"Attribute"}},"content":{"content":"\nConvert an option, described as a list of the option parts to a\nhuman-readable version.\n\n# Inputs\n\n`parts`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `showOption` usage example\n\n```nix\n(showOption [\"foo\" \"bar\" \"baz\"]) == \"foo.bar.baz\"\n  (showOption [\"foo\" \"bar.baz\" \"tux\"]) == \"foo.\\\"bar.baz\\\".tux\"\n  (showOption [\"windowManager\" \"2bwm\" \"enable\"]) == \"windowManager.\\\"2bwm\\\".enable\"\n\nPlaceholders will not be quoted as they are not actual values:\n  (showOption [\"foo\" \"*\" \"bar\"]) == \"foo.*.bar\"\n  (showOption [\"foo\" \"<name>\" \"bar\"]) == \"foo.<name>.bar\"\n  (showOption [\"foo\" \"<myPlaceholder>\" \"bar\"]) == \"foo.<myPlaceholder>.bar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":817,"column":3},"path":["lib","options","showOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.options.showOptionWithDefLocs","path":["lib","options","showOptionWithDefLocs"],"aliases":[["lib","showOptionWithDefLocs"]],"signature":"showOptionWithDefLocs :: { files :: [String]; loc :: [String]; ... } -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":905,"column":3},"attr_expr":"showOptionWithDefLocs = opt: ''\n    ${showOption opt.loc}, with values defined in:\n    ${concatMapStringsSep \"\\n\" (defFile: \"  - ${defFile}\") opt.files}\n  '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":905,"column":27},"lambda_expr":"showOptionWithDefLocs = opt: ''\n    ${showOption opt.loc}, with values defined in:\n    ${concatMapStringsSep \"\\n\" (defFile: \"  - ${defFile}\") opt.files}\n  '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":905,"column":3},"path":["lib","options","showOptionWithDefLocs"],"pos_type":"Attribute"}},"content":{"content":"\nPretty prints all option definition locations\n\n# Inputs\n\n`option`\n: The option to pretty print\n\n# Examples\n:::{.example}\n## `lib.options.showOptionWithDefLocs` usage example\n\n```nix\nshowOptionWithDefLocs { loc = [\"x\" \"y\" ]; files = [ \"foo.nix\" \"bar.nix\" ];  }\n\"x.y, with values defined in:\\n  - foo.nix\\n  - bar.nix\\n\"\n```\n\n```nix\nnix-repl> eval = lib.evalModules {\n    modules = [\n      {\n        options = {\n          foo = lib.mkEnableOption \"foo\";\n        };\n      }\n    ];\n  }\n\nnix-repl> lib.options.showOptionWithDefLocs eval.options.foo\n\"foo, with values defined in:\\n  - <unknown-file>\\n\"\n```\n\n:::\n\n# Type\n\n```\nshowOptionWithDefLocs :: { files :: [String]; loc :: [String]; ... } -> String\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/options.nix","line":905,"column":3},"path":["lib","options","showOptionWithDefLocs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.append","path":["lib","path","append"],"aliases":[],"signature":"append :: Path -> String -> Path\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":236,"column":3},"attr_expr":"append =\n    # The absolute path to append to\n    path:\n    # The subpath string to append\n    subpath:\n    assert assertMsg (isPath path)\n      \"lib.path.append: The first argument is of type ${builtins.typeOf path}, but a path was expected\";\n    assert assertMsg (isValid subpath) ''\n      lib.path.append: Second argument is not a valid subpath string:\n          ${subpathInvalidReason subpath}'';\n    path + (\"/\" + subpath);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":238,"column":5},"lambda_expr":"append =\n    # The absolute path to append to\n    path:\n    # The subpath string to append\n    subpath:\n    assert assertMsg (isPath path)\n      \"lib.path.append: The first argument is of type ${builtins.typeOf path}, but a path was expected\";\n    assert assertMsg (isValid subpath) ''\n      lib.path.append: Second argument is not a valid subpath string:\n          ${subpathInvalidReason subpath}'';\n    path + (\"/\" + subpath);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":236,"column":3},"path":["lib","path","append"],"pos_type":"Attribute"}},"content":{"content":"\nAppend a subpath string to a path.\n\nLike `path + (\"/\" + string)` but safer, because it errors instead of returning potentially surprising results.\nMore specifically, it checks that the first argument is a [path value type](https://nixos.org/manual/nix/stable/language/values.html#type-path\"),\nand that the second argument is a [valid subpath string](#function-library-lib.path.subpath.isValid).\n\nLaws:\n\n- Not influenced by subpath [normalisation](#function-library-lib.path.subpath.normalise):\n\n      append p s == append p (subpath.normalise s)\n\n# Inputs\n\n`path`\n\n: The absolute path to append to\n\n`subpath`\n\n: The subpath string to append\n\n# Type\n\n```\nappend :: Path -> String -> Path\n```\n\n# Examples\n:::{.example}\n## `append` usage example\n\n```nix\nappend /foo \"bar/baz\"\n=> /foo/bar/baz\n\n# subpaths don't need to be normalised\nappend /foo \"./bar//baz/./\"\n=> /foo/bar/baz\n\n# can append to root directory\nappend /. \"foo/bar\"\n=> /foo/bar\n\n# first argument needs to be a path value type\nappend \"/foo\" \"bar\"\n=> <error>\n\n# second argument needs to be a valid subpath string\nappend /foo /bar\n=> <error>\nappend /foo \"\"\n=> <error>\nappend /foo \"/bar\"\n=> <error>\nappend /foo \"../bar\"\n=> <error>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":236,"column":3},"path":["lib","path","append"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.hasPrefix","path":["lib","path","hasPrefix"],"aliases":[],"signature":"hasPrefix :: Path -> Path -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":286,"column":3},"attr_expr":"hasPrefix =\n    path1:\n    assert assertMsg (isPath path1)\n      \"lib.path.hasPrefix: First argument is of type ${typeOf path1}, but a path was expected\";\n    let\n      path1Deconstructed = deconstructPath path1;\n    in\n    path2:\n    assert assertMsg (isPath path2)\n      \"lib.path.hasPrefix: Second argument is of type ${typeOf path2}, but a path was expected\";\n    let\n      path2Deconstructed = deconstructPath path2;\n    in\n    assert assertMsg (path1Deconstructed.root == path2Deconstructed.root) ''\n      lib.path.hasPrefix: Filesystem roots must be the same for both paths, but paths with different roots were given:\n          first argument: \"${toString path1}\" with root \"${toString path1Deconstructed.root}\"\n          second argument: \"${toString path2}\" with root \"${toString path2Deconstructed.root}\"'';\n    take (length path1Deconstructed.components) path2Deconstructed.components\n    == path1Deconstructed.components;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":287,"column":5},"lambda_expr":"hasPrefix =\n    path1:\n    assert assertMsg (isPath path1)\n      \"lib.path.hasPrefix: First argument is of type ${typeOf path1}, but a path was expected\";\n    let\n      path1Deconstructed = deconstructPath path1;\n    in\n    path2:\n    assert assertMsg (isPath path2)\n      \"lib.path.hasPrefix: Second argument is of type ${typeOf path2}, but a path was expected\";\n    let\n      path2Deconstructed = deconstructPath path2;\n    in\n    assert assertMsg (path1Deconstructed.root == path2Deconstructed.root) ''\n      lib.path.hasPrefix: Filesystem roots must be the same for both paths, but paths with different roots were given:\n          first argument: \"${toString path1}\" with root \"${toString path1Deconstructed.root}\"\n          second argument: \"${toString path2}\" with root \"${toString path2Deconstructed.root}\"'';\n    take (length path1Deconstructed.components) path2Deconstructed.components\n    == path1Deconstructed.components;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":286,"column":3},"path":["lib","path","hasPrefix"],"pos_type":"Attribute"}},"content":{"content":"\nWhether the first path is a component-wise prefix of the second path.\n\nLaws:\n\n- `hasPrefix p q` is only true if [`q == append p s`](#function-library-lib.path.append) for some [subpath](#function-library-lib.path.subpath.isValid) `s`.\n\n- `hasPrefix` is a [non-strict partial order](https://en.wikipedia.org/wiki/Partially_ordered_set#Non-strict_partial_order) over the set of all path values.\n\n# Inputs\n\n`path1`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhasPrefix :: Path -> Path -> Bool\n```\n\n# Examples\n:::{.example}\n## `hasPrefix` usage example\n\n```nix\nhasPrefix /foo /foo/bar\n=> true\nhasPrefix /foo /foo\n=> true\nhasPrefix /foo/bar /foo\n=> false\nhasPrefix /. /foo\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":286,"column":3},"path":["lib","path","hasPrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.hasStorePathPrefix","path":["lib","path","hasStorePathPrefix"],"aliases":[],"signature":"hasStorePathPrefix :: Path -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":492,"column":3},"attr_expr":"hasStorePathPrefix =\n    path:\n    let\n      deconstructed = deconstructPath path;\n    in\n    assert assertMsg (isPath path)\n      \"lib.path.hasStorePathPrefix: Argument is of type ${typeOf path}, but a path was expected\";\n    assert assertMsg\n      # This function likely breaks or needs adjustment if used with other filesystem roots, if they ever get implemented.\n      # Let's try to error nicely in such a case, though it's unclear how an implementation would work even and whether this could be detected.\n      # See also https://github.com/NixOS/nix/pull/6530#discussion_r1422843117\n      (deconstructed.root == /. && toString deconstructed.root == \"/\")\n      \"lib.path.hasStorePathPrefix: Argument has a filesystem root (${toString deconstructed.root}) that's not /, which is currently not supported.\";\n    componentsHaveStorePathPrefix deconstructed.components;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":493,"column":5},"lambda_expr":"hasStorePathPrefix =\n    path:\n    let\n      deconstructed = deconstructPath path;\n    in\n    assert assertMsg (isPath path)\n      \"lib.path.hasStorePathPrefix: Argument is of type ${typeOf path}, but a path was expected\";\n    assert assertMsg\n      # This function likely breaks or needs adjustment if used with other filesystem roots, if they ever get implemented.\n      # Let's try to error nicely in such a case, though it's unclear how an implementation would work even and whether this could be detected.\n      # See also https://github.com/NixOS/nix/pull/6530#discussion_r1422843117\n      (deconstructed.root == /. && toString deconstructed.root == \"/\")\n      \"lib.path.hasStorePathPrefix: Argument has a filesystem root (${toString deconstructed.root}) that's not /, which is currently not supported.\";\n    componentsHaveStorePathPrefix deconstructed.components;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":492,"column":3},"path":["lib","path","hasStorePathPrefix"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a [path](https://nixos.org/manual/nix/stable/language/values.html#type-path)\nhas a [store path](https://nixos.org/manual/nix/stable/store/store-path.html#store-path)\nas a prefix.\n\n:::{.note}\nAs with all functions of this `lib.path` library, it does not work on paths in strings,\nwhich is how you'd typically get store paths.\n\nInstead, this function only handles path values themselves,\nwhich occur when Nix files in the store use relative path expressions.\n:::\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\nhasStorePathPrefix :: Path -> Bool\n```\n\n# Examples\n:::{.example}\n## `hasStorePathPrefix` usage example\n\n```nix\n# Subpaths of derivation outputs have a store path as a prefix\nhasStorePathPrefix /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo/bar/baz\n=> true\n\n# The store directory itself is not a store path\nhasStorePathPrefix /nix/store\n=> false\n\n# Derivation outputs are store paths themselves\nhasStorePathPrefix /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo\n=> true\n\n# Paths outside the Nix store don't have a store path prefix\nhasStorePathPrefix /home/user\n=> false\n\n# Not all paths under the Nix store are store paths\nhasStorePathPrefix /nix/store/.links/10gg8k3rmbw8p7gszarbk7qyd9jwxhcfq9i6s5i0qikx8alkk4hq\n=> false\n\n# Store derivations are also store paths themselves\nhasStorePathPrefix /nix/store/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo.drv\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":492,"column":3},"path":["lib","path","hasStorePathPrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.removePrefix","path":["lib","path","removePrefix"],"aliases":[],"signature":"removePrefix :: Path -> Path -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":345,"column":3},"attr_expr":"removePrefix =\n    path1:\n    assert assertMsg (isPath path1)\n      \"lib.path.removePrefix: First argument is of type ${typeOf path1}, but a path was expected.\";\n    let\n      path1Deconstructed = deconstructPath path1;\n      path1Length = length path1Deconstructed.components;\n    in\n    path2:\n    assert assertMsg (isPath path2)\n      \"lib.path.removePrefix: Second argument is of type ${typeOf path2}, but a path was expected.\";\n    let\n      path2Deconstructed = deconstructPath path2;\n      success = take path1Length path2Deconstructed.components == path1Deconstructed.components;\n      components =\n        if success then\n          drop path1Length path2Deconstructed.components\n        else\n          throw ''lib.path.removePrefix: The first path argument \"${toString path1}\" is not a component-wise prefix of the second path argument \"${toString path2}\".'';\n    in\n    assert assertMsg (path1Deconstructed.root == path2Deconstructed.root) ''\n      lib.path.removePrefix: Filesystem roots must be the same for both paths, but paths with different roots were given:\n          first argument: \"${toString path1}\" with root \"${toString path1Deconstructed.root}\"\n          second argument: \"${toString path2}\" with root \"${toString path2Deconstructed.root}\"'';\n    joinRelPath components;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":346,"column":5},"lambda_expr":"removePrefix =\n    path1:\n    assert assertMsg (isPath path1)\n      \"lib.path.removePrefix: First argument is of type ${typeOf path1}, but a path was expected.\";\n    let\n      path1Deconstructed = deconstructPath path1;\n      path1Length = length path1Deconstructed.components;\n    in\n    path2:\n    assert assertMsg (isPath path2)\n      \"lib.path.removePrefix: Second argument is of type ${typeOf path2}, but a path was expected.\";\n    let\n      path2Deconstructed = deconstructPath path2;\n      success = take path1Length path2Deconstructed.components == path1Deconstructed.components;\n      components =\n        if success then\n          drop path1Length path2Deconstructed.components\n        else\n          throw ''lib.path.removePrefix: The first path argument \"${toString path1}\" is not a component-wise prefix of the second path argument \"${toString path2}\".'';\n    in\n    assert assertMsg (path1Deconstructed.root == path2Deconstructed.root) ''\n      lib.path.removePrefix: Filesystem roots must be the same for both paths, but paths with different roots were given:\n          first argument: \"${toString path1}\" with root \"${toString path1Deconstructed.root}\"\n          second argument: \"${toString path2}\" with root \"${toString path2Deconstructed.root}\"'';\n    joinRelPath components;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":345,"column":3},"path":["lib","path","removePrefix"],"pos_type":"Attribute"}},"content":{"content":"\nRemove the first path as a component-wise prefix from the second path.\nThe result is a [normalised subpath string](#function-library-lib.path.subpath.normalise).\n\nLaws:\n\n- Inverts [`append`](#function-library-lib.path.append) for [normalised subpath string](#function-library-lib.path.subpath.normalise):\n\n      removePrefix p (append p s) == subpath.normalise s\n\n# Inputs\n\n`path1`\n\n: 1\\. Function argument\n\n# Type\n\n```\nremovePrefix :: Path -> Path -> String\n```\n\n# Examples\n:::{.example}\n## `removePrefix` usage example\n\n```nix\nremovePrefix /foo /foo/bar/baz\n=> \"./bar/baz\"\nremovePrefix /foo /foo\n=> \"./.\"\nremovePrefix /foo/bar /foo\n=> <error>\nremovePrefix /. /foo\n=> \"./foo\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":345,"column":3},"path":["lib","path","removePrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.splitRoot","path":["lib","path","splitRoot"],"aliases":[],"signature":"splitRoot :: Path -> { root :: Path; subpath :: String; }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":422,"column":3},"attr_expr":"splitRoot =\n    # The path to split the root off of\n    path:\n    assert assertMsg (isPath path)\n      \"lib.path.splitRoot: Argument is of type ${typeOf path}, but a path was expected\";\n    let\n      deconstructed = deconstructPath path;\n    in\n    {\n      root = deconstructed.root;\n      subpath = joinRelPath deconstructed.components;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":424,"column":5},"lambda_expr":"splitRoot =\n    # The path to split the root off of\n    path:\n    assert assertMsg (isPath path)\n      \"lib.path.splitRoot: Argument is of type ${typeOf path}, but a path was expected\";\n    let\n      deconstructed = deconstructPath path;\n    in\n    {\n      root = deconstructed.root;\n      subpath = joinRelPath deconstructed.components;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":422,"column":3},"path":["lib","path","splitRoot"],"pos_type":"Attribute"}},"content":{"content":"\nSplit the filesystem root from a [path](https://nixos.org/manual/nix/stable/language/values.html#type-path).\nThe result is an attribute set with these attributes:\n- `root`: The filesystem root of the path, meaning that this directory has no parent directory.\n- `subpath`: The [normalised subpath string](#function-library-lib.path.subpath.normalise) that when [appended](#function-library-lib.path.append) to `root` returns the original path.\n\nLaws:\n- [Appending](#function-library-lib.path.append) the `root` and `subpath` gives the original path:\n\n      p ==\n        append\n          (splitRoot p).root\n          (splitRoot p).subpath\n\n- Trying to get the parent directory of `root` using [`dirOf`](https://nixos.org/manual/nix/stable/language/builtins.html#builtins-dirOf) returns `root` itself:\n\n      dirOf (splitRoot p).root == (splitRoot p).root\n\n# Inputs\n\n`path`\n\n: The path to split the root off of\n\n# Type\n\n```\nsplitRoot :: Path -> { root :: Path; subpath :: String; }\n```\n\n# Examples\n:::{.example}\n## `splitRoot` usage example\n\n```nix\nsplitRoot /foo/bar\n=> { root = /.; subpath = \"./foo/bar\"; }\n\nsplitRoot /.\n=> { root = /.; subpath = \"./.\"; }\n\n# Nix neutralises `..` path components for all path values automatically\nsplitRoot /foo/../bar\n=> { root = /.; subpath = \"./bar\"; }\n\nsplitRoot \"/foo/bar\"\n=> <error>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":422,"column":3},"path":["lib","path","splitRoot"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.sources.canCleanSource","path":["lib","sources","canCleanSource"],"aliases":[["lib","canCleanSource"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":640,"column":5},"attr_expr":"canCleanSource","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":385,"column":20},"lambda_expr":"src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":385,"column":20},"path":["lib","sources","canCleanSource"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":385,"column":20},"path":["lib","sources","canCleanSource"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.cleanSource","path":["lib","sources","cleanSource"],"aliases":[["lib","cleanSource"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":636,"column":5},"attr_expr":"cleanSource","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":101,"column":5},"lambda_expr":"cleanSource =\n    src:\n    cleanSourceWith {\n      filter = cleanSourceFilter;\n      inherit src;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":101,"column":5},"path":["lib","sources","cleanSource"],"pos_type":"Lambda"}},"content":{"content":"\nFilters a source tree removing version control files and directories using `cleanSourceFilter`.\n\n# Inputs\n\n`src`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `cleanSource` usage example\n\n```nix\ncleanSource ./.\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":101,"column":5},"path":["lib","sources","cleanSource"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.cleanSourceFilter","path":["lib","sources","cleanSourceFilter"],"aliases":[["lib","cleanSourceFilter"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":638,"column":5},"attr_expr":"cleanSourceFilter","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":44,"column":5},"lambda_expr":"cleanSourceFilter =\n    name: type:\n    let\n      baseName = baseNameOf (toString name);\n    in\n    !(\n      # Filter out version control software files/directories\n      (\n        baseName == \".git\"\n        ||\n          type == \"directory\"\n          && (\n            baseName == \".svn\"\n            || baseName == \"CVS\"\n            || baseName == \".hg\"\n            || baseName == \".jj\"\n            || baseName == \".pijul\"\n            || baseName == \"_darcs\"\n          )\n      )\n      ||\n        # Filter out editor backup / swap files.\n        lib.hasSuffix \"~\" baseName\n      || match \"^\\\\.sw[a-z]$\" baseName != null\n      || match \"^\\\\..*\\\\.sw[a-z]$\" baseName != null\n      ||\n\n        # Filter out generates files.\n        lib.hasSuffix \".o\" baseName\n      || lib.hasSuffix \".so\" baseName\n      ||\n        # Filter out nix-build result symlinks\n        (type == \"symlink\" && lib.hasPrefix \"result\" baseName)\n      ||\n        # Filter out sockets and other types of files we can't have in the store.\n        (type == \"unknown\")\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":44,"column":5},"path":["lib","sources","cleanSourceFilter"],"pos_type":"Lambda"}},"content":{"content":"\nA basic filter for `cleanSourceWith` that removes\ndirectories of version control system, backup files (`*~`)\nand some generated files.\n\n# Inputs\n\n`name`\n\n: 1\\. Function argument\n\n`type`\n\n: 2\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":44,"column":5},"path":["lib","sources","cleanSourceFilter"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.cleanSourceWith","path":["lib","sources","cleanSourceWith"],"aliases":[["lib","cleanSourceWith"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":637,"column":5},"attr_expr":"cleanSourceWith","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":133,"column":5},"lambda_expr":"cleanSourceWith =\n    {\n      # A path or cleanSourceWith result to filter and/or rename.\n      src,\n      # Optional with default value: constant true (include everything)\n      # The function will be combined with the && operator such\n      # that src.filter is called lazily.\n      # For implementing a filter, see\n      # https://nixos.org/nix/manual/#builtin-filterSource\n      # Type: A function (Path -> Type -> Bool)\n      filter ? _path: _type: true,\n      # Optional name to use as part of the store path.\n      # This defaults to `src.name` or otherwise `\"source\"`.\n      name ? null,\n    }:\n    let\n      orig = toSourceAttributes src;\n    in\n    fromSourceAttributes {\n      inherit (orig) origSrc;\n      filter = path: type: filter path type && orig.filter path type;\n      name = if name != null then name else orig.name;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":133,"column":5},"path":["lib","sources","cleanSourceWith"],"pos_type":"Lambda"}},"content":{"content":"\nLike `builtins.filterSource`, except it will compose with itself,\nallowing you to chain multiple calls together without any\nintermediate copies being put in the nix store.\n\n# Examples\n:::{.example}\n## `cleanSourceWith` usage example\n\n```nix\nlib.cleanSourceWith {\n  filter = f;\n  src = lib.cleanSourceWith {\n    filter = g;\n    src = ./.;\n  };\n}\n# Succeeds!\n\nbuiltins.filterSource f (builtins.filterSource g ./.)\n# Fails!\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":133,"column":5},"path":["lib","sources","cleanSourceWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.commitIdFromGitRepo","path":["lib","sources","commitIdFromGitRepo"],"aliases":[["lib","commitIdFromGitRepo"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":634,"column":5},"attr_expr":"commitIdFromGitRepo","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":301,"column":5},"lambda_expr":"commitIdFromGitRepo =\n    path:\n    let\n      commitIdOrError = _commitIdFromGitRepoOrError path;\n    in\n    commitIdOrError.value or (throw commitIdOrError.error);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":301,"column":5},"path":["lib","sources","commitIdFromGitRepo"],"pos_type":"Lambda"}},"content":{"content":"\nGet the commit id of a git repo.\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Examples\n:::{.example}\n## `commitIdFromGitRepo` usage example\n\n```nix\ncommitIdFromGitRepo <nixpkgs/.git>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":301,"column":5},"path":["lib","sources","commitIdFromGitRepo"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.filterSource","path":["lib","sources","filterSource"],"aliases":[["builtins","filterSource"],["lib","filterSource"]],"signature":null,"is_primop":true,"primop_meta":{"name":"filterSource","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":654,"column":22},"attr_expr":"filterSource","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","sources","filterSource"],"pos_type":"Lambda"}},"content":{"content":"\n> **Warning**\n>\n> `filterSource` should not be used to filter store paths. Since\n> `filterSource` uses the name of the input directory while naming\n> the output directory, doing so produces a directory name in\n> the form of `<hash2>-<hash>-<name>`, where `<hash>-<name>` is\n> the name of the input directory. Since `<hash>` depends on the\n> unfiltered directory, the name of the output directory\n> indirectly depends on files that are filtered out by the\n> function. This triggers a rebuild even when a filtered out\n> file is changed. Use `builtins.path` instead, which allows\n> specifying the name of the output directory.\n\nThis function allows you to copy sources into the Nix store while\nfiltering certain files. For instance, suppose that you want to use\nthe directory `source-dir` as an input to a Nix expression, e.g.\n\n```nix\nstdenv.mkDerivation {\n  ...\n  src = ./source-dir;\n}\n```\n\nHowever, if `source-dir` is a Subversion working copy, then all of\nthose annoying `.svn` subdirectories are also copied to the\nstore. Worse, the contents of those directories may change a lot,\ncausing lots of spurious rebuilds. With `filterSource` you can\nfilter out the `.svn` directories:\n\n```nix\nsrc = builtins.filterSource\n  (path: type: type != \"directory\" || baseNameOf path != \".svn\")\n  ./source-dir;\n```\n\nThus, the first argument *e1* must be a predicate function that is\ncalled for each regular file, directory or symlink in the source\ntree *e2*. If the function returns `true`, the file is copied to the\nNix store, otherwise it is omitted. The function is called with two\narguments. The first is the full path of the file. The second is a\nstring that identifies the type of the file, which is either\n`\"regular\"`, `\"directory\"`, `\"symlink\"` or `\"unknown\"` (for other\nkinds of files such as device nodes or fifos — but note that those\ncannot be copied to the Nix store, so if the predicate returns\n`true` for them, the copy fails). If you exclude a directory,\nthe entire corresponding subtree of *e2* is excluded.\n","source":{"position":null,"path":["lib","sources","filterSource"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.pathHasContext","path":["lib","sources","pathHasContext"],"aliases":[["builtins","hasContext"],["lib","hasContext"],["lib","pathHasContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"hasContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":639,"column":5},"attr_expr":"pathHasContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","sources","pathHasContext"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if string *s* has a non-empty context.\nThe context can be obtained with\n[`getContext`](#builtins-getContext).\n\n> **Example**\n>\n> Many operations require a string context to be empty because they are intended only to work with \"regular\" strings, and also to help users avoid unintentionally loosing track of string context elements.\n> `builtins.hasContext` can help create better domain-specific errors in those case.\n>\n> ```nix\n> name: meta:\n>\n> if builtins.hasContext name\n> then throw \"package name cannot contain string context\"\n> else { ${name} = meta; }\n> ```\n","source":{"position":null,"path":["lib","sources","pathHasContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.pathIsGitRepo","path":["lib","sources","pathIsGitRepo"],"aliases":[["lib","pathIsGitRepo"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":633,"column":5},"attr_expr":"pathIsGitRepo","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":279,"column":19},"lambda_expr":"path: (_commitIdFromGitRepoOrError path) ? value","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":279,"column":19},"path":["lib","sources","pathIsGitRepo"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":279,"column":19},"path":["lib","sources","pathIsGitRepo"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.repoRevToName","path":["lib","sources","repoRevToName"],"aliases":[["lib","repoRevToName"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":645,"column":5},"attr_expr":"repoRevToName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":506,"column":5},"lambda_expr":"repoRevToName =\n    kind:\n    # match on `kind` first to minimize the thunk\n    if kind == \"source\" then\n      (\n        repo: rev: suffix:\n        \"source\"\n      )\n    else if kind == \"versioned\" then\n      (\n        repo: rev: suffix:\n        repoRevToNameFull repo rev null\n      )\n    else if kind == \"full\" then\n      repoRevToNameFull\n    else\n      throw \"repoRevToName: invalid kind\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":506,"column":5},"path":["lib","sources","repoRevToName"],"pos_type":"Lambda"}},"content":{"content":"\"full\" -> name everything as \"${repo}-${rev}-${fetcher}-source\"","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":506,"column":5},"path":["lib","sources","repoRevToName"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.revOrTag","path":["lib","sources","revOrTag"],"aliases":[["lib","revOrTag"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":644,"column":5},"attr_expr":"revOrTag","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":474,"column":5},"lambda_expr":"revOrTag =\n    rev: tag:\n    if tag != null then\n      tag\n    else if rev != null then\n      rev\n    else\n      \"HEAD\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":474,"column":5},"path":["lib","sources","revOrTag"],"pos_type":"Lambda"}},"content":{"content":"Turn git `rev` and `tag` pair into a revision usable in `repoRevToName*`.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":474,"column":5},"path":["lib","sources","revOrTag"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.shortRev","path":["lib","sources","shortRev"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":643,"column":5},"attr_expr":"shortRev","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":457,"column":5},"lambda_expr":"shortRev =\n    rev:\n    let\n      baseRev = baseNameOf (toString rev);\n      matchHash = match \"[a-f0-9]+\" baseRev;\n      matchVer = match \"([A-Za-z]+[-_. ]?)*(v)?([0-9.]+.*)\" baseRev;\n    in\n    if matchHash != null then\n      builtins.substring 0 7 baseRev\n    else if matchVer != null then\n      lib.last matchVer\n    else\n      baseRev;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":457,"column":5},"path":["lib","sources","shortRev"],"pos_type":"Lambda"}},"content":{"content":"Given a package revision (like \"refs/tags/v12.0\"), produce a short revision (\"12.0\").","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":457,"column":5},"path":["lib","sources","shortRev"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.sourceByGlobs","path":["lib","sources","sourceByGlobs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":649,"column":5},"attr_expr":"sourceByGlobs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":625,"column":5},"lambda_expr":"src: patterns:\n    lib.cleanSourceWith {\n      filter = mkSourceFilter src patterns;\n      inherit src;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":625,"column":5},"path":["lib","sources","sourceByGlobs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":625,"column":5},"path":["lib","sources","sourceByGlobs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.sourceByRegex","path":["lib","sources","sourceByRegex"],"aliases":[["lib","sourceByRegex"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":647,"column":5},"attr_expr":"sourceByRegex","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":216,"column":5},"lambda_expr":"sourceByRegex =\n    src: regexes:\n    let\n      isFiltered = src ? _isLibCleanSourceWith;\n      origSrc = if isFiltered then src.origSrc else src;\n    in\n    lib.cleanSourceWith {\n      filter = (\n        path: type:\n        let\n          relPath = lib.removePrefix (toString origSrc + \"/\") (toString path);\n        in\n        lib.any (re: match re relPath != null) regexes\n      );\n      inherit src;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":216,"column":5},"path":["lib","sources","sourceByRegex"],"pos_type":"Lambda"}},"content":{"content":"\nFilter sources by a list of regular expressions.\n\n# Inputs\n\n`src`\n\n: 1\\. Function argument\n\n`regexes`\n\n: 2\\. Function argument\n\n# Examples\n:::{.example}\n## `sourceByRegex` usage example\n\n```nix\nsrc = sourceByRegex ./my-subproject [\".*\\\\.py$\" \"^database\\\\.sql$\"]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":216,"column":5},"path":["lib","sources","sourceByRegex"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.sourceFilesBySuffices","path":["lib","sources","sourceFilesBySuffices"],"aliases":[["lib","sourceFilesBySuffices"]],"signature":"sourceFilesBySuffices :: SourceLike -> [String] -> Source\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":648,"column":5},"attr_expr":"sourceFilesBySuffices","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":266,"column":5},"lambda_expr":"sourceFilesBySuffices =\n    # Path or source containing the files to be returned\n    src:\n    # A list of file suffix strings\n    exts:\n    let\n      filter =\n        name: type:\n        let\n          base = baseNameOf (toString name);\n        in\n        type == \"directory\" || lib.any (ext: lib.hasSuffix ext base) exts;\n    in\n    cleanSourceWith { inherit filter src; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":266,"column":5},"path":["lib","sources","sourceFilesBySuffices"],"pos_type":"Lambda"}},"content":{"content":"\nGet all files ending with the specified suffices from the given\nsource directory or its descendants, omitting files that do not match\nany suffix. The result of the example below will include files like\n`./dir/module.c` and `./dir/subdir/doc.xml` if present.\n\n# Inputs\n\n`src`\n\n: Path or source containing the files to be returned\n\n`exts`\n\n: A list of file suffix strings\n\n# Type\n\n```\nsourceFilesBySuffices :: SourceLike -> [String] -> Source\n```\n\n# Examples\n:::{.example}\n## `sourceFilesBySuffices` usage example\n\n```nix\nsourceFilesBySuffices ./. [ \".xml\" \".c\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":266,"column":5},"path":["lib","sources","sourceFilesBySuffices"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.trace","path":["lib","sources","trace"],"aliases":[],"signature":"sources.trace :: SourceLike -> Source\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":651,"column":5},"attr_expr":"trace","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":173,"column":5},"lambda_expr":"trace =\n    # Source to debug. The returned source will behave like this source, but also log its filter invocations.\n    src:\n    let\n      attrs = toSourceAttributes src;\n    in\n    fromSourceAttributes (\n      attrs\n      // {\n        filter =\n          path: type:\n          let\n            r = attrs.filter path type;\n          in\n          builtins.trace \"${attrs.name}.filter ${path} = ${boolToString r}\" r;\n      }\n    )\n    // {\n      satisfiesSubpathInvariant = src ? satisfiesSubpathInvariant && src.satisfiesSubpathInvariant;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":173,"column":5},"path":["lib","sources","trace"],"pos_type":"Lambda"}},"content":{"content":"\nAdd logging to a source, for troubleshooting the filtering behavior.\n\n# Inputs\n\n`src`\n\n: Source to debug. The returned source will behave like this source, but also log its filter invocations.\n\n# Type\n\n```\nsources.trace :: SourceLike -> Source\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":173,"column":5},"path":["lib","sources","trace"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.sources.urlToName","path":["lib","sources","urlToName"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":642,"column":5},"attr_expr":"urlToName","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":432,"column":5},"lambda_expr":"urlToName =\n    url:\n    let\n      inherit (lib.strings) stringLength;\n      base = baseNameOf (lib.removeSuffix \"/\" (lib.last (lib.splitString \":\" (toString url))));\n      # chop away one git or archive-related extension\n      removeExt =\n        name:\n        let\n          matchExt = match \"(.*)\\\\.(git|tar|zip|gz|tgz|bz|tbz|bz2|tbz2|lzma|txz|xz|zstd)$\" name;\n        in\n        if matchExt != null then lib.head matchExt else name;\n      # apply function f to string x while the result shrinks\n      shrink =\n        f: x:\n        let\n          v = f x;\n        in\n        if stringLength v < stringLength x then shrink f v else x;\n    in\n    shrink removeExt base;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":432,"column":5},"path":["lib","sources","urlToName"],"pos_type":"Lambda"}},"content":{"content":"Transform a URL (or path, or string) into a clean package name.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":432,"column":5},"path":["lib","sources","urlToName"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.addContextFrom","path":["lib","strings","addContextFrom"],"aliases":[["lib","addContextFrom"]],"signature":"addContextFrom :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1690,"column":3},"attr_expr":"addContextFrom = src: target: substring 0 0 src + target;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1690,"column":20},"lambda_expr":"addContextFrom = src: target: substring 0 0 src + target;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1690,"column":3},"path":["lib","strings","addContextFrom"],"pos_type":"Attribute"}},"content":{"content":"\nAppends string context from string like object `src` to `target`.\n\n:::{.warning}\nThis is an implementation\ndetail of Nix and should be used carefully.\n:::\n\nStrings in Nix carry an invisible `context` which is a list of strings\nrepresenting store paths. If the string is later used in a derivation\nattribute, the derivation will properly populate the inputDrvs and\ninputSrcs.\n\n# Inputs\n\n`src`\n: The string to take the context from. If the argument is not a string,\n  it will be implicitly converted to a string.\n\n`target`\n: The string to append the context to. If the argument is not a string,\n  it will be implicitly converted to a string.\n\n# Type\n\n```\naddContextFrom :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.addContextFrom` usage example\n\n```nix\npkgs = import <nixpkgs> { };\naddContextFrom pkgs.coreutils \"bar\"\n=> \"bar\"\n```\n\nThe context can be displayed using the `toString` function:\n\n```nix\nnix-repl> builtins.getContext (lib.strings.addContextFrom pkgs.coreutils \"bar\")\n{\n  \"/nix/store/m1s1d2dk2dqqlw3j90jl3cjy2cykbdxz-coreutils-9.5.drv\" = { ... };\n}\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1690,"column":3},"path":["lib","strings","addContextFrom"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.appendContext","path":["lib","strings","appendContext"],"aliases":[["builtins","appendContext"],["lib","appendContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"appendContext","args":[],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":42,"column":5},"attr_expr":"appendContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","appendContext"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":null,"path":["lib","strings","appendContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.charToInt","path":["lib","strings","charToInt"],"aliases":[],"signature":"charToInt :: String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1003,"column":3},"attr_expr":"charToInt = c: builtins.getAttr c asciiTable;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1003,"column":15},"lambda_expr":"charToInt = c: builtins.getAttr c asciiTable;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1003,"column":3},"path":["lib","strings","charToInt"],"pos_type":"Attribute"}},"content":{"content":"\nConvert char to ascii value, must be in printable range\n\n# Inputs\n\n`c`\n: 1\\. Function argument\n\n# Type\n\n```\ncharToInt :: String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.strings.charToInt` usage example\n\n```nix\ncharToInt \"A\"\n=> 65\ncharToInt \"(\"\n=> 40\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1003,"column":3},"path":["lib","strings","charToInt"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.cmakeBool","path":["lib","strings","cmakeBool"],"aliases":[["lib","cmakeBool"]],"signature":"cmakeBool :: String -> Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2187,"column":3},"attr_expr":"cmakeBool =\n    condition: flag:\n    assert (lib.isString condition);\n    assert (lib.isBool flag);\n    cmakeOptionType \"bool\" condition (lib.toUpper (lib.boolToString flag));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2188,"column":5},"lambda_expr":"cmakeBool =\n    condition: flag:\n    assert (lib.isString condition);\n    assert (lib.isBool flag);\n    cmakeOptionType \"bool\" condition (lib.toUpper (lib.boolToString flag));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2187,"column":3},"path":["lib","strings","cmakeBool"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<condition>={TRUE,FALSE}\"` string that can be passed to typical\nCMake invocations.\n\n# Inputs\n\n`condition`\n: The condition to be made true or false\n\n`flag`\n: The controlling flag of the condition\n\n# Type\n\n```\ncmakeBool :: String -> Bool -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.cmakeBool` usage example\n\n```nix\ncmakeBool \"ENABLE_STATIC_LIBS\" false\n=> \"-DENABLESTATIC_LIBS:BOOL=FALSE\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2187,"column":3},"path":["lib","strings","cmakeBool"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.cmakeFeature","path":["lib","strings","cmakeFeature"],"aliases":[["lib","cmakeFeature"]],"signature":"cmakeFeature :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2223,"column":3},"attr_expr":"cmakeFeature =\n    feature: value:\n    assert (lib.isString feature);\n    assert (lib.isString value);\n    cmakeOptionType \"string\" feature value;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2224,"column":5},"lambda_expr":"cmakeFeature =\n    feature: value:\n    assert (lib.isString feature);\n    assert (lib.isString value);\n    cmakeOptionType \"string\" feature value;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2223,"column":3},"path":["lib","strings","cmakeFeature"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>:STRING=<value>\"` string that can be passed to typical\nCMake invocations.\nThis is the most typical usage, so it deserves a special case.\n\n# Inputs\n\n`feature`\n: The feature to be set\n\n`value`\n: The desired value\n\n# Type\n\n```\ncmakeFeature :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.cmakeFeature` usage example\n\n```nix\ncmakeFeature \"MODULES\" \"badblock\"\n=> \"-DMODULES:STRING=badblock\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2223,"column":3},"path":["lib","strings","cmakeFeature"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.cmakeOptionType","path":["lib","strings","cmakeOptionType"],"aliases":[["lib","cmakeOptionType"]],"signature":"cmakeOptionType :: String -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2141,"column":3},"attr_expr":"cmakeOptionType =\n    let\n      types = [\n        \"BOOL\"\n        \"FILEPATH\"\n        \"PATH\"\n        \"STRING\"\n        \"INTERNAL\"\n        \"LIST\"\n      ];\n    in\n    type: feature: value:\n    assert (elem (toUpper type) types);\n    assert (isString feature);\n    assert (isString value);\n    \"-D${feature}:${toUpper type}=${value}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2152,"column":5},"lambda_expr":"type: feature: value:\n    assert (elem (toUpper type) types);\n    assert (isString feature);\n    assert (isString value);\n    \"-D${feature}:${toUpper type}=${value}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2141,"column":3},"path":["lib","strings","cmakeOptionType"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>:<type>=<value>\"` string that can be passed to typical\nCMake invocations.\n\n# Inputs\n\n`type`\n: The type of the feature to be set, as described in\n  [the CMake set documentation](https://cmake.org/cmake/help/latest/command/set.html)\n  the possible values (case insensitive) are:\n  BOOL FILEPATH PATH STRING INTERNAL LIST\n\n`feature`\n: The feature to be set\n\n`feature`\n: The feature to be set\n\n`value`\n: The desired value\n\n# Type\n\n```\ncmakeOptionType :: String -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.cmakeOptionType` usage example\n\n```nix\ncmakeOptionType \"string\" \"ENGINE\" \"sdl2\"\n=> \"-DENGINE:STRING=sdl2\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2141,"column":3},"path":["lib","strings","cmakeOptionType"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.commonPrefixLength","path":["lib","strings","commonPrefixLength"],"aliases":[],"signature":"commonPrefixLength :: String -> String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2996,"column":3},"attr_expr":"commonPrefixLength =\n    a: b:\n    let\n      m = lib.min (stringLength a) (stringLength b);\n      go =\n        i:\n        if i >= m then\n          m\n        else if substring i 1 a == substring i 1 b then\n          go (i + 1)\n        else\n          i;\n    in\n    go 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2997,"column":5},"lambda_expr":"commonPrefixLength =\n    a: b:\n    let\n      m = lib.min (stringLength a) (stringLength b);\n      go =\n        i:\n        if i >= m then\n          m\n        else if substring i 1 a == substring i 1 b then\n          go (i + 1)\n        else\n          i;\n    in\n    go 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2996,"column":3},"path":["lib","strings","commonPrefixLength"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the length of the prefix that appears in both strings `a` and `b`.\n\n# Inputs\n\n`a`\n: 1\\. Function argument\n\n`b`\n: 2\\. Function argument\n\n# Type\n\n```\ncommonPrefixLength :: String -> String -> Int\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2996,"column":3},"path":["lib","strings","commonPrefixLength"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.commonSuffixLength","path":["lib","strings","commonSuffixLength"],"aliases":[],"signature":"commonSuffixLength :: String -> String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3028,"column":3},"attr_expr":"commonSuffixLength =\n    a: b:\n    let\n      m = lib.min (stringLength a) (stringLength b);\n      go =\n        i:\n        if i >= m then\n          m\n        else if substring (stringLength a - i - 1) 1 a == substring (stringLength b - i - 1) 1 b then\n          go (i + 1)\n        else\n          i;\n    in\n    go 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3029,"column":5},"lambda_expr":"commonSuffixLength =\n    a: b:\n    let\n      m = lib.min (stringLength a) (stringLength b);\n      go =\n        i:\n        if i >= m then\n          m\n        else if substring (stringLength a - i - 1) 1 a == substring (stringLength b - i - 1) 1 b then\n          go (i + 1)\n        else\n          i;\n    in\n    go 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3028,"column":3},"path":["lib","strings","commonSuffixLength"],"pos_type":"Attribute"}},"content":{"content":"\nReturns the length of the suffix common to both strings `a` and `b`.\n\n# Inputs\n\n`a`\n: 1\\. Function argument\n\n`b`\n: 2\\. Function argument\n\n# Type\n\n```\ncommonSuffixLength :: String -> String -> Int\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3028,"column":3},"path":["lib","strings","commonSuffixLength"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.compareVersions","path":["lib","strings","compareVersions"],"aliases":[["builtins","compareVersions"],["lib","compareVersions"],["lib","versions","compareVersions"]],"signature":null,"is_primop":true,"primop_meta":{"name":"compareVersions","args":["s1","s2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":18,"column":5},"attr_expr":"compareVersions","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","compareVersions"],"pos_type":"Lambda"}},"content":{"content":"\nCompare two strings representing versions and return `-1` if\nversion *s1* is older than version *s2*, `0` if they are the same,\nand `1` if *s1* is newer than *s2*. The version comparison\nalgorithm is the same as the one used by [`nix-env\n-u`](../command-ref/nix-env.md#operation---upgrade).\n","source":{"position":null,"path":["lib","strings","compareVersions"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.concatImapStrings","path":["lib","strings","concatImapStrings"],"aliases":[["lib","concatImapStrings"]],"signature":"concatImapStrings :: (Int -> a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":156,"column":3},"attr_expr":"concatImapStrings = f: list: concatStrings (lib.imap1 f list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":156,"column":23},"lambda_expr":"concatImapStrings = f: list: concatStrings (lib.imap1 f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":156,"column":3},"path":["lib","strings","concatImapStrings"],"pos_type":"Attribute"}},"content":{"content":"\nLike `concatMapStrings` except that the function `f` also gets the\nposition as a parameter.\n\n# Inputs\n\n`f`\n: 1\\. Function argument\n\n`list`\n: 2\\. Function argument\n\n# Type\n\n```\nconcatImapStrings :: (Int -> a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatImapStrings` usage example\n\n```nix\nconcatImapStrings (pos: x: \"${toString pos}-${x}\") [\"foo\" \"bar\"]\n=> \"1-foo2-bar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":156,"column":3},"path":["lib","strings","concatImapStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.concatImapStringsSep","path":["lib","strings","concatImapStringsSep"],"aliases":[["lib","concatImapStringsSep"]],"signature":"concatIMapStringsSep :: String -> (Int -> a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":297,"column":3},"attr_expr":"concatImapStringsSep =\n    sep: f: list:\n    concatStringsSep sep (lib.imap1 f list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":298,"column":5},"lambda_expr":"concatImapStringsSep =\n    sep: f: list:\n    concatStringsSep sep (lib.imap1 f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":297,"column":3},"path":["lib","strings","concatImapStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nSame as `concatMapStringsSep`, but the mapping function\nadditionally receives the position of its argument.\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`f`\n: Function that receives elements and their positions\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatIMapStringsSep :: String -> (Int -> a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatImapStringsSep` usage example\n\n```nix\nconcatImapStringsSep \"-\" (pos: x: toString (x / pos)) [ 6 6 6 ]\n=> \"6-3-2\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":297,"column":3},"path":["lib","strings","concatImapStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.concatLines","path":["lib","strings","concatLines"],"aliases":[["lib","concatLines"]],"signature":"concatLines :: [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":363,"column":3},"attr_expr":"concatLines = lines: optionalString (lines != [ ]) (concatStringsSep \"\\n\" lines + \"\\n\");","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":363,"column":17},"lambda_expr":"concatLines = lines: optionalString (lines != [ ]) (concatStringsSep \"\\n\" lines + \"\\n\");","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":363,"column":3},"path":["lib","strings","concatLines"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings, adding a newline at the end of each one.\n\n# Inputs\n\n`list`\n: List of strings. Any element that is not a string will be implicitly converted to a string.\n\n# Type\n\n```\nconcatLines :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatLines` usage example\n\n```nix\nconcatLines [ \"foo\" \"bar\" ]\n=> \"foo\\nbar\\n\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":363,"column":3},"path":["lib","strings","concatLines"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.concatMapAttrsStringSep","path":["lib","strings","concatMapAttrsStringSep"],"aliases":[["lib","concatMapAttrsStringSep"]],"signature":"concatMapAttrsStringSep :: String -> (String -> a -> String) -> { [String] :: a } -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":334,"column":3},"attr_expr":"concatMapAttrsStringSep =\n    sep: f: attrs:\n    concatStringsSep sep (lib.attrValues (lib.mapAttrs f attrs));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":335,"column":5},"lambda_expr":"concatMapAttrsStringSep =\n    sep: f: attrs:\n    concatStringsSep sep (lib.attrValues (lib.mapAttrs f attrs));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":334,"column":3},"path":["lib","strings","concatMapAttrsStringSep"],"pos_type":"Attribute"}},"content":{"content":"\nLike [`concatMapStringsSep`](#function-library-lib.strings.concatMapStringsSep)\nbut takes an attribute set instead of a list.\n\n# Inputs\n\n`sep`\n: Separator to add between item strings\n\n`f`\n: Function that takes each key and value and return a string\n\n`attrs`\n: Attribute set to map from\n\n# Type\n\n```\nconcatMapAttrsStringSep :: String -> (String -> a -> String) -> { [String] :: a } -> String\n```\n\n# Examples\n\n:::{.example}\n## `lib.strings.concatMapAttrsStringSep` usage example\n\n```nix\nconcatMapAttrsStringSep \"\\n\" (name: value: \"${name}: foo-${value}\") { a = \"0.1.0\"; b = \"0.2.0\"; }\n=> \"a: foo-0.1.0\\nb: foo-0.2.0\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":334,"column":3},"path":["lib","strings","concatMapAttrsStringSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.concatMapStrings","path":["lib","strings","concatMapStrings"],"aliases":[["lib","concatMapStrings"]],"signature":"concatMapStrings :: (a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":125,"column":3},"attr_expr":"concatMapStrings = f: list: concatStrings (map f list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":125,"column":22},"lambda_expr":"concatMapStrings = f: list: concatStrings (map f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":125,"column":3},"path":["lib","strings","concatMapStrings"],"pos_type":"Attribute"}},"content":{"content":"\nMap a function over a list and concatenate the resulting strings.\n\n# Inputs\n\n`f`\n: 1\\. Function argument\n\n`list`\n: 2\\. Function argument\n\n# Type\n\n```\nconcatMapStrings :: (a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatMapStrings` usage example\n\n```nix\nconcatMapStrings (x: \"a\" + x) [\"foo\" \"bar\"]\n=> \"afooabar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":125,"column":3},"path":["lib","strings","concatMapStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.concatMapStringsSep","path":["lib","strings","concatMapStringsSep"],"aliases":[["lib","concatMapStringsSep"]],"signature":"concatMapStringsSep :: String -> (a -> String) -> [a] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":261,"column":3},"attr_expr":"concatMapStringsSep =\n    sep: f: list:\n    concatStringsSep sep (map f list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":262,"column":5},"lambda_expr":"concatMapStringsSep =\n    sep: f: list:\n    concatStringsSep sep (map f list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":261,"column":3},"path":["lib","strings","concatMapStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nMaps a function over a list of strings and then concatenates the\nresult with the specified separator interspersed between\nelements.\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`f`\n: Function to map over the list\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatMapStringsSep :: String -> (a -> String) -> [a] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatMapStringsSep` usage example\n\n```nix\nconcatMapStringsSep \"-\" (x: toUpper x)  [\"foo\" \"bar\" \"baz\"]\n=> \"FOO-BAR-BAZ\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":261,"column":3},"path":["lib","strings","concatMapStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.concatStrings","path":["lib","strings","concatStrings"],"aliases":[["lib","concatStrings"]],"signature":"concatStrings :: [String] -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":95,"column":3},"attr_expr":"concatStrings = builtins.concatStringsSep \"\";","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":95,"column":3},"path":["lib","strings","concatStrings"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings.\n\n# Type\n\n```\nconcatStrings :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatStrings` usage example\n\n```nix\nconcatStrings [\"foo\" \"bar\"]\n=> \"foobar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":95,"column":3},"path":["lib","strings","concatStrings"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.concatStringsSep","path":["lib","strings","concatStringsSep"],"aliases":[["builtins","concatStringsSep"],["lib","concatStringsSep"],["lib","join"],["lib","strings","join"]],"signature":"concatStringsSep :: String -> [String] -> String\n","is_primop":true,"primop_meta":{"name":"concatStringsSep","args":["separator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"attr_expr":"concatStringsSep = builtins.concatStringsSep;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate a list of strings with a separator between each element\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`list`\n: List of input strings\n\n# Type\n\n```\nconcatStringsSep :: String -> [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.concatStringsSep` usage example\n\n```nix\nconcatStringsSep \"/\" [\"usr\" \"local\" \"bin\"]\n=> \"usr/local/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":226,"column":3},"path":["lib","strings","concatStringsSep"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.elem","path":["lib","strings","elem"],"aliases":[["builtins","elem"],["lib","elem"],["lib","lists","elem"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elem","args":["x","xs"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":19,"column":5},"attr_expr":"elem","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","elem"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if a value equal to *x* occurs in the list *xs*, and\n`false` otherwise.\n","source":{"position":null,"path":["lib","strings","elem"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.elemAt","path":["lib","strings","elemAt"],"aliases":[["builtins","elemAt"],["lib","elemAt"],["lib","lists","elemAt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"elemAt","args":["xs","n"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":20,"column":5},"attr_expr":"elemAt","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","elemAt"],"pos_type":"Lambda"}},"content":{"content":"\nReturn element *n* from the list *xs*. Elements are counted starting\nfrom 0. A fatal error occurs if the index is out of bounds.\n","source":{"position":null,"path":["lib","strings","elemAt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.enableFeature","path":["lib","strings","enableFeature"],"aliases":[["lib","enableFeature"]],"signature":"enableFeature :: Bool -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2369,"column":3},"attr_expr":"enableFeature =\n    flag: feature:\n    assert lib.isBool flag;\n    assert lib.isString feature; # e.g. passing openssl instead of \"openssl\"\n    \"--${if flag then \"enable\" else \"disable\"}-${feature}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2370,"column":5},"lambda_expr":"enableFeature =\n    flag: feature:\n    assert lib.isBool flag;\n    assert lib.isString feature; # e.g. passing openssl instead of \"openssl\"\n    \"--${if flag then \"enable\" else \"disable\"}-${feature}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2369,"column":3},"path":["lib","strings","enableFeature"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{enable,disable}-<feature>\"` string that can be passed to\nstandard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n# Type\n\n```\nenableFeature :: Bool -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.enableFeature` usage example\n\n```nix\nenableFeature true \"shared\"\n=> \"--enable-shared\"\nenableFeature false \"shared\"\n=> \"--disable-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2369,"column":3},"path":["lib","strings","enableFeature"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.enableFeatureAs","path":["lib","strings","enableFeatureAs"],"aliases":[["lib","enableFeatureAs"]],"signature":"enableFeatureAs :: Bool -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2409,"column":3},"attr_expr":"enableFeatureAs =\n    flag: feature: value:\n    enableFeature flag feature + optionalString flag \"=${value}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2410,"column":5},"lambda_expr":"enableFeatureAs =\n    flag: feature: value:\n    enableFeature flag feature + optionalString flag \"=${value}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2409,"column":3},"path":["lib","strings","enableFeatureAs"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{enable-<feature>=<value>,disable-<feature>}\"` string that\ncan be passed to standard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n`value`\n: 3\\. Function argument\n\n# Type\n\n```\nenableFeatureAs :: Bool -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.enableFeatureAs` usage example\n\n```nix\nenableFeatureAs true \"shared\" \"foo\"\n=> \"--enable-shared=foo\"\nenableFeatureAs false \"shared\" (throw \"ignored\")\n=> \"--disable-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2409,"column":3},"path":["lib","strings","enableFeatureAs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escape","path":["lib","strings","escape"],"aliases":[["lib","escape"]],"signature":"escape :: [String] -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1034,"column":3},"attr_expr":"escape = list: replaceStrings list (map (c: \"\\\\${c}\") list);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1034,"column":12},"lambda_expr":"escape = list: replaceStrings list (map (c: \"\\\\${c}\") list);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1034,"column":3},"path":["lib","strings","escape"],"pos_type":"Attribute"}},"content":{"content":"\nEscape occurrence of the elements of `list` in `string` by\nprefixing it with a backslash.\n\n# Inputs\n\n`list`\n: 1\\. Function argument\n\n`string`\n: 2\\. Function argument\n\n# Type\n\n```\nescape :: [String] -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escape` usage example\n\n```nix\nescape [\"(\" \")\"] \"(foo)\"\n=> \"\\\\(foo\\\\)\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1034,"column":3},"path":["lib","strings","escape"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeC","path":["lib","strings","escapeC"],"aliases":[],"signature":"escapeC :: [String] -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1066,"column":3},"attr_expr":"escapeC =\n    list:\n    replaceStrings list (\n      map (c: \"\\\\x${fixedWidthString 2 \"0\" (toLower (lib.toHexString (charToInt c)))}\") list\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1067,"column":5},"lambda_expr":"escapeC =\n    list:\n    replaceStrings list (\n      map (c: \"\\\\x${fixedWidthString 2 \"0\" (toLower (lib.toHexString (charToInt c)))}\") list\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1066,"column":3},"path":["lib","strings","escapeC"],"pos_type":"Attribute"}},"content":{"content":"\nEscape occurrence of the element of `list` in `string` by\nconverting to its ASCII value and prefixing it with \\\\x.\nOnly works for printable ascii characters.\n\n# Inputs\n\n`list`\n: 1\\. Function argument\n\n`string`\n: 2\\. Function argument\n\n# Type\n\n```\nescapeC :: [String] -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeC` usage example\n\n```nix\nescapeC [\" \"] \"foo bar\"\n=> \"foo\\\\x20bar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1066,"column":3},"path":["lib","strings","escapeC"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeNixIdentifier","path":["lib","strings","escapeNixIdentifier"],"aliases":[],"signature":"escapeNixIdentifier :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1434,"column":3},"attr_expr":"escapeNixIdentifier =\n    let\n      # see https://nix.dev/manual/nix/2.26/language/identifiers#keywords\n      nixKeywords = [\n        \"assert\"\n        \"else\"\n        \"if\"\n        \"in\"\n        \"inherit\"\n        \"let\"\n        \"or\"\n        \"rec\"\n        \"then\"\n        \"with\"\n      ];\n    in\n    s:\n    # Regex from https://github.com/NixOS/nix/blob/d048577909e383439c2549e849c5c2f2016c997e/src/libexpr/lexer.l#L91\n    if (match \"[a-zA-Z_][a-zA-Z0-9_'-]*\" s != null) && (!lib.elem s nixKeywords) then\n      s\n    else\n      escapeNixString s;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1450,"column":5},"lambda_expr":"s:\n    # Regex from https://github.com/NixOS/nix/blob/d048577909e383439c2549e849c5c2f2016c997e/src/libexpr/lexer.l#L91\n    if (match \"[a-zA-Z_][a-zA-Z0-9_'-]*\" s != null) && (!lib.elem s nixKeywords) then\n      s\n    else\n      escapeNixString s","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1434,"column":3},"path":["lib","strings","escapeNixIdentifier"],"pos_type":"Attribute"}},"content":{"content":"\nQuotes a string `s` if it can't be used as an identifier directly.\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeNixIdentifier :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeNixIdentifier` usage example\n\n```nix\nescapeNixIdentifier \"hello\"\n=> \"hello\"\nescapeNixIdentifier \"0abc\"\n=> \"\\\"0abc\\\"\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1434,"column":3},"path":["lib","strings","escapeNixIdentifier"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeNixString","path":["lib","strings","escapeNixString"],"aliases":[],"signature":"escapeNixString :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1378,"column":3},"attr_expr":"escapeNixString = s: escape [ \"$\" ] (toJSON s);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1378,"column":21},"lambda_expr":"escapeNixString = s: escape [ \"$\" ] (toJSON s);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1378,"column":3},"path":["lib","strings","escapeNixString"],"pos_type":"Attribute"}},"content":{"content":"\nTurn a string `s` into a Nix expression representing that string\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeNixString :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeNixString` usage example\n\n```nix\nescapeNixString \"hello\\${}\\n\"\n=> \"\\\"hello\\\\\\${}\\\\n\\\"\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1378,"column":3},"path":["lib","strings","escapeNixString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeRegex","path":["lib","strings","escapeRegex"],"aliases":[["lib","escapeRegex"]],"signature":"escapeRegex :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1405,"column":3},"attr_expr":"escapeRegex = escape (stringToCharacters \"\\\\[{()^$?*+|.\");","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1405,"column":3},"path":["lib","strings","escapeRegex"],"pos_type":"Attribute"}},"content":{"content":"\nTurn a string `s` into an exact regular expression\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeRegex :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeRegex` usage example\n\n```nix\nescapeRegex \"[^a-z]*\"\n=> \"\\\\[\\\\^a-z]\\\\*\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1405,"column":3},"path":["lib","strings","escapeRegex"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeShellArg","path":["lib","strings","escapeShellArg"],"aliases":[["lib","escapeShellArg"]],"signature":"escapeShellArg :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1200,"column":3},"attr_expr":"escapeShellArg =\n    arg:\n    let\n      string = toString arg;\n    in\n    if match \"[[:alnum:],._+:@%/-]+\" string == null then\n      \"'${replaceString \"'\" \"'\\\\''\" string}'\"\n    else\n      string;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1201,"column":5},"lambda_expr":"escapeShellArg =\n    arg:\n    let\n      string = toString arg;\n    in\n    if match \"[[:alnum:],._+:@%/-]+\" string == null then\n      \"'${replaceString \"'\" \"'\\\\''\" string}'\"\n    else\n      string;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1200,"column":3},"path":["lib","strings","escapeShellArg"],"pos_type":"Attribute"}},"content":{"content":"\nQuote `string` to be used safely within the Bourne shell if it has any\nspecial characters.\n\n# Inputs\n\n`string`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeShellArg :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeShellArg` usage example\n\n```nix\nescapeShellArg \"esc'ape\\nme\"\n=> \"'esc'\\\\''ape\\nme'\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1200,"column":3},"path":["lib","strings","escapeShellArg"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeShellArgs","path":["lib","strings","escapeShellArgs"],"aliases":[["lib","escapeShellArgs"]],"signature":"escapeShellArgs :: [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1236,"column":3},"attr_expr":"escapeShellArgs = concatMapStringsSep \" \" escapeShellArg;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":262,"column":13},"lambda_expr":"list:\n    concatStringsSep sep (map f list)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1236,"column":3},"path":["lib","strings","escapeShellArgs"],"pos_type":"Attribute"}},"content":{"content":"\nQuote all arguments that have special characters to be safely passed to the\nBourne shell.\n\n# Inputs\n\n`args`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeShellArgs :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeShellArgs` usage example\n\n```nix\nescapeShellArgs [\"one\" \"two three\" \"four'five\"]\n=> \"one 'two three' 'four'\\\\''five'\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1236,"column":3},"path":["lib","strings","escapeShellArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeURL","path":["lib","strings","escapeURL"],"aliases":[["lib","escapeURL"]],"signature":"escapeURL :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1098,"column":3},"attr_expr":"escapeURL =\n    let\n      unreserved = [\n        \"A\"\n        \"B\"\n        \"C\"\n        \"D\"\n        \"E\"\n        \"F\"\n        \"G\"\n        \"H\"\n        \"I\"\n        \"J\"\n        \"K\"\n        \"L\"\n        \"M\"\n        \"N\"\n        \"O\"\n        \"P\"\n        \"Q\"\n        \"R\"\n        \"S\"\n        \"T\"\n        \"U\"\n        \"V\"\n        \"W\"\n        \"X\"\n        \"Y\"\n        \"Z\"\n        \"a\"\n        \"b\"\n        \"c\"\n        \"d\"\n        \"e\"\n        \"f\"\n        \"g\"\n        \"h\"\n        \"i\"\n        \"j\"\n        \"k\"\n        \"l\"\n        \"m\"\n        \"n\"\n        \"o\"\n        \"p\"\n        \"q\"\n        \"r\"\n        \"s\"\n        \"t\"\n        \"u\"\n        \"v\"\n        \"w\"\n        \"x\"\n        \"y\"\n        \"z\"\n        \"0\"\n        \"1\"\n        \"2\"\n        \"3\"\n        \"4\"\n        \"5\"\n        \"6\"\n        \"7\"\n        \"8\"\n        \"9\"\n        \"-\"\n        \"_\"\n        \".\"\n        \"~\"\n      ];\n      toEscape = removeAttrs asciiTable unreserved;\n    in\n    replaceStrings (builtins.attrNames toEscape) (\n      lib.mapAttrsToList (_: c: \"%${fixedWidthString 2 \"0\" (lib.toHexString c)}\") toEscape\n    );","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1098,"column":3},"path":["lib","strings","escapeURL"],"pos_type":"Attribute"}},"content":{"content":"\nEscape the `string` so it can be safely placed inside a URL\nquery.\n\n# Inputs\n\n`string`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeURL :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeURL` usage example\n\n```nix\nescapeURL \"foo/bar baz\"\n=> \"foo%2Fbar%20baz\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1098,"column":3},"path":["lib","strings","escapeURL"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.escapeXML","path":["lib","strings","escapeXML"],"aliases":[["lib","escapeXML"]],"signature":"escapeXML :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1483,"column":3},"attr_expr":"escapeXML =\n    builtins.replaceStrings\n      [ \"\\\"\" \"'\" \"<\" \">\" \"&\" ]\n      [ \"&quot;\" \"&apos;\" \"&lt;\" \"&gt;\" \"&amp;\" ];","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1483,"column":3},"path":["lib","strings","escapeXML"],"pos_type":"Attribute"}},"content":{"content":"\nEscapes a string `s` such that it is safe to include verbatim in an XML\ndocument.\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nescapeXML :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.escapeXML` usage example\n\n```nix\nescapeXML ''\"test\" 'test' < & >''\n=> \"&quot;test&quot; &apos;test&apos; &lt; &amp; &gt;\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1483,"column":3},"path":["lib","strings","escapeXML"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.fileContents","path":["lib","strings","fileContents"],"aliases":[["lib","fileContents"]],"signature":"fileContents :: Path -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2866,"column":3},"attr_expr":"fileContents = file: removeSuffix \"\\n\" (readFile file);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2866,"column":18},"lambda_expr":"fileContents = file: removeSuffix \"\\n\" (readFile file);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2866,"column":3},"path":["lib","strings","fileContents"],"pos_type":"Attribute"}},"content":{"content":"\nRead the contents of a file removing the trailing \\n\n\n# Inputs\n\n`file`\n: 1\\. Function argument\n\n# Type\n\n```\nfileContents :: Path -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.fileContents` usage example\n\n```nix\n$ echo \"1.0\" > ./version\n\nfileContents ./version\n=> \"1.0\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2866,"column":3},"path":["lib","strings","fileContents"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.filter","path":["lib","strings","filter"],"aliases":[["builtins","filter"],["lib","filter"],["lib","lists","filter"]],"signature":null,"is_primop":true,"primop_meta":{"name":"filter","args":["f","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":21,"column":5},"attr_expr":"filter","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","filter"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a list consisting of the elements of *list* for which the\nfunction *f* returns `true`.\n","source":{"position":null,"path":["lib","strings","filter"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.fixedWidthNumber","path":["lib","strings","fixedWidthNumber"],"aliases":[["lib","fixedWidthNumber"]],"signature":"fixedWidthNumber :: Int -> Int -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2560,"column":3},"attr_expr":"fixedWidthNumber = width: n: fixedWidthString width \"0\" (toString n);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2560,"column":22},"lambda_expr":"fixedWidthNumber = width: n: fixedWidthString width \"0\" (toString n);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2560,"column":3},"path":["lib","strings","fixedWidthNumber"],"pos_type":"Attribute"}},"content":{"content":"\nFormat a number adding leading zeroes up to fixed width.\n\n# Inputs\n\n`width`\n: 1\\. Function argument\n\n`n`\n: 2\\. Function argument\n\n# Type\n\n```\nfixedWidthNumber :: Int -> Int -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.fixedWidthNumber` usage example\n\n```nix\nfixedWidthNumber 5 15\n=> \"00015\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2560,"column":3},"path":["lib","strings","fixedWidthNumber"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.fixedWidthString","path":["lib","strings","fixedWidthString"],"aliases":[["lib","fixedWidthString"]],"signature":"fixedWidthString :: Int -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2522,"column":3},"attr_expr":"fixedWidthString =\n    width: filler: str:\n    let\n      strw = lib.stringLength str;\n      reqWidth = width - (lib.stringLength filler);\n    in\n    assert lib.assertMsg (strw <= width)\n      \"fixedWidthString: requested string length (${toString width}) must not be shorter than actual length (${toString strw})\";\n    if strw == width then str else filler + fixedWidthString reqWidth filler str;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2523,"column":5},"lambda_expr":"fixedWidthString =\n    width: filler: str:\n    let\n      strw = lib.stringLength str;\n      reqWidth = width - (lib.stringLength filler);\n    in\n    assert lib.assertMsg (strw <= width)\n      \"fixedWidthString: requested string length (${toString width}) must not be shorter than actual length (${toString strw})\";\n    if strw == width then str else filler + fixedWidthString reqWidth filler str;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2522,"column":3},"path":["lib","strings","fixedWidthString"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a fixed width string with additional prefix to match\nrequired width.\n\nThis function will fail if the input string is longer than the\nrequested length.\n\n# Inputs\n\n`width`\n: 1\\. Function argument\n\n`filler`\n: 2\\. Function argument\n\n`str`\n: 3\\. Function argument\n\n# Type\n\n```\nfixedWidthString :: Int -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.fixedWidthString` usage example\n\n```nix\nfixedWidthString 5 \"0\" (toString 15)\n=> \"00015\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2522,"column":3},"path":["lib","strings","fixedWidthString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.floatToString","path":["lib","strings","floatToString"],"aliases":[],"signature":"floatToString :: Float -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2591,"column":3},"attr_expr":"floatToString =\n    float:\n    let\n      result = toString float;\n      precise = float == fromJSON result;\n    in\n    lib.warnIf (!precise) \"Imprecise conversion from float to string ${result}\" result;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2592,"column":5},"lambda_expr":"floatToString =\n    float:\n    let\n      result = toString float;\n      precise = float == fromJSON result;\n    in\n    lib.warnIf (!precise) \"Imprecise conversion from float to string ${result}\" result;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2591,"column":3},"path":["lib","strings","floatToString"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a float to a string, but emit a warning when precision is lost\nduring the conversion\n\n# Inputs\n\n`float`\n: 1\\. Function argument\n\n# Type\n\n```\nfloatToString :: Float -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.floatToString` usage example\n\n```nix\nfloatToString 0.000001\n=> \"0.000001\"\nfloatToString 0.0000001\n=> trace: warning: Imprecise conversion from float to string 0.000000\n   \"0.000000\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2591,"column":3},"path":["lib","strings","floatToString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.fromJSON","path":["lib","strings","fromJSON"],"aliases":[["builtins","fromJSON"],["lib","fromJSON"]],"signature":null,"is_primop":true,"primop_meta":{"name":"fromJSON","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":22,"column":5},"attr_expr":"fromJSON","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","fromJSON"],"pos_type":"Lambda"}},"content":{"content":"\nConvert a JSON string to a Nix value. For example,\n\n```nix\nbuiltins.fromJSON ''{\"x\": [1, 2, 3], \"y\": null}''\n```\n\nreturns the value `{ x = [ 1 2 3 ]; y = null; }`.\n","source":{"position":null,"path":["lib","strings","fromJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.genList","path":["lib","strings","genList"],"aliases":[["builtins","genList"],["lib","genList"],["lib","lists","genList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"genList","args":["generator","length"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":23,"column":5},"attr_expr":"genList","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","genList"],"pos_type":"Lambda"}},"content":{"content":"\nGenerate list of size *length*, with each element *i* equal to the\nvalue returned by *generator* `i`. For example,\n\n```nix\nbuiltins.genList (x: x * x) 5\n```\n\nreturns the list `[ 0 1 4 9 16 ]`.\n","source":{"position":null,"path":["lib","strings","genList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.getName","path":["lib","strings","getName"],"aliases":[["lib","getName"]],"signature":"getName :: String | Derivation -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2020,"column":3},"attr_expr":"getName =\n    let\n      parse = drv: (parseDrvName drv).name;\n    in\n    x: if isString x then parse x else x.pname or (parse x.name);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2024,"column":5},"lambda_expr":"x: if isString x then parse x else x.pname or (parse x.name)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2020,"column":3},"path":["lib","strings","getName"],"pos_type":"Attribute"}},"content":{"content":"\nThis function takes an argument `x` that's either a derivation or a\nderivation's \"name\" attribute and extracts the name part from that\nargument.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\ngetName :: String | Derivation -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.getName` usage example\n\n```nix\ngetName \"youtube-dl-2016.01.01\"\n=> \"youtube-dl\"\ngetName pkgs.youtube-dl\n=> \"youtube-dl\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2020,"column":3},"path":["lib","strings","getName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.getVersion","path":["lib","strings","getVersion"],"aliases":[["lib","getVersion"]],"signature":"getVersion :: String | Derivation -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2055,"column":3},"attr_expr":"getVersion =\n    let\n      parse = drv: (parseDrvName drv).version;\n    in\n    x: if isString x then parse x else x.version or (parse x.name);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2059,"column":5},"lambda_expr":"x: if isString x then parse x else x.version or (parse x.name)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2055,"column":3},"path":["lib","strings","getVersion"],"pos_type":"Attribute"}},"content":{"content":"\nThis function takes an argument `x` that's either a derivation or a\nderivation's \"name\" attribute and extracts the version part from that\nargument.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\ngetVersion :: String | Derivation -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.getVersion` usage example\n\n```nix\ngetVersion \"youtube-dl-2016.01.01\"\n=> \"2016.01.01\"\ngetVersion pkgs.youtube-dl\n=> \"2016.01.01\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2055,"column":3},"path":["lib","strings","getVersion"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.hasInfix","path":["lib","strings","hasInfix"],"aliases":[["lib","hasInfix"]],"signature":"hasInfix :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":891,"column":3},"attr_expr":"hasInfix =\n    infix: content:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath infix)\n      ''\n        lib.strings.hasInfix: The first argument (${toString infix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (builtins.match \".*${escapeRegex infix}.*\" \"${content}\" != null);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":892,"column":5},"lambda_expr":"hasInfix =\n    infix: content:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath infix)\n      ''\n        lib.strings.hasInfix: The first argument (${toString infix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (builtins.match \".*${escapeRegex infix}.*\" \"${content}\" != null);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":891,"column":3},"path":["lib","strings","hasInfix"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine whether a string contains the given infix\n\n# Inputs\n\n`infix`\n: 1\\. Function argument\n\n`content`\n: 2\\. Function argument\n\n# Type\n\n```\nhasInfix :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.hasInfix` usage example\n\n```nix\nhasInfix \"bc\" \"abcd\"\n=> true\nhasInfix \"ab\" \"abcd\"\n=> true\nhasInfix \"cd\" \"abcd\"\n=> true\nhasInfix \"foo\" \"abcd\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":891,"column":3},"path":["lib","strings","hasInfix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.hasPrefix","path":["lib","strings","hasPrefix"],"aliases":[["lib","hasPrefix"]],"signature":"hasPrefix :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":798,"column":3},"attr_expr":"hasPrefix =\n    pref: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath pref)\n      ''\n        lib.strings.hasPrefix: The first argument (${toString pref}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.\n            You might want to use `lib.path.hasPrefix` instead, which correctly supports paths.''\n      (substring 0 (stringLength pref) str == pref);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":799,"column":5},"lambda_expr":"hasPrefix =\n    pref: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath pref)\n      ''\n        lib.strings.hasPrefix: The first argument (${toString pref}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.\n            You might want to use `lib.path.hasPrefix` instead, which correctly supports paths.''\n      (substring 0 (stringLength pref) str == pref);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":798,"column":3},"path":["lib","strings","hasPrefix"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine whether a string has given prefix.\n\n# Inputs\n\n`pref`\n: Prefix to check for\n\n`str`\n: Input string\n\n# Type\n\n```\nhasPrefix :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.hasPrefix` usage example\n\n```nix\nhasPrefix \"foo\" \"foobar\"\n=> true\nhasPrefix \"foo\" \"barfoo\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":798,"column":3},"path":["lib","strings","hasPrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.hasSuffix","path":["lib","strings","hasSuffix"],"aliases":[["lib","hasSuffix"]],"signature":"hasSuffix :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":841,"column":3},"attr_expr":"hasSuffix =\n    suffix: content:\n    let\n      lenContent = stringLength content;\n      lenSuffix = stringLength suffix;\n    in\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath suffix)\n      ''\n        lib.strings.hasSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (lenContent >= lenSuffix && substring (lenContent - lenSuffix) lenContent content == suffix);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":842,"column":5},"lambda_expr":"hasSuffix =\n    suffix: content:\n    let\n      lenContent = stringLength content;\n      lenSuffix = stringLength suffix;\n    in\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath suffix)\n      ''\n        lib.strings.hasSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function always returns `false` in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (lenContent >= lenSuffix && substring (lenContent - lenSuffix) lenContent content == suffix);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":841,"column":3},"path":["lib","strings","hasSuffix"],"pos_type":"Attribute"}},"content":{"content":"\nDetermine whether a string has given suffix.\n\n# Inputs\n\n`suffix`\n: Suffix to check for\n\n`content`\n: Input string\n\n# Type\n\n```\nhasSuffix :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.hasSuffix` usage example\n\n```nix\nhasSuffix \"foo\" \"foobar\"\n=> false\nhasSuffix \"foo\" \"barfoo\"\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":841,"column":3},"path":["lib","strings","hasSuffix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.head","path":["lib","strings","head"],"aliases":[["builtins","head"],["lib","head"],["lib","lists","head"]],"signature":null,"is_primop":true,"primop_meta":{"name":"head","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":24,"column":5},"attr_expr":"head","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","head"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the first element of a list; abort evaluation if the argument\nisn’t a list or is an empty list. You can test whether a list is\nempty by comparing it with `[]`.\n","source":{"position":null,"path":["lib","strings","head"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.intersperse","path":["lib","strings","intersperse"],"aliases":[["lib","intersperse"]],"signature":"intersperse :: a -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":186,"column":3},"attr_expr":"intersperse =\n    separator: list:\n    if list == [ ] || length list == 1 then\n      list\n    else\n      tail (\n        lib.concatMap (x: [\n          separator\n          x\n        ]) list\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":187,"column":5},"lambda_expr":"intersperse =\n    separator: list:\n    if list == [ ] || length list == 1 then\n      list\n    else\n      tail (\n        lib.concatMap (x: [\n          separator\n          x\n        ]) list\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":186,"column":3},"path":["lib","strings","intersperse"],"pos_type":"Attribute"}},"content":{"content":"\nPlace an element between each element of a list\n\n# Inputs\n\n`separator`\n: Separator to add between elements\n\n`list`\n: Input list\n\n# Type\n\n```\nintersperse :: a -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.intersperse` usage example\n\n```nix\nintersperse \"/\" [\"usr\" \"local\" \"bin\"]\n=> [\"usr\" \"/\" \"local\" \"/\" \"bin\"].\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":186,"column":3},"path":["lib","strings","intersperse"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.isAttrs","path":["lib","strings","isAttrs"],"aliases":[["builtins","isAttrs"],["lib","isAttrs"],["lib","attrsets","isAttrs"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isAttrs","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":27,"column":5},"attr_expr":"isAttrs","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","isAttrs"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a set, and `false` otherwise.\n","source":{"position":null,"path":["lib","strings","isAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.isConvertibleWithToString","path":["lib","strings","isConvertibleWithToString"],"aliases":[],"signature":"isConvertibleWithToString :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2616,"column":3},"attr_expr":"isConvertibleWithToString =\n    let\n      types = [\n        \"null\"\n        \"int\"\n        \"float\"\n        \"bool\"\n      ];\n    in\n    x: isStringLike x || elem (typeOf x) types || (isList x && lib.all isConvertibleWithToString x);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2625,"column":5},"lambda_expr":"x: isStringLike x || elem (typeOf x) types || (isList x && lib.all isConvertibleWithToString x)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2616,"column":3},"path":["lib","strings","isConvertibleWithToString"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether a list or other value `x` can be passed to `toString`.\n\nMany types of value are coercible to string this way, including `int`, `float`,\n`null`, `bool`, `list` of similarly coercible values.\n\n# Inputs\n\n`val`\n: 1\\. Function argument\n\n# Type\n\n```\nisConvertibleWithToString :: Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2616,"column":3},"path":["lib","strings","isConvertibleWithToString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.isInt","path":["lib","strings","isInt"],"aliases":[["builtins","isInt"],["lib","isInt"],["lib","trivial","isInt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isInt","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":25,"column":5},"attr_expr":"isInt","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","isInt"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to an integer, and `false` otherwise.\n","source":{"position":null,"path":["lib","strings","isInt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.isList","path":["lib","strings","isList"],"aliases":[["builtins","isList"],["lib","isList"],["lib","lists","isList"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isList","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":26,"column":5},"attr_expr":"isList","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","isList"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a list, and `false` otherwise.\n","source":{"position":null,"path":["lib","strings","isList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.isPath","path":["lib","strings","isPath"],"aliases":[["builtins","isPath"],["lib","isPath"],["lib","filesystem","isPath"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isPath","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":28,"column":5},"attr_expr":"isPath","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","isPath"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a path, and `false` otherwise.\n","source":{"position":null,"path":["lib","strings","isPath"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.isStorePath","path":["lib","strings","isStorePath"],"aliases":[["lib","isStorePath"]],"signature":"isStorePath :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2678,"column":3},"attr_expr":"isStorePath =\n    x:\n    if isStringLike x then\n      let\n        str = toString x;\n      in\n      substring 0 1 str == \"/\"\n      && (\n        dirOf str == storeDir\n        # Match content‐addressed derivations, which _currently_ do not have a\n        # store directory prefix.\n        # This is a workaround for https://github.com/NixOS/nix/issues/12361\n        # which was needed during the experimental phase of ca-derivations and\n        # should be removed once the issue has been resolved.\n        || builtins.match \"/[0-9a-z]{52}\" str != null\n      )\n    else\n      false;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2679,"column":5},"lambda_expr":"isStorePath =\n    x:\n    if isStringLike x then\n      let\n        str = toString x;\n      in\n      substring 0 1 str == \"/\"\n      && (\n        dirOf str == storeDir\n        # Match content‐addressed derivations, which _currently_ do not have a\n        # store directory prefix.\n        # This is a workaround for https://github.com/NixOS/nix/issues/12361\n        # which was needed during the experimental phase of ca-derivations and\n        # should be removed once the issue has been resolved.\n        || builtins.match \"/[0-9a-z]{52}\" str != null\n      )\n    else\n      false;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2678,"column":3},"path":["lib","strings","isStorePath"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether a value `x` is a store path.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\nisStorePath :: Any -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.isStorePath` usage example\n\n```nix\nisStorePath \"/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11/bin/python\"\n=> false\nisStorePath \"/nix/store/d945ibfx9x185xf04b890y4f9g3cbb63-python-2.7.11\"\n=> true\nisStorePath pkgs.python\n=> true\nisStorePath [] || isStorePath 42 || isStorePath {} || …\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2678,"column":3},"path":["lib","strings","isStorePath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.isString","path":["lib","strings","isString"],"aliases":[["builtins","isString"],["lib","isString"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isString","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":29,"column":5},"attr_expr":"isString","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","isString"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a string, and `false` otherwise.\n","source":{"position":null,"path":["lib","strings","isString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.isStringLike","path":["lib","strings","isStringLike"],"aliases":[["lib","isStringLike"]],"signature":"isStringLike :: Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2645,"column":3},"attr_expr":"isStringLike = x: isString x || isPath x || x ? outPath || x ? __toString;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2645,"column":18},"lambda_expr":"isStringLike = x: isString x || isPath x || x ? outPath || x ? __toString;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2645,"column":3},"path":["lib","strings","isStringLike"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether a value can be coerced to a string.\nThe value must be a string, path, or attribute set.\n\nString-like values can be used without explicit conversion in\nstring interpolations and in most functions that expect a string.\n\n# Inputs\n\n`x`\n: 1\\. Function argument\n\n# Type\n\n```\nisStringLike :: Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2645,"column":3},"path":["lib","strings","isStringLike"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.isValidPosixName","path":["lib","strings","isValidPosixName"],"aliases":[["lib","isValidPosixName"]],"signature":"isValidPosixName :: String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1265,"column":3},"attr_expr":"isValidPosixName = name: match \"[a-zA-Z_][a-zA-Z0-9_]*\" name != null;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1265,"column":22},"lambda_expr":"isValidPosixName = name: match \"[a-zA-Z_][a-zA-Z0-9_]*\" name != null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1265,"column":3},"path":["lib","strings","isValidPosixName"],"pos_type":"Attribute"}},"content":{"content":"\nTest whether the given `name` is a valid POSIX shell variable name.\n\n# Inputs\n\n`name`\n: 1\\. Function argument\n\n# Type\n\n```\nisValidPosixName :: String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.isValidPosixName` usage example\n\n```nix\nisValidPosixName \"foo_bar000\"\n=> true\nisValidPosixName \"0-bad.jpg\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1265,"column":3},"path":["lib","strings","isValidPosixName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.join","path":["lib","strings","join"],"aliases":[["builtins","concatStringsSep"],["lib","concatStringsSep"],["lib","join"],["lib","strings","concatStringsSep"]],"signature":"join :: String -> [String] -> String\n","is_primop":true,"primop_meta":{"name":"concatStringsSep","args":["separator","list"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":73,"column":3},"attr_expr":"join = builtins.concatStringsSep;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":73,"column":3},"path":["lib","strings","join"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenates a list of strings with a separator between each element.\n\n# Inputs\n\n`sep`\n: Separator to add between elements\n\n`list`\n: List of strings that will be joined\n\n# Type\n\n```\njoin :: String -> [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.join` usage example\n\n```nix\njoin \", \" [\"foo\" \"bar\"]\n=> \"foo, bar\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":73,"column":3},"path":["lib","strings","join"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.levenshtein","path":["lib","strings","levenshtein"],"aliases":[],"signature":"levenshtein :: String -> String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2959,"column":3},"attr_expr":"levenshtein =\n    a: b:\n    let\n      # Two dimensional array with dimensions (stringLength a + 1, stringLength b + 1)\n      arr = lib.genList (i: lib.genList (j: dist i j) (stringLength b + 1)) (stringLength a + 1);\n      d = x: y: lib.elemAt (lib.elemAt arr x) y;\n      dist =\n        i: j:\n        let\n          c = if substring (i - 1) 1 a == substring (j - 1) 1 b then 0 else 1;\n        in\n        if j == 0 then\n          i\n        else if i == 0 then\n          j\n        else\n          lib.min (lib.min (d (i - 1) j + 1) (d i (j - 1) + 1)) (d (i - 1) (j - 1) + c);\n    in\n    d (stringLength a) (stringLength b);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2960,"column":5},"lambda_expr":"levenshtein =\n    a: b:\n    let\n      # Two dimensional array with dimensions (stringLength a + 1, stringLength b + 1)\n      arr = lib.genList (i: lib.genList (j: dist i j) (stringLength b + 1)) (stringLength a + 1);\n      d = x: y: lib.elemAt (lib.elemAt arr x) y;\n      dist =\n        i: j:\n        let\n          c = if substring (i - 1) 1 a == substring (j - 1) 1 b then 0 else 1;\n        in\n        if j == 0 then\n          i\n        else if i == 0 then\n          j\n        else\n          lib.min (lib.min (d (i - 1) j + 1) (d i (j - 1) + 1)) (d (i - 1) (j - 1) + c);\n    in\n    d (stringLength a) (stringLength b);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2959,"column":3},"path":["lib","strings","levenshtein"],"pos_type":"Attribute"}},"content":{"content":"\nComputes the Levenshtein distance between two strings `a` and `b`.\n\nComplexity O(n*m) where n and m are the lengths of the strings.\nAlgorithm adjusted from [this stackoverflow comment](https://stackoverflow.com/a/9750974/6605742)\n\n# Inputs\n\n`a`\n: 1\\. Function argument\n\n`b`\n: 2\\. Function argument\n\n# Type\n\n```\nlevenshtein :: String -> String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.strings.levenshtein` usage example\n\n```nix\nlevenshtein \"foo\" \"foo\"\n=> 0\nlevenshtein \"book\" \"hook\"\n=> 1\nlevenshtein \"hello\" \"Heyo\"\n=> 3\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2959,"column":3},"path":["lib","strings","levenshtein"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.levenshteinAtMost","path":["lib","strings","levenshteinAtMost"],"aliases":[],"signature":"levenshteinAtMost :: Int -> String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3084,"column":3},"attr_expr":"levenshteinAtMost =\n    let\n      infixDifferAtMost1 = x: y: stringLength x <= 1 && stringLength y <= 1;\n\n      # This function takes two strings stripped by their common pre and suffix,\n      # and returns whether they differ by at most two by Levenshtein distance.\n      # Because of this stripping, if they do indeed differ by at most two edits,\n      # we know that those edits were (if at all) done at the start or the end,\n      # while the middle has to have stayed the same. This fact is used in the\n      # implementation.\n      infixDifferAtMost2 =\n        x: y:\n        let\n          xlen = stringLength x;\n          ylen = stringLength y;\n          # This function is only called with |x| >= |y| and |x| - |y| <= 2, so\n          # diff is one of 0, 1 or 2\n          diff = xlen - ylen;\n\n          # Infix of x and y, stripped by the left and right most character\n          xinfix = substring 1 (xlen - 2) x;\n          yinfix = substring 1 (ylen - 2) y;\n\n          # x and y but a character deleted at the left or right\n          xdelr = substring 0 (xlen - 1) x;\n          xdell = substring 1 (xlen - 1) x;\n          ydelr = substring 0 (ylen - 1) y;\n          ydell = substring 1 (ylen - 1) y;\n        in\n        # A length difference of 2 can only be gotten with 2 delete edits,\n        # which have to have happened at the start and end of x\n        # Example: \"abcdef\" -> \"bcde\"\n        if diff == 2 then\n          xinfix == y\n        # A length difference of 1 can only be gotten with a deletion on the\n        # right and a replacement on the left or vice versa.\n        # Example: \"abcdef\" -> \"bcdez\" or \"zbcde\"\n        else if diff == 1 then\n          xinfix == ydelr || xinfix == ydell\n        # No length difference can either happen through replacements on both\n        # sides, or a deletion on the left and an insertion on the right or\n        # vice versa\n        # Example: \"abcdef\" -> \"zbcdez\" or \"bcdefz\" or \"zabcde\"\n        else\n          xinfix == yinfix || xdelr == ydell || xdell == ydelr;\n\n    in\n    k:\n    if k <= 0 then\n      a: b: a == b\n    else\n      let\n        f =\n          a: b:\n          let\n            alen = stringLength a;\n            blen = stringLength b;\n            prelen = commonPrefixLength a b;\n            suflen = commonSuffixLength a b;\n            presuflen = prelen + suflen;\n            ainfix = substring prelen (alen - presuflen) a;\n            binfix = substring prelen (blen - presuflen) b;\n          in\n          # Make a be the bigger string\n          if alen < blen then\n            f b a\n          # If a has over k more characters than b, even with k deletes on a, b can't be reached\n          else if alen - blen > k then\n            false\n          else if k == 1 then\n            infixDifferAtMost1 ainfix binfix\n          else if k == 2 then\n            infixDifferAtMost2 ainfix binfix\n          else\n            levenshtein ainfix binfix <= k;\n      in\n      f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3131,"column":5},"lambda_expr":"k:\n    if k <= 0 then\n      a: b: a == b\n    else\n      let\n        f =\n          a: b:\n          let\n            alen = stringLength a;\n            blen = stringLength b;\n            prelen = commonPrefixLength a b;\n            suflen = commonSuffixLength a b;\n            presuflen = prelen + suflen;\n            ainfix = substring prelen (alen - presuflen) a;\n            binfix = substring prelen (blen - presuflen) b;\n          in\n          # Make a be the bigger string\n          if alen < blen then\n            f b a\n          # If a has over k more characters than b, even with k deletes on a, b can't be reached\n          else if alen - blen > k then\n            false\n          else if k == 1 then\n            infixDifferAtMost1 ainfix binfix\n          else if k == 2 then\n            infixDifferAtMost2 ainfix binfix\n          else\n            levenshtein ainfix binfix <= k;\n      in\n      f","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3084,"column":3},"path":["lib","strings","levenshteinAtMost"],"pos_type":"Attribute"}},"content":{"content":"\nReturns whether the levenshtein distance between two strings `a` and `b` is at most some value `k`.\n\nComplexity is O(min(n,m)) for k <= 2 and O(n*m) otherwise\n\n# Inputs\n\n`k`\n: Distance threshold\n\n`a`\n: String `a`\n\n`b`\n: String `b`\n\n# Type\n\n```\nlevenshteinAtMost :: Int -> String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.levenshteinAtMost` usage example\n\n```nix\nlevenshteinAtMost 0 \"foo\" \"foo\"\n=> true\nlevenshteinAtMost 1 \"foo\" \"boa\"\n=> false\nlevenshteinAtMost 2 \"foo\" \"boa\"\n=> true\nlevenshteinAtMost 2 \"This is a sentence\" \"this is a sentense.\"\n=> false\nlevenshteinAtMost 3 \"This is a sentence\" \"this is a sentense.\"\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":3084,"column":3},"path":["lib","strings","levenshteinAtMost"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.makeBinPath","path":["lib","strings","makeBinPath"],"aliases":[["lib","makeBinPath"]],"signature":"makeBinPath :: [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":696,"column":3},"attr_expr":"makeBinPath = makeSearchPathOutput \"bin\" \"bin\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":21},"lambda_expr":"pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":696,"column":3},"path":["lib","strings","makeBinPath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a binary search path (such as $PATH) containing the\nbinaries for a set of packages.\n\n# Inputs\n\n`packages`\n: List of packages\n\n# Type\n\n```\nmakeBinPath :: [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeBinPath` usage example\n\n```nix\nmakeBinPath [\"/root\" \"/usr\" \"/usr/local\"]\n=> \"/root/bin:/usr/bin:/usr/local/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":696,"column":3},"path":["lib","strings","makeBinPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.makeIncludePath","path":["lib","strings","makeIncludePath"],"aliases":[["lib","makeIncludePath"]],"signature":"makeIncludePath :: [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":668,"column":3},"attr_expr":"makeIncludePath = makeSearchPathOutput \"dev\" \"include\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":21},"lambda_expr":"pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":668,"column":3},"path":["lib","strings","makeIncludePath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct an include search path (such as C_INCLUDE_PATH) containing the\nheader files for a set of packages or paths.\n\n# Inputs\n\n`packages`\n: List of packages\n\n# Type\n\n```\nmakeIncludePath :: [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeIncludePath` usage example\n\n```nix\nmakeIncludePath [ \"/usr\" \"/usr/local\" ]\n=> \"/usr/include:/usr/local/include\"\npkgs = import <nixpkgs> { }\nmakeIncludePath [ pkgs.openssl pkgs.zlib ]\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev/include:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8-dev/include\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":668,"column":3},"path":["lib","strings","makeIncludePath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.makeLibraryPath","path":["lib","strings","makeLibraryPath"],"aliases":[["lib","makeLibraryPath"]],"signature":"makeLibraryPath :: [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":637,"column":3},"attr_expr":"makeLibraryPath = makeSearchPathOutput \"lib\" \"lib\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":21},"lambda_expr":"pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs)","count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":637,"column":3},"path":["lib","strings","makeLibraryPath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a library search path (such as RPATH) containing the\nlibraries for a set of packages\n\n# Inputs\n\n`packages`\n: List of packages\n\n# Type\n\n```\nmakeLibraryPath :: [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeLibraryPath` usage example\n\n```nix\nmakeLibraryPath [ \"/usr\" \"/usr/local\" ]\n=> \"/usr/lib:/usr/local/lib\"\npkgs = import <nixpkgs> { }\nmakeLibraryPath [ pkgs.openssl pkgs.zlib ]\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r/lib:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/lib\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":637,"column":3},"path":["lib","strings","makeLibraryPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.makeSearchPath","path":["lib","strings","makeSearchPath"],"aliases":[["lib","makeSearchPath"]],"signature":"makeSearchPath :: String -> [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":566,"column":3},"attr_expr":"makeSearchPath =\n    subDir: paths: concatStringsSep \":\" (map (path: path + \"/\" + subDir) (filter (x: x != null) paths));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":567,"column":5},"lambda_expr":"makeSearchPath =\n    subDir: paths: concatStringsSep \":\" (map (path: path + \"/\" + subDir) (filter (x: x != null) paths));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":566,"column":3},"path":["lib","strings","makeSearchPath"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a Unix-style, colon-separated search path consisting of\nthe given `subDir` appended to each of the given paths.\n\n# Inputs\n\n`subDir`\n: Directory name to append\n\n`paths`\n: List of base paths\n\n# Type\n\n```\nmakeSearchPath :: String -> [String] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeSearchPath` usage example\n\n```nix\nmakeSearchPath \"bin\" [\"/root\" \"/usr\" \"/usr/local\"]\n=> \"/root/bin:/usr/bin:/usr/local/bin\"\nmakeSearchPath \"bin\" [\"\"]\n=> \"/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":566,"column":3},"path":["lib","strings","makeSearchPath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.makeSearchPathOutput","path":["lib","strings","makeSearchPathOutput"],"aliases":[["lib","makeSearchPathOutput"]],"signature":"makeSearchPathOutput :: String -> String -> [Derivation] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":604,"column":3},"attr_expr":"makeSearchPathOutput =\n    output: subDir: pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":605,"column":5},"lambda_expr":"makeSearchPathOutput =\n    output: subDir: pkgs:\n    makeSearchPath subDir (map (lib.getOutput output) pkgs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":604,"column":3},"path":["lib","strings","makeSearchPathOutput"],"pos_type":"Attribute"}},"content":{"content":"\nConstruct a Unix-style search path by appending the given\n`subDir` to the specified `output` of each of the packages.\n\nIf no output by the given name is found, fallback to `.out` and then to\nthe default.\n\n# Inputs\n\n`output`\n: Package output to use\n\n`subDir`\n: Directory name to append\n\n`pkgs`\n: List of packages\n\n# Type\n\n```\nmakeSearchPathOutput :: String -> String -> [Derivation] -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.makeSearchPathOutput` usage example\n\n```nix\nmakeSearchPathOutput \"dev\" \"bin\" [ pkgs.openssl pkgs.zlib ]\n=> \"/nix/store/9rz8gxhzf8sw4kf2j2f1grr49w8zx5vj-openssl-1.0.1r-dev/bin:/nix/store/wwh7mhwh269sfjkm6k5665b5kgp7jrk2-zlib-1.2.8/bin\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":604,"column":3},"path":["lib","strings","makeSearchPathOutput"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.match","path":["lib","strings","match"],"aliases":[["builtins","match"],["lib","match"]],"signature":null,"is_primop":true,"primop_meta":{"name":"match","args":["regex","str"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":30,"column":5},"attr_expr":"match","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","match"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a list if the [extended POSIX regular\nexpression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)\n*regex* matches *str* precisely, otherwise returns `null`. Each item\nin the list is a regex group.\n\n```nix\nbuiltins.match \"ab\" \"abc\"\n```\n\nEvaluates to `null`.\n\n```nix\nbuiltins.match \"abc\" \"abc\"\n```\n\nEvaluates to `[ ]`.\n\n```nix\nbuiltins.match \"a(b)(c)\" \"abc\"\n```\n\nEvaluates to `[ \"b\" \"c\" ]`.\n\n```nix\nbuiltins.match \"[[:space:]]+([[:upper:]]+)[[:space:]]+\" \"  FOO   \"\n```\n\nEvaluates to `[ \"FOO\" ]`.\n","source":{"position":null,"path":["lib","strings","match"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.mesonBool","path":["lib","strings","mesonBool"],"aliases":[["lib","mesonBool"]],"signature":"mesonBool :: String -> Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2295,"column":3},"attr_expr":"mesonBool =\n    condition: flag:\n    assert (lib.isString condition);\n    assert (lib.isBool flag);\n    mesonOption condition (lib.boolToString flag);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2296,"column":5},"lambda_expr":"mesonBool =\n    condition: flag:\n    assert (lib.isString condition);\n    assert (lib.isBool flag);\n    mesonOption condition (lib.boolToString flag);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2295,"column":3},"path":["lib","strings","mesonBool"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<condition>={true,false}\"` string that can be passed to typical\nMeson invocations.\n\n# Inputs\n\n`condition`\n: The condition to be made true or false\n\n`flag`\n: The controlling flag of the condition\n\n# Type\n\n```\nmesonBool :: String -> Bool -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.mesonBool` usage example\n\n```nix\nmesonBool \"hardened\" true\n=> \"-Dhardened=true\"\nmesonBool \"static\" false\n=> \"-Dstatic=false\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2295,"column":3},"path":["lib","strings","mesonBool"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.mesonEnable","path":["lib","strings","mesonEnable"],"aliases":[["lib","mesonEnable"]],"signature":"mesonEnable :: String -> Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2332,"column":3},"attr_expr":"mesonEnable =\n    feature: flag:\n    assert (lib.isString feature);\n    assert (lib.isBool flag);\n    mesonOption feature (if flag then \"enabled\" else \"disabled\");","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2333,"column":5},"lambda_expr":"mesonEnable =\n    feature: flag:\n    assert (lib.isString feature);\n    assert (lib.isBool flag);\n    mesonOption feature (if flag then \"enabled\" else \"disabled\");","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2332,"column":3},"path":["lib","strings","mesonEnable"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>={enabled,disabled}\"` string that can be passed to\ntypical Meson invocations.\n\n# Inputs\n\n`feature`\n: The feature to be enabled or disabled\n\n`flag`\n: The controlling flag\n\n# Type\n\n```\nmesonEnable :: String -> Bool -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.mesonEnable` usage example\n\n```nix\nmesonEnable \"docs\" true\n=> \"-Ddocs=enabled\"\nmesonEnable \"savage\" false\n=> \"-Dsavage=disabled\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2332,"column":3},"path":["lib","strings","mesonEnable"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.mesonOption","path":["lib","strings","mesonOption"],"aliases":[["lib","mesonOption"]],"signature":"mesonOption :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2258,"column":3},"attr_expr":"mesonOption =\n    feature: value:\n    assert (lib.isString feature);\n    assert (lib.isString value);\n    \"-D${feature}=${value}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2259,"column":5},"lambda_expr":"mesonOption =\n    feature: value:\n    assert (lib.isString feature);\n    assert (lib.isString value);\n    \"-D${feature}=${value}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2258,"column":3},"path":["lib","strings","mesonOption"],"pos_type":"Attribute"}},"content":{"content":"\nCreate a `\"-D<feature>=<value>\"` string that can be passed to typical Meson\ninvocations.\n\n# Inputs\n\n`feature`\n: The feature to be set\n\n`value`\n: The desired value\n\n# Type\n\n```\nmesonOption :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.mesonOption` usage example\n\n```nix\nmesonOption \"engine\" \"opengl\"\n=> \"-Dengine=opengl\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2258,"column":3},"path":["lib","strings","mesonOption"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.nameFromURL","path":["lib","strings","nameFromURL"],"aliases":[["lib","nameFromURL"]],"signature":"nameFromURL :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2093,"column":3},"attr_expr":"nameFromURL =\n    url: sep:\n    let\n      components = splitString \"/\" url;\n      filename = lib.last components;\n      name = head (splitString sep filename);\n    in\n    assert name != filename;\n    name;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2094,"column":5},"lambda_expr":"nameFromURL =\n    url: sep:\n    let\n      components = splitString \"/\" url;\n      filename = lib.last components;\n      name = head (splitString sep filename);\n    in\n    assert name != filename;\n    name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2093,"column":3},"path":["lib","strings","nameFromURL"],"pos_type":"Attribute"}},"content":{"content":"\nExtract name and version from a URL as shown in the examples.\n\nSeparator `sep` is used to determine the end of the extension.\n\n# Inputs\n\n`url`\n: 1\\. Function argument\n\n`sep`\n: 2\\. Function argument\n\n# Type\n\n```\nnameFromURL :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.nameFromURL` usage example\n\n```nix\nnameFromURL \"https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2\" \"-\"\n=> \"nix\"\nnameFromURL \"https://nixos.org/releases/nix/nix-1.7/nix-1.7-x86_64-linux.tar.bz2\" \"_\"\n=> \"nix-1.7-x86\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2093,"column":3},"path":["lib","strings","nameFromURL"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.normalizePath","path":["lib","strings","normalizePath"],"aliases":[],"signature":"normalizePath :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":723,"column":3},"attr_expr":"normalizePath =\n    s:\n    warnIf (isPath s)\n      ''\n        lib.strings.normalizePath: The argument (${toString s}) is a path value, but only strings are supported.\n            Path values are always normalised in Nix, so there's no need to call this function on them.\n            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.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        builtins.foldl' (x: y: if y == \"/\" && hasSuffix \"/\" x then x else x + y) \"\" (stringToCharacters s)\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":724,"column":5},"lambda_expr":"normalizePath =\n    s:\n    warnIf (isPath s)\n      ''\n        lib.strings.normalizePath: The argument (${toString s}) is a path value, but only strings are supported.\n            Path values are always normalised in Nix, so there's no need to call this function on them.\n            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.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        builtins.foldl' (x: y: if y == \"/\" && hasSuffix \"/\" x then x else x + y) \"\" (stringToCharacters s)\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":723,"column":3},"path":["lib","strings","normalizePath"],"pos_type":"Attribute"}},"content":{"content":"\nNormalize path, removing extraneous /s\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nnormalizePath :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.normalizePath` usage example\n\n```nix\nnormalizePath \"/a//b///c/\"\n=> \"/a/b/c/\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":723,"column":3},"path":["lib","strings","normalizePath"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.optionalString","path":["lib","strings","optionalString"],"aliases":[["lib","optionalString"]],"signature":"optionalString :: Bool -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":766,"column":3},"attr_expr":"optionalString = cond: string: if cond then string else \"\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":766,"column":20},"lambda_expr":"optionalString = cond: string: if cond then string else \"\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":766,"column":3},"path":["lib","strings","optionalString"],"pos_type":"Attribute"}},"content":{"content":"\nDepending on the boolean `cond`, return either the given string\nor the empty string. Useful to concatenate against a bigger string.\n\n# Inputs\n\n`cond`\n: Condition\n\n`string`\n: String to return if condition is true\n\n# Type\n\n```\noptionalString :: Bool -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.optionalString` usage example\n\n```nix\noptionalString true \"some-string\"\n=> \"some-string\"\noptionalString false \"some-string\"\n=> \"\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":766,"column":3},"path":["lib","strings","optionalString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.parseDrvName","path":["lib","strings","parseDrvName"],"aliases":[["builtins","parseDrvName"],["lib","parseDrvName"]],"signature":null,"is_primop":true,"primop_meta":{"name":"parseDrvName","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":31,"column":5},"attr_expr":"parseDrvName","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","parseDrvName"],"pos_type":"Lambda"}},"content":{"content":"\nSplit the string *s* into a package name and version. The package\nname is everything up to but not including the first dash not followed\nby a letter, and the version is everything following that dash. The\nresult is returned in a set `{ name, version }`. Thus,\n`builtins.parseDrvName \"nix-0.12pre12876\"` returns `{ name =\n\"nix\"; version = \"0.12pre12876\"; }`.\n","source":{"position":null,"path":["lib","strings","parseDrvName"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.readFile","path":["lib","strings","readFile"],"aliases":[["builtins","readFile"],["lib","readFile"],["lib","trivial","readFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"readFile","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":32,"column":5},"attr_expr":"readFile","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","readFile"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the contents of the file *path* as a string.\n","source":{"position":null,"path":["lib","strings","readFile"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.removePrefix","path":["lib","strings","removePrefix"],"aliases":[["lib","removePrefix"]],"signature":"removePrefix :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1853,"column":3},"attr_expr":"removePrefix =\n    prefix: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath prefix)\n      ''\n        lib.strings.removePrefix: The first argument (${toString prefix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function never removes any prefix in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        let\n          preLen = stringLength prefix;\n        in\n        if substring 0 preLen str == prefix then\n          # -1 will take the string until the end\n          substring preLen (-1) str\n        else\n          str\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1854,"column":5},"lambda_expr":"removePrefix =\n    prefix: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath prefix)\n      ''\n        lib.strings.removePrefix: The first argument (${toString prefix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function never removes any prefix in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        let\n          preLen = stringLength prefix;\n        in\n        if substring 0 preLen str == prefix then\n          # -1 will take the string until the end\n          substring preLen (-1) str\n        else\n          str\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1853,"column":3},"path":["lib","strings","removePrefix"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a string without the specified prefix, if the prefix matches.\n\n# Inputs\n\n`prefix`\n: Prefix to remove if it matches\n\n`str`\n: Input string\n\n# Type\n\n```\nremovePrefix :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.removePrefix` usage example\n\n```nix\nremovePrefix \"foo.\" \"foo.bar.baz\"\n=> \"bar.baz\"\nremovePrefix \"xxx\" \"foo.bar.baz\"\n=> \"foo.bar.baz\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1853,"column":3},"path":["lib","strings","removePrefix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.removeSuffix","path":["lib","strings","removeSuffix"],"aliases":[["lib","removeSuffix"]],"signature":"removeSuffix :: String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1904,"column":3},"attr_expr":"removeSuffix =\n    suffix: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath suffix)\n      ''\n        lib.strings.removeSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function never removes any suffix in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        let\n          sufLen = stringLength suffix;\n          sLen = stringLength str;\n        in\n        if sufLen <= sLen && suffix == substring (sLen - sufLen) sufLen str then\n          substring 0 (sLen - sufLen) str\n        else\n          str\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1905,"column":5},"lambda_expr":"removeSuffix =\n    suffix: str:\n    # Before 23.05, paths would be copied to the store before converting them\n    # to strings and comparing. This was surprising and confusing.\n    warnIf (isPath suffix)\n      ''\n        lib.strings.removeSuffix: The first argument (${toString suffix}) is a path value, but only strings are supported.\n            There is almost certainly a bug in the calling code, since this function never removes any suffix in such a case.\n            This function also copies the path to the Nix store, which may not be what you want.\n            This behavior is deprecated and will throw an error in the future.''\n      (\n        let\n          sufLen = stringLength suffix;\n          sLen = stringLength str;\n        in\n        if sufLen <= sLen && suffix == substring (sLen - sufLen) sufLen str then\n          substring 0 (sLen - sufLen) str\n        else\n          str\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1904,"column":3},"path":["lib","strings","removeSuffix"],"pos_type":"Attribute"}},"content":{"content":"\nReturns a string without the specified suffix, if the suffix matches.\n\n# Inputs\n\n`suffix`\n: Suffix to remove if it matches\n\n`str`\n: Input string\n\n# Type\n\n```\nremoveSuffix :: String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.removeSuffix` usage example\n\n```nix\nremoveSuffix \"front\" \"homefront\"\n=> \"home\"\nremoveSuffix \"xxx\" \"homefront\"\n=> \"homefront\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1904,"column":3},"path":["lib","strings","removeSuffix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.replaceString","path":["lib","strings","replaceString"],"aliases":[["lib","replaceString"]],"signature":"replaceString :: String -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":398,"column":3},"attr_expr":"replaceString = from: to: replaceStrings [ from ] [ to ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":398,"column":19},"lambda_expr":"replaceString = from: to: replaceStrings [ from ] [ to ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":398,"column":3},"path":["lib","strings","replaceString"],"pos_type":"Attribute"}},"content":{"content":"\nGiven string `s`, replace every occurrence of the string `from` with the string `to`.\n\n# Inputs\n\n`from`\n: The string to be replaced\n\n`to`\n: The string to replace with\n\n`s`\n: The original string where replacements will be made\n\n# Type\n\n```\nreplaceString :: String -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.replaceString` usage example\n\n```nix\nreplaceString \"world\" \"Nix\" \"Hello, world!\"\n=> \"Hello, Nix!\"\nreplaceString \".\" \"_\" \"v1.2.3\"\n=> \"v1_2_3\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":398,"column":3},"path":["lib","strings","replaceString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.replaceStrings","path":["lib","strings","replaceStrings"],"aliases":[["builtins","replaceStrings"],["lib","replaceStrings"]],"signature":null,"is_primop":true,"primop_meta":{"name":"replaceStrings","args":["from","to","s"],"experimental":false,"arity":3},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":33,"column":5},"attr_expr":"replaceStrings","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","replaceStrings"],"pos_type":"Lambda"}},"content":{"content":"\nGiven string *s*, replace every occurrence of the strings in *from*\nwith the corresponding string in *to*.\n\nThe argument *to* is lazy, that is, it is only evaluated when its corresponding pattern in *from* is matched in the string *s*\n\nExample:\n\n```nix\nbuiltins.replaceStrings [\"oo\" \"a\"] [\"a\" \"i\"] \"foobar\"\n```\n\nevaluates to `\"fabir\"`.\n","source":{"position":null,"path":["lib","strings","replaceStrings"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.replicate","path":["lib","strings","replicate"],"aliases":[],"signature":"replicate :: Int -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":431,"column":3},"attr_expr":"replicate = n: s: concatStrings (lib.lists.replicate n s);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":431,"column":15},"lambda_expr":"replicate = n: s: concatStrings (lib.lists.replicate n s);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":431,"column":3},"path":["lib","strings","replicate"],"pos_type":"Attribute"}},"content":{"content":"\nRepeat a string `n` times,\nand concatenate the parts into a new string.\n\n# Inputs\n\n`n`\n: 1\\. Function argument\n\n`s`\n: 2\\. Function argument\n\n# Type\n\n```\nreplicate :: Int -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.replicate` usage example\n\n```nix\nreplicate 3 \"v\"\n=> \"vvv\"\nreplicate 5 \"hello\"\n=> \"hellohellohellohellohello\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":431,"column":3},"path":["lib","strings","replicate"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.sanitizeDerivationName","path":["lib","strings","sanitizeDerivationName"],"aliases":[],"signature":"sanitizeDerivationName :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2897,"column":3},"attr_expr":"sanitizeDerivationName =\n    let\n      okRegex = match \"[[:alnum:]+_?=-][[:alnum:]+._?=-]*\";\n    in\n    string:\n    # First detect the common case of already valid strings, to speed those up\n    if stringLength string <= 207 && okRegex string != null then\n      unsafeDiscardStringContext string\n    else\n      lib.pipe string [\n        # Get rid of string context. This is safe under the assumption that the\n        # resulting string is only used as a derivation name\n        unsafeDiscardStringContext\n        # Strip all leading \".\"\n        (x: elemAt (match \"\\\\.*(.*)\" x) 0)\n        # Split out all invalid characters\n        # https://github.com/NixOS/nix/blob/2.3.2/src/libstore/store-api.cc#L85-L112\n        # https://github.com/NixOS/nix/blob/2242be83c61788b9c0736a92bb0b5c7bbfc40803/nix-rust/src/store/path.rs#L100-L125\n        (split \"[^[:alnum:]+._?=-]+\")\n        # Replace invalid character ranges with a \"-\"\n        (concatMapStrings (s: if lib.isList s then \"-\" else s))\n        # Limit to 211 characters (minus 4 chars for \".drv\")\n        (x: substring (lib.max (stringLength x - 207) 0) (-1) x)\n        # If the result is empty, replace it with \"unknown\"\n        (x: if stringLength x == 0 then \"unknown\" else x)\n      ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2901,"column":5},"lambda_expr":"string:\n    # First detect the common case of already valid strings, to speed those up\n    if stringLength string <= 207 && okRegex string != null then\n      unsafeDiscardStringContext string\n    else\n      lib.pipe string [\n        # Get rid of string context. This is safe under the assumption that the\n        # resulting string is only used as a derivation name\n        unsafeDiscardStringContext\n        # Strip all leading \".\"\n        (x: elemAt (match \"\\\\.*(.*)\" x) 0)\n        # Split out all invalid characters\n        # https://github.com/NixOS/nix/blob/2.3.2/src/libstore/store-api.cc#L85-L112\n        # https://github.com/NixOS/nix/blob/2242be83c61788b9c0736a92bb0b5c7bbfc40803/nix-rust/src/store/path.rs#L100-L125\n        (split \"[^[:alnum:]+._?=-]+\")\n        # Replace invalid character ranges with a \"-\"\n        (concatMapStrings (s: if lib.isList s then \"-\" else s))\n        # Limit to 211 characters (minus 4 chars for \".drv\")\n        (x: substring (lib.max (stringLength x - 207) 0) (-1) x)\n        # If the result is empty, replace it with \"unknown\"\n        (x: if stringLength x == 0 then \"unknown\" else x)\n      ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2897,"column":3},"path":["lib","strings","sanitizeDerivationName"],"pos_type":"Attribute"}},"content":{"content":"\nCreates a valid derivation name from a potentially invalid one.\n\n# Inputs\n\n`string`\n: 1\\. Function argument\n\n# Type\n\n```\nsanitizeDerivationName :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.sanitizeDerivationName` usage example\n\n```nix\nsanitizeDerivationName \"../hello.bar # foo\"\n=> \"-hello.bar-foo\"\nsanitizeDerivationName \"\"\n=> \"unknown\"\nsanitizeDerivationName pkgs.hello\n=> \"-nix-store-2g75chlbpxlrqn15zlby2dfh8hr9qwbk-hello-2.10\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2897,"column":3},"path":["lib","strings","sanitizeDerivationName"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.split","path":["lib","strings","split"],"aliases":[["builtins","split"],["lib","split"]],"signature":null,"is_primop":true,"primop_meta":{"name":"split","args":["regex","str"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":34,"column":5},"attr_expr":"split","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","split"],"pos_type":"Lambda"}},"content":{"content":"\nReturns a list composed of non matched strings interleaved with the\nlists of the [extended POSIX regular\nexpression](http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04)\n*regex* matches of *str*. Each item in the lists of matched\nsequences is a regex group.\n\n```nix\nbuiltins.split \"(a)b\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" ] \"c\" ]`.\n\n```nix\nbuiltins.split \"([ac])\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" ] \"b\" [ \"c\" ] \"\" ]`.\n\n```nix\nbuiltins.split \"(a)|(c)\" \"abc\"\n```\n\nEvaluates to `[ \"\" [ \"a\" null ] \"b\" [ null \"c\" ] \"\" ]`.\n\n```nix\nbuiltins.split \"([[:upper:]]+)\" \" FOO \"\n```\n\nEvaluates to `[ \" \" [ \"FOO\" ] \" \" ]`.\n","source":{"position":null,"path":["lib","strings","split"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.splitString","path":["lib","strings","splitString"],"aliases":[["lib","splitString"]],"signature":"splitString :: String -> String -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1723,"column":3},"attr_expr":"splitString =\n    sep: s:\n    let\n      splits = builtins.filter builtins.isString (\n        builtins.split (escapeRegex (toString sep)) (toString s)\n      );\n    in\n    map (addContextFrom s) splits;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1724,"column":5},"lambda_expr":"splitString =\n    sep: s:\n    let\n      splits = builtins.filter builtins.isString (\n        builtins.split (escapeRegex (toString sep)) (toString s)\n      );\n    in\n    map (addContextFrom s) splits;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1723,"column":3},"path":["lib","strings","splitString"],"pos_type":"Attribute"}},"content":{"content":"\nCut a string with a separator and produces a list of strings which\nwere separated by this separator.\n\n# Inputs\n\n`sep`\n: 1\\. Function argument\n\n`s`\n: 2\\. Function argument\n\n# Type\n\n```\nsplitString :: String -> String -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.splitString` usage example\n\n```nix\nsplitString \".\" \"foo.bar.baz\"\n=> [ \"foo\" \"bar\" \"baz\" ]\nsplitString \"/\" \"/usr/local/bin\"\n=> [ \"\" \"usr\" \"local\" \"bin\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1723,"column":3},"path":["lib","strings","splitString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.splitStringBy","path":["lib","strings","splitStringBy"],"aliases":[["lib","splitStringBy"]],"signature":"splitStringBy :: (String -> String -> Bool) -> Bool -> String -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1793,"column":3},"attr_expr":"splitStringBy =\n    predicate: keepSplit: str:\n    let\n      len = stringLength str;\n\n      # Helper function that processes the string character by character\n      go =\n        pos: currentPart: result:\n        # Base case: reached end of string\n        if pos == len then\n          result ++ [ currentPart ]\n        else\n          let\n            currChar = substring pos 1 str;\n            prevChar = if pos > 0 then substring (pos - 1) 1 str else \"\";\n            isSplit = predicate prevChar currChar;\n          in\n          if isSplit then\n            # Split here - add current part to results and start a new one\n            let\n              newResult = result ++ [ currentPart ];\n              newCurrentPart = if keepSplit then currChar else \"\";\n            in\n            go (pos + 1) newCurrentPart newResult\n          else\n            # Keep building current part\n            go (pos + 1) (currentPart + currChar) result;\n    in\n    if len == 0 then [ (addContextFrom str \"\") ] else map (addContextFrom str) (go 0 \"\" [ ]);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1794,"column":5},"lambda_expr":"splitStringBy =\n    predicate: keepSplit: str:\n    let\n      len = stringLength str;\n\n      # Helper function that processes the string character by character\n      go =\n        pos: currentPart: result:\n        # Base case: reached end of string\n        if pos == len then\n          result ++ [ currentPart ]\n        else\n          let\n            currChar = substring pos 1 str;\n            prevChar = if pos > 0 then substring (pos - 1) 1 str else \"\";\n            isSplit = predicate prevChar currChar;\n          in\n          if isSplit then\n            # Split here - add current part to results and start a new one\n            let\n              newResult = result ++ [ currentPart ];\n              newCurrentPart = if keepSplit then currChar else \"\";\n            in\n            go (pos + 1) newCurrentPart newResult\n          else\n            # Keep building current part\n            go (pos + 1) (currentPart + currChar) result;\n    in\n    if len == 0 then [ (addContextFrom str \"\") ] else map (addContextFrom str) (go 0 \"\" [ ]);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1793,"column":3},"path":["lib","strings","splitStringBy"],"pos_type":"Attribute"}},"content":{"content":"\nSplits a string into substrings based on a predicate that examines adjacent characters.\n\nThis function provides a flexible way to split strings by checking pairs of characters\nagainst a custom predicate function. Unlike simpler splitting functions, this allows\nfor context-aware splitting based on character transitions and patterns.\n\n# Inputs\n\n`predicate`\n: Function that takes two arguments (previous character and current character)\n  and returns true when the string should be split at the current position.\n  For the first character, previous will be \"\" (empty string).\n\n`keepSplit`\n: Boolean that determines whether the splitting character should be kept as\n  part of the result. If true, the character will be included at the beginning\n  of the next substring; if false, it will be discarded.\n\n`str`\n: The input string to split.\n\n# Return\n\nA list of substrings from the original string, split according to the predicate.\n\n# Type\n\n```\nsplitStringBy :: (String -> String -> Bool) -> Bool -> String -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.splitStringBy` usage example\n\nSplit on periods and hyphens, discarding the separators:\n```nix\nsplitStringBy (prev: curr: builtins.elem curr [ \".\" \"-\" ]) false \"foo.bar-baz\"\n=> [ \"foo\" \"bar\" \"baz\" ]\n```\n\nSplit on transitions from lowercase to uppercase, keeping the uppercase characters:\n```nix\nsplitStringBy (prev: curr: builtins.match \"[a-z]\" prev != null && builtins.match \"[A-Z]\" curr != null) true \"fooBarBaz\"\n=> [ \"foo\" \"Bar\" \"Baz\" ]\n```\n\nHandle leading separators correctly:\n```nix\nsplitStringBy (prev: curr: builtins.elem curr [ \".\" ]) false \".foo.bar.baz\"\n=> [ \"\" \"foo\" \"bar\" \"baz\" ]\n```\n\nHandle trailing separators correctly:\n```nix\nsplitStringBy (prev: curr: builtins.elem curr [ \".\" ]) false \"foo.bar.baz.\"\n=> [ \"foo\" \"bar\" \"baz\" \"\" ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1793,"column":3},"path":["lib","strings","splitStringBy"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.stringAsChars","path":["lib","strings","stringAsChars"],"aliases":[["lib","stringAsChars"]],"signature":"stringAsChars :: (String -> String) -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":969,"column":3},"attr_expr":"stringAsChars =\n    # Function to map over each individual character\n    f:\n    # Input string\n    s:\n    concatStrings (map f (stringToCharacters s));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":971,"column":5},"lambda_expr":"stringAsChars =\n    # Function to map over each individual character\n    f:\n    # Input string\n    s:\n    concatStrings (map f (stringToCharacters s));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":969,"column":3},"path":["lib","strings","stringAsChars"],"pos_type":"Attribute"}},"content":{"content":"\nManipulate a string character by character and replace them by\nstrings before concatenating the results.\n\n# Inputs\n\n`f`\n: Function to map over each individual character\n\n`s`\n: Input string\n\n# Type\n\n```\nstringAsChars :: (String -> String) -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.stringAsChars` usage example\n\n```nix\nstringAsChars (x: if x == \"a\" then \"i\" else x) \"nax\"\n=> \"nix\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":969,"column":3},"path":["lib","strings","stringAsChars"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.stringLength","path":["lib","strings","stringLength"],"aliases":[["builtins","stringLength"],["lib","stringLength"]],"signature":null,"is_primop":true,"primop_meta":{"name":"stringLength","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":36,"column":5},"attr_expr":"stringLength","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","stringLength"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the number of bytes of the string *e*. If *e* is not a string,\nevaluation is aborted.\n","source":{"position":null,"path":["lib","strings","stringLength"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.stringToCharacters","path":["lib","strings","stringToCharacters"],"aliases":[["lib","stringToCharacters"]],"signature":"stringToCharacters :: String -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":938,"column":3},"attr_expr":"stringToCharacters = s: genList (p: substring p 1 s) (stringLength s);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":938,"column":24},"lambda_expr":"stringToCharacters = s: genList (p: substring p 1 s) (stringLength s);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":938,"column":3},"path":["lib","strings","stringToCharacters"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a string `s` to a list of characters (i.e. singleton strings).\nThis allows you to, e.g., map a function over each character.  However,\nnote that this will likely be horribly inefficient; Nix is not a\ngeneral purpose programming language. Complex string manipulations\nshould, if appropriate, be done in a derivation.\nAlso note that Nix treats strings as a list of bytes and thus doesn't\nhandle unicode.\n\n# Inputs\n\n`s`\n: 1\\. Function argument\n\n# Type\n\n```\nstringToCharacters :: String -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.strings.stringToCharacters` usage example\n\n```nix\nstringToCharacters \"\"\n=> [ ]\nstringToCharacters \"abc\"\n=> [ \"a\" \"b\" \"c\" ]\nstringToCharacters \"🦄\"\n=> [ \"�\" \"�\" \"�\" \"�\" ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":938,"column":3},"path":["lib","strings","stringToCharacters"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.substring","path":["lib","strings","substring"],"aliases":[["builtins","substring"],["lib","substring"]],"signature":null,"is_primop":true,"primop_meta":{"name":"substring","args":["start","len","s"],"experimental":false,"arity":3},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":37,"column":5},"attr_expr":"substring","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","substring"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the substring of *s* from byte position *start*\n(zero-based) up to but not including *start + len*. If *start* is\ngreater than the length of the string, an empty string is returned.\nIf *start + len* lies beyond the end of the string or *len* is `-1`,\nonly the substring up to the end of the string is returned.\n*start* must be non-negative.\nFor example,\n\n```nix\nbuiltins.substring 0 3 \"nixos\"\n```\n\nevaluates to `\"nix\"`.\n","source":{"position":null,"path":["lib","strings","substring"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.tail","path":["lib","strings","tail"],"aliases":[["builtins","tail"],["lib","tail"],["lib","lists","tail"]],"signature":null,"is_primop":true,"primop_meta":{"name":"tail","args":["list"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":38,"column":5},"attr_expr":"tail","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","tail"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the list without its first item; abort evaluation if\nthe argument isn’t a list or is an empty list.\n\n> **Warning**\n>\n> This function should generally be avoided since it's inefficient:\n> unlike Haskell's `tail`, it takes O(n) time, so recursing over a\n> list by repeatedly calling `tail` takes O(n^2) time.\n","source":{"position":null,"path":["lib","strings","tail"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.toCamelCase","path":["lib","strings","toCamelCase"],"aliases":[["lib","toCamelCase"]],"signature":"toCamelCase :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1615,"column":3},"attr_expr":"toCamelCase =\n    str:\n    lib.throwIfNot (isString str) \"toCamelCase does only accepts string values, but got ${typeOf str}\" (\n      let\n        separators = splitStringBy (\n          prev: curr:\n          elem curr [\n            \"-\"\n            \"_\"\n            \" \"\n          ]\n        ) false str;\n\n        parts = lib.flatten (\n          map (splitStringBy (\n            prev: curr: match \"[a-z]\" prev != null && match \"[A-Z]\" curr != null\n          ) true) separators\n        );\n\n        first = if length parts > 0 then toLower (head parts) else \"\";\n        rest = if length parts > 1 then map toSentenceCase (tail parts) else [ ];\n      in\n      concatStrings (map (addContextFrom str) ([ first ] ++ rest))\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1616,"column":5},"lambda_expr":"toCamelCase =\n    str:\n    lib.throwIfNot (isString str) \"toCamelCase does only accepts string values, but got ${typeOf str}\" (\n      let\n        separators = splitStringBy (\n          prev: curr:\n          elem curr [\n            \"-\"\n            \"_\"\n            \" \"\n          ]\n        ) false str;\n\n        parts = lib.flatten (\n          map (splitStringBy (\n            prev: curr: match \"[a-z]\" prev != null && match \"[A-Z]\" curr != null\n          ) true) separators\n        );\n\n        first = if length parts > 0 then toLower (head parts) else \"\";\n        rest = if length parts > 1 then map toSentenceCase (tail parts) else [ ];\n      in\n      concatStrings (map (addContextFrom str) ([ first ] ++ rest))\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1615,"column":3},"path":["lib","strings","toCamelCase"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a string to camelCase. Handles snake_case, PascalCase,\nkebab-case strings as well as strings delimited by spaces.\n\n# Inputs\n\n`string`\n: The string to convert to camelCase\n\n# Type\n\n```\ntoCamelCase :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toCamelCase` usage example\n\n```nix\ntoCamelCase \"hello-world\"\n=> \"helloWorld\"\ntoCamelCase \"hello_world\"\n=> \"helloWorld\"\ntoCamelCase \"hello world\"\n=> \"helloWorld\"\ntoCamelCase \"HelloWorld\"\n=> \"helloWorld\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1615,"column":3},"path":["lib","strings","toCamelCase"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.toInt","path":["lib","strings","toInt"],"aliases":[["lib","toInt"]],"signature":"toInt :: String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2735,"column":3},"attr_expr":"toInt =\n    let\n      matchStripInput = match \"[[:space:]]*(-?[[:digit:]]+)[[:space:]]*\";\n      matchLeadingZero = match \"0[[:digit:]]+\";\n    in\n    str:\n    let\n      # RegEx: Match any leading whitespace, possibly a '-', one or more digits,\n      # and finally match any trailing whitespace.\n      strippedInput = matchStripInput str;\n\n      # RegEx: Match a leading '0' then one or more digits.\n      isLeadingZero = matchLeadingZero (head strippedInput) == [ ];\n\n      # Attempt to parse input\n      parsedInput = fromJSON (head strippedInput);\n\n      generalError = \"toInt: Could not convert ${escapeNixString str} to int.\";\n\n    in\n    # Error on presence of non digit characters.\n    if strippedInput == null then\n      throw generalError\n    # Error on presence of leading zero/octal ambiguity.\n    else if isLeadingZero then\n      throw \"toInt: Ambiguity in interpretation of ${escapeNixString str} between octal and zero padded integer.\"\n    # Error if parse function fails.\n    else if !isInt parsedInput then\n      throw generalError\n    # Return result.\n    else\n      parsedInput;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2740,"column":5},"lambda_expr":"str:\n    let\n      # RegEx: Match any leading whitespace, possibly a '-', one or more digits,\n      # and finally match any trailing whitespace.\n      strippedInput = matchStripInput str;\n\n      # RegEx: Match a leading '0' then one or more digits.\n      isLeadingZero = matchLeadingZero (head strippedInput) == [ ];\n\n      # Attempt to parse input\n      parsedInput = fromJSON (head strippedInput);\n\n      generalError = \"toInt: Could not convert ${escapeNixString str} to int.\";\n\n    in\n    # Error on presence of non digit characters.\n    if strippedInput == null then\n      throw generalError\n    # Error on presence of leading zero/octal ambiguity.\n    else if isLeadingZero then\n      throw \"toInt: Ambiguity in interpretation of ${escapeNixString str} between octal and zero padded integer.\"\n    # Error if parse function fails.\n    else if !isInt parsedInput then\n      throw generalError\n    # Return result.\n    else\n      parsedInput","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2735,"column":3},"path":["lib","strings","toInt"],"pos_type":"Attribute"}},"content":{"content":"\nParse a string as an int. Does not support parsing of integers with preceding zero due to\nambiguity between zero-padded and octal numbers. See `toIntBase10`.\n\n# Inputs\n\n`str`\n: A string to be interpreted as an int.\n\n# Type\n\n```\ntoInt :: String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toInt` usage example\n\n```nix\ntoInt \"1337\"\n=> 1337\n\ntoInt \"-4\"\n=> -4\n\ntoInt \" 123 \"\n=> 123\n\ntoInt \"00024\"\n=> error: Ambiguity in interpretation of 00024 between octal and zero padded integer.\n\ntoInt \"3.14\"\n=> error: floating point JSON numbers are not supported\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2735,"column":3},"path":["lib","strings","toInt"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.toIntBase10","path":["lib","strings","toIntBase10"],"aliases":[["lib","toIntBase10"]],"signature":"toIntBase10 :: String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2805,"column":3},"attr_expr":"toIntBase10 =\n    let\n      matchStripInput = match \"[[:space:]]*0*(-?[[:digit:]]+)[[:space:]]*\";\n      matchZero = match \"0+\";\n    in\n    str:\n    let\n      # RegEx: Match any leading whitespace, then match any zero padding,\n      # capture possibly a '-' followed by one or more digits,\n      # and finally match any trailing whitespace.\n      strippedInput = matchStripInput str;\n\n      # RegEx: Match at least one '0'.\n      isZero = matchZero (head strippedInput) == [ ];\n\n      # Attempt to parse input\n      parsedInput = fromJSON (head strippedInput);\n\n      generalError = \"toIntBase10: Could not convert ${escapeNixString str} to int.\";\n\n    in\n    # Error on presence of non digit characters.\n    if strippedInput == null then\n      throw generalError\n    # In the special case zero-padded zero (00000), return early.\n    else if isZero then\n      0\n    # Error if parse function fails.\n    else if !isInt parsedInput then\n      throw generalError\n    # Return result.\n    else\n      parsedInput;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2810,"column":5},"lambda_expr":"str:\n    let\n      # RegEx: Match any leading whitespace, then match any zero padding,\n      # capture possibly a '-' followed by one or more digits,\n      # and finally match any trailing whitespace.\n      strippedInput = matchStripInput str;\n\n      # RegEx: Match at least one '0'.\n      isZero = matchZero (head strippedInput) == [ ];\n\n      # Attempt to parse input\n      parsedInput = fromJSON (head strippedInput);\n\n      generalError = \"toIntBase10: Could not convert ${escapeNixString str} to int.\";\n\n    in\n    # Error on presence of non digit characters.\n    if strippedInput == null then\n      throw generalError\n    # In the special case zero-padded zero (00000), return early.\n    else if isZero then\n      0\n    # Error if parse function fails.\n    else if !isInt parsedInput then\n      throw generalError\n    # Return result.\n    else\n      parsedInput","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2805,"column":3},"path":["lib","strings","toIntBase10"],"pos_type":"Attribute"}},"content":{"content":"\nParse a string as a base 10 int. This supports parsing of zero-padded integers.\n\n# Inputs\n\n`str`\n: A string to be interpreted as an int.\n\n# Type\n\n```\ntoIntBase10 :: String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toIntBase10` usage example\n\n```nix\ntoIntBase10 \"1337\"\n=> 1337\n\ntoIntBase10 \"-4\"\n=> -4\n\ntoIntBase10 \" 123 \"\n=> 123\n\ntoIntBase10 \"00024\"\n=> 24\n\ntoIntBase10 \"3.14\"\n=> error: floating point JSON numbers are not supported\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2805,"column":3},"path":["lib","strings","toIntBase10"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.toJSON","path":["lib","strings","toJSON"],"aliases":[["builtins","toJSON"],["lib","toJSON"]],"signature":null,"is_primop":true,"primop_meta":{"name":"toJSON","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":39,"column":5},"attr_expr":"toJSON","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","toJSON"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a string containing a JSON representation of *e*. Strings,\nintegers, floats, booleans, nulls and lists are mapped to their JSON\nequivalents. Sets (except derivations) are represented as objects.\nDerivations are translated to a JSON string containing the\nderivation’s output path. Paths are copied to the store and\nrepresented as a JSON string of the resulting store path.\n","source":{"position":null,"path":["lib","strings","toJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.toLower","path":["lib","strings","toLower"],"aliases":[["lib","toLower"]],"signature":"toLower :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1517,"column":3},"attr_expr":"toLower = replaceStrings upperChars lowerChars;","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1517,"column":3},"path":["lib","strings","toLower"],"pos_type":"Attribute"}},"content":{"content":"\nConverts an ASCII string `s` to lower-case.\n\n# Inputs\n\n`s`\n: The string to convert to lower-case.\n\n# Type\n\n```\ntoLower :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toLower` usage example\n\n```nix\ntoLower \"HOME\"\n=> \"home\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1517,"column":3},"path":["lib","strings","toLower"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.toSentenceCase","path":["lib","strings","toSentenceCase"],"aliases":[["lib","toSentenceCase"]],"signature":"toSentenceCase :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1571,"column":3},"attr_expr":"toSentenceCase =\n    str:\n    lib.throwIfNot (isString str)\n      \"toSentenceCase does only accepts string values, but got ${typeOf str}\"\n      (\n        let\n          firstChar = substring 0 1 str;\n          rest = substring 1 (stringLength str) str;\n        in\n        addContextFrom str (toUpper firstChar + toLower rest)\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1572,"column":5},"lambda_expr":"toSentenceCase =\n    str:\n    lib.throwIfNot (isString str)\n      \"toSentenceCase does only accepts string values, but got ${typeOf str}\"\n      (\n        let\n          firstChar = substring 0 1 str;\n          rest = substring 1 (stringLength str) str;\n        in\n        addContextFrom str (toUpper firstChar + toLower rest)\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1571,"column":3},"path":["lib","strings","toSentenceCase"],"pos_type":"Attribute"}},"content":{"content":"\nConverts the first character of a string `s` to upper-case.\n\n# Inputs\n\n`str`\n: The string to convert to sentence case.\n\n# Type\n\n```\ntoSentenceCase :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toSentenceCase` usage example\n\n```nix\ntoSentenceCase \"home\"\n=> \"Home\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1571,"column":3},"path":["lib","strings","toSentenceCase"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.toShellVar","path":["lib","strings","toShellVar"],"aliases":[["lib","toShellVar"]],"signature":"toShellVar :: String -> (String | [String] | { [String] :: String }) -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1305,"column":3},"attr_expr":"toShellVar =\n    name: value:\n    lib.throwIfNot (isValidPosixName name) \"toShellVar: ${name} is not a valid shell variable name\" (\n      if isAttrs value && !isStringLike value then\n        \"declare -A ${name}=(${\n          concatStringsSep \" \" (lib.mapAttrsToList (n: v: \"[${escapeShellArg n}]=${escapeShellArg v}\") value)\n        })\"\n      else if isList value then\n        \"declare -a ${name}=(${escapeShellArgs value})\"\n      else\n        \"${name}=${escapeShellArg value}\"\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1306,"column":5},"lambda_expr":"toShellVar =\n    name: value:\n    lib.throwIfNot (isValidPosixName name) \"toShellVar: ${name} is not a valid shell variable name\" (\n      if isAttrs value && !isStringLike value then\n        \"declare -A ${name}=(${\n          concatStringsSep \" \" (lib.mapAttrsToList (n: v: \"[${escapeShellArg n}]=${escapeShellArg v}\") value)\n        })\"\n      else if isList value then\n        \"declare -a ${name}=(${escapeShellArgs value})\"\n      else\n        \"${name}=${escapeShellArg value}\"\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1305,"column":3},"path":["lib","strings","toShellVar"],"pos_type":"Attribute"}},"content":{"content":"\nTranslate a Nix value into a shell variable declaration, with proper escaping.\n\nThe value can be a string (mapped to a regular variable), a list of strings\n(mapped to a Bash-style array) or an attribute set of strings (mapped to a\nBash-style associative array). Note that \"string\" includes string-coercible\nvalues like paths or derivations.\n\nStrings are translated into POSIX sh-compatible code; lists and attribute sets\nassume a shell that understands Bash syntax (e.g. Bash or ZSH).\n\n# Inputs\n\n`name`\n: 1\\. Function argument\n\n`value`\n: 2\\. Function argument\n\n# Type\n\n```\ntoShellVar :: String -> (String | [String] | { [String] :: String }) -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toShellVar` usage example\n\n```nix\n''\n  ${toShellVar \"foo\" \"some string\"}\n  [[ \"$foo\" == \"some string\" ]]\n''\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1305,"column":3},"path":["lib","strings","toShellVar"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.toShellVars","path":["lib","strings","toShellVars"],"aliases":[["lib","toShellVars"]],"signature":"toShellVars :: {\n  [String] :: String | [String] | { [String] :: String };\n} -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1351,"column":3},"attr_expr":"toShellVars = vars: concatStringsSep \"\\n\" (lib.mapAttrsToList toShellVar vars);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1351,"column":17},"lambda_expr":"toShellVars = vars: concatStringsSep \"\\n\" (lib.mapAttrsToList toShellVar vars);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1351,"column":3},"path":["lib","strings","toShellVars"],"pos_type":"Attribute"}},"content":{"content":"\nTranslate an attribute set `vars` into corresponding shell variable declarations\nusing `toShellVar`.\n\n# Inputs\n\n`vars`\n: 1\\. Function argument\n\n# Type\n\n```\ntoShellVars :: {\n  [String] :: String | [String] | { [String] :: String };\n} -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toShellVars` usage example\n\n```nix\nlet\n  foo = \"value\";\n  bar = foo;\nin ''\n  ${toShellVars { inherit foo bar; }}\n  [[ \"$foo\" == \"$bar\" ]]\n''\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1351,"column":3},"path":["lib","strings","toShellVars"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.toUpper","path":["lib","strings","toUpper"],"aliases":[["lib","toUpper"]],"signature":"toUpper :: String -> String\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1544,"column":3},"attr_expr":"toUpper = replaceStrings lowerChars upperChars;","lambda_position":null,"lambda_expr":null,"count_applied":2,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1544,"column":3},"path":["lib","strings","toUpper"],"pos_type":"Attribute"}},"content":{"content":"\nConverts an ASCII string `s` to upper-case.\n\n# Inputs\n\n`s`\n: The string to convert to upper-case.\n\n# Type\n\n```\ntoUpper :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.toUpper` usage example\n\n```nix\ntoUpper \"home\"\n=> \"HOME\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1544,"column":3},"path":["lib","strings","toUpper"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.trim","path":["lib","strings","trim"],"aliases":[["lib","trim"]],"signature":"trim :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":461,"column":3},"attr_expr":"trim = trimWith {\n    start = true;\n    end = true;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":527,"column":5},"lambda_expr":"s:\n    let\n      # If the string was empty or entirely whitespace,\n      # then the regex may not match and `res` will be `null`.\n      res = match regex s;\n    in\n    optionalString (res != null) (head res)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":461,"column":3},"path":["lib","strings","trim"],"pos_type":"Attribute"}},"content":{"content":"\nRemove leading and trailing whitespace from a string `s`.\n\nWhitespace is defined as any of the following characters:\n  \" \", \"\\t\" \"\\r\" \"\\n\"\n\n# Inputs\n\n`s`\n: The string to trim\n\n# Type\n\n```\ntrim :: String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.trim` usage example\n\n```nix\ntrim \"   hello, world!   \"\n=> \"hello, world!\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":461,"column":3},"path":["lib","strings","trim"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.trimWith","path":["lib","strings","trimWith"],"aliases":[["lib","trimWith"]],"signature":"trimWith :: { start :: Bool; end :: Bool; } -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":505,"column":3},"attr_expr":"trimWith =\n    {\n      start ? false,\n      end ? false,\n    }:\n    let\n      # Define our own whitespace character class instead of using\n      # `[:space:]`, which is not well-defined.\n      chars = \" \\t\\r\\n\";\n\n      # To match up until trailing whitespace, we need to capture a\n      # group that ends with a non-whitespace character.\n      regex =\n        if start && end then\n          \"[${chars}]*(.*[^${chars}])[${chars}]*\"\n        else if start then\n          \"[${chars}]*(.*)\"\n        else if end then\n          \"(.*[^${chars}])[${chars}]*\"\n        else\n          \"(.*)\";\n    in\n    s:\n    let\n      # If the string was empty or entirely whitespace,\n      # then the regex may not match and `res` will be `null`.\n      res = match regex s;\n    in\n    optionalString (res != null) (head res);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":506,"column":5},"lambda_expr":"trimWith =\n    {\n      start ? false,\n      end ? false,\n    }:\n    let\n      # Define our own whitespace character class instead of using\n      # `[:space:]`, which is not well-defined.\n      chars = \" \\t\\r\\n\";\n\n      # To match up until trailing whitespace, we need to capture a\n      # group that ends with a non-whitespace character.\n      regex =\n        if start && end then\n          \"[${chars}]*(.*[^${chars}])[${chars}]*\"\n        else if start then\n          \"[${chars}]*(.*)\"\n        else if end then\n          \"(.*[^${chars}])[${chars}]*\"\n        else\n          \"(.*)\";\n    in\n    s:\n    let\n      # If the string was empty or entirely whitespace,\n      # then the regex may not match and `res` will be `null`.\n      res = match regex s;\n    in\n    optionalString (res != null) (head res);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":505,"column":3},"path":["lib","strings","trimWith"],"pos_type":"Attribute"}},"content":{"content":"\nRemove leading and/or trailing whitespace from a string `s`.\n\nTo remove both leading and trailing whitespace, you can also use [`trim`](#function-library-lib.strings.trim)\n\nWhitespace is defined as any of the following characters:\n  \" \", \"\\t\" \"\\r\" \"\\n\"\n\n# Inputs\n\n`config` (Attribute set)\n: `start`\n  : Whether to trim leading whitespace (`false` by default)\n\n: `end`\n  : Whether to trim trailing whitespace (`false` by default)\n\n`s`\n: The string to trim\n\n# Type\n\n```\ntrimWith :: { start :: Bool; end :: Bool; } -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.trimWith` usage example\n\n```nix\ntrimWith { start = true; } \"   hello, world!   \"}\n=> \"hello, world!   \"\n\ntrimWith { end = true; } \"   hello, world!   \"}\n=> \"   hello, world!\"\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":505,"column":3},"path":["lib","strings","trimWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.typeOf","path":["lib","strings","typeOf"],"aliases":[["builtins","typeOf"],["lib","typeOf"]],"signature":null,"is_primop":true,"primop_meta":{"name":"typeOf","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":40,"column":5},"attr_expr":"typeOf","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","typeOf"],"pos_type":"Lambda"}},"content":{"content":"\nReturn a string representing the type of the value *e*, namely\n`\"int\"`, `\"bool\"`, `\"string\"`, `\"path\"`, `\"null\"`, `\"set\"`,\n`\"list\"`, `\"lambda\"` or `\"float\"`.\n","source":{"position":null,"path":["lib","strings","typeOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.unsafeDiscardStringContext","path":["lib","strings","unsafeDiscardStringContext"],"aliases":[["builtins","unsafeDiscardStringContext"],["lib","unsafeDiscardStringContext"]],"signature":null,"is_primop":true,"primop_meta":{"name":"unsafeDiscardStringContext","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":41,"column":5},"attr_expr":"unsafeDiscardStringContext","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","strings","unsafeDiscardStringContext"],"pos_type":"Lambda"}},"content":{"content":"\nDiscard the [string context](@docroot@/language/string-context.md) from a value that can be coerced to a string.\n","source":{"position":null,"path":["lib","strings","unsafeDiscardStringContext"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.strings.versionAtLeast","path":["lib","strings","versionAtLeast"],"aliases":[["lib","versionAtLeast"]],"signature":"versionAtLeast :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":3},"attr_expr":"versionAtLeast = v1: v2: !versionOlder v1 v2;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":20},"lambda_expr":"versionAtLeast = v1: v2: !versionOlder v1 v2;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":3},"path":["lib","strings","versionAtLeast"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if string `v1` denotes a version equal to or newer than `v2`.\n\n# Inputs\n\n`v1`\n: 1\\. Function argument\n\n`v2`\n: 2\\. Function argument\n\n# Type\n\n```\nversionAtLeast :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.versionAtLeast` usage example\n\n```nix\nversionAtLeast \"1.1\" \"1.0\"\n=> true\nversionAtLeast \"1.1\" \"1.1\"\n=> true\nversionAtLeast \"1.1\" \"1.2\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":3},"path":["lib","strings","versionAtLeast"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.versionOlder","path":["lib","strings","versionOlder"],"aliases":[["lib","versionOlder"]],"signature":"versionOlder :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":3},"attr_expr":"versionOlder = v1: v2: compareVersions v2 v1 == 1;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":18},"lambda_expr":"versionOlder = v1: v2: compareVersions v2 v1 == 1;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":3},"path":["lib","strings","versionOlder"],"pos_type":"Attribute"}},"content":{"content":"\nReturns true if string `v1` denotes a version older than `v2`.\n\n# Inputs\n\n`v1`\n: 1\\. Function argument\n\n`v2`\n: 2\\. Function argument\n\n# Type\n\n```\nversionOlder :: String -> String -> Bool\n```\n\n# Examples\n:::{.example}\n## `lib.strings.versionOlder` usage example\n\n```nix\nversionOlder \"1.1\" \"1.2\"\n=> true\nversionOlder \"1.1\" \"1.1\"\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":3},"path":["lib","strings","versionOlder"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.withFeature","path":["lib","strings","withFeature"],"aliases":[["lib","withFeature"]],"signature":"withFeature :: Bool -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2444,"column":3},"attr_expr":"withFeature =\n    flag: feature:\n    assert isString feature; # e.g. passing openssl instead of \"openssl\"\n    \"--${if flag then \"with\" else \"without\"}-${feature}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2445,"column":5},"lambda_expr":"withFeature =\n    flag: feature:\n    assert isString feature; # e.g. passing openssl instead of \"openssl\"\n    \"--${if flag then \"with\" else \"without\"}-${feature}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2444,"column":3},"path":["lib","strings","withFeature"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{with,without}-<feature>\"` string that can be passed to\nstandard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n# Type\n\n```\nwithFeature :: Bool -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.withFeature` usage example\n\n```nix\nwithFeature true \"shared\"\n=> \"--with-shared\"\nwithFeature false \"shared\"\n=> \"--without-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2444,"column":3},"path":["lib","strings","withFeature"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.strings.withFeatureAs","path":["lib","strings","withFeatureAs"],"aliases":[["lib","withFeatureAs"]],"signature":"withFeatureAs :: Bool -> String -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2483,"column":3},"attr_expr":"withFeatureAs =\n    flag: feature: value:\n    withFeature flag feature + optionalString flag \"=${value}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2484,"column":5},"lambda_expr":"withFeatureAs =\n    flag: feature: value:\n    withFeature flag feature + optionalString flag \"=${value}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2483,"column":3},"path":["lib","strings","withFeatureAs"],"pos_type":"Attribute"}},"content":{"content":"\nCreate an `\"--{with-<feature>=<value>,without-<feature>}\"` string that can be passed to\nstandard GNU Autoconf scripts.\n\n# Inputs\n\n`flag`\n: 1\\. Function argument\n\n`feature`\n: 2\\. Function argument\n\n`value`\n: 3\\. Function argument\n\n# Type\n\n```\nwithFeatureAs :: Bool -> String -> String -> String\n```\n\n# Examples\n:::{.example}\n## `lib.strings.withFeatureAs` usage example\n\n```nix\nwithFeatureAs true \"shared\" \"foo\"\n=> \"--with-shared=foo\"\nwithFeatureAs false \"shared\" (throw \"ignored\")\n=> \"--without-shared\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":2483,"column":3},"path":["lib","strings","withFeatureAs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.stringsWithDeps.fullDepEntry","path":["lib","stringsWithDeps","fullDepEntry"],"aliases":[["lib","fullDepEntry"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":175,"column":3},"attr_expr":"fullDepEntry = text: deps: { inherit text deps; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":175,"column":18},"lambda_expr":"text: deps: { inherit text deps; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":175,"column":18},"path":["lib","stringsWithDeps","fullDepEntry"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":175,"column":18},"path":["lib","stringsWithDeps","fullDepEntry"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.stringsWithDeps.noDepEntry","path":["lib","stringsWithDeps","noDepEntry"],"aliases":[["lib","noDepEntry"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":171,"column":3},"attr_expr":"noDepEntry = text: {\n    inherit text;\n    deps = [ ];\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":171,"column":16},"lambda_expr":"text: {\n    inherit text;\n    deps = [ ];\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":171,"column":16},"path":["lib","stringsWithDeps","noDepEntry"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":171,"column":16},"path":["lib","stringsWithDeps","noDepEntry"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.stringsWithDeps.packEntry","path":["lib","stringsWithDeps","packEntry"],"aliases":[["lib","packEntry"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":176,"column":3},"attr_expr":"packEntry = deps: {\n    inherit deps;\n    text = \"\";\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":176,"column":15},"lambda_expr":"deps: {\n    inherit deps;\n    text = \"\";\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":176,"column":15},"path":["lib","stringsWithDeps","packEntry"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":176,"column":15},"path":["lib","stringsWithDeps","packEntry"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.stringsWithDeps.stringAfter","path":["lib","stringsWithDeps","stringAfter"],"aliases":[["lib","stringAfter"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":181,"column":3},"attr_expr":"stringAfter = deps: text: { inherit text deps; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":181,"column":17},"lambda_expr":"deps: text: { inherit text deps; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":181,"column":17},"path":["lib","stringsWithDeps","stringAfter"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":181,"column":17},"path":["lib","stringsWithDeps","stringAfter"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.stringsWithDeps.textClosureList","path":["lib","stringsWithDeps","textClosureList"],"aliases":[["lib","textClosureList"]],"signature":"textClosureList :: { [String] :: { deps :: [String]; text :: String; } | String; } -> [String] -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":129,"column":3},"attr_expr":"textClosureList =\n    predefined: arg:\n    let\n      f =\n        done: todo:\n        if todo == [ ] then\n          {\n            result = [ ];\n            inherit done;\n          }\n        else\n          let\n            entry = head todo;\n          in\n          if isAttrs entry then\n            let\n              x = f done entry.deps;\n              y = f x.done (tail todo);\n            in\n            {\n              result = x.result ++ [ entry.text ] ++ y.result;\n              done = y.done;\n            }\n          else if done ? ${entry} then\n            f done (tail todo)\n          else\n            f (\n              done\n              // listToAttrs [\n                {\n                  name = entry;\n                  value = 1;\n                }\n              ]\n            ) ([ predefined.${entry} ] ++ tail todo);\n    in\n    (f { } arg).result;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":130,"column":5},"lambda_expr":"textClosureList =\n    predefined: arg:\n    let\n      f =\n        done: todo:\n        if todo == [ ] then\n          {\n            result = [ ];\n            inherit done;\n          }\n        else\n          let\n            entry = head todo;\n          in\n          if isAttrs entry then\n            let\n              x = f done entry.deps;\n              y = f x.done (tail todo);\n            in\n            {\n              result = x.result ++ [ entry.text ] ++ y.result;\n              done = y.done;\n            }\n          else if done ? ${entry} then\n            f done (tail todo)\n          else\n            f (\n              done\n              // listToAttrs [\n                {\n                  name = entry;\n                  value = 1;\n                }\n              ]\n            ) ([ predefined.${entry} ] ++ tail todo);\n    in\n    (f { } arg).result;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":129,"column":3},"path":["lib","stringsWithDeps","textClosureList"],"pos_type":"Attribute"}},"content":{"content":"\nTopologically sort a collection of dependent strings.\nOnly the values to keys listed in `arg` and their dependencies will be included in the result.\n\n::: {.note}\nThis function doesn't formally fulfill the definition of topological sorting, but it's good enough for our purposes in Nixpkgs.\n:::\n\n# Inputs\n\n`predefined` (attribute set)\n\n: strings with annotated dependencies (strings or attribute set)\n  A value can be a simple string if it has no dependencies.\n  Otherwise, is can be an attribute set with the following attributes:\n  - `deps` (list of strings)\n  - `text` (Any\n\n`arg` (list of strings)\n\n: Keys for which the values in the dependency closure will be included in the result\n\n# Type\n\n```\ntextClosureList :: { [String] :: { deps :: [String]; text :: String; } | String; } -> [String] -> [String]\n```\n\n# Examples\n:::{.example}\n## `lib.stringsWithDeps.textClosureList` usage example\n\n```nix\ntextClosureList {\n  a = {\n    deps = [ \"b\" \"c\" \"e\" ];\n    text = \"a: depends on b, c and e\";\n  };\n  b = {\n    deps = [ ];\n    text = \"b: no dependencies\";\n  };\n  c = {\n    deps = [ \"b\" ];\n    text = \"c: depends on b\";\n  };\n  d = {\n    deps = [ \"c\" ];\n    text = \"d: not being depended on by anything in `arg`\";\n  };\n  e = {\n    deps = [ \"c\" ];\n    text = \"e: depends on c, depended on by a, not in `arg`\";\n  };\n} [\n  \"a\"\n  \"b\"\n  \"c\"\n]\n=> [\n  \"b: no dependencies\"\n  \"c: depends on b\"\n  \"e: depends on c, depended on by a, not in `arg`\"\n  \"a: depends on b, c and e\"\n]\n```\n:::\n\nCommon real world usages are:\n- Ordering the dependent phases of `system.activationScripts`\n- Ordering the dependent phases of `system.userActivationScripts`\n\nFor further examples see: [NixOS activation script](https://nixos.org/manual/nixos/stable/#sec-activation-script)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":129,"column":3},"path":["lib","stringsWithDeps","textClosureList"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.stringsWithDeps.textClosureMap","path":["lib","stringsWithDeps","textClosureMap"],"aliases":[["lib","textClosureMap"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":167,"column":3},"attr_expr":"textClosureMap =\n    f: predefined: names:\n    concatMapStringsSep \"\\n\" f (textClosureList predefined names);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":168,"column":5},"lambda_expr":"f: predefined: names:\n    concatMapStringsSep \"\\n\" f (textClosureList predefined names)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":168,"column":5},"path":["lib","stringsWithDeps","textClosureMap"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings-with-deps.nix","line":168,"column":5},"path":["lib","stringsWithDeps","textClosureMap"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.elaborate","path":["lib","systems","elaborate"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":708,"column":5},"attr_expr":"elaborate","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":84,"column":5},"lambda_expr":"elaborate =\n    systemOrArgs:\n    let\n      allArgs = systemToAttrs systemOrArgs;\n\n      # These attributes are derived from other inputs, so they should NOT be\n      # overridden further down with \"// args\".\n      args = removeAttrs allArgs [\n        \"parsed\"\n        \"system\"\n        \"_withoutFunctions\"\n      ];\n\n      # TODO: deprecate args.rustc in favour of args.rust after 23.05 is EOL.\n      rust = args.rust or args.rustc or { };\n\n      selectEmulator =\n        pkgs:\n        let\n          wine = (pkgs.winePackagesFor \"wine${toString final.parsed.cpu.bits}\").minimal;\n        in\n        # Note: we guarantee that the return value is either `null` or a path\n        # to an emulator program. That is, if an emulator requires additional\n        # arguments, a wrapper should be used.\n        if pkgs.stdenv.hostPlatform.canExecute final then\n          lib.getExe (pkgs.writeShellScriptBin \"exec\" ''exec \"$@\"'')\n        else if final.isWindows then\n          \"${wine}/bin/wine\"\n        else if final.isLinux && pkgs.stdenv.hostPlatform.isLinux && final.qemuArch != null then\n          \"${pkgs.qemu-user}/bin/qemu-${final.qemuArch}\"\n        else if final.isWasi then\n          \"${pkgs.wasmtime}/bin/wasmtime\"\n        else if final.isGhcjs then\n          \"${pkgs.nodejs-slim}/bin/node\"\n        else if final.isMmix then\n          \"${pkgs.mmixware}/bin/mmix\"\n        else\n          null;\n\n      final = {\n        _withoutFunctions = removeAttrs final ignoredNames;\n        # Prefer to parse `config` as it is strictly more informative.\n        parsed = parse.mkSystemFromString (args.config or allArgs.system);\n        # This can be losslessly-extracted from `parsed` iff parsing succeeds.\n        system = parse.doubleFromSystem final.parsed;\n        # TODO: This currently can't be losslessly-extracted from `parsed`, for example\n        # because of -mingw32.\n        config = parse.tripleFromSystem final.parsed;\n        # Determine whether we can execute binaries built for the provided platform.\n        canExecute =\n          platform:\n          final.isAndroid == platform.isAndroid\n          && parse.isCompatible final.parsed.cpu platform.parsed.cpu\n          && final.parsed.kernel == platform.parsed.kernel\n          && (\n            # Only perform this check when cpus have the same type;\n            # assume compatible cpu have all the instructions included\n            final.parsed.cpu == platform.parsed.cpu\n            ->\n              # if platform has gcc.arch, final must also have and can execute the gcc.arch of platform\n              (\n                platform ? gcc.arch -> final ? gcc.arch && architectures.canExecute final.gcc.arch platform.gcc.arch\n              )\n          );\n\n        # Derived meta-data\n        useLLVM = final.isFreeBSD || final.isOpenBSD;\n\n        libc =\n          if final.isDarwin then\n            \"libSystem\"\n          else if final.isMsvc then\n            \"ucrt\"\n          else if final.isMinGW then\n            \"msvcrt\"\n          else if final.isCygwin then\n            \"cygwin\"\n          else if final.isWasi then\n            \"wasilibc\"\n          else if final.isWasm && !final.isWasi then\n            null\n          else if final.isRedox then\n            \"relibc\"\n          else if final.isMusl then\n            \"musl\"\n          else if final.isUClibc then\n            \"uclibc\"\n          else if final.isAndroid then\n            \"bionic\"\n          else if\n            final.isLinux # default\n          then\n            \"glibc\"\n          else if final.isFreeBSD then\n            \"fblibc\"\n          else if final.isOpenBSD then\n            \"oblibc\"\n          else if final.isNetBSD then\n            \"nblibc\"\n          else if final.isAvr then\n            \"avrlibc\"\n          else if final.isGhcjs then\n            null\n          else if final.isNone then\n            \"newlib\"\n          # TODO(@Ericson2314) think more about other operating systems\n          else\n            \"native/impure\";\n        # Choose what linker we wish to use by default. Someday we might also\n        # choose the C compiler, runtime library, C++ standard library, etc. in\n        # this way, nice and orthogonally, and deprecate `useLLVM`. But due to\n        # the monolithic GCC build we cannot actually make those choices\n        # independently, so we are just doing `linker` and keeping `useLLVM` for\n        # now.\n        linker =\n          if final.useLLVM or false then\n            \"lld\"\n          else if final.isDarwin then\n            \"cctools\"\n          # \"bfd\" and \"gold\" both come from GNU binutils. The existence of Gold\n          # is why we use the more obscure \"bfd\" and not \"binutils\" for this\n          # choice.\n          else\n            \"bfd\";\n        # The standard lib directory name that non-nixpkgs binaries distributed\n        # for this platform normally assume.\n        libDir =\n          if final.isLinux then\n            if final.isx86_64 || final.isMips64 || final.isPower64 then \"lib64\" else \"lib\"\n          else\n            null;\n        extensions = {\n          staticLibrary = if final.isWindows then \".lib\" else \".a\";\n          library = if final.isStatic then final.extensions.staticLibrary else final.extensions.sharedLibrary;\n          executable = if (final.isWindows || final.isCygwin) then \".exe\" else \"\";\n\n          ${if final.hasSharedLibraries then \"sharedLibrary\" else null} =\n            if final.isDarwin then\n              \".dylib\"\n            else if (final.isWindows || final.isCygwin) then\n              \".dll\"\n            else\n              \".so\";\n        };\n        # Misc boolean options\n        useAndroidPrebuilt = false;\n        useiOSPrebuilt = false;\n\n        # Output from uname\n        uname = {\n          # uname -s\n          system =\n            {\n              linux = \"Linux\";\n              windows = \"Windows\";\n              cygwin = \"CYGWIN_NT\";\n              darwin = \"Darwin\";\n              netbsd = \"NetBSD\";\n              freebsd = \"FreeBSD\";\n              openbsd = \"OpenBSD\";\n              wasi = \"Wasi\";\n              redox = \"Redox\";\n              genode = \"Genode\";\n            }\n            .${final.parsed.kernel.name} or null;\n\n          # uname -m\n          processor =\n            if final.isPower64 then\n              \"ppc64${optionalString final.isLittleEndian \"le\"}\"\n            else if final.isPower then\n              \"ppc${optionalString final.isLittleEndian \"le\"}\"\n            else if final.isMips64 then\n              \"mips64\" # endianness is *not* included on mips64\n            else if final.isDarwin then\n              final.darwinArch\n            else\n              final.parsed.cpu.name;\n\n          # uname -r\n          release = null;\n        };\n\n        # It is important that hasSharedLibraries==false when the platform has no\n        # dynamic library loader.  Various tools (including the gcc build system)\n        # have knowledge of which platforms are incapable of dynamic linking, and\n        # will still build on/for those platforms with --enable-shared, but simply\n        # omit any `.so` build products such as libgcc_s.so.  When that happens,\n        # it causes hard-to-troubleshoot build failures.\n        hasSharedLibraries =\n          with final;\n          (\n            isAndroid\n            || isGnu\n            || isMusl # Linux (allows multiple libcs)\n            || isDarwin\n            || isSunOS\n            || isOpenBSD\n            || isFreeBSD\n            || isNetBSD # BSDs\n            || isCygwin\n            || isMinGW\n            || isWindows # Windows\n            || isWasm # WASM\n          )\n          && !isStatic;\n\n        # The difference between `isStatic` and `hasSharedLibraries` is mainly the\n        # addition of the `staticMarker` (see make-derivation.nix).  Some\n        # platforms, like embedded machines without a libc (e.g. arm-none-eabi)\n        # don't support dynamic linking, but don't get the `staticMarker`.\n        # `pkgsStatic` sets `isStatic=true`, so `pkgsStatic.hostPlatform` always\n        # has the `staticMarker`.\n        isStatic = final.isWasi || final.isRedox;\n\n        # Just a guess, based on `system`\n        inherit\n          (\n            {\n              linux-kernel = args.linux-kernel or { };\n              gcc = args.gcc or { };\n            }\n            // platforms.select final\n          )\n          linux-kernel\n          gcc\n          ;\n\n        # TODO: remove after 23.05 is EOL, with an error pointing to the rust.* attrs.\n        rustc = args.rustc or { };\n\n        linuxArch =\n          if final.isAarch32 then\n            \"arm\"\n          else if final.isAarch64 then\n            \"arm64\"\n          else if final.isx86_32 then\n            \"i386\"\n          else if final.isx86_64 then\n            \"x86_64\"\n          # linux kernel does not distinguish microblaze/microblazeel\n          else if final.isMicroBlaze then\n            \"microblaze\"\n          else if final.isMips32 then\n            \"mips\"\n          else if final.isMips64 then\n            \"mips\" # linux kernel does not distinguish mips32/mips64\n          else if final.isPower then\n            \"powerpc\"\n          else if final.isRiscV then\n            \"riscv\"\n          else if final.isSh4 then\n            \"sh\"\n          else if final.isS390 then\n            \"s390\"\n          else if final.isLoongArch64 then\n            \"loongarch\"\n          else\n            final.parsed.cpu.name;\n\n        # https://source.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106\n        ubootArch =\n          if final.isx86_32 then\n            \"x86\" # not i386\n          else if final.isMips64 then\n            \"mips64\" # uboot *does* distinguish between mips32/mips64\n          else\n            final.linuxArch; # other cases appear to agree with linuxArch\n\n        qemuArch =\n          if final.isAarch32 then\n            \"arm\"\n          else if final.isAarch64 then\n            \"aarch64${optionalString final.isBigEndian \"_be\"}\"\n          else if final.isS390 && !final.isS390x then\n            null\n          else if final.isx86_64 then\n            \"x86_64\"\n          else if final.isx86 then\n            \"i386\"\n          else if final.isMips64n32 then\n            \"mipsn32${optionalString final.isLittleEndian \"el\"}\"\n          else if final.isMips64 then\n            \"mips64${optionalString final.isLittleEndian \"el\"}\"\n          else\n            final.uname.processor;\n\n        # Name used by UEFI for architectures.\n        efiArch =\n          if final.isx86_32 then\n            \"ia32\"\n          else if final.isx86_64 then\n            \"x64\"\n          else if final.isAarch32 then\n            \"arm\"\n          else if final.isAarch64 then\n            \"aa64\"\n          else\n            final.parsed.cpu.name;\n\n        darwinArch = parse.darwinArch final.parsed.cpu;\n\n        darwinPlatform =\n          if final.isMacOS then\n            \"macos\"\n          else if final.isiOS then\n            \"ios\"\n          else\n            null;\n        # The canonical name for this attribute is darwinSdkVersion, but some\n        # platforms define the old name \"sdkVer\".\n        darwinSdkVersion = final.sdkVer or \"14.4\";\n        darwinMinVersion = \"14.0\";\n        darwinMinVersionVariable =\n          if final.isMacOS then\n            \"MACOSX_DEPLOYMENT_TARGET\"\n          else if final.isiOS then\n            \"IPHONEOS_DEPLOYMENT_TARGET\"\n          else\n            null;\n\n        # Handle Android SDK and NDK versions.\n        androidSdkVersion = args.androidSdkVersion or null;\n        androidNdkVersion = args.androidNdkVersion or null;\n\n        emulatorAvailable = pkgs: selectEmulator pkgs != null;\n\n        # whether final.emulator pkgs.pkgsStatic works\n        staticEmulatorAvailable =\n          pkgs: final.emulatorAvailable pkgs && (final.isLinux || final.isWasi || final.isMmix);\n\n        emulator =\n          pkgs:\n          if (final.emulatorAvailable pkgs) then\n            selectEmulator pkgs\n          else\n            throw \"Don't know how to run ${final.config} executables.\";\n\n      }\n      // mapAttrs (n: v: v final.parsed) inspect.predicates\n      // mapAttrs (n: v: v final.gcc.arch or \"default\") architectures.predicates\n      // args\n      // {\n        rust = rust // {\n          platform =\n            rust.platform or (\n              if lib.hasSuffix \".json\" (rust.rustcTargetSpec or \"\") then\n                lib.importJSON rust.rustcTargetSpec\n              else\n                { }\n            )\n\n            # Once args.rustc.platform.target-family is deprecated and\n            # removed, there will no longer be any need to modify any\n            # values from args.rust.platform, so we can drop all the\n            # \"args ? rust\" etc. checks, and merge args.rust.platform in\n            # /after/.\n            // {\n              # https://doc.rust-lang.org/reference/conditional-compilation.html#target_arch\n              arch =\n                if rust ? platform then\n                  rust.platform.arch\n                else if final.isAarch32 then\n                  \"arm\"\n                else if final.isMips64 then\n                  \"mips64\" # never add \"el\" suffix\n                else if final.isPower64 then\n                  \"powerpc64\" # never add \"le\" suffix\n                else\n                  final.parsed.cpu.name;\n\n              # https://doc.rust-lang.org/reference/conditional-compilation.html#target_os\n              os =\n                if rust ? platform then\n                  rust.platform.os or \"none\"\n                else if final.isDarwin then\n                  \"macos\"\n                else if final.isWasm && !final.isWasi then\n                  \"unknown\" # Needed for {wasm32,wasm64}-unknown-unknown.\n                else\n                  final.parsed.kernel.name;\n\n              # https://doc.rust-lang.org/reference/conditional-compilation.html#target_family\n              target-family =\n                if args ? rust.platform.target-family then\n                  args.rust.platform.target-family\n                else if args ? rustc.platform.target-family then\n                  (\n                    # Since https://github.com/rust-lang/rust/pull/84072\n                    # `target-family` is a list instead of single value.\n                    let\n                      f = args.rustc.platform.target-family;\n                    in\n                    if isList f then f else [ f ]\n                  )\n                else\n                  optional final.isUnix \"unix\" ++ optional final.isWindows \"windows\" ++ optional final.isWasm \"wasm\";\n\n              # https://doc.rust-lang.org/reference/conditional-compilation.html#target_vendor\n              vendor =\n                let\n                  inherit (final.parsed) vendor;\n                in\n                rust.platform.vendor or {\n                  \"w64\" = \"pc\";\n                }\n                .${vendor.name} or vendor.name;\n            };\n\n          # The name of the rust target if it is standard, or the json file\n          # containing the custom target spec. Adjustments are because rust has\n          # slightly different naming conventions than we do.\n          rustcTargetSpec =\n            let\n              inherit (final.parsed) cpu kernel abi;\n              cpu_ =\n                rust.platform.arch or {\n                  \"armv7a\" = \"armv7\";\n                  \"armv7l\" = \"armv7\";\n                  \"armv6l\" = \"arm\";\n                  \"armv5tel\" = \"armv5te\";\n                  \"riscv32\" = \"riscv32gc\";\n                  \"riscv64\" = \"riscv64gc\";\n                }\n                .${cpu.name} or cpu.name;\n              vendor_ = final.rust.platform.vendor;\n              abi_ =\n                # We're very explicit about the POWER ELF ABI w/ glibc in our parsing, while Rust is not.\n                # TODO: Somehow ensure that Rust actually *uses* the correct ABI, and not just a libc-based default.\n                if (lib.strings.hasPrefix \"powerpc\" cpu.name) && (lib.strings.hasPrefix \"gnuabielfv\" abi.name) then\n                  \"gnu\"\n                else\n                  abi.name;\n\n              inferred =\n                if final.isWasi then\n                  # Rust uses `wasm32-wasip?` rather than `wasm32-unknown-wasi`.\n                  # We cannot know which subversion does the user want, and\n                  # currently use WASI 0.1 as default for compatibility. Custom\n                  # users can set `rust.rustcTargetSpec` to override it.\n                  \"${cpu_}-wasip1\"\n                else\n                  \"${cpu_}-${vendor_}-${kernel.name}${optionalString (abi.name != \"unknown\") \"-${abi_}\"}\";\n            in\n            # TODO: deprecate args.rustc in favour of args.rust after 23.05 is EOL.\n            args.rust.rustcTargetSpec or args.rustc.config or (\n              if rust ? platform then\n                # TODO: This breaks cc-rs and thus std support, so maybe remove support?\n                builtins.toFile (rust.rustcTarget or inferred + \".json\") (toJSON rust.platform)\n              else\n                args.rust.rustcTarget or inferred\n            );\n\n          # Do not use rustcTarget. Use rustcTargetSpec or cargoShortTarget.\n          # TODO: Remove all in-tree usages, and deprecate\n          rustcTarget = rust.rustcTarget or final.rust.cargoShortTarget;\n\n          # The name of the rust target if it is standard, or the\n          # basename of the file containing the custom target spec,\n          # without the .json extension.\n          #\n          # This is the name used by Cargo for target subdirectories.\n          cargoShortTarget = removeSuffix \".json\" (baseNameOf \"${final.rust.rustcTargetSpec}\");\n\n          # When used as part of an environment variable name, triples are\n          # uppercased and have all hyphens replaced by underscores:\n          #\n          # https://github.com/rust-lang/cargo/pull/9169\n          # https://github.com/rust-lang/cargo/issues/8285#issuecomment-634202431\n          cargoEnvVarTarget = replaceString \"-\" \"_\" (toUpper final.rust.cargoShortTarget);\n\n          # True if the target is no_std\n          # https://github.com/rust-lang/rust/blob/2e44c17c12cec45b6a682b1e53a04ac5b5fcc9d2/src/bootstrap/config.rs#L415-L421\n          isNoStdTarget = any (t: hasInfix t final.rust.rustcTarget) [\n            \"-none\"\n            \"nvptx\"\n            \"switch\"\n            \"-uefi\"\n          ];\n        };\n        go = {\n          # See https://pkg.go.dev/internal/platform for a list of known platforms\n          GOARCH =\n            {\n              \"aarch64\" = \"arm64\";\n              \"arm\" = \"arm\";\n              \"armv5tel\" = \"arm\";\n              \"armv6l\" = \"arm\";\n              \"armv7l\" = \"arm\";\n              \"i686\" = \"386\";\n              \"loongarch64\" = \"loong64\";\n              \"mips\" = \"mips\";\n              \"mips64el\" = \"mips64le\";\n              \"mipsel\" = \"mipsle\";\n              \"powerpc64\" = \"ppc64\";\n              \"powerpc64le\" = \"ppc64le\";\n              \"riscv64\" = \"riscv64\";\n              \"s390x\" = \"s390x\";\n              \"x86_64\" = \"amd64\";\n              \"wasm32\" = \"wasm\";\n            }\n            .${final.parsed.cpu.name} or null;\n          GOOS = if final.isWasi then \"wasip1\" else final.parsed.kernel.name;\n\n          # See https://go.dev/wiki/GoArm\n          GOARM = toString (lib.intersectLists [ (final.parsed.cpu.version or \"\") ] [ \"5\" \"6\" \"7\" ]);\n        };\n\n        node = {\n          # See these locations for a list of known architectures/platforms:\n          # - https://nodejs.org/api/os.html#osarch\n          # - https://nodejs.org/api/os.html#osplatform\n          arch =\n            if final.isAarch then\n              \"arm\" + lib.optionalString final.is64bit \"64\"\n            else if final.isMips32 then\n              \"mips\" + lib.optionalString final.isLittleEndian \"el\"\n            else if final.isMips64 && final.isLittleEndian then\n              \"mips64el\"\n            else if final.isPower then\n              \"ppc\" + lib.optionalString final.is64bit \"64\"\n            else if final.isx86_64 then\n              \"x64\"\n            else if final.isx86_32 then\n              \"ia32\"\n            else if final.isS390x then\n              \"s390x\"\n            else if final.isRiscV64 then\n              \"riscv64\"\n            else if final.isLoongArch64 then\n              \"loong64\"\n            else\n              null;\n\n          platform =\n            if final.isAndroid then\n              \"android\"\n            else if final.isDarwin then\n              \"darwin\"\n            else if final.isFreeBSD then\n              \"freebsd\"\n            else if final.isLinux then\n              \"linux\"\n            else if final.isOpenBSD then\n              \"openbsd\"\n            else if final.isSunOS then\n              \"sunos\"\n            else if (final.isWindows || final.isCygwin) then\n              \"win32\"\n            else\n              null;\n        };\n\n        nim = {\n          # See these locations for a known list of cpu/os idntifeiers:\n          # - https://nim-lang.org/docs/system.html#hostCPU\n          # - https://nim-lang.org/docs/system.html#hostOS\n          cpu =\n            if final.isAarch32 then\n              \"arm\"\n            else if final.isAarch64 then\n              \"arm64\"\n            else if final.isAlpha then\n              \"alpha\"\n            else if final.isAvr then\n              \"avr\"\n            else if final.isMips && final.is32Bit then\n              \"mips\"\n            else if final.isMips && final.is64Bit then\n              \"mips64\"\n            else if final.isMsp430 then\n              \"msp430\"\n            else if final.isPower && final.is32bit then\n              \"powerpc\"\n            else if final.isPower && final.is64bit then\n              \"powerpc64\"\n            else if final.isRiscV && final.is64bit then\n              \"riscv64\"\n            else if final.isSparc then\n              \"sparc\"\n            else if final.isx86_32 then\n              \"i386\"\n            else if final.isx86_64 then\n              \"amd64\"\n            else\n              null;\n          os =\n            if final.isAndroid then\n              \"Android\"\n            else if final.isDarwin then\n              \"MacOSX\"\n            else if final.isFreeBSD then\n              \"FreeBSD\"\n            else if final.isGenode then\n              \"Genode\"\n            else if final.isLinux then\n              \"Linux\"\n            else if final.isNetBSD then\n              \"NetBSD\"\n            else if final.isNone then\n              \"Standalone\"\n            else if final.isOpenBSD then\n              \"OpenBSD\"\n            else if final.isWindows then\n              \"Windows\"\n            else if final.isiOS then\n              \"iOS\"\n            else\n              null;\n        };\n      };\n    in\n    assert final.useAndroidPrebuilt -> final.isAndroid;\n    assert foldl' (pass: { assertion, message }: if assertion final then pass else throw message) true (\n      final.parsed.abi.assertions or [ ]\n    );\n    final;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":84,"column":5},"path":["lib","systems","elaborate"],"pos_type":"Lambda"}},"content":{"content":"always just used `final.*` would fail on both counts.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":84,"column":5},"path":["lib","systems","elaborate"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.equals","path":["lib","systems","equals"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":709,"column":5},"attr_expr":"equals","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":42,"column":12},"lambda_expr":"equals = a: b: a._withoutFunctions == b._withoutFunctions;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":42,"column":12},"path":["lib","systems","equals"],"pos_type":"Lambda"}},"content":{"content":"\nElaborated systems contain functions, which means that they don't satisfy\n`==` for a lack of reflexivity.\n\nThey might *appear* to satisfy `==` reflexivity when the same exact value is\ncompared to itself, because object identity is used as an \"optimization\";\ncompare the value with a reconstruction of itself, e.g. with `f == a: f a`,\nor perhaps calling `elaborate` twice, and one will see reflexivity fail as described.\n\nTo solve this, the elaborated systems also store a version of their data\nwithout any functions to be compared.\n\nNote that this does not canonicalize the systems, so you'll want to make sure\nboth arguments have been `elaborate`-d.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":42,"column":12},"path":["lib","systems","equals"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.systemToAttrs","path":["lib","systems","systemToAttrs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":716,"column":5},"attr_expr":"systemToAttrs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":75,"column":5},"lambda_expr":"systemToAttrs =\n    systemOrArgs: if isAttrs systemOrArgs then systemOrArgs else { system = systemOrArgs; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":75,"column":5},"path":["lib","systems","systemToAttrs"],"pos_type":"Lambda"}},"content":{"content":"attrset.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/default.nix","line":75,"column":5},"path":["lib","systems","systemToAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.add","path":["lib","trivial","add"],"aliases":[["builtins","add"],["lib","add"]],"signature":null,"is_primop":true,"primop_meta":{"name":"add","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":30,"column":5},"attr_expr":"add","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","add"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the sum of the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","trivial","add"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.and","path":["lib","trivial","and"],"aliases":[["lib","and"]],"signature":"and :: Bool -> Bool -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":233,"column":3},"attr_expr":"and = x: y: x && y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":233,"column":9},"lambda_expr":"and = x: y: x && y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":233,"column":3},"path":["lib","trivial","and"],"pos_type":"Attribute"}},"content":{"content":"\nboolean “and”\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nand :: Bool -> Bool -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":233,"column":3},"path":["lib","trivial","and"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.bitAnd","path":["lib","trivial","bitAnd"],"aliases":[["builtins","bitAnd"],["lib","bitAnd"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitAnd","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":38,"column":5},"attr_expr":"bitAnd","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","bitAnd"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the bitwise AND of the integers *e1* and *e2*.\n","source":{"position":null,"path":["lib","trivial","bitAnd"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.bitNot","path":["lib","trivial","bitNot"],"aliases":[["lib","bitNot"]],"signature":"bitNot :: Number -> Number\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":267,"column":3},"attr_expr":"bitNot = builtins.sub (-1);","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":267,"column":3},"path":["lib","trivial","bitNot"],"pos_type":"Attribute"}},"content":{"content":"\nbitwise “not”\n\n# Type\n\n```\nbitNot :: Number -> Number\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":267,"column":3},"path":["lib","trivial","bitNot"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.bitOr","path":["lib","trivial","bitOr"],"aliases":[["builtins","bitOr"],["lib","bitOr"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitOr","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":39,"column":5},"attr_expr":"bitOr","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","bitOr"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the bitwise OR of the integers *e1* and *e2*.\n","source":{"position":null,"path":["lib","trivial","bitOr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.bitXor","path":["lib","trivial","bitXor"],"aliases":[["builtins","bitXor"],["lib","bitXor"]],"signature":null,"is_primop":true,"primop_meta":{"name":"bitXor","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":40,"column":5},"attr_expr":"bitXor","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","bitXor"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the bitwise XOR of the integers *e1* and *e2*.\n","source":{"position":null,"path":["lib","trivial","bitXor"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.boolToString","path":["lib","trivial","boolToString"],"aliases":[["lib","boolToString"]],"signature":"boolToString :: Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":288,"column":3},"attr_expr":"boolToString = b: if b then \"true\" else \"false\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":288,"column":18},"lambda_expr":"boolToString = b: if b then \"true\" else \"false\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":288,"column":3},"path":["lib","trivial","boolToString"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a boolean to a string.\n\nThis function uses the strings \"true\" and \"false\" to represent\nboolean values. Calling `toString` on a bool instead returns \"1\"\nand \"\" (sic!).\n\n# Inputs\n\n`b`\n\n: 1\\. Function argument\n\n# Type\n\n```\nboolToString :: Bool -> String\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":288,"column":3},"path":["lib","trivial","boolToString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.boolToYesNo","path":["lib","trivial","boolToYesNo"],"aliases":[["lib","boolToYesNo"]],"signature":"boolToYesNo :: Bool -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":308,"column":3},"attr_expr":"boolToYesNo = b: if b then \"yes\" else \"no\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":308,"column":17},"lambda_expr":"boolToYesNo = b: if b then \"yes\" else \"no\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":308,"column":3},"path":["lib","trivial","boolToYesNo"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a boolean to a string.\n\nThis function uses the strings \"yes\" and \"no\" to represent\nboolean values.\n\n# Inputs\n\n`b`\n\n: The boolean to convert\n\n# Type\n\n```\nboolToYesNo :: Bool -> String\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":308,"column":3},"path":["lib","trivial","boolToYesNo"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.ceil","path":["lib","trivial","ceil"],"aliases":[["builtins","ceil"],["lib","ceil"]],"signature":null,"is_primop":true,"primop_meta":{"name":"ceil","args":["number"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":41,"column":5},"attr_expr":"ceil","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","ceil"],"pos_type":"Lambda"}},"content":{"content":"\nRounds and converts *number* to the next higher NixInt value if possible, i.e. `ceil *number* >= *number*` and\n`ceil *number* - *number* < 1`.\n\nAn evaluation error is thrown, if there exists no such NixInt value `ceil *number*`.\nDue to bugs in previous Nix versions an evaluation error might be thrown, if the datatype of *number* is\na NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.\n\nIf the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat\n(IEEE-754 double-precision floating-point number), an evaluation error is thrown.\n","source":{"position":null,"path":["lib","trivial","ceil"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.checkListOfEnum","path":["lib","trivial","checkListOfEnum"],"aliases":[["lib","checkListOfEnum"]],"signature":"checkListOfEnum :: String -> [a] -> [a] -> ((b -> b) | Never)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1041,"column":3},"attr_expr":"checkListOfEnum =\n    msg: valid: given:\n    let\n      unexpected = lib.subtractLists valid given;\n    in\n    lib.throwIfNot (unexpected == [ ])\n      \"${msg}: ${builtins.concatStringsSep \", \" (map toString unexpected)} unexpected; valid ones: ${builtins.concatStringsSep \", \" (map toString valid)}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1042,"column":5},"lambda_expr":"checkListOfEnum =\n    msg: valid: given:\n    let\n      unexpected = lib.subtractLists valid given;\n    in\n    lib.throwIfNot (unexpected == [ ])\n      \"${msg}: ${builtins.concatStringsSep \", \" (map toString unexpected)} unexpected; valid ones: ${builtins.concatStringsSep \", \" (map toString valid)}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1041,"column":3},"path":["lib","trivial","checkListOfEnum"],"pos_type":"Attribute"}},"content":{"content":"\nCheck if the elements in a list are valid values from a enum, returning the identity function, or throwing an error message otherwise.\n\n# Inputs\n\n`msg`\n\n: 1\\. Function argument\n\n`valid`\n\n: 2\\. Function argument\n\n`given`\n\n: 3\\. Function argument\n\n# Type\n\n```\ncheckListOfEnum :: String -> [a] -> [a] -> ((b -> b) | Never)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.checkListOfEnum` usage example\n\n```nix\nlet colorVariants = [\"bright\" \"dark\" \"black\"]\nin checkListOfEnum \"color variants\" [ \"standard\" \"light\" \"dark\" ] colorVariants;\n=>\nerror: color variants: bright, black unexpected; valid ones: standard, light, dark\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1041,"column":3},"path":["lib","trivial","checkListOfEnum"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.compare","path":["lib","trivial","compare"],"aliases":[["lib","compare"]],"signature":"compare :: a -> a -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":677,"column":3},"attr_expr":"compare =\n    a: b:\n    if a < b then\n      -1\n    else if a > b then\n      1\n    else\n      0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":678,"column":5},"lambda_expr":"compare =\n    a: b:\n    if a < b then\n      -1\n    else if a > b then\n      1\n    else\n      0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":677,"column":3},"path":["lib","trivial","compare"],"pos_type":"Attribute"}},"content":{"content":"\nC-style comparisons\n\na < b,  compare a b => -1\na == b, compare a b => 0\na > b,  compare a b => 1\n\n# Inputs\n\n`a`\n\n: 1\\. Function argument\n\n`b`\n\n: 2\\. Function argument\n\n# Type\n\n```\ncompare :: a -> a -> Int\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":677,"column":3},"path":["lib","trivial","compare"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.concat","path":["lib","trivial","concat"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"attr_expr":"concat = x: y: x ++ y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.const","path":["lib","trivial","const"],"aliases":[["lib","const"]],"signature":"const :: a -> b -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":98,"column":3},"attr_expr":"const = x: y: x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":98,"column":11},"lambda_expr":"const = x: y: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":98,"column":3},"path":["lib","trivial","const"],"pos_type":"Attribute"}},"content":{"content":"\nThe constant function\n\nIgnores the second argument. If called with only one argument,\nconstructs a function that always returns a static value.\n\n# Inputs\n\n`x`\n\n: Value to return\n\n`y`\n\n: Value to ignore\n\n# Type\n\n```\nconst :: a -> b -> a\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.const` usage example\n\n```nix\nlet f = const 5; in f 10\n=> 5\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":98,"column":3},"path":["lib","trivial","const"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.deepSeq","path":["lib","trivial","deepSeq"],"aliases":[["builtins","deepSeq"],["lib","deepSeq"]],"signature":null,"is_primop":true,"primop_meta":{"name":"deepSeq","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":36,"column":5},"attr_expr":"deepSeq","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","deepSeq"],"pos_type":"Lambda"}},"content":{"content":"\nThis is like `seq e1 e2`, except that *e1* is evaluated *deeply*:\nif it’s a list or set, its elements or attributes are also\nevaluated recursively.\n","source":{"position":null,"path":["lib","trivial","deepSeq"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.defaultTo","path":["lib","trivial","defaultTo"],"aliases":[["lib","defaultTo"]],"signature":"defaultTo :: a -> (b | Null) -> (b | a)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":414,"column":3},"attr_expr":"defaultTo = default: maybeValue: if maybeValue != null then maybeValue else default;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":414,"column":15},"lambda_expr":"defaultTo = default: maybeValue: if maybeValue != null then maybeValue else default;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":414,"column":3},"path":["lib","trivial","defaultTo"],"pos_type":"Attribute"}},"content":{"content":"\nReturns `maybeValue` if not null, otherwise return `default`.\n\n# Inputs\n\n`default`\n\n: 1\\. Function argument\n\n`maybeValue`\n\n: 2\\. Function argument\n\n# Type\n\n```\ndefaultTo :: a -> (b | Null) -> (b | a)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.defaultTo` usage example\n\n```nix\ndefaultTo \"default\" null\n=> \"default\"\ndefaultTo \"default\" \"foo\"\n=> \"foo\"\ndefaultTo \"default\" false\n=> false\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":414,"column":3},"path":["lib","trivial","defaultTo"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.div","path":["lib","trivial","div"],"aliases":[["builtins","div"],["lib","div"]],"signature":null,"is_primop":true,"primop_meta":{"name":"div","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":33,"column":5},"attr_expr":"div","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","div"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the quotient of the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","trivial","div"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.flip","path":["lib","trivial","flip"],"aliases":[["lib","flip"]],"signature":"flip :: (a -> b -> c) -> (b -> a -> c)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":376,"column":3},"attr_expr":"flip =\n    f: a: b:\n    f b a;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":377,"column":5},"lambda_expr":"flip =\n    f: a: b:\n    f b a;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":376,"column":3},"path":["lib","trivial","flip"],"pos_type":"Attribute"}},"content":{"content":"\nFlip the order of the arguments of a binary function.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`a`\n\n: 2\\. Function argument\n\n`b`\n\n: 3\\. Function argument\n\n# Type\n\n```\nflip :: (a -> b -> c) -> (b -> a -> c)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.flip` usage example\n\n```nix\nflip concat [1] [2]\n=> [ 2 1 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":376,"column":3},"path":["lib","trivial","flip"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.floor","path":["lib","trivial","floor"],"aliases":[["builtins","floor"],["lib","floor"]],"signature":null,"is_primop":true,"primop_meta":{"name":"floor","args":["number"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":42,"column":5},"attr_expr":"floor","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","floor"],"pos_type":"Lambda"}},"content":{"content":"\nRounds and converts *number* to the next lower NixInt value if possible, i.e. `floor *number* <= *number*` and\n`*number* - floor *number* < 1`.\n\nAn evaluation error is thrown, if there exists no such NixInt value `floor *number*`.\nDue to bugs in previous Nix versions an evaluation error might be thrown, if the datatype of *number* is\na NixInt and if `*number* < -9007199254740992` or `*number* > 9007199254740992`.\n\nIf the datatype of *number* is neither a NixInt (signed 64-bit integer) nor a NixFloat\n(IEEE-754 double-precision floating-point number), an evaluation error will be thrown.\n","source":{"position":null,"path":["lib","trivial","floor"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.fromHexString","path":["lib","trivial","fromHexString"],"aliases":[["lib","fromHexString"]],"signature":"fromHexString :: String -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1234,"column":3},"attr_expr":"fromHexString =\n    str:\n    let\n      match = builtins.match \"(0x)?([0-7]?[0-9A-Fa-f]{1,15})\" str;\n    in\n    if match != null then\n      (fromTOML \"v=0x${builtins.elemAt match 1}\").v\n    else\n      # TODO: Turn this into a `throw` in 26.05.\n      assert lib.warn \"fromHexString: ${\n        lib.generators.toPretty { } str\n      } is not a valid input and will be rejected in 26.05\" true;\n      let\n        noPrefix = lib.strings.removePrefix \"0x\" (lib.strings.toLower str);\n      in\n      (fromTOML \"v=0x${noPrefix}\").v;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1235,"column":5},"lambda_expr":"fromHexString =\n    str:\n    let\n      match = builtins.match \"(0x)?([0-7]?[0-9A-Fa-f]{1,15})\" str;\n    in\n    if match != null then\n      (fromTOML \"v=0x${builtins.elemAt match 1}\").v\n    else\n      # TODO: Turn this into a `throw` in 26.05.\n      assert lib.warn \"fromHexString: ${\n        lib.generators.toPretty { } str\n      } is not a valid input and will be rejected in 26.05\" true;\n      let\n        noPrefix = lib.strings.removePrefix \"0x\" (lib.strings.toLower str);\n      in\n      (fromTOML \"v=0x${noPrefix}\").v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1234,"column":3},"path":["lib","trivial","fromHexString"],"pos_type":"Attribute"}},"content":{"content":"\nConvert a hexadecimal string to it's integer representation.\n\n# Type\n\n```\nfromHexString :: String -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.fromHexString` usage examples\n```nix\nfromHexString \"FF\"\n=> 255\n\nfromHexString \"0x7fffffffffffffff\"\n=> 9223372036854775807\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1234,"column":3},"path":["lib","trivial","fromHexString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.functionArgs","path":["lib","trivial","functionArgs"],"aliases":[["lib","functionArgs"]],"signature":"functionArgs : (a -> b) -> { [String] :: Bool }\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1105,"column":3},"attr_expr":"functionArgs =\n    let\n      functionArgs = builtins.functionArgs;\n    in\n    f: if f ? __functor then f.__functionArgs or (functionArgs (f.__functor f)) else functionArgs f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1109,"column":5},"lambda_expr":"f: if f ? __functor then f.__functionArgs or (functionArgs (f.__functor f)) else functionArgs f","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1105,"column":3},"path":["lib","trivial","functionArgs"],"pos_type":"Attribute"}},"content":{"content":"\nExtract the expected function arguments from a function.\nThis works both with nix-native `{ a, b ? foo, ... }:` style\nfunctions and functions with args set with `setFunctionArgs`. It\nhas the same return type and semantics as `builtins.functionArgs`.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nfunctionArgs : (a -> b) -> { [String] :: Bool }\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1105,"column":3},"path":["lib","trivial","functionArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.genericClosure","path":["lib","trivial","genericClosure"],"aliases":[["builtins","genericClosure"],["lib","genericClosure"]],"signature":null,"is_primop":true,"primop_meta":{"name":"genericClosure","args":["attrset"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":37,"column":5},"attr_expr":"genericClosure","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","genericClosure"],"pos_type":"Lambda"}},"content":{"content":"\n`builtins.genericClosure` iteratively computes the transitive closure over an arbitrary relation defined by a function.\n\nIt takes *attrset* with two attributes named `startSet` and `operator`, and returns a list of attribute sets:\n\n- `startSet`:\n  The initial list of attribute sets.\n\n- `operator`:\n  A function that takes an attribute set and returns a list of attribute sets.\n  It defines how each item in the current set is processed and expanded into more items.\n\nEach attribute set in the list `startSet` and the list returned by `operator` must have an attribute `key`, which must support equality comparison.\nThe value of `key` can be one of the following types:\n\n- [Int](@docroot@/language/types.md#type-int)\n- [Float](@docroot@/language/types.md#type-float)\n- [Boolean](@docroot@/language/types.md#type-boolean)\n- [String](@docroot@/language/types.md#type-string)\n- [Path](@docroot@/language/types.md#type-path)\n- [List](@docroot@/language/types.md#list)\n\nThe result is produced by calling the `operator` on each `item` that has not been called yet, including newly added items, until no new items are added.\nItems are compared by their `key` attribute.\n\nCommon usages are:\n\n- Generating unique collections of items, such as dependency graphs.\n- Traversing through structures that may contain cycles or loops.\n- Processing data structures with complex internal relationships.\n\n> **Example**\n>\n> ```nix\n> builtins.genericClosure {\n>   startSet = [ {key = 5;} ];\n>   operator = item: [{\n>     key = if (item.key / 2 ) * 2 == item.key\n>          then item.key / 2\n>          else 3 * item.key + 1;\n>   }];\n> }\n> ```\n>\n> evaluates to\n>\n> ```nix\n> [ { key = 5; } { key = 16; } { key = 8; } { key = 4; } { key = 2; } { key = 1; } ]\n> ```\n","source":{"position":null,"path":["lib","trivial","genericClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.id","path":["lib","trivial","id"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"attr_expr":"id = x: x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.importJSON","path":["lib","trivial","importJSON"],"aliases":[["lib","importJSON"]],"signature":"importJSON :: Path -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":794,"column":3},"attr_expr":"importJSON = path: fromJSON (readFile path);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":794,"column":16},"lambda_expr":"importJSON = path: fromJSON (readFile path);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":794,"column":3},"path":["lib","trivial","importJSON"],"pos_type":"Attribute"}},"content":{"content":"\nReads a JSON file.\n\n# Examples\n:::{.example}\n## `lib.trivial.importJSON` usage example\n\nexample.json\n```json\n{\n  \"title\": \"Example JSON\",\n  \"hello\": {\n    \"world\": \"foo\",\n    \"bar\": {\n      \"foobar\": true\n    }\n  }\n}\n```\n\n```nix\nimportJSON ./example.json\n=> {\n  title = \"Example JSON\";\n  hello = {\n    world = \"foo\";\n    bar = {\n      foobar = true;\n    };\n  };\n}\n```\n\n:::\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\nimportJSON :: Path -> Any\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":794,"column":3},"path":["lib","trivial","importJSON"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.importTOML","path":["lib","trivial","importTOML"],"aliases":[["lib","importTOML"]],"signature":"importTOML :: Path -> Any\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":841,"column":3},"attr_expr":"importTOML = path: fromTOML (readFile path);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":841,"column":16},"lambda_expr":"importTOML = path: fromTOML (readFile path);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":841,"column":3},"path":["lib","trivial","importTOML"],"pos_type":"Attribute"}},"content":{"content":"\nReads a TOML file.\n\n# Examples\n:::{.example}\n## `lib.trivial.importTOML` usage example\n\nexample.toml\n```toml\ntitle = \"TOML Example\"\n\n[hello]\nworld = \"foo\"\n\n[hello.bar]\nfoobar = true\n```\n\n```nix\nimportTOML ./example.toml\n=> {\n  title = \"TOML Example\";\n  hello = {\n    world = \"foo\";\n    bar = {\n      foobar = true;\n    };\n  };\n}\n```\n\n:::\n\n# Inputs\n\n`path`\n\n: 1\\. Function argument\n\n# Type\n\n```\nimportTOML :: Path -> Any\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":841,"column":3},"path":["lib","trivial","importTOML"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.info","path":["lib","trivial","info"],"aliases":[["lib","info"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1049,"column":3},"attr_expr":"info = msg: builtins.trace \"INFO: ${msg}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1049,"column":10},"lambda_expr":"msg: builtins.trace \"INFO: ${msg}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1049,"column":10},"path":["lib","trivial","info"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1049,"column":10},"path":["lib","trivial","info"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.isBool","path":["lib","trivial","isBool"],"aliases":[["builtins","isBool"],["lib","isBool"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isBool","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":27,"column":5},"attr_expr":"isBool","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","isBool"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a bool, and `false` otherwise.\n","source":{"position":null,"path":["lib","trivial","isBool"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.isFloat","path":["lib","trivial","isFloat"],"aliases":[["builtins","isFloat"],["lib","isFloat"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isFloat","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":29,"column":5},"attr_expr":"isFloat","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","isFloat"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to a float, and `false` otherwise.\n","source":{"position":null,"path":["lib","trivial","isFloat"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.isFunction","path":["lib","trivial","isFunction"],"aliases":[["lib","isFunction"]],"signature":"isFunction : Any -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1127,"column":3},"attr_expr":"isFunction =\n    let\n      isFunction = builtins.isFunction;\n    in\n    f: isFunction f || (f ? __functor && isFunction (f.__functor f));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1131,"column":5},"lambda_expr":"f: isFunction f || (f ? __functor && isFunction (f.__functor f))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1127,"column":3},"path":["lib","trivial","isFunction"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether something is a function or something\nannotated with function args.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n# Type\n\n```\nisFunction : Any -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1127,"column":3},"path":["lib","trivial","isFunction"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.isInOldestRelease","path":["lib","trivial","isInOldestRelease"],"aliases":[["lib","isInOldestRelease"],["lib","oldestSupportedReleaseIsAtLeast"],["lib","trivial","oldestSupportedReleaseIsAtLeast"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":490,"column":3},"attr_expr":"isInOldestRelease =\n    lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2411)\n      \"lib.isInOldestRelease is deprecated. Use lib.oldestSupportedReleaseIsAtLeast instead.\"\n      lib.oldestSupportedReleaseIsAtLeast;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":499,"column":37},"lambda_expr":"oldestSupportedReleaseIsAtLeast = release: release <= lib.trivial.oldestSupportedRelease;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":490,"column":3},"path":["lib","trivial","isInOldestRelease"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a feature is supported in all supported releases (at the time of\nrelease branch-off, if applicable). See `oldestSupportedRelease`.\n\n# Inputs\n\n`release`\n\n: Release number of feature introduction as an integer, e.g. 2111 for 21.11.\nSet it to the upcoming release, matching the nixpkgs/.version file.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":490,"column":3},"path":["lib","trivial","isInOldestRelease"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.isInt","path":["lib","trivial","isInt"],"aliases":[["builtins","isInt"],["lib","isInt"],["lib","strings","isInt"]],"signature":null,"is_primop":true,"primop_meta":{"name":"isInt","args":["e"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":28,"column":5},"attr_expr":"isInt","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","isInt"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if *e* evaluates to an integer, and `false` otherwise.\n","source":{"position":null,"path":["lib","trivial","isInt"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.lessThan","path":["lib","trivial","lessThan"],"aliases":[["builtins","lessThan"],["lib","lessThan"]],"signature":null,"is_primop":true,"primop_meta":{"name":"lessThan","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":34,"column":5},"attr_expr":"lessThan","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","lessThan"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if the value *e1* is less than the value *e2*, and `false` otherwise.\nEvaluation aborts if either *e1* or *e2* does not evaluate to a number, string or path.\nFurthermore, it aborts if *e2* does not match *e1*'s type according to the aforementioned classification of number, string or path.\n","source":{"position":null,"path":["lib","trivial","lessThan"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.mapNullable","path":["lib","trivial","mapNullable"],"aliases":[["lib","mapNullable"]],"signature":"mapNullable :: (a -> b) -> (a | Null) -> (b | Null)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":448,"column":3},"attr_expr":"mapNullable = f: a: if a == null then a else f a;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":448,"column":17},"lambda_expr":"mapNullable = f: a: if a == null then a else f a;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":448,"column":3},"path":["lib","trivial","mapNullable"],"pos_type":"Attribute"}},"content":{"content":"\nApply function if the supplied argument is non-null.\n\n# Inputs\n\n`f`\n\n: Function to call\n\n`a`\n\n: Argument to check for null before passing it to `f`\n\n# Type\n\n```\nmapNullable :: (a -> b) -> (a | Null) -> (b | Null)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mapNullable` usage example\n\n```nix\nmapNullable (x: x+1) null\n=> null\nmapNullable (x: x+1) 22\n=> 23\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":448,"column":3},"path":["lib","trivial","mapNullable"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.max","path":["lib","trivial","max"],"aliases":[["lib","max"]],"signature":"max :: Number -> Number -> Number\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":616,"column":3},"attr_expr":"max = x: y: if x > y then x else y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":616,"column":9},"lambda_expr":"max = x: y: if x > y then x else y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":616,"column":3},"path":["lib","trivial","max"],"pos_type":"Attribute"}},"content":{"content":"\nReturns maximum of two numbers.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmax :: Number -> Number -> Number\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":616,"column":3},"path":["lib","trivial","max"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.mergeAttrs","path":["lib","trivial","mergeAttrs"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"attr_expr":"mergeAttrs = x: y: x // y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.min","path":["lib","trivial","min"],"aliases":[["lib","min"]],"signature":"min :: Number -> Number -> Number\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":595,"column":3},"attr_expr":"min = x: y: if x < y then x else y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":595,"column":9},"lambda_expr":"min = x: y: if x < y then x else y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":595,"column":3},"path":["lib","trivial","min"],"pos_type":"Attribute"}},"content":{"content":"\nReturns minimum of two numbers.\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmin :: Number -> Number -> Number\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":595,"column":3},"path":["lib","trivial","min"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.mirrorFunctionArgs","path":["lib","trivial","mirrorFunctionArgs"],"aliases":[["lib","mirrorFunctionArgs"]],"signature":"mirrorFunctionArgs :: (a -> b) -> (a -> c) -> (a -> c)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1177,"column":3},"attr_expr":"mirrorFunctionArgs =\n    f:\n    let\n      fArgs = functionArgs f;\n    in\n    g: {\n      __functor = self: g;\n      __functionArgs = fArgs;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1178,"column":5},"lambda_expr":"mirrorFunctionArgs =\n    f:\n    let\n      fArgs = functionArgs f;\n    in\n    g: {\n      __functor = self: g;\n      __functionArgs = fArgs;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1177,"column":3},"path":["lib","trivial","mirrorFunctionArgs"],"pos_type":"Attribute"}},"content":{"content":"\n`mirrorFunctionArgs f g` creates a new function `g'` with the same behavior as `g` (`g' x == g x`)\nbut its function arguments mirroring `f` (`lib.functionArgs g' == lib.functionArgs f`).\n\n# Inputs\n\n`f`\n\n: Function to provide the argument metadata\n\n`g`\n\n: Function to set the argument metadata to\n\n# Type\n\n```\nmirrorFunctionArgs :: (a -> b) -> (a -> c) -> (a -> c)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mirrorFunctionArgs` usage example\n\n```nix\naddab = {a, b}: a + b\naddab { a = 2; b = 4; }\n=> 6\nlib.functionArgs addab\n=> { a = false; b = false; }\naddab1 = attrs: addab attrs + 1\naddab1 { a = 2; b = 4; }\n=> 7\nlib.functionArgs addab1\n=> { }\naddab1' = lib.mirrorFunctionArgs addab addab1\naddab1' { a = 2; b = 4; }\n=> 7\nlib.functionArgs addab1'\n=> { a = false; b = false; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1177,"column":3},"path":["lib","trivial","mirrorFunctionArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.mod","path":["lib","trivial","mod"],"aliases":[["lib","mod"]],"signature":"mod :: Int -> Int -> Int\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":650,"column":3},"attr_expr":"mod = base: int: base - (int * (builtins.div base int));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":650,"column":9},"lambda_expr":"mod = base: int: base - (int * (builtins.div base int));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":650,"column":3},"path":["lib","trivial","mod"],"pos_type":"Attribute"}},"content":{"content":"\nInteger modulus\n\n# Inputs\n\n`base`\n\n: 1\\. Function argument\n\n`int`\n\n: 2\\. Function argument\n\n# Type\n\n```\nmod :: Int -> Int -> Int\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mod` usage example\n\n```nix\nmod 11 10\n=> 1\nmod 1 10\n=> 1\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":650,"column":3},"path":["lib","trivial","mod"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.mul","path":["lib","trivial","mul"],"aliases":[["builtins","mul"],["lib","mul"]],"signature":null,"is_primop":true,"primop_meta":{"name":"mul","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":32,"column":5},"attr_expr":"mul","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","mul"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the product of the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","trivial","mul"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.oldestSupportedReleaseIsAtLeast","path":["lib","trivial","oldestSupportedReleaseIsAtLeast"],"aliases":[["lib","isInOldestRelease"],["lib","oldestSupportedReleaseIsAtLeast"],["lib","trivial","isInOldestRelease"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":499,"column":3},"attr_expr":"oldestSupportedReleaseIsAtLeast = release: release <= lib.trivial.oldestSupportedRelease;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":499,"column":37},"lambda_expr":"oldestSupportedReleaseIsAtLeast = release: release <= lib.trivial.oldestSupportedRelease;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":499,"column":3},"path":["lib","trivial","oldestSupportedReleaseIsAtLeast"],"pos_type":"Attribute"}},"content":{"content":"\nAlias for `isInOldestRelease` introduced in 24.11.\nUse `isInOldestRelease` in expressions outside of Nixpkgs for greater compatibility.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":499,"column":3},"path":["lib","trivial","oldestSupportedReleaseIsAtLeast"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.or","path":["lib","trivial","or"],"aliases":[["lib","or"]],"signature":"or :: Bool -> Bool -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":212,"column":3},"attr_expr":"\"or\" = x: y: x || y;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":212,"column":10},"lambda_expr":"\"or\" = x: y: x || y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":212,"column":3},"path":["lib","trivial","or"],"pos_type":"Attribute"}},"content":{"content":"\nboolean “or”\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nor :: Bool -> Bool -> Bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":212,"column":3},"path":["lib","trivial","or"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.pathExists","path":["lib","trivial","pathExists"],"aliases":[["builtins","pathExists"],["lib","pathExists"]],"signature":null,"is_primop":true,"primop_meta":{"name":"pathExists","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":25,"column":5},"attr_expr":"pathExists","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","pathExists"],"pos_type":"Lambda"}},"content":{"content":"\nReturn `true` if the path *path* exists at evaluation time, and\n`false` otherwise.\n","source":{"position":null,"path":["lib","trivial","pathExists"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.pipe","path":["lib","trivial","pipe"],"aliases":[["lib","pipe"]],"signature":"pipe :: a -> [(a -> b) (b -> c) ... (x -> y) (y -> z)] -> z\n","is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":152,"column":3},"attr_expr":"pipe = builtins.foldl' (x: f: f x);","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":152,"column":3},"path":["lib","trivial","pipe"],"pos_type":"Attribute"}},"content":{"content":"\nPipes a value through a list of functions, left to right.\n\n# Inputs\n\n`value`\n\n: Value to start piping.\n\n`fns`\n\n: List of functions to apply sequentially.\n\n# Type\n\n```\npipe :: a -> [(a -> b) (b -> c) ... (x -> y) (y -> z)] -> z\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.pipe` usage example\n\n```nix\npipe 2 [\n    (x: x + 2)  # 2 + 2 = 4\n    (x: x * 2)  # 4 * 2 = 8\n  ]\n=> 8\n\n# ideal to do text transformations\npipe [ \"a/b\" \"a/c\" ] [\n\n  # create the cp command\n  (map (file: ''cp \"${src}/${file}\" $out\\n''))\n\n  # concatenate all commands into one string\n  lib.concatStrings\n\n  # make that string into a nix derivation\n  (pkgs.runCommand \"copy-to-out\" {})\n\n]\n=> <drv which copies all files to $out>\n\nThe output type of each function has to be the input type\nof the next function, and the last function returns the\nfinal value.\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":152,"column":3},"path":["lib","trivial","pipe"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.readFile","path":["lib","trivial","readFile"],"aliases":[["builtins","readFile"],["lib","readFile"],["lib","strings","readFile"]],"signature":null,"is_primop":true,"primop_meta":{"name":"readFile","args":["path"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":26,"column":5},"attr_expr":"readFile","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","readFile"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the contents of the file *path* as a string.\n","source":{"position":null,"path":["lib","trivial","readFile"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.revisionWithDefault","path":["lib","trivial","revisionWithDefault"],"aliases":[],"signature":"revisionWithDefault :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":534,"column":3},"attr_expr":"revisionWithDefault =\n    default:\n    let\n      revisionFile = \"${toString ./..}/.git-revision\";\n      gitRepo = \"${toString ./..}/.git\";\n    in\n    if lib.pathIsGitRepo gitRepo then\n      lib.commitIdFromGitRepo gitRepo\n    else if lib.pathExists revisionFile then\n      lib.fileContents revisionFile\n    else\n      default;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":535,"column":5},"lambda_expr":"revisionWithDefault =\n    default:\n    let\n      revisionFile = \"${toString ./..}/.git-revision\";\n      gitRepo = \"${toString ./..}/.git\";\n    in\n    if lib.pathIsGitRepo gitRepo then\n      lib.commitIdFromGitRepo gitRepo\n    else if lib.pathExists revisionFile then\n      lib.fileContents revisionFile\n    else\n      default;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":534,"column":3},"path":["lib","trivial","revisionWithDefault"],"pos_type":"Attribute"}},"content":{"content":"\nAttempts to return the the current revision of nixpkgs and\nreturns the supplied default value otherwise.\n\n# Inputs\n\n`default`\n\n: Default value to return if revision can not be determined\n\n# Type\n\n```\nrevisionWithDefault :: String -> String\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":534,"column":3},"path":["lib","trivial","revisionWithDefault"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.seq","path":["lib","trivial","seq"],"aliases":[["builtins","seq"],["lib","seq"]],"signature":null,"is_primop":true,"primop_meta":{"name":"seq","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":35,"column":5},"attr_expr":"seq","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","seq"],"pos_type":"Lambda"}},"content":{"content":"\nEvaluate *e1*, then evaluate and return *e2*. This ensures that a\ncomputation is strict in the value of *e1*.\n","source":{"position":null,"path":["lib","trivial","seq"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.setFunctionArgs","path":["lib","trivial","setFunctionArgs"],"aliases":[["lib","setFunctionArgs"]],"signature":"setFunctionArgs : (a -> b) -> { [String] :: Bool } -> (a -> b)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":3},"attr_expr":"setFunctionArgs = f: args: {\n    # TODO: Should we add call-time \"type\" checking like built in?\n    __functor = self: f;\n    __functionArgs = args;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":21},"lambda_expr":"setFunctionArgs = f: args: {\n    # TODO: Should we add call-time \"type\" checking like built in?\n    __functor = self: f;\n    __functionArgs = args;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":3},"path":["lib","trivial","setFunctionArgs"],"pos_type":"Attribute"}},"content":{"content":"\nAdd metadata about expected function arguments to a function.\nThe metadata should match the format given by\nbuiltins.functionArgs, i.e. a set from expected argument to a bool\nrepresenting whether that argument has a default or not.\n\nThis function is necessary because you can't dynamically create a\nfunction of the `{ a, b ? foo, ... }:` format, but some facilities\nlike `callPackage` expect to be able to query expected arguments.\n\n# Inputs\n\n`f`\n\n: 1\\. Function argument\n\n`args`\n\n: 2\\. Function argument\n\n# Type\n\n```\nsetFunctionArgs : (a -> b) -> { [String] :: Bool } -> (a -> b)\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1081,"column":3},"path":["lib","trivial","setFunctionArgs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.showWarnings","path":["lib","trivial","showWarnings"],"aliases":[["lib","showWarnings"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1051,"column":3},"attr_expr":"showWarnings = warnings: res: foldr warn res warnings;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1051,"column":18},"lambda_expr":"warnings: res: foldr warn res warnings","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1051,"column":18},"path":["lib","trivial","showWarnings"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1051,"column":18},"path":["lib","trivial","showWarnings"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.splitByAndCompare","path":["lib","trivial","splitByAndCompare"],"aliases":[["lib","splitByAndCompare"]],"signature":"splitByAndCompare :: (a -> Bool) -> (a -> a -> Int) -> (a -> a -> Int) -> (a -> a -> Int)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":738,"column":3},"attr_expr":"splitByAndCompare =\n    p: yes: no: a: b:\n    if p a then\n      if p b then yes a b else -1\n    else if p b then\n      1\n    else\n      no a b;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":739,"column":5},"lambda_expr":"splitByAndCompare =\n    p: yes: no: a: b:\n    if p a then\n      if p b then yes a b else -1\n    else if p b then\n      1\n    else\n      no a b;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":738,"column":3},"path":["lib","trivial","splitByAndCompare"],"pos_type":"Attribute"}},"content":{"content":"\nSplit type into two subtypes by predicate `p`, take all elements\nof the first subtype to be less than all the elements of the\nsecond subtype, compare elements of a single subtype with `yes`\nand `no` respectively.\n\n# Inputs\n\n`p`\n\n: Predicate\n\n`yes`\n\n: Comparison function if predicate holds for both values\n\n`no`\n\n: Comparison function if predicate holds for neither value\n\n`a`\n\n: First value to compare\n\n`b`\n\n: Second value to compare\n\n# Type\n\n```\nsplitByAndCompare :: (a -> Bool) -> (a -> a -> Int) -> (a -> a -> Int) -> (a -> a -> Int)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.splitByAndCompare` usage example\n\n```nix\nlet cmp = splitByAndCompare (hasPrefix \"foo\") compare compare; in\n\ncmp \"a\" \"z\" => -1\ncmp \"fooa\" \"fooz\" => -1\n\ncmp \"f\" \"a\" => 1\ncmp \"fooa\" \"a\" => -1\n# while\ncompare \"fooa\" \"a\" => 1\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":738,"column":3},"path":["lib","trivial","splitByAndCompare"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.sub","path":["lib","trivial","sub"],"aliases":[["builtins","sub"],["lib","sub"]],"signature":null,"is_primop":true,"primop_meta":{"name":"sub","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":31,"column":5},"attr_expr":"sub","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","trivial","sub"],"pos_type":"Lambda"}},"content":{"content":"\nReturn the difference between the numbers *e1* and *e2*.\n","source":{"position":null,"path":["lib","trivial","sub"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.trivial.throwIf","path":["lib","trivial","throwIf"],"aliases":[["lib","throwIf"]],"signature":"throwIf :: Bool -> String -> a -> (a | Never)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1003,"column":3},"attr_expr":"throwIf = cond: msg: if cond then throw msg else x: x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1003,"column":13},"lambda_expr":"throwIf = cond: msg: if cond then throw msg else x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1003,"column":3},"path":["lib","trivial","throwIf"],"pos_type":"Attribute"}},"content":{"content":"\nLike `throwIfNot`, but negated (throw if the first argument is `true`).\n\n# Inputs\n\n`cond`\n\n: 1\\. Function argument\n\n`msg`\n\n: 2\\. Function argument\n\n# Type\n\n```\nthrowIf :: Bool -> String -> a -> (a | Never)\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1003,"column":3},"path":["lib","trivial","throwIf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.throwIfNot","path":["lib","trivial","throwIfNot"],"aliases":[["lib","throwIfNot"]],"signature":"throwIfNot :: Bool -> String -> a -> (a | Never)\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":982,"column":3},"attr_expr":"throwIfNot = cond: msg: if cond then x: x else throw msg;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":982,"column":16},"lambda_expr":"throwIfNot = cond: msg: if cond then x: x else throw msg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":982,"column":3},"path":["lib","trivial","throwIfNot"],"pos_type":"Attribute"}},"content":{"content":"\nLike the `assert b; e` expression, but with a custom error message and\nwithout the semicolon.\n\nIf true, return the identity function, `r: r`.\n\nIf false, throw the error message.\n\nCalls can be juxtaposed using function application, as `(r: r) a = a`, so\n`(r: r) (r: r) a = a`, and so forth.\n\n# Inputs\n\n`cond`\n\n: 1\\. Function argument\n\n`msg`\n\n: 2\\. Function argument\n\n# Type\n\n```\nthrowIfNot :: Bool -> String -> a -> (a | Never)\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.throwIfNot` usage example\n\n```nix\nthrowIfNot (lib.isList overlays) \"The overlays argument to nixpkgs must be a list.\"\nlib.foldr (x: throwIfNot (lib.isFunction x) \"All overlays passed to nixpkgs must be functions.\") (r: r) overlays\npkgs\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":982,"column":3},"path":["lib","trivial","throwIfNot"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.toBaseDigits","path":["lib","trivial","toBaseDigits"],"aliases":[["lib","toBaseDigits"]],"signature":"toBaseDigits :: Int -> Int -> [Int]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1321,"column":3},"attr_expr":"toBaseDigits =\n    base: i:\n    let\n      go =\n        i:\n        if i < base then\n          [ i ]\n        else\n          let\n            r = i - ((i / base) * base);\n            q = (i - r) / base;\n          in\n          go q ++ [ r ];\n    in\n    assert (isInt base);\n    assert (isInt i);\n    assert (base >= 2);\n    assert (i >= 0);\n    go i;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1322,"column":5},"lambda_expr":"toBaseDigits =\n    base: i:\n    let\n      go =\n        i:\n        if i < base then\n          [ i ]\n        else\n          let\n            r = i - ((i / base) * base);\n            q = (i - r) / base;\n          in\n          go q ++ [ r ];\n    in\n    assert (isInt base);\n    assert (isInt i);\n    assert (base >= 2);\n    assert (i >= 0);\n    go i;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1321,"column":3},"path":["lib","trivial","toBaseDigits"],"pos_type":"Attribute"}},"content":{"content":"\n`toBaseDigits base i` converts the positive integer `i` to a list of its\ndigits in the given base.\n\n# Inputs\n\n`base`\n\n: 1\\. Function argument\n\n`i`\n\n: 2\\. Function argument\n\n# Type\n\n```\ntoBaseDigits :: Int -> Int -> [Int]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.toBaseDigits`\n\n```nix\ntoBaseDigits 10 123 => [ 1 2 3 ]\n\ntoBaseDigits 2 6 => [ 1 1 0 ]\n\ntoBaseDigits 16 250 => [ 15 10 ]\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1321,"column":3},"path":["lib","trivial","toBaseDigits"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.toFunction","path":["lib","trivial","toFunction"],"aliases":[["lib","toFunction"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1211,"column":3},"attr_expr":"toFunction = v: if isFunction v then v else k: v;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1211,"column":16},"lambda_expr":"toFunction = v: if isFunction v then v else k: v;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1211,"column":3},"path":["lib","trivial","toFunction"],"pos_type":"Attribute"}},"content":{"content":"\nTurns any non-callable values into constant functions.\nReturns callable values as is.\n\n# Inputs\n\n`v`\n\n: Any value\n\n# Examples\n:::{.example}\n## `lib.trivial.toFunction` usage example\n\n```nix\nnix-repl> lib.toFunction 1 2\n1\n\nnix-repl> lib.toFunction (x: x + 1) 2\n3\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1211,"column":3},"path":["lib","trivial","toFunction"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.toHexString","path":["lib","trivial","toHexString"],"aliases":[["lib","toHexString"]],"signature":"toHexString :: Int -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1274,"column":3},"attr_expr":"toHexString =\n    let\n      hexDigits = {\n        \"10\" = \"A\";\n        \"11\" = \"B\";\n        \"12\" = \"C\";\n        \"13\" = \"D\";\n        \"14\" = \"E\";\n        \"15\" = \"F\";\n      };\n      toHexDigit = d: if d < 10 then toString d else hexDigits.${toString d};\n    in\n    i: lib.concatMapStrings toHexDigit (toBaseDigits 16 i);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1286,"column":5},"lambda_expr":"i: lib.concatMapStrings toHexDigit (toBaseDigits 16 i)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1274,"column":3},"path":["lib","trivial","toHexString"],"pos_type":"Attribute"}},"content":{"content":"\nConvert the given positive integer to a string of its hexadecimal\nrepresentation.\n\n# Type\n\n```\ntoHexString :: Int -> String\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.toHexString` usage example\n\n```nix\ntoHexString 0 => \"0\"\n\ntoHexString 16 => \"10\"\n\ntoHexString 250 => \"FA\"\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1274,"column":3},"path":["lib","trivial","toHexString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.warn","path":["lib","trivial","warn"],"aliases":[["builtins","warn"],["lib","warn"]],"signature":"warn :: String -> a -> a\n","is_primop":true,"primop_meta":{"name":"warn","args":["e1","e2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":867,"column":3},"attr_expr":"warn =\n    # Since Nix 2.23, https://github.com/NixOS/nix/pull/10592\n    builtins.warn or (\n      let\n        mustAbort = lib.elem (builtins.getEnv \"NIX_ABORT_ON_WARN\") [\n          \"1\"\n          \"true\"\n          \"yes\"\n        ];\n      in\n      # Do not eta reduce v, so that we have the same strictness as `builtins.warn`.\n      msg: v:\n      # `builtins.warn` requires a string message, so we enforce that in our implementation, so that callers aren't accidentally incompatible with newer Nix versions.\n      assert isString msg;\n      if mustAbort then\n        builtins.trace \"\u001b[1;31mevaluation warning:\u001b[0m ${msg}\" (\n          abort \"NIX_ABORT_ON_WARN=true; warnings are treated as unrecoverable errors.\"\n        )\n      else\n        builtins.trace \"\u001b[1;35mevaluation warning:\u001b[0m ${msg}\" v\n    );","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":867,"column":3},"path":["lib","trivial","warn"],"pos_type":"Attribute"}},"content":{"content":"\n`warn` *`message`* *`value`*\n\nPrint a warning before returning the second argument.\n\nSee [`builtins.warn`](https://nix.dev/manual/nix/latest/language/builtins.html#builtins-warn) (Nix >= 2.23).\nOn older versions, the Nix 2.23 behavior is emulated with [`builtins.trace`](https://nix.dev/manual/nix/latest/language/builtins.html#builtins-warn), including the [`NIX_ABORT_ON_WARN`](https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-abort-on-warn) behavior, but not the `nix.conf` setting or command line option.\n\n# Inputs\n\n*`message`* (String)\n\n: Warning message to print before evaluating *`value`*.\n\n*`value`* (any value)\n\n: Value to return as-is.\n\n# Type\n\n```\nwarn :: String -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":867,"column":3},"path":["lib","trivial","warn"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.warnIf","path":["lib","trivial","warnIf"],"aliases":[["lib","warnIf"]],"signature":"warnIf :: Bool -> String -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":914,"column":3},"attr_expr":"warnIf = cond: msg: if cond then warn msg else x: x;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":914,"column":12},"lambda_expr":"warnIf = cond: msg: if cond then warn msg else x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":914,"column":3},"path":["lib","trivial","warnIf"],"pos_type":"Attribute"}},"content":{"content":"\n`warnIf` *`condition`* *`message`* *`value`*\n\nLike `warn`, but only warn when the first argument is `true`.\n\n# Inputs\n\n*`condition`* (Boolean)\n\n: `true` to trigger the warning before continuing with *`value`*.\n\n*`message`* (String)\n\n: Warning message to print before evaluating\n\n*`value`* (any value)\n\n: Value to return as-is.\n\n# Type\n\n```\nwarnIf :: Bool -> String -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":914,"column":3},"path":["lib","trivial","warnIf"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.warnIfNot","path":["lib","trivial","warnIfNot"],"aliases":[["lib","warnIfNot"]],"signature":"warnIfNot :: Bool -> String -> a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":941,"column":3},"attr_expr":"warnIfNot = cond: msg: if cond then x: x else warn msg;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":941,"column":15},"lambda_expr":"warnIfNot = cond: msg: if cond then x: x else warn msg;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":941,"column":3},"path":["lib","trivial","warnIfNot"],"pos_type":"Attribute"}},"content":{"content":"\n`warnIfNot` *`condition`* *`message`* *`value`*\n\nLike `warnIf`, but negated: warn if the first argument is `false`.\n\n# Inputs\n\n*`condition`*\n\n: `false` to trigger the warning before continuing with `val`.\n\n*`message`*\n\n: Warning message to print before evaluating *`value`*.\n\n*`value`*\n\n: Value to return as-is.\n\n# Type\n\n```\nwarnIfNot :: Bool -> String -> a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":941,"column":3},"path":["lib","trivial","warnIfNot"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.trivial.xor","path":["lib","trivial","xor"],"aliases":[["lib","xor"]],"signature":"xor :: bool -> bool -> bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":256,"column":3},"attr_expr":"xor = x: y: (!x) != (!y);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":256,"column":9},"lambda_expr":"xor = x: y: (!x) != (!y);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":256,"column":3},"path":["lib","trivial","xor"],"pos_type":"Attribute"}},"content":{"content":"\nboolean “exclusive or”\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nxor :: bool -> bool -> bool\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":256,"column":3},"path":["lib","trivial","xor"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.types.addCheck","path":["lib","types","addCheck"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1852,"column":3},"attr_expr":"addCheck =\n    elemType: check:\n    if elemType.merge ? v2 then\n      elemType\n      // {\n        check = {\n          __functor = _self: x: elemType.check x && check x;\n          isV2MergeCoherent = true;\n        };\n        merge = {\n          __functor =\n            self: loc: defs:\n            (self.v2 { inherit loc defs; }).value;\n          v2 =\n            { loc, defs }@args:\n            let\n              orig = checkV2MergeCoherence loc elemType (elemType.merge.v2 args);\n              headError' = if orig.headError != null then orig.headError else checkDefsForError check loc defs;\n            in\n            orig\n            // {\n              headError = headError';\n            };\n        };\n      }\n    else\n      elemType\n      // {\n        check = x: elemType.check x && check x;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1853,"column":5},"lambda_expr":"addCheck =\n    elemType: check:\n    if elemType.merge ? v2 then\n      elemType\n      // {\n        check = {\n          __functor = _self: x: elemType.check x && check x;\n          isV2MergeCoherent = true;\n        };\n        merge = {\n          __functor =\n            self: loc: defs:\n            (self.v2 { inherit loc defs; }).value;\n          v2 =\n            { loc, defs }@args:\n            let\n              orig = checkV2MergeCoherence loc elemType (elemType.merge.v2 args);\n              headError' = if orig.headError != null then orig.headError else checkDefsForError check loc defs;\n            in\n            orig\n            // {\n              headError = headError';\n            };\n        };\n      }\n    else\n      elemType\n      // {\n        check = x: elemType.check x && check x;\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1852,"column":3},"path":["lib","types","addCheck"],"pos_type":"Attribute"}},"content":{"content":"\nAugment the given type with an additional type check function.\n\n:::{.warning}\nThis function has some broken behavior see: [#396021](https://github.com/NixOS/nixpkgs/issues/396021)\nFixing is not trivial, we appreciate any help!\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1852,"column":3},"path":["lib","types","addCheck"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.types.attrListOf","path":["lib","types","attrListOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":815,"column":3},"attr_expr":"attrListOf = elemType: attrListWith { inherit elemType; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":815,"column":16},"lambda_expr":"elemType: attrListWith { inherit elemType; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":815,"column":16},"path":["lib","types","attrListOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":815,"column":16},"path":["lib","types","attrListOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.attrListWith","path":["lib","types","attrListWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":817,"column":3},"attr_expr":"attrListWith =\n    {\n      elemType,\n      asAttrs ? false,\n      mergeAttrValues ? _name: values: values,\n    }:\n    mkOptionType rec {\n      name = \"attrListOf\";\n      description = \"attribute list of ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType\n      }\";\n      descriptionClass = \"composite\";\n      check = {\n        __functor = _self: x: isList x || isAttrs x;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            # Peel order and override properties from a value in any nesting order.\n            # Returns { value, prio, overridePrio }.\n            # mkOrder is stripped (we consume it for sorting).\n            # mkOverride is preserved in value (mergeDefinitions strips it).\n            peelProperties =\n              value:\n              let\n                type = value._type or null;\n              in\n              if type == \"order\" then\n                let\n                  inner = peelProperties value.content;\n                in\n                {\n                  inherit (inner) value overridePrio;\n                  prio = value.priority;\n                }\n              else if type == \"override\" then\n                let\n                  inner = peelProperties value.content;\n                in\n                {\n                  inherit (inner) prio;\n                  overridePrio = value.priority;\n                  # Re-wrap mkOverride around the inner value (with mkOrder stripped)\n                  value = mkOverride value.priority inner.value;\n                }\n              else\n                {\n                  inherit value;\n                  prio = defaultOrderPriority;\n                  overridePrio = defaultOverridePriority;\n                };\n\n            # Extract { file, key, value, prio, overridePrio } from a single-key attrset,\n            # optionally wrapped in mkOrder at the element level (list format).\n            extractItem =\n              file: raw:\n              let\n                hasOrder = isType \"order\" raw;\n                item = if hasOrder then raw.content else raw;\n                key = head (attrNames item);\n                peeled = peelProperties item.${key};\n              in\n              if isAttrs item && length (attrNames item) == 1 then\n                peeled\n                // {\n                  inherit file key;\n                  prio = if hasOrder then raw.priority else peeled.prio;\n                }\n              else\n                throw \"A definition for option `${showOption loc}' is not of type `${description}'. ${\n                  if !isAttrs item then\n                    \"Each list element must be an attribute set, but got ${builtins.typeOf item}\"\n                  else\n                    \"Each list element must be a single-key attribute set, but got ${toString (length (attrNames item))} keys\"\n                }.${\n                  showDefs [\n                    {\n                      inherit file;\n                      value = raw;\n                    }\n                  ]\n                }\";\n\n            # Convert a definition to a flat list of { file, key, value, prio, overridePrio }\n            defToItems =\n              def:\n              if isList def.value then\n                map (extractItem def.file) def.value\n              else\n                # isAttrs: properties are on the values directly\n                map (\n                  key:\n                  peelProperties def.value.${key}\n                  // {\n                    inherit (def) file;\n                    inherit key;\n                  }\n                ) (attrNames def.value);\n\n            allItems = concatMap defToItems defs;\n\n            # Per key, find the highest override priority (lowest number)\n            winningOverridePrio = foldl' (\n              acc: item:\n              let\n                prev = acc.${item.key} or defaultOverridePriority;\n              in\n              if item.overridePrio < prev then\n                acc // { ${item.key} = item.overridePrio; }\n              else\n                # minimize `//` operations\n                acc\n            ) { } allItems;\n\n            # Keep only items at the winning override priority for their key\n            items = sort (a: b: a.prio < b.prio) (\n              filter (\n                item: item.overridePrio == winningOverridePrio.${item.key} or defaultOverridePriority\n              ) allItems\n            );\n\n            evals = filter (e: e.eval.optionalValue ? value) (\n              map (item: {\n                inherit (item) key file prio;\n                eval = mergeDefinitions (loc ++ [ item.key ]) elemType [\n                  {\n                    inherit (item) file value;\n                  }\n                ];\n              }) items\n            );\n\n            attrListValue = map (e: { ${e.key} = e.eval.optionalValue.value or e.eval.mergedValue; }) evals;\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = if asAttrs then zipAttrsWith mergeAttrValues attrListValue else attrListValue;\n            valueMeta.attrList = map (e: e.eval.checkedAndMerged.valueMeta) evals;\n            /**\n              The ordered list representation, especially useful when asAttrs is set.\n            */\n            valueMeta.attrListValue = attrListValue;\n            valueMeta.definitions = map (\n              e:\n              mkDefinition {\n                inherit (e) file;\n                value = mkOrder e.prio { ${e.key} = e.eval.optionalValue.value or e.eval.mergedValue; };\n              }\n            ) evals;\n          };\n      };\n      emptyValue = {\n        value = if asAttrs then { } else [ ];\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"*\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules =\n        m:\n        attrListWith {\n          inherit asAttrs mergeAttrValues;\n          elemType = elemType.substSubModules m;\n        };\n      typeMerge = t: null; # Disable type merging\n      nestedTypes.elemType = elemType;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":818,"column":5},"lambda_expr":"{\n      elemType,\n      asAttrs ? false,\n      mergeAttrValues ? _name: values: values,\n    }:\n    mkOptionType rec {\n      name = \"attrListOf\";\n      description = \"attribute list of ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType\n      }\";\n      descriptionClass = \"composite\";\n      check = {\n        __functor = _self: x: isList x || isAttrs x;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            # Peel order and override properties from a value in any nesting order.\n            # Returns { value, prio, overridePrio }.\n            # mkOrder is stripped (we consume it for sorting).\n            # mkOverride is preserved in value (mergeDefinitions strips it).\n            peelProperties =\n              value:\n              let\n                type = value._type or null;\n              in\n              if type == \"order\" then\n                let\n                  inner = peelProperties value.content;\n                in\n                {\n                  inherit (inner) value overridePrio;\n                  prio = value.priority;\n                }\n              else if type == \"override\" then\n                let\n                  inner = peelProperties value.content;\n                in\n                {\n                  inherit (inner) prio;\n                  overridePrio = value.priority;\n                  # Re-wrap mkOverride around the inner value (with mkOrder stripped)\n                  value = mkOverride value.priority inner.value;\n                }\n              else\n                {\n                  inherit value;\n                  prio = defaultOrderPriority;\n                  overridePrio = defaultOverridePriority;\n                };\n\n            # Extract { file, key, value, prio, overridePrio } from a single-key attrset,\n            # optionally wrapped in mkOrder at the element level (list format).\n            extractItem =\n              file: raw:\n              let\n                hasOrder = isType \"order\" raw;\n                item = if hasOrder then raw.content else raw;\n                key = head (attrNames item);\n                peeled = peelProperties item.${key};\n              in\n              if isAttrs item && length (attrNames item) == 1 then\n                peeled\n                // {\n                  inherit file key;\n                  prio = if hasOrder then raw.priority else peeled.prio;\n                }\n              else\n                throw \"A definition for option `${showOption loc}' is not of type `${description}'. ${\n                  if !isAttrs item then\n                    \"Each list element must be an attribute set, but got ${builtins.typeOf item}\"\n                  else\n                    \"Each list element must be a single-key attribute set, but got ${toString (length (attrNames item))} keys\"\n                }.${\n                  showDefs [\n                    {\n                      inherit file;\n                      value = raw;\n                    }\n                  ]\n                }\";\n\n            # Convert a definition to a flat list of { file, key, value, prio, overridePrio }\n            defToItems =\n              def:\n              if isList def.value then\n                map (extractItem def.file) def.value\n              else\n                # isAttrs: properties are on the values directly\n                map (\n                  key:\n                  peelProperties def.value.${key}\n                  // {\n                    inherit (def) file;\n                    inherit key;\n                  }\n                ) (attrNames def.value);\n\n            allItems = concatMap defToItems defs;\n\n            # Per key, find the highest override priority (lowest number)\n            winningOverridePrio = foldl' (\n              acc: item:\n              let\n                prev = acc.${item.key} or defaultOverridePriority;\n              in\n              if item.overridePrio < prev then\n                acc // { ${item.key} = item.overridePrio; }\n              else\n                # minimize `//` operations\n                acc\n            ) { } allItems;\n\n            # Keep only items at the winning override priority for their key\n            items = sort (a: b: a.prio < b.prio) (\n              filter (\n                item: item.overridePrio == winningOverridePrio.${item.key} or defaultOverridePriority\n              ) allItems\n            );\n\n            evals = filter (e: e.eval.optionalValue ? value) (\n              map (item: {\n                inherit (item) key file prio;\n                eval = mergeDefinitions (loc ++ [ item.key ]) elemType [\n                  {\n                    inherit (item) file value;\n                  }\n                ];\n              }) items\n            );\n\n            attrListValue = map (e: { ${e.key} = e.eval.optionalValue.value or e.eval.mergedValue; }) evals;\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = if asAttrs then zipAttrsWith mergeAttrValues attrListValue else attrListValue;\n            valueMeta.attrList = map (e: e.eval.checkedAndMerged.valueMeta) evals;\n            /**\n              The ordered list representation, especially useful when asAttrs is set.\n            */\n            valueMeta.attrListValue = attrListValue;\n            valueMeta.definitions = map (\n              e:\n              mkDefinition {\n                inherit (e) file;\n                value = mkOrder e.prio { ${e.key} = e.eval.optionalValue.value or e.eval.mergedValue; };\n              }\n            ) evals;\n          };\n      };\n      emptyValue = {\n        value = if asAttrs then { } else [ ];\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"*\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules =\n        m:\n        attrListWith {\n          inherit asAttrs mergeAttrValues;\n          elemType = elemType.substSubModules m;\n        };\n      typeMerge = t: null; # Disable type merging\n      nestedTypes.elemType = elemType;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":818,"column":5},"path":["lib","types","attrListWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":818,"column":5},"path":["lib","types","attrListWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.attrTag","path":["lib","types","attrTag"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1115,"column":3},"attr_expr":"attrTag =\n    tags:\n    let\n      tags_ = tags;\n    in\n    let\n      tags = mapAttrs (\n        n: opt:\n        builtins.addErrorContext\n          \"while checking that attrTag tag ${lib.strings.escapeNixIdentifier n} is an option with a type${inAttrPosSuffix tags_ n}\"\n          (\n            throwIf (opt._type or null != \"option\")\n              \"In attrTag, each tag value must be an option, but tag ${lib.strings.escapeNixIdentifier n} ${\n                if opt ? _type then\n                  if opt._type == \"option-type\" then\n                    \"was a bare type, not wrapped in mkOption.\"\n                  else\n                    \"was of type ${lib.strings.escapeNixString opt._type}.\"\n                else\n                  \"was not.\"\n              }\"\n              opt\n            // {\n              declarations =\n                opt.declarations or (\n                  let\n                    pos = builtins.unsafeGetAttrPos n tags_;\n                  in\n                  if pos == null then [ ] else [ pos.file ]\n                );\n              declarationPositions =\n                opt.declarationPositions or (\n                  let\n                    pos = builtins.unsafeGetAttrPos n tags_;\n                  in\n                  if pos == null then [ ] else [ pos ]\n                );\n            }\n          )\n      ) tags_;\n      choicesStr = concatMapStringsSep \", \" lib.strings.escapeNixIdentifier (attrNames tags);\n    in\n    mkOptionType {\n      name = \"attrTag\";\n      description = \"attribute-tagged union with choices: ${choicesStr}\";\n      descriptionClass = \"noun\";\n      getSubOptions =\n        prefix: mapAttrs (tagName: tagOption: tagOption // { loc = prefix ++ [ tagName ]; }) tags;\n      check = v: isAttrs v && length (attrNames v) == 1 && tags ? ${head (attrNames v)};\n      merge =\n        loc: defs:\n        let\n          choice = head (attrNames (head defs).value);\n          checkedValueDefs = map (\n            def:\n            assert (length (attrNames def.value)) == 1;\n            if (head (attrNames def.value)) != choice then\n              throw \"The option `${showOption loc}` is defined both as `${choice}` and `${head (attrNames def.value)}`, in ${showFiles (getFiles defs)}.\"\n            else\n              {\n                inherit (def) file;\n                value = def.value.${choice};\n              }\n          ) defs;\n        in\n        if tags ? ${choice} then\n          {\n            ${choice} = (lib.modules.evalOptionValue (loc ++ [ choice ]) tags.${choice} checkedValueDefs).value;\n          }\n        else\n          throw \"The option `${showOption loc}` is defined as ${lib.strings.escapeNixIdentifier choice}, but ${lib.strings.escapeNixIdentifier choice} is not among the valid choices (${choicesStr}). Value ${choice} was defined in ${showFiles (getFiles defs)}.\";\n      nestedTypes = tags;\n      functor = defaultFunctor \"attrTag\" // {\n        type = { tags, ... }: lib.types.attrTag tags;\n        payload = { inherit tags; };\n        binOp =\n          let\n            # Add metadata in the format that submodules work with\n            wrapOptionDecl = option: {\n              options = option;\n              _file = \"<attrTag {...}>\";\n              pos = null;\n            };\n          in\n          a: b: {\n            tags =\n              a.tags\n              // b.tags\n              // mapAttrs (\n                tagName: bOpt:\n                lib.mergeOptionDecls\n                  # FIXME: loc is not accurate; should include prefix\n                  #        Fortunately, it's only used for error messages, where a \"relative\" location is kinda ok.\n                  #        It is also returned though, but use of the attribute seems rare?\n                  [ tagName ]\n                  [\n                    (wrapOptionDecl a.tags.${tagName})\n                    (wrapOptionDecl bOpt)\n                  ]\n                // {\n                  # mergeOptionDecls is not idempotent in these attrs:\n                  declarations = a.tags.${tagName}.declarations ++ bOpt.declarations;\n                  declarationPositions = a.tags.${tagName}.declarationPositions ++ bOpt.declarationPositions;\n                }\n              ) (builtins.intersectAttrs a.tags b.tags);\n          };\n      };\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1116,"column":5},"lambda_expr":"tags:\n    let\n      tags_ = tags;\n    in\n    let\n      tags = mapAttrs (\n        n: opt:\n        builtins.addErrorContext\n          \"while checking that attrTag tag ${lib.strings.escapeNixIdentifier n} is an option with a type${inAttrPosSuffix tags_ n}\"\n          (\n            throwIf (opt._type or null != \"option\")\n              \"In attrTag, each tag value must be an option, but tag ${lib.strings.escapeNixIdentifier n} ${\n                if opt ? _type then\n                  if opt._type == \"option-type\" then\n                    \"was a bare type, not wrapped in mkOption.\"\n                  else\n                    \"was of type ${lib.strings.escapeNixString opt._type}.\"\n                else\n                  \"was not.\"\n              }\"\n              opt\n            // {\n              declarations =\n                opt.declarations or (\n                  let\n                    pos = builtins.unsafeGetAttrPos n tags_;\n                  in\n                  if pos == null then [ ] else [ pos.file ]\n                );\n              declarationPositions =\n                opt.declarationPositions or (\n                  let\n                    pos = builtins.unsafeGetAttrPos n tags_;\n                  in\n                  if pos == null then [ ] else [ pos ]\n                );\n            }\n          )\n      ) tags_;\n      choicesStr = concatMapStringsSep \", \" lib.strings.escapeNixIdentifier (attrNames tags);\n    in\n    mkOptionType {\n      name = \"attrTag\";\n      description = \"attribute-tagged union with choices: ${choicesStr}\";\n      descriptionClass = \"noun\";\n      getSubOptions =\n        prefix: mapAttrs (tagName: tagOption: tagOption // { loc = prefix ++ [ tagName ]; }) tags;\n      check = v: isAttrs v && length (attrNames v) == 1 && tags ? ${head (attrNames v)};\n      merge =\n        loc: defs:\n        let\n          choice = head (attrNames (head defs).value);\n          checkedValueDefs = map (\n            def:\n            assert (length (attrNames def.value)) == 1;\n            if (head (attrNames def.value)) != choice then\n              throw \"The option `${showOption loc}` is defined both as `${choice}` and `${head (attrNames def.value)}`, in ${showFiles (getFiles defs)}.\"\n            else\n              {\n                inherit (def) file;\n                value = def.value.${choice};\n              }\n          ) defs;\n        in\n        if tags ? ${choice} then\n          {\n            ${choice} = (lib.modules.evalOptionValue (loc ++ [ choice ]) tags.${choice} checkedValueDefs).value;\n          }\n        else\n          throw \"The option `${showOption loc}` is defined as ${lib.strings.escapeNixIdentifier choice}, but ${lib.strings.escapeNixIdentifier choice} is not among the valid choices (${choicesStr}). Value ${choice} was defined in ${showFiles (getFiles defs)}.\";\n      nestedTypes = tags;\n      functor = defaultFunctor \"attrTag\" // {\n        type = { tags, ... }: lib.types.attrTag tags;\n        payload = { inherit tags; };\n        binOp =\n          let\n            # Add metadata in the format that submodules work with\n            wrapOptionDecl = option: {\n              options = option;\n              _file = \"<attrTag {...}>\";\n              pos = null;\n            };\n          in\n          a: b: {\n            tags =\n              a.tags\n              // b.tags\n              // mapAttrs (\n                tagName: bOpt:\n                lib.mergeOptionDecls\n                  # FIXME: loc is not accurate; should include prefix\n                  #        Fortunately, it's only used for error messages, where a \"relative\" location is kinda ok.\n                  #        It is also returned though, but use of the attribute seems rare?\n                  [ tagName ]\n                  [\n                    (wrapOptionDecl a.tags.${tagName})\n                    (wrapOptionDecl bOpt)\n                  ]\n                // {\n                  # mergeOptionDecls is not idempotent in these attrs:\n                  declarations = a.tags.${tagName}.declarations ++ bOpt.declarations;\n                  declarationPositions = a.tags.${tagName}.declarationPositions ++ bOpt.declarationPositions;\n                }\n              ) (builtins.intersectAttrs a.tags b.tags);\n          };\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1116,"column":5},"path":["lib","types","attrTag"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1116,"column":5},"path":["lib","types","attrTag"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.attrsOf","path":["lib","types","attrsOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":988,"column":3},"attr_expr":"attrsOf = elemType: attrsWith { inherit elemType; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":988,"column":13},"lambda_expr":"elemType: attrsWith { inherit elemType; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":988,"column":13},"path":["lib","types","attrsOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":988,"column":13},"path":["lib","types","attrsOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.attrsWith","path":["lib","types","attrsWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1003,"column":3},"attr_expr":"attrsWith =\n    let\n      # Push down position info.\n      pushPositions = map (\n        def:\n        mapAttrs (n: v: {\n          inherit (def) file;\n          value = v;\n        }) def.value\n      );\n      binOp =\n        lhs: rhs:\n        let\n          elemType = lhs.elemType.typeMerge rhs.elemType.functor;\n          lazy = if lhs.lazy == rhs.lazy then lhs.lazy else null;\n          placeholder =\n            if lhs.placeholder == rhs.placeholder then\n              lhs.placeholder\n            else if lhs.placeholder == \"name\" then\n              rhs.placeholder\n            else if rhs.placeholder == \"name\" then\n              lhs.placeholder\n            else\n              null;\n        in\n        if elemType == null || lazy == null || placeholder == null then\n          null\n        else\n          {\n            inherit elemType lazy placeholder;\n          };\n    in\n    {\n      elemType,\n      lazy ? false,\n      placeholder ? \"name\",\n    }:\n    mkOptionType rec {\n      name = if lazy then \"lazyAttrsOf\" else \"attrsOf\";\n      description =\n        (if lazy then \"lazy attribute set\" else \"attribute set\")\n        + \" of ${optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType}\";\n      descriptionClass = \"composite\";\n      check = {\n        __functor = _self: isAttrs;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            evals =\n              if lazy then\n                zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)\n              else\n                # Filtering makes the merge function more strict\n                # Meaning it is less lazy\n                filterAttrs (n: v: v.optionalValue ? value) (\n                  zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)\n                );\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = mapAttrs (\n              n: v:\n              if lazy then\n                v.optionalValue.value or elemType.emptyValue.value or v.mergedValue\n              else\n                v.optionalValue.value\n            ) evals;\n            valueMeta.attrs = mapAttrs (n: v: v.checkedAndMerged.valueMeta) evals;\n          };\n      };\n\n      emptyValue = {\n        value = { };\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"<${placeholder}>\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules =\n        m:\n        attrsWith {\n          elemType = elemType.substSubModules m;\n          inherit lazy placeholder;\n        };\n      functor =\n        (elemTypeFunctor \"attrsWith\" {\n          inherit elemType lazy placeholder;\n        })\n        // {\n          # Custom type merging required because of the \"placeholder\" attribute\n          inherit binOp;\n        };\n      nestedTypes.elemType = elemType;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1035,"column":5},"lambda_expr":"{\n      elemType,\n      lazy ? false,\n      placeholder ? \"name\",\n    }:\n    mkOptionType rec {\n      name = if lazy then \"lazyAttrsOf\" else \"attrsOf\";\n      description =\n        (if lazy then \"lazy attribute set\" else \"attribute set\")\n        + \" of ${optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType}\";\n      descriptionClass = \"composite\";\n      check = {\n        __functor = _self: isAttrs;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            evals =\n              if lazy then\n                zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)\n              else\n                # Filtering makes the merge function more strict\n                # Meaning it is less lazy\n                filterAttrs (n: v: v.optionalValue ? value) (\n                  zipAttrsWith (name: defs: mergeDefinitions (loc ++ [ name ]) elemType defs) (pushPositions defs)\n                );\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = mapAttrs (\n              n: v:\n              if lazy then\n                v.optionalValue.value or elemType.emptyValue.value or v.mergedValue\n              else\n                v.optionalValue.value\n            ) evals;\n            valueMeta.attrs = mapAttrs (n: v: v.checkedAndMerged.valueMeta) evals;\n          };\n      };\n\n      emptyValue = {\n        value = { };\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"<${placeholder}>\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules =\n        m:\n        attrsWith {\n          elemType = elemType.substSubModules m;\n          inherit lazy placeholder;\n        };\n      functor =\n        (elemTypeFunctor \"attrsWith\" {\n          inherit elemType lazy placeholder;\n        })\n        // {\n          # Custom type merging required because of the \"placeholder\" attribute\n          inherit binOp;\n        };\n      nestedTypes.elemType = elemType;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1035,"column":5},"path":["lib","types","attrsWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1035,"column":5},"path":["lib","types","attrsWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.coercedTo","path":["lib","types","coercedTo"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1773,"column":3},"attr_expr":"coercedTo =\n    coercedType: coerceFunc: finalType:\n    assert lib.assertMsg (\n      coercedType.getSubModules == null\n    ) \"coercedTo: coercedType must not have submodules (it’s a ${coercedType.description})\";\n    mkOptionType rec {\n      name = \"coercedTo\";\n      description = \"${optionDescriptionPhrase (class: class == \"noun\") finalType} or ${\n        optionDescriptionPhrase (class: class == \"noun\") coercedType\n      } convertible to it\";\n      check = {\n        __functor = _self: x: (coercedType.check x && finalType.check (coerceFunc x)) || finalType.check x;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            finalDefs = (\n              map (\n                def:\n                def\n                // {\n                  value =\n                    if coercedType.merge ? v2 then\n                      let\n                        merged = checkV2MergeCoherence loc coercedType (\n                          coercedType.merge.v2 {\n                            inherit loc;\n                            defs = [ def ];\n                          }\n                        );\n                      in\n                      if merged.headError == null then coerceFunc def.value else def.value\n                    else if coercedType.check def.value then\n                      coerceFunc def.value\n                    else\n                      def.value;\n                }\n              ) defs\n            );\n          in\n          if finalType.merge ? v2 then\n            checkV2MergeCoherence loc finalType (\n              finalType.merge.v2 {\n                inherit loc;\n                defs = finalDefs;\n              }\n            )\n          else\n            {\n              value = finalType.merge loc finalDefs;\n              valueMeta = { };\n              headError = checkDefsForError check loc defs;\n            };\n      };\n      emptyValue = finalType.emptyValue;\n      getSubOptions = finalType.getSubOptions;\n      getSubModules = finalType.getSubModules;\n      substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);\n      typeMerge = t: null;\n      functor = (defaultFunctor name) // {\n        wrappedDeprecationMessage = makeWrappedDeprecationMessage { elemType = finalType; };\n      };\n      nestedTypes.coercedType = coercedType;\n      nestedTypes.finalType = finalType;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1774,"column":5},"lambda_expr":"coercedTo =\n    coercedType: coerceFunc: finalType:\n    assert lib.assertMsg (\n      coercedType.getSubModules == null\n    ) \"coercedTo: coercedType must not have submodules (it’s a ${coercedType.description})\";\n    mkOptionType rec {\n      name = \"coercedTo\";\n      description = \"${optionDescriptionPhrase (class: class == \"noun\") finalType} or ${\n        optionDescriptionPhrase (class: class == \"noun\") coercedType\n      } convertible to it\";\n      check = {\n        __functor = _self: x: (coercedType.check x && finalType.check (coerceFunc x)) || finalType.check x;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            finalDefs = (\n              map (\n                def:\n                def\n                // {\n                  value =\n                    if coercedType.merge ? v2 then\n                      let\n                        merged = checkV2MergeCoherence loc coercedType (\n                          coercedType.merge.v2 {\n                            inherit loc;\n                            defs = [ def ];\n                          }\n                        );\n                      in\n                      if merged.headError == null then coerceFunc def.value else def.value\n                    else if coercedType.check def.value then\n                      coerceFunc def.value\n                    else\n                      def.value;\n                }\n              ) defs\n            );\n          in\n          if finalType.merge ? v2 then\n            checkV2MergeCoherence loc finalType (\n              finalType.merge.v2 {\n                inherit loc;\n                defs = finalDefs;\n              }\n            )\n          else\n            {\n              value = finalType.merge loc finalDefs;\n              valueMeta = { };\n              headError = checkDefsForError check loc defs;\n            };\n      };\n      emptyValue = finalType.emptyValue;\n      getSubOptions = finalType.getSubOptions;\n      getSubModules = finalType.getSubModules;\n      substSubModules = m: coercedTo coercedType coerceFunc (finalType.substSubModules m);\n      typeMerge = t: null;\n      functor = (defaultFunctor name) // {\n        wrappedDeprecationMessage = makeWrappedDeprecationMessage { elemType = finalType; };\n      };\n      nestedTypes.coercedType = coercedType;\n      nestedTypes.finalType = finalType;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1774,"column":5},"path":["lib","types","coercedTo"],"pos_type":"Lambda"}},"content":{"content":"converted to `finalType` using `coerceFunc`.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1774,"column":5},"path":["lib","types","coercedTo"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.defaultFunctor","path":["lib","types","defaultFunctor"],"aliases":[["lib","defaultFunctor"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":213,"column":3},"attr_expr":"defaultFunctor = name: {\n    inherit name;\n    type = lib.types.${name} or null;\n    wrapped = null;\n    payload = null;\n    binOp = a: b: null;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":213,"column":20},"lambda_expr":"defaultFunctor = name: {\n    inherit name;\n    type = lib.types.${name} or null;\n    wrapped = null;\n    payload = null;\n    binOp = a: b: null;\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":213,"column":20},"path":["lib","types","defaultFunctor"],"pos_type":"Lambda"}},"content":{"content":"Default type functor","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":213,"column":20},"path":["lib","types","defaultFunctor"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.defaultTypeMerge","path":["lib","types","defaultTypeMerge"],"aliases":[["lib","defaultTypeMerge"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":168,"column":3},"attr_expr":"defaultTypeMerge =\n    f: f':\n    let\n      mergedWrapped = f.wrapped.typeMerge f'.wrapped.functor;\n      mergedPayload = f.binOp f.payload f'.payload;\n\n      hasPayload =\n        assert (f'.payload != null) == (f.payload != null);\n        f.payload != null;\n      hasWrapped =\n        let\n          hasWrappedNonNull = set: set ? \"wrapped\" && set.wrapped != null;\n        in\n        assert (hasWrappedNonNull f') == (hasWrappedNonNull f);\n        hasWrappedNonNull f;\n\n      typeFromPayload = if mergedPayload == null then null else f.type mergedPayload;\n      typeFromWrapped = if mergedWrapped == null then null else f.type mergedWrapped;\n    in\n    # Abort early: cannot merge different types\n    if f.name != f'.name then\n      null\n    else\n\n    if hasPayload then\n      # Just return the payload if returning wrapped is deprecated\n      if f ? wrappedDeprecationMessage then\n        typeFromPayload\n      else if hasWrapped then\n        # Has both wrapped and payload\n        throw ''\n          Type ${f.name} defines both `functor.payload` and `functor.wrapped` at the same time, which is not supported.\n\n          Use either `functor.payload` or `functor.wrapped` but not both.\n\n          If your code worked before remove either `functor.wrapped` or `functor.payload` from the type definition.\n        ''\n      else\n        typeFromPayload\n    else if hasWrapped then\n      typeFromWrapped\n    else\n      f.type;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":169,"column":5},"lambda_expr":"defaultTypeMerge =\n    f: f':\n    let\n      mergedWrapped = f.wrapped.typeMerge f'.wrapped.functor;\n      mergedPayload = f.binOp f.payload f'.payload;\n\n      hasPayload =\n        assert (f'.payload != null) == (f.payload != null);\n        f.payload != null;\n      hasWrapped =\n        let\n          hasWrappedNonNull = set: set ? \"wrapped\" && set.wrapped != null;\n        in\n        assert (hasWrappedNonNull f') == (hasWrappedNonNull f);\n        hasWrappedNonNull f;\n\n      typeFromPayload = if mergedPayload == null then null else f.type mergedPayload;\n      typeFromWrapped = if mergedWrapped == null then null else f.type mergedWrapped;\n    in\n    # Abort early: cannot merge different types\n    if f.name != f'.name then\n      null\n    else\n\n    if hasPayload then\n      # Just return the payload if returning wrapped is deprecated\n      if f ? wrappedDeprecationMessage then\n        typeFromPayload\n      else if hasWrapped then\n        # Has both wrapped and payload\n        throw ''\n          Type ${f.name} defines both `functor.payload` and `functor.wrapped` at the same time, which is not supported.\n\n          Use either `functor.payload` or `functor.wrapped` but not both.\n\n          If your code worked before remove either `functor.wrapped` or `functor.payload` from the type definition.\n        ''\n      else\n        typeFromPayload\n    else if hasWrapped then\n      typeFromWrapped\n    else\n      f.type;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":169,"column":5},"path":["lib","types","defaultTypeMerge"],"pos_type":"Lambda"}},"content":{"content":"takes two type functors and return the merged type","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":169,"column":5},"path":["lib","types","defaultTypeMerge"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.deferredModuleWith","path":["lib","types","deferredModuleWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1332,"column":3},"attr_expr":"deferredModuleWith =\n    attrs@{\n      staticModules ? [ ],\n    }:\n    mkOptionType {\n      name = \"deferredModule\";\n      description = \"module\";\n      descriptionClass = \"noun\";\n      check = x: isAttrs x || isFunction x || path.check x;\n      merge = loc: defs: {\n        imports =\n          staticModules\n          ++ map (\n            def: lib.setDefaultModuleLocation \"${def.file}, via option ${showOption loc}\" def.value\n          ) defs;\n      };\n      inherit (submoduleWith { modules = staticModules; })\n        getSubOptions\n        getSubModules\n        ;\n      substSubModules =\n        m:\n        deferredModuleWith (\n          attrs\n          // {\n            staticModules = m;\n          }\n        );\n      functor = defaultFunctor \"deferredModuleWith\" // {\n        type = lib.types.deferredModuleWith;\n        payload = {\n          inherit staticModules;\n        };\n        binOp = lhs: rhs: {\n          staticModules = lhs.staticModules ++ rhs.staticModules;\n        };\n      };\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1333,"column":5},"lambda_expr":"deferredModuleWith =\n    attrs@{\n      staticModules ? [ ],\n    }:\n    mkOptionType {\n      name = \"deferredModule\";\n      description = \"module\";\n      descriptionClass = \"noun\";\n      check = x: isAttrs x || isFunction x || path.check x;\n      merge = loc: defs: {\n        imports =\n          staticModules\n          ++ map (\n            def: lib.setDefaultModuleLocation \"${def.file}, via option ${showOption loc}\" def.value\n          ) defs;\n      };\n      inherit (submoduleWith { modules = staticModules; })\n        getSubOptions\n        getSubModules\n        ;\n      substSubModules =\n        m:\n        deferredModuleWith (\n          attrs\n          // {\n            staticModules = m;\n          }\n        );\n      functor = defaultFunctor \"deferredModuleWith\" // {\n        type = lib.types.deferredModuleWith;\n        payload = {\n          inherit staticModules;\n        };\n        binOp = lhs: rhs: {\n          staticModules = lhs.staticModules ++ rhs.staticModules;\n        };\n      };\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1333,"column":5},"path":["lib","types","deferredModuleWith"],"pos_type":"Lambda"}},"content":{"content":"options declared via `config`.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1333,"column":5},"path":["lib","types","deferredModuleWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.either","path":["lib","types","either"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1675,"column":3},"attr_expr":"either =\n    t1: t2:\n    mkOptionType rec {\n      name = \"either\";\n      description =\n        if t1.descriptionClass or null == \"nonRestrictiveClause\" then\n          # Plain, but add comma\n          \"${t1.description}, or ${\n            optionDescriptionPhrase (class: class == \"noun\" || class == \"conjunction\") t2\n          }\"\n        else\n          \"${optionDescriptionPhrase (class: class == \"noun\" || class == \"conjunction\") t1} or ${\n            optionDescriptionPhrase (\n              class: class == \"noun\" || class == \"conjunction\" || class == \"composite\"\n            ) t2\n          }\";\n      descriptionClass = \"conjunction\";\n      check = {\n        __functor = _self: x: t1.check x || t2.check x;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }@args:\n          let\n            t1CheckedAndMerged =\n              if t1.merge ? v2 then\n                checkV2MergeCoherence loc t1 (t1.merge.v2 args)\n              else\n                {\n                  value = t1.merge loc defs;\n                  headError = checkDefsForError t1.check loc defs;\n                  valueMeta = { };\n                };\n            t2CheckedAndMerged =\n              if t2.merge ? v2 then\n                checkV2MergeCoherence loc t2 (t2.merge.v2 args)\n              else\n                {\n                  value = t2.merge loc defs;\n                  headError = checkDefsForError t2.check loc defs;\n                  valueMeta = { };\n                };\n\n            checkedAndMerged =\n              if t1CheckedAndMerged.headError == null then\n                t1CheckedAndMerged\n              else if t2CheckedAndMerged.headError == null then\n                t2CheckedAndMerged\n              else\n                rec {\n                  valueMeta = {\n                    inherit headError;\n                  };\n                  headError = {\n                    message = \"The option `${showOption loc}` is neither a value of type `${t1.description}` nor `${t2.description}`, Definition values: ${showDefs defs}\";\n                  };\n                  value = lib.warn ''\n                    One or more definitions did not pass the type-check of the 'either' type.\n                    ${headError.message}\n                    If `either`, `oneOf` or similar is used in freeformType, ensure that it is preceded by an 'attrsOf' such as: `freeformType = types.attrsOf (types.either t1 t2)`.\n                    Otherwise consider using the correct type for the option `${showOption loc}`.  This will be an error in Nixpkgs 26.05.\n                  '' (mergeOneOption loc defs);\n                };\n          in\n          checkedAndMerged;\n      };\n      typeMerge =\n        f':\n        let\n          mt1 = t1.typeMerge (head f'.payload.elemType).functor;\n          mt2 = t2.typeMerge (elemAt f'.payload.elemType 1).functor;\n        in\n        if (name == f'.name) && (mt1 != null) && (mt2 != null) then functor.type mt1 mt2 else null;\n      functor = elemTypeFunctor name {\n        elemType = [\n          t1\n          t2\n        ];\n      };\n      nestedTypes.left = t1;\n      nestedTypes.right = t2;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1676,"column":5},"lambda_expr":"either =\n    t1: t2:\n    mkOptionType rec {\n      name = \"either\";\n      description =\n        if t1.descriptionClass or null == \"nonRestrictiveClause\" then\n          # Plain, but add comma\n          \"${t1.description}, or ${\n            optionDescriptionPhrase (class: class == \"noun\" || class == \"conjunction\") t2\n          }\"\n        else\n          \"${optionDescriptionPhrase (class: class == \"noun\" || class == \"conjunction\") t1} or ${\n            optionDescriptionPhrase (\n              class: class == \"noun\" || class == \"conjunction\" || class == \"composite\"\n            ) t2\n          }\";\n      descriptionClass = \"conjunction\";\n      check = {\n        __functor = _self: x: t1.check x || t2.check x;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }@args:\n          let\n            t1CheckedAndMerged =\n              if t1.merge ? v2 then\n                checkV2MergeCoherence loc t1 (t1.merge.v2 args)\n              else\n                {\n                  value = t1.merge loc defs;\n                  headError = checkDefsForError t1.check loc defs;\n                  valueMeta = { };\n                };\n            t2CheckedAndMerged =\n              if t2.merge ? v2 then\n                checkV2MergeCoherence loc t2 (t2.merge.v2 args)\n              else\n                {\n                  value = t2.merge loc defs;\n                  headError = checkDefsForError t2.check loc defs;\n                  valueMeta = { };\n                };\n\n            checkedAndMerged =\n              if t1CheckedAndMerged.headError == null then\n                t1CheckedAndMerged\n              else if t2CheckedAndMerged.headError == null then\n                t2CheckedAndMerged\n              else\n                rec {\n                  valueMeta = {\n                    inherit headError;\n                  };\n                  headError = {\n                    message = \"The option `${showOption loc}` is neither a value of type `${t1.description}` nor `${t2.description}`, Definition values: ${showDefs defs}\";\n                  };\n                  value = lib.warn ''\n                    One or more definitions did not pass the type-check of the 'either' type.\n                    ${headError.message}\n                    If `either`, `oneOf` or similar is used in freeformType, ensure that it is preceded by an 'attrsOf' such as: `freeformType = types.attrsOf (types.either t1 t2)`.\n                    Otherwise consider using the correct type for the option `${showOption loc}`.  This will be an error in Nixpkgs 26.05.\n                  '' (mergeOneOption loc defs);\n                };\n          in\n          checkedAndMerged;\n      };\n      typeMerge =\n        f':\n        let\n          mt1 = t1.typeMerge (head f'.payload.elemType).functor;\n          mt2 = t2.typeMerge (elemAt f'.payload.elemType 1).functor;\n        in\n        if (name == f'.name) && (mt1 != null) && (mt2 != null) then functor.type mt1 mt2 else null;\n      functor = elemTypeFunctor name {\n        elemType = [\n          t1\n          t2\n        ];\n      };\n      nestedTypes.left = t1;\n      nestedTypes.right = t2;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1676,"column":5},"path":["lib","types","either"],"pos_type":"Lambda"}},"content":{"content":"Either value of type `t1` or `t2`.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1676,"column":5},"path":["lib","types","either"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.enum","path":["lib","types","enum"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1597,"column":3},"attr_expr":"enum =\n    values:\n    let\n      inherit (lib.lists) unique;\n      show =\n        v:\n        if builtins.isString v then\n          ''\"${v}\"''\n        else if builtins.isInt v then\n          toString v\n        else if builtins.isBool v then\n          boolToString v\n        else\n          \"<${builtins.typeOf v}>\";\n    in\n    mkOptionType rec {\n      name = \"enum\";\n      description =\n        # Length 0 or 1 enums may occur in a design pattern with type merging\n        # where an \"interface\" module declares an empty enum and other modules\n        # provide implementations, each extending the enum with their own\n        # identifier.\n        if values == [ ] then\n          \"impossible (empty enum)\"\n        else if builtins.length values == 1 then\n          \"value ${show (builtins.head values)} (singular enum)\"\n        else\n          \"one of ${concatMapStringsSep \", \" show values}\";\n      descriptionClass = if builtins.length values < 2 then \"noun\" else \"conjunction\";\n      check = flip elem values;\n      merge = mergeEqualOption;\n      functor = (defaultFunctor name) // {\n        payload = { inherit values; };\n        type = payload: lib.types.enum payload.values;\n        binOp = a: b: { values = unique (a.values ++ b.values); };\n      };\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1598,"column":5},"lambda_expr":"enum =\n    values:\n    let\n      inherit (lib.lists) unique;\n      show =\n        v:\n        if builtins.isString v then\n          ''\"${v}\"''\n        else if builtins.isInt v then\n          toString v\n        else if builtins.isBool v then\n          boolToString v\n        else\n          \"<${builtins.typeOf v}>\";\n    in\n    mkOptionType rec {\n      name = \"enum\";\n      description =\n        # Length 0 or 1 enums may occur in a design pattern with type merging\n        # where an \"interface\" module declares an empty enum and other modules\n        # provide implementations, each extending the enum with their own\n        # identifier.\n        if values == [ ] then\n          \"impossible (empty enum)\"\n        else if builtins.length values == 1 then\n          \"value ${show (builtins.head values)} (singular enum)\"\n        else\n          \"one of ${concatMapStringsSep \", \" show values}\";\n      descriptionClass = if builtins.length values < 2 then \"noun\" else \"conjunction\";\n      check = flip elem values;\n      merge = mergeEqualOption;\n      functor = (defaultFunctor name) // {\n        payload = { inherit values; };\n        type = payload: lib.types.enum payload.values;\n        binOp = a: b: { values = unique (a.values ++ b.values); };\n      };\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1598,"column":5},"path":["lib","types","enum"],"pos_type":"Lambda"}},"content":{"content":"A value from a set of allowed ones.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1598,"column":5},"path":["lib","types","enum"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.functionTo","path":["lib","types","functionTo"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1288,"column":3},"attr_expr":"functionTo =\n    elemType:\n    mkOptionType {\n      name = \"functionTo\";\n      description = \"function that evaluates to a(n) ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType\n      }\";\n      descriptionClass = \"composite\";\n      check = isFunction;\n      merge = loc: defs: {\n        # An argument attribute has a default when it has a default in all definitions\n        __functionArgs = zipAttrsWith (_: all (x: x)) (map (fn: functionArgs fn.value) defs);\n        __functor =\n          _: callerArgs:\n          (mergeDefinitions (loc ++ [ \"<function body>\" ]) elemType (\n            map (fn: {\n              inherit (fn) file;\n              value = fn.value callerArgs;\n            }) defs\n          )).mergedValue;\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"<function body>\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules = m: functionTo (elemType.substSubModules m);\n      functor = (elemTypeFunctor \"functionTo\" { inherit elemType; }) // {\n        type = payload: lib.types.functionTo payload.elemType;\n      };\n      nestedTypes.elemType = elemType;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1289,"column":5},"lambda_expr":"elemType:\n    mkOptionType {\n      name = \"functionTo\";\n      description = \"function that evaluates to a(n) ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType\n      }\";\n      descriptionClass = \"composite\";\n      check = isFunction;\n      merge = loc: defs: {\n        # An argument attribute has a default when it has a default in all definitions\n        __functionArgs = zipAttrsWith (_: all (x: x)) (map (fn: functionArgs fn.value) defs);\n        __functor =\n          _: callerArgs:\n          (mergeDefinitions (loc ++ [ \"<function body>\" ]) elemType (\n            map (fn: {\n              inherit (fn) file;\n              value = fn.value callerArgs;\n            }) defs\n          )).mergedValue;\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"<function body>\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules = m: functionTo (elemType.substSubModules m);\n      functor = (elemTypeFunctor \"functionTo\" { inherit elemType; }) // {\n        type = payload: lib.types.functionTo payload.elemType;\n      };\n      nestedTypes.elemType = elemType;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1289,"column":5},"path":["lib","types","functionTo"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1289,"column":5},"path":["lib","types","functionTo"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.isOptionType","path":["lib","types","isOptionType"],"aliases":[["lib","isOptionType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":221,"column":3},"attr_expr":"isOptionType = isType \"option-type\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":18},"lambda_expr":"x: (x._type or \"\") == type","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.types.isType","path":["lib","types","isType"],"aliases":[["lib","isType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":3},"attr_expr":"isType = type: x: (x._type or \"\") == type;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":12},"lambda_expr":"type: x: (x._type or \"\") == type","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":12},"path":["lib","types","isType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":12},"path":["lib","types","isType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.lazyAttrsOf","path":["lib","types","lazyAttrsOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":995,"column":3},"attr_expr":"lazyAttrsOf =\n    elemType:\n    attrsWith {\n      inherit elemType;\n      lazy = true;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":996,"column":5},"lambda_expr":"lazyAttrsOf =\n    elemType:\n    attrsWith {\n      inherit elemType;\n      lazy = true;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":996,"column":5},"path":["lib","types","lazyAttrsOf"],"pos_type":"Lambda"}},"content":{"content":"error that it's not defined. Use only if conditional definitions don't make sense.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":996,"column":5},"path":["lib","types","lazyAttrsOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.listOf","path":["lib","types","listOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":749,"column":3},"attr_expr":"listOf =\n    elemType:\n    mkOptionType rec {\n      name = \"listOf\";\n      description = \"list of ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType\n      }\";\n      descriptionClass = \"composite\";\n      check = {\n        __functor = _self: isList;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            evals = filter (x: x.optionalValue ? value) (\n              concatLists (\n                imap1 (\n                  n: def:\n                  imap1 (\n                    m: def':\n                    (mergeDefinitions (loc ++ [ \"[definition ${toString n}-entry ${toString m}]\" ]) elemType [\n                      {\n                        inherit (def) file;\n                        value = def';\n                      }\n                    ])\n                  ) def.value\n                ) defs\n              )\n            );\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = map (x: x.optionalValue.value or x.mergedValue) evals;\n            valueMeta.list = map (v: v.checkedAndMerged.valueMeta) evals;\n          };\n      };\n      emptyValue = {\n        value = [ ];\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"*\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules = m: listOf (elemType.substSubModules m);\n      functor = (elemTypeFunctor name { inherit elemType; }) // {\n        type = payload: lib.types.listOf payload.elemType;\n      };\n      nestedTypes.elemType = elemType;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":750,"column":5},"lambda_expr":"elemType:\n    mkOptionType rec {\n      name = \"listOf\";\n      description = \"list of ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"composite\") elemType\n      }\";\n      descriptionClass = \"composite\";\n      check = {\n        __functor = _self: isList;\n        isV2MergeCoherent = true;\n      };\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            evals = filter (x: x.optionalValue ? value) (\n              concatLists (\n                imap1 (\n                  n: def:\n                  imap1 (\n                    m: def':\n                    (mergeDefinitions (loc ++ [ \"[definition ${toString n}-entry ${toString m}]\" ]) elemType [\n                      {\n                        inherit (def) file;\n                        value = def';\n                      }\n                    ])\n                  ) def.value\n                ) defs\n              )\n            );\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = map (x: x.optionalValue.value or x.mergedValue) evals;\n            valueMeta.list = map (v: v.checkedAndMerged.valueMeta) evals;\n          };\n      };\n      emptyValue = {\n        value = [ ];\n      };\n      getSubOptions = prefix: elemType.getSubOptions (prefix ++ [ \"*\" ]);\n      getSubModules = elemType.getSubModules;\n      substSubModules = m: listOf (elemType.substSubModules m);\n      functor = (elemTypeFunctor name { inherit elemType; }) // {\n        type = payload: lib.types.listOf payload.elemType;\n      };\n      nestedTypes.elemType = elemType;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":750,"column":5},"path":["lib","types","listOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":750,"column":5},"path":["lib","types","listOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.loaOf","path":["lib","types","loaOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1103,"column":3},"attr_expr":"loaOf =\n    elemType:\n    lib.types.attrsOf elemType\n    // {\n      name = \"loaOf\";\n      deprecationMessage =\n        \"Mixing lists with attribute values is no longer\"\n        + \" possible; please use `types.attrsOf` instead. See\"\n        + \" https://github.com/NixOS/nixpkgs/issues/1800 for the motivation.\";\n      nestedTypes.elemType = elemType;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1104,"column":5},"lambda_expr":"loaOf =\n    elemType:\n    lib.types.attrsOf elemType\n    // {\n      name = \"loaOf\";\n      deprecationMessage =\n        \"Mixing lists with attribute values is no longer\"\n        + \" possible; please use `types.attrsOf` instead. See\"\n        + \" https://github.com/NixOS/nixpkgs/issues/1800 for the motivation.\";\n      nestedTypes.elemType = elemType;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1104,"column":5},"path":["lib","types","loaOf"],"pos_type":"Lambda"}},"content":{"content":"TODO: deprecate this in the future:","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1104,"column":5},"path":["lib","types","loaOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.mergeTypes","path":["lib","types","mergeTypes"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1920,"column":3},"attr_expr":"mergeTypes =\n    a: b:\n    assert isOptionType a && isOptionType b;\n    let\n      merged = a.typeMerge b.functor;\n    in\n    if merged == null then setType \"merge-error\" { error = \"Cannot merge types\"; } else merged;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1921,"column":5},"lambda_expr":"mergeTypes =\n    a: b:\n    assert isOptionType a && isOptionType b;\n    let\n      merged = a.typeMerge b.functor;\n    in\n    if merged == null then setType \"merge-error\" { error = \"Cannot merge types\"; } else merged;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1920,"column":3},"path":["lib","types","mergeTypes"],"pos_type":"Attribute"}},"content":{"content":"\nMerges two option types together.\n\n:::{.note}\nUses the type merge function of the first type, to merge it with the second type.\n\nUsually types can only be merged if they are of the same type\n:::\n\n# Inputs\n\n: `a` (option type): The first option type.\n: `b` (option type): The second option type.\n\n# Returns\n\n- The merged option type.\n- `{ _type = \"merge-error\"; error = \"Cannot merge types\"; }` if the types can't be merged.\n\n# Examples\n:::{.example}\n## `lib.types.mergeTypes` usage example\n```nix\nlet\n  enumAB = lib.types.enum [\"A\" \"B\"];\n  enumXY = lib.types.enum [\"X\" \"Y\"];\n  # This operation could be notated as: [ A ] | [ B ] -> [ A B ]\n  merged = lib.types.mergeTypes enumAB enumXY; # -> enum [ \"A\" \"B\" \"X\" \"Y\" ]\nin\n  assert merged.check \"A\"; # true\n  assert merged.check \"B\"; # true\n  assert merged.check \"X\"; # true\n  assert merged.check \"Y\"; # true\n  merged.check \"C\" # false\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1920,"column":3},"path":["lib","types","mergeTypes"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.types.mkOptionType","path":["lib","types","mkOptionType"],"aliases":[["lib","mkOptionType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":222,"column":3},"attr_expr":"mkOptionType =\n    {\n      # Human-readable representation of the type, should be equivalent to\n      # the type function name.\n      name,\n      # Description of the type, defined recursively by embedding the wrapped type if any.\n      description ? null,\n      # A hint for whether or not this description needs parentheses. Possible values:\n      #  - \"noun\": a noun phrase\n      #    Example description: \"positive integer\",\n      #  - \"conjunction\": a phrase with a potentially ambiguous \"or\" connective\n      #    Example description: \"int or string\"\n      #  - \"composite\": a phrase with an \"of\" connective\n      #    Example description: \"list of string\"\n      #  - \"nonRestrictiveClause\": a noun followed by a comma and a clause\n      #    Example description: \"positive integer, meaning >0\"\n      # See the `optionDescriptionPhrase` function.\n      descriptionClass ? null,\n      # DO NOT USE WITHOUT KNOWING WHAT YOU ARE DOING!\n      # Function applied to each definition that must return false when a definition\n      # does not match the type. It should not check more than the root of the value,\n      # because checking nested values reduces laziness, leading to unnecessary\n      # infinite recursions in the module system.\n      # Further checks of nested values should be performed by throwing in\n      # the merge function.\n      # Strict and deep type checking can be performed by calling lib.deepSeq on\n      # the merged value.\n      #\n      # See https://github.com/NixOS/nixpkgs/pull/6794 that introduced this change,\n      # https://github.com/NixOS/nixpkgs/pull/173568 and\n      # https://github.com/NixOS/nixpkgs/pull/168295 that attempted to revert this,\n      # https://github.com/NixOS/nixpkgs/issues/191124 and\n      # https://github.com/NixOS/nixos-search/issues/391 for what happens if you ignore\n      # this disclaimer.\n      check ? (x: true),\n      # Merge a list of definitions together into a single value.\n      # This function is called with two arguments: the location of\n      # the option in the configuration as a list of strings\n      # (e.g. [\"boot\" \"loader \"grub\" \"enable\"]), and a list of\n      # definition values and locations (e.g. [ { file = \"/foo.nix\";\n      # value = 1; } { file = \"/bar.nix\"; value = 2 } ]).\n      merge ? mergeDefaultOption,\n      # Whether this type has a value representing nothingness. If it does,\n      # this should be a value of the form { value = <the nothing value>; }\n      # If it doesn't, this should be {}\n      # This may be used when a value is required for `mkIf false`. This allows the extra laziness in e.g. `lazyAttrsOf`.\n      emptyValue ? { },\n      # Return a flat attrset of sub-options.  Used to generate\n      # documentation.\n      getSubOptions ? prefix: { },\n      # List of modules if any, or null if none.\n      getSubModules ? null,\n      # Function for building the same option type with a different list of\n      # modules.\n      substSubModules ? m: null,\n      # Function that merge type declarations.\n      # internal, takes a functor as argument and returns the merged type.\n      # returning null means the type is not mergeable\n      typeMerge ? defaultTypeMerge functor,\n      # The type functor.\n      # internal, representation of the type as an attribute set.\n      #   name: name of the type\n      #   type: type function.\n      #   wrapped: the type wrapped in case of compound types.\n      #   payload: values of the type, two payloads of the same type must be\n      #            combinable with the binOp binary operation.\n      #   binOp: binary operation that merge two payloads of the same type.\n      functor ? defaultFunctor name,\n      # The deprecation message to display when this type is used by an option\n      # If null, the type isn't deprecated\n      deprecationMessage ? null,\n      # The types that occur in the definition of this type. This is used to\n      # issue deprecation warnings recursively. Can also be used to reuse\n      # nested types\n      nestedTypes ? { },\n    }:\n    {\n      _type = \"option-type\";\n      inherit\n        name\n        check\n        merge\n        emptyValue\n        getSubOptions\n        getSubModules\n        substSubModules\n        typeMerge\n        deprecationMessage\n        nestedTypes\n        descriptionClass\n        ;\n      functor =\n        if functor ? wrappedDeprecationMessage then\n          functor\n          // {\n            wrapped = functor.wrappedDeprecationMessage {\n              loc = null;\n            };\n          }\n        else\n          functor;\n      description = if description == null then name else description;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":223,"column":5},"lambda_expr":"{\n      # Human-readable representation of the type, should be equivalent to\n      # the type function name.\n      name,\n      # Description of the type, defined recursively by embedding the wrapped type if any.\n      description ? null,\n      # A hint for whether or not this description needs parentheses. Possible values:\n      #  - \"noun\": a noun phrase\n      #    Example description: \"positive integer\",\n      #  - \"conjunction\": a phrase with a potentially ambiguous \"or\" connective\n      #    Example description: \"int or string\"\n      #  - \"composite\": a phrase with an \"of\" connective\n      #    Example description: \"list of string\"\n      #  - \"nonRestrictiveClause\": a noun followed by a comma and a clause\n      #    Example description: \"positive integer, meaning >0\"\n      # See the `optionDescriptionPhrase` function.\n      descriptionClass ? null,\n      # DO NOT USE WITHOUT KNOWING WHAT YOU ARE DOING!\n      # Function applied to each definition that must return false when a definition\n      # does not match the type. It should not check more than the root of the value,\n      # because checking nested values reduces laziness, leading to unnecessary\n      # infinite recursions in the module system.\n      # Further checks of nested values should be performed by throwing in\n      # the merge function.\n      # Strict and deep type checking can be performed by calling lib.deepSeq on\n      # the merged value.\n      #\n      # See https://github.com/NixOS/nixpkgs/pull/6794 that introduced this change,\n      # https://github.com/NixOS/nixpkgs/pull/173568 and\n      # https://github.com/NixOS/nixpkgs/pull/168295 that attempted to revert this,\n      # https://github.com/NixOS/nixpkgs/issues/191124 and\n      # https://github.com/NixOS/nixos-search/issues/391 for what happens if you ignore\n      # this disclaimer.\n      check ? (x: true),\n      # Merge a list of definitions together into a single value.\n      # This function is called with two arguments: the location of\n      # the option in the configuration as a list of strings\n      # (e.g. [\"boot\" \"loader \"grub\" \"enable\"]), and a list of\n      # definition values and locations (e.g. [ { file = \"/foo.nix\";\n      # value = 1; } { file = \"/bar.nix\"; value = 2 } ]).\n      merge ? mergeDefaultOption,\n      # Whether this type has a value representing nothingness. If it does,\n      # this should be a value of the form { value = <the nothing value>; }\n      # If it doesn't, this should be {}\n      # This may be used when a value is required for `mkIf false`. This allows the extra laziness in e.g. `lazyAttrsOf`.\n      emptyValue ? { },\n      # Return a flat attrset of sub-options.  Used to generate\n      # documentation.\n      getSubOptions ? prefix: { },\n      # List of modules if any, or null if none.\n      getSubModules ? null,\n      # Function for building the same option type with a different list of\n      # modules.\n      substSubModules ? m: null,\n      # Function that merge type declarations.\n      # internal, takes a functor as argument and returns the merged type.\n      # returning null means the type is not mergeable\n      typeMerge ? defaultTypeMerge functor,\n      # The type functor.\n      # internal, representation of the type as an attribute set.\n      #   name: name of the type\n      #   type: type function.\n      #   wrapped: the type wrapped in case of compound types.\n      #   payload: values of the type, two payloads of the same type must be\n      #            combinable with the binOp binary operation.\n      #   binOp: binary operation that merge two payloads of the same type.\n      functor ? defaultFunctor name,\n      # The deprecation message to display when this type is used by an option\n      # If null, the type isn't deprecated\n      deprecationMessage ? null,\n      # The types that occur in the definition of this type. This is used to\n      # issue deprecation warnings recursively. Can also be used to reuse\n      # nested types\n      nestedTypes ? { },\n    }:\n    {\n      _type = \"option-type\";\n      inherit\n        name\n        check\n        merge\n        emptyValue\n        getSubOptions\n        getSubModules\n        substSubModules\n        typeMerge\n        deprecationMessage\n        nestedTypes\n        descriptionClass\n        ;\n      functor =\n        if functor ? wrappedDeprecationMessage then\n          functor\n          // {\n            wrapped = functor.wrappedDeprecationMessage {\n              loc = null;\n            };\n          }\n        else\n          functor;\n      description = if description == null then name else description;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":223,"column":5},"path":["lib","types","mkOptionType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":223,"column":5},"path":["lib","types","mkOptionType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.nonEmptyListOf","path":["lib","types","nonEmptyListOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":803,"column":3},"attr_expr":"nonEmptyListOf =\n    elemType:\n    let\n      list = addCheck (lib.types.listOf elemType) (l: l != [ ]);\n    in\n    list\n    // {\n      description = \"non-empty ${optionDescriptionPhrase (class: class == \"noun\") list}\";\n      emptyValue = { }; # no .value attr, meaning unset\n      substSubModules = m: nonEmptyListOf (elemType.substSubModules m);\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":804,"column":5},"lambda_expr":"elemType:\n    let\n      list = addCheck (lib.types.listOf elemType) (l: l != [ ]);\n    in\n    list\n    // {\n      description = \"non-empty ${optionDescriptionPhrase (class: class == \"noun\") list}\";\n      emptyValue = { }; # no .value attr, meaning unset\n      substSubModules = m: nonEmptyListOf (elemType.substSubModules m);\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":804,"column":5},"path":["lib","types","nonEmptyListOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":804,"column":5},"path":["lib","types","nonEmptyListOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.nullOr","path":["lib","types","nullOr"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1256,"column":3},"attr_expr":"nullOr =\n    elemType:\n    mkOptionType rec {\n      name = \"nullOr\";\n      description = \"null or ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"conjunction\") elemType\n      }\";\n      descriptionClass = \"conjunction\";\n      check = x: x == null || elemType.check x;\n      merge =\n        loc: defs:\n        let\n          nulls = filter (def: def.value == null) defs;\n        in\n        if nulls == [ ] then\n          elemType.merge loc defs\n        else if length nulls == length defs then\n          null\n        else\n          throw \"The option `${showOption loc}` is defined both null and not null, in ${showFiles (getFiles defs)}.\";\n      emptyValue = {\n        value = null;\n      };\n      getSubOptions = elemType.getSubOptions;\n      getSubModules = elemType.getSubModules;\n      substSubModules = m: nullOr (elemType.substSubModules m);\n      functor = (elemTypeFunctor name { inherit elemType; }) // {\n        type = payload: lib.types.nullOr payload.elemType;\n      };\n      nestedTypes.elemType = elemType;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1257,"column":5},"lambda_expr":"nullOr =\n    elemType:\n    mkOptionType rec {\n      name = \"nullOr\";\n      description = \"null or ${\n        optionDescriptionPhrase (class: class == \"noun\" || class == \"conjunction\") elemType\n      }\";\n      descriptionClass = \"conjunction\";\n      check = x: x == null || elemType.check x;\n      merge =\n        loc: defs:\n        let\n          nulls = filter (def: def.value == null) defs;\n        in\n        if nulls == [ ] then\n          elemType.merge loc defs\n        else if length nulls == length defs then\n          null\n        else\n          throw \"The option `${showOption loc}` is defined both null and not null, in ${showFiles (getFiles defs)}.\";\n      emptyValue = {\n        value = null;\n      };\n      getSubOptions = elemType.getSubOptions;\n      getSubModules = elemType.getSubModules;\n      substSubModules = m: nullOr (elemType.substSubModules m);\n      functor = (elemTypeFunctor name { inherit elemType; }) // {\n        type = payload: lib.types.nullOr payload.elemType;\n      };\n      nestedTypes.elemType = elemType;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1257,"column":5},"path":["lib","types","nullOr"],"pos_type":"Lambda"}},"content":{"content":"Null or value of ...","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1257,"column":5},"path":["lib","types","nullOr"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.oneOf","path":["lib","types","oneOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1763,"column":3},"attr_expr":"oneOf =\n    ts:\n    let\n      head' =\n        if ts == [ ] then throw \"types.oneOf needs to get at least one type in its argument\" else head ts;\n    in\n    foldl' either head' (tail ts);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1764,"column":5},"lambda_expr":"oneOf =\n    ts:\n    let\n      head' =\n        if ts == [ ] then throw \"types.oneOf needs to get at least one type in its argument\" else head ts;\n    in\n    foldl' either head' (tail ts);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1764,"column":5},"path":["lib","types","oneOf"],"pos_type":"Lambda"}},"content":{"content":"Any of the types in the given list","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1764,"column":5},"path":["lib","types","oneOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.optionDescriptionPhrase","path":["lib","types","optionDescriptionPhrase"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":346,"column":3},"attr_expr":"optionDescriptionPhrase =\n    unparenthesize: t:\n    if unparenthesize (t.descriptionClass or null) then t.description else \"(${t.description})\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":347,"column":5},"lambda_expr":"optionDescriptionPhrase =\n    unparenthesize: t:\n    if unparenthesize (t.descriptionClass or null) then t.description else \"(${t.description})\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":347,"column":5},"path":["lib","types","optionDescriptionPhrase"],"pos_type":"Lambda"}},"content":{"content":"ambiguity.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":347,"column":5},"path":["lib","types","optionDescriptionPhrase"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.passwdEntry","path":["lib","types","passwdEntry"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":626,"column":3},"attr_expr":"passwdEntry =\n    entryType:\n    addCheck entryType (str: !(hasInfix \":\" str || hasInfix \"\\n\" str))\n    // {\n      name = \"passwdEntry ${entryType.name}\";\n      description = \"${\n        optionDescriptionPhrase (class: class == \"noun\") entryType\n      }, not containing newlines or colons\";\n      descriptionClass = \"nonRestrictiveClause\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":627,"column":5},"lambda_expr":"entryType:\n    addCheck entryType (str: !(hasInfix \":\" str || hasInfix \"\\n\" str))\n    // {\n      name = \"passwdEntry ${entryType.name}\";\n      description = \"${\n        optionDescriptionPhrase (class: class == \"noun\") entryType\n      }, not containing newlines or colons\";\n      descriptionClass = \"nonRestrictiveClause\";\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":627,"column":5},"path":["lib","types","passwdEntry"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":627,"column":5},"path":["lib","types","passwdEntry"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.pathWith","path":["lib","types","pathWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":702,"column":3},"attr_expr":"pathWith =\n    {\n      inStore ? null,\n      absolute ? null,\n    }:\n    throwIf (inStore != null && absolute != null && inStore && !absolute)\n      \"In pathWith, inStore means the path must be absolute\"\n      mkOptionType\n      {\n        name = \"path\";\n        description = (\n          (if absolute == null then \"\" else (if absolute then \"absolute \" else \"relative \"))\n          + \"path\"\n          + (\n            if inStore == null then \"\" else (if inStore then \" in the Nix store\" else \" not in the Nix store\")\n          )\n        );\n        descriptionClass = \"noun\";\n\n        merge = mergeEqualOption;\n        functor = defaultFunctor \"path\" // {\n          type = pathWith;\n          payload = { inherit inStore absolute; };\n          binOp = lhs: rhs: if lhs == rhs then lhs else null;\n        };\n\n        check =\n          x:\n          let\n            isInStore = hasStorePathPrefix (\n              if isPath x then\n                x\n              # Discarding string context is necessary to convert the value to\n              # a path and safe as the result is never used in any derivation.\n              else\n                /. + builtins.unsafeDiscardStringContext x\n            );\n            isAbsolute = substring 0 1 (toString x) == \"/\";\n            isExpectedType = (\n              if inStore == null || inStore then isStringLike x else isString x # Do not allow a true path, which could be copied to the store later on.\n            );\n          in\n          isExpectedType\n          && (inStore == null || inStore == isInStore)\n          && (absolute == null || absolute == isAbsolute);\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":703,"column":5},"lambda_expr":"{\n      inStore ? null,\n      absolute ? null,\n    }:\n    throwIf (inStore != null && absolute != null && inStore && !absolute)\n      \"In pathWith, inStore means the path must be absolute\"\n      mkOptionType\n      {\n        name = \"path\";\n        description = (\n          (if absolute == null then \"\" else (if absolute then \"absolute \" else \"relative \"))\n          + \"path\"\n          + (\n            if inStore == null then \"\" else (if inStore then \" in the Nix store\" else \" not in the Nix store\")\n          )\n        );\n        descriptionClass = \"noun\";\n\n        merge = mergeEqualOption;\n        functor = defaultFunctor \"path\" // {\n          type = pathWith;\n          payload = { inherit inStore absolute; };\n          binOp = lhs: rhs: if lhs == rhs then lhs else null;\n        };\n\n        check =\n          x:\n          let\n            isInStore = hasStorePathPrefix (\n              if isPath x then\n                x\n              # Discarding string context is necessary to convert the value to\n              # a path and safe as the result is never used in any derivation.\n              else\n                /. + builtins.unsafeDiscardStringContext x\n            );\n            isAbsolute = substring 0 1 (toString x) == \"/\";\n            isExpectedType = (\n              if inStore == null || inStore then isStringLike x else isString x # Do not allow a true path, which could be copied to the store later on.\n            );\n          in\n          isExpectedType\n          && (inStore == null || inStore == isInStore)\n          && (absolute == null || absolute == isAbsolute);\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":703,"column":5},"path":["lib","types","pathWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":703,"column":5},"path":["lib","types","pathWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.separatedString","path":["lib","types","separatedString"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":607,"column":3},"attr_expr":"separatedString =\n    sep:\n    mkOptionType rec {\n      name = \"separatedString\";\n      description = \"strings concatenated with ${builtins.toJSON sep}\";\n      descriptionClass = \"noun\";\n      check = isString;\n      merge = loc: defs: concatStringsSep sep (getValues defs);\n      functor = (defaultFunctor name) // {\n        payload = { inherit sep; };\n        type = payload: lib.types.separatedString payload.sep;\n        binOp = lhs: rhs: if lhs.sep == rhs.sep then { inherit (lhs) sep; } else null;\n      };\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":608,"column":5},"lambda_expr":"separatedString =\n    sep:\n    mkOptionType rec {\n      name = \"separatedString\";\n      description = \"strings concatenated with ${builtins.toJSON sep}\";\n      descriptionClass = \"noun\";\n      check = isString;\n      merge = loc: defs: concatStringsSep sep (getValues defs);\n      functor = (defaultFunctor name) // {\n        payload = { inherit sep; };\n        type = payload: lib.types.separatedString payload.sep;\n        binOp = lhs: rhs: if lhs.sep == rhs.sep then { inherit (lhs) sep; } else null;\n      };\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":608,"column":5},"path":["lib","types","separatedString"],"pos_type":"Lambda"}},"content":{"content":"separator between the values).","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":608,"column":5},"path":["lib","types","separatedString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.serializableValueWith","path":["lib","types","serializableValueWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1646,"column":3},"attr_expr":"serializableValueWith =\n    {\n      typeName,\n      nullable ? true,\n    }:\n    let\n      baseType = oneOf [\n        bool\n        int\n        float\n        str\n        path\n        (attrsOf valueType)\n        (listOf valueType)\n      ];\n      valueType = (if nullable then nullOr baseType else baseType) // {\n        description = \"${typeName} value\";\n      };\n    in\n    valueType;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1647,"column":5},"lambda_expr":"serializableValueWith =\n    {\n      typeName,\n      nullable ? true,\n    }:\n    let\n      baseType = oneOf [\n        bool\n        int\n        float\n        str\n        path\n        (attrsOf valueType)\n        (listOf valueType)\n      ];\n      valueType = (if nullable then nullOr baseType else baseType) // {\n        description = \"${typeName} value\";\n      };\n    in\n    valueType;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1646,"column":3},"path":["lib","types","serializableValueWith"],"pos_type":"Attribute"}},"content":{"content":"\nCreates a value type suitable for serialization formats.\n\nParameters:\n- typeName: String describing the format (e.g. \"JSON\", \"YAML\", \"XML\")\n- nullable: Whether the structured value type allows `null` values.\n\nReturns a type suitable for structured data formats that supports:\n- Basic types: boolean, integer, float, string, path\n- Complex types: attribute sets and lists\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1646,"column":3},"path":["lib","types","serializableValueWith"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.types.setType","path":["lib","types","setType"],"aliases":[["lib","setType"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":159,"column":3},"attr_expr":"setType =\n    typeName: value:\n    value\n    // {\n      _type = typeName;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":160,"column":5},"lambda_expr":"typeName: value:\n    value\n    // {\n      _type = typeName;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":160,"column":5},"path":["lib","types","setType"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":160,"column":5},"path":["lib","types","setType"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.strMatching","path":["lib","types","strMatching"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":590,"column":3},"attr_expr":"strMatching =\n    pattern:\n    mkOptionType {\n      name = \"strMatching ${escapeNixString pattern}\";\n      description = \"string matching the pattern ${pattern}\";\n      descriptionClass = \"noun\";\n      check = x: str.check x && builtins.match pattern x != null;\n      inherit (str) merge;\n      functor = defaultFunctor \"strMatching\" // {\n        type = payload: strMatching payload.pattern;\n        payload = { inherit pattern; };\n        binOp = lhs: rhs: if lhs == rhs then lhs else null;\n      };\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":591,"column":5},"lambda_expr":"pattern:\n    mkOptionType {\n      name = \"strMatching ${escapeNixString pattern}\";\n      description = \"string matching the pattern ${pattern}\";\n      descriptionClass = \"noun\";\n      check = x: str.check x && builtins.match pattern x != null;\n      inherit (str) merge;\n      functor = defaultFunctor \"strMatching\" // {\n        type = payload: strMatching payload.pattern;\n        payload = { inherit pattern; };\n        binOp = lhs: rhs: if lhs == rhs then lhs else null;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":591,"column":5},"path":["lib","types","strMatching"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":591,"column":5},"path":["lib","types","strMatching"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.submodule","path":["lib","types","submodule"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1319,"column":3},"attr_expr":"submodule =\n    modules:\n    submoduleWith {\n      shorthandOnlyDefinesConfig = true;\n      modules = toList modules;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1320,"column":5},"lambda_expr":"submodule =\n    modules:\n    submoduleWith {\n      shorthandOnlyDefinesConfig = true;\n      modules = toList modules;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1320,"column":5},"path":["lib","types","submodule"],"pos_type":"Lambda"}},"content":{"content":"A submodule (like typed attribute set). See NixOS manual.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1320,"column":5},"path":["lib","types","submodule"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.submoduleWith","path":["lib","types","submoduleWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1410,"column":3},"attr_expr":"submoduleWith =\n    {\n      modules,\n      specialArgs ? { },\n      shorthandOnlyDefinesConfig ? false,\n      description ? null,\n      class ? null,\n    }@attrs:\n    let\n      inherit (lib.modules) evalModules;\n\n      allModules =\n        defs:\n        map (\n          { value, file }:\n          if isAttrs value && shorthandOnlyDefinesConfig then\n            {\n              _file = file;\n              config = value;\n            }\n          else\n            {\n              _file = file;\n              imports = [ value ];\n            }\n        ) defs;\n\n      base = evalModules {\n        inherit class specialArgs;\n        modules = [\n          {\n            # This is a work-around for the fact that some sub-modules,\n            # such as the one included in an attribute set, expects an \"args\"\n            # attribute to be given to the sub-module. As the option\n            # evaluation does not have any specific attribute name yet, we\n            # provide a default for the documentation and the freeform type.\n            #\n            # This is necessary as some option declaration might use the\n            # \"name\" attribute given as argument of the submodule and use it\n            # as the default of option declarations.\n            #\n            # We use lookalike unicode single angle quotation marks because\n            # of the docbook transformation the options receive. In all uses\n            # &gt; and &lt; wouldn't be encoded correctly so the encoded values\n            # would be used, and use of `<` and `>` would break the XML document.\n            # It shouldn't cause an issue since this is cosmetic for the manual.\n            _module.args.name = lib.mkOptionDefault \"‹name›\";\n          }\n        ]\n        ++ modules;\n      };\n\n      freeformType = base._module.freeformType;\n\n      name = \"submodule\";\n\n      check = {\n        __functor = _self: x: isAttrs x || isFunction x || path.check x;\n        isV2MergeCoherent = true;\n      };\n    in\n    mkOptionType {\n      inherit name;\n      description =\n        if description != null then\n          description\n        else\n          let\n            docsEval = base.extendModules { modules = [ noCheckForDocsModule ]; };\n          in\n          if docsEval._module.freeformType ? description then\n            \"open ${name} of ${\n              optionDescriptionPhrase (\n                class: class == \"noun\" || class == \"composite\"\n              ) docsEval._module.freeformType\n            }\"\n          else\n            name;\n      inherit check;\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            configuration = base.extendModules {\n              modules = [ { _module.args.name = last loc; } ] ++ allModules defs;\n              prefix = loc;\n            };\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = configuration.config;\n            valueMeta = { inherit configuration; };\n          };\n      };\n      emptyValue = {\n        value = base.config;\n      };\n      getSubOptions =\n        prefix:\n        let\n          docsEval = (\n            base.extendModules {\n              inherit prefix;\n              modules = [ noCheckForDocsModule ];\n            }\n          );\n          # Intentionally shadow the freeformType from the possibly *checked*\n          # configuration. See `noCheckForDocsModule` comment.\n          inherit (docsEval._module) freeformType;\n        in\n        docsEval.options\n        // optionalAttrs (freeformType != null) {\n          # Expose the sub options of the freeform type. Note that the option\n          # discovery doesn't care about the attribute name used here, so this\n          # is just to avoid conflicts with potential options from the submodule\n          _freeformOptions = freeformType.getSubOptions prefix;\n        };\n      getSubModules = modules;\n      substSubModules =\n        m:\n        submoduleWith (\n          attrs\n          // {\n            modules = m;\n          }\n        );\n      nestedTypes = lib.optionalAttrs (freeformType != null) {\n        freeformType = freeformType;\n      };\n      functor = defaultFunctor name // {\n        type = lib.types.submoduleWith;\n        payload = {\n          inherit\n            modules\n            class\n            specialArgs\n            shorthandOnlyDefinesConfig\n            description\n            ;\n        };\n        binOp = lhs: rhs: {\n          class =\n            # `or null` was added for backwards compatibility only. `class` is\n            # always set in the current version of the module system.\n            if lhs.class or null == null then\n              rhs.class or null\n            else if rhs.class or null == null then\n              lhs.class or null\n            else if lhs.class or null == rhs.class then\n              lhs.class or null\n            else\n              throw \"A submoduleWith option is declared multiple times with conflicting class values \\\"${toString lhs.class}\\\" and \\\"${toString rhs.class}\\\".\";\n          modules = lhs.modules ++ rhs.modules;\n          specialArgs =\n            let\n              intersecting = builtins.intersectAttrs lhs.specialArgs rhs.specialArgs;\n            in\n            if intersecting == { } then\n              lhs.specialArgs // rhs.specialArgs\n            else\n              throw \"A submoduleWith option is declared multiple times with the same specialArgs \\\"${toString (attrNames intersecting)}\\\"\";\n          shorthandOnlyDefinesConfig =\n            if lhs.shorthandOnlyDefinesConfig == null then\n              rhs.shorthandOnlyDefinesConfig\n            else if rhs.shorthandOnlyDefinesConfig == null then\n              lhs.shorthandOnlyDefinesConfig\n            else if lhs.shorthandOnlyDefinesConfig == rhs.shorthandOnlyDefinesConfig then\n              lhs.shorthandOnlyDefinesConfig\n            else\n              throw \"A submoduleWith option is declared multiple times with conflicting shorthandOnlyDefinesConfig values\";\n          description =\n            if lhs.description == null then\n              rhs.description\n            else if rhs.description == null then\n              lhs.description\n            else if lhs.description == rhs.description then\n              lhs.description\n            else\n              throw \"A submoduleWith option is declared multiple times with conflicting descriptions\";\n        };\n      };\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1411,"column":5},"lambda_expr":"{\n      modules,\n      specialArgs ? { },\n      shorthandOnlyDefinesConfig ? false,\n      description ? null,\n      class ? null,\n    }@attrs:\n    let\n      inherit (lib.modules) evalModules;\n\n      allModules =\n        defs:\n        map (\n          { value, file }:\n          if isAttrs value && shorthandOnlyDefinesConfig then\n            {\n              _file = file;\n              config = value;\n            }\n          else\n            {\n              _file = file;\n              imports = [ value ];\n            }\n        ) defs;\n\n      base = evalModules {\n        inherit class specialArgs;\n        modules = [\n          {\n            # This is a work-around for the fact that some sub-modules,\n            # such as the one included in an attribute set, expects an \"args\"\n            # attribute to be given to the sub-module. As the option\n            # evaluation does not have any specific attribute name yet, we\n            # provide a default for the documentation and the freeform type.\n            #\n            # This is necessary as some option declaration might use the\n            # \"name\" attribute given as argument of the submodule and use it\n            # as the default of option declarations.\n            #\n            # We use lookalike unicode single angle quotation marks because\n            # of the docbook transformation the options receive. In all uses\n            # &gt; and &lt; wouldn't be encoded correctly so the encoded values\n            # would be used, and use of `<` and `>` would break the XML document.\n            # It shouldn't cause an issue since this is cosmetic for the manual.\n            _module.args.name = lib.mkOptionDefault \"‹name›\";\n          }\n        ]\n        ++ modules;\n      };\n\n      freeformType = base._module.freeformType;\n\n      name = \"submodule\";\n\n      check = {\n        __functor = _self: x: isAttrs x || isFunction x || path.check x;\n        isV2MergeCoherent = true;\n      };\n    in\n    mkOptionType {\n      inherit name;\n      description =\n        if description != null then\n          description\n        else\n          let\n            docsEval = base.extendModules { modules = [ noCheckForDocsModule ]; };\n          in\n          if docsEval._module.freeformType ? description then\n            \"open ${name} of ${\n              optionDescriptionPhrase (\n                class: class == \"noun\" || class == \"composite\"\n              ) docsEval._module.freeformType\n            }\"\n          else\n            name;\n      inherit check;\n      merge = {\n        __functor =\n          self: loc: defs:\n          (self.v2 { inherit loc defs; }).value;\n        v2 =\n          { loc, defs }:\n          let\n            configuration = base.extendModules {\n              modules = [ { _module.args.name = last loc; } ] ++ allModules defs;\n              prefix = loc;\n            };\n          in\n          {\n            headError = checkDefsForError check loc defs;\n            value = configuration.config;\n            valueMeta = { inherit configuration; };\n          };\n      };\n      emptyValue = {\n        value = base.config;\n      };\n      getSubOptions =\n        prefix:\n        let\n          docsEval = (\n            base.extendModules {\n              inherit prefix;\n              modules = [ noCheckForDocsModule ];\n            }\n          );\n          # Intentionally shadow the freeformType from the possibly *checked*\n          # configuration. See `noCheckForDocsModule` comment.\n          inherit (docsEval._module) freeformType;\n        in\n        docsEval.options\n        // optionalAttrs (freeformType != null) {\n          # Expose the sub options of the freeform type. Note that the option\n          # discovery doesn't care about the attribute name used here, so this\n          # is just to avoid conflicts with potential options from the submodule\n          _freeformOptions = freeformType.getSubOptions prefix;\n        };\n      getSubModules = modules;\n      substSubModules =\n        m:\n        submoduleWith (\n          attrs\n          // {\n            modules = m;\n          }\n        );\n      nestedTypes = lib.optionalAttrs (freeformType != null) {\n        freeformType = freeformType;\n      };\n      functor = defaultFunctor name // {\n        type = lib.types.submoduleWith;\n        payload = {\n          inherit\n            modules\n            class\n            specialArgs\n            shorthandOnlyDefinesConfig\n            description\n            ;\n        };\n        binOp = lhs: rhs: {\n          class =\n            # `or null` was added for backwards compatibility only. `class` is\n            # always set in the current version of the module system.\n            if lhs.class or null == null then\n              rhs.class or null\n            else if rhs.class or null == null then\n              lhs.class or null\n            else if lhs.class or null == rhs.class then\n              lhs.class or null\n            else\n              throw \"A submoduleWith option is declared multiple times with conflicting class values \\\"${toString lhs.class}\\\" and \\\"${toString rhs.class}\\\".\";\n          modules = lhs.modules ++ rhs.modules;\n          specialArgs =\n            let\n              intersecting = builtins.intersectAttrs lhs.specialArgs rhs.specialArgs;\n            in\n            if intersecting == { } then\n              lhs.specialArgs // rhs.specialArgs\n            else\n              throw \"A submoduleWith option is declared multiple times with the same specialArgs \\\"${toString (attrNames intersecting)}\\\"\";\n          shorthandOnlyDefinesConfig =\n            if lhs.shorthandOnlyDefinesConfig == null then\n              rhs.shorthandOnlyDefinesConfig\n            else if rhs.shorthandOnlyDefinesConfig == null then\n              lhs.shorthandOnlyDefinesConfig\n            else if lhs.shorthandOnlyDefinesConfig == rhs.shorthandOnlyDefinesConfig then\n              lhs.shorthandOnlyDefinesConfig\n            else\n              throw \"A submoduleWith option is declared multiple times with conflicting shorthandOnlyDefinesConfig values\";\n          description =\n            if lhs.description == null then\n              rhs.description\n            else if rhs.description == null then\n              lhs.description\n            else if lhs.description == rhs.description then\n              lhs.description\n            else\n              throw \"A submoduleWith option is declared multiple times with conflicting descriptions\";\n        };\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1411,"column":5},"path":["lib","types","submoduleWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1411,"column":5},"path":["lib","types","submoduleWith"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.uniq","path":["lib","types","uniq"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1233,"column":3},"attr_expr":"uniq = unique { message = \"\"; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1237,"column":5},"lambda_expr":"type:\n    mkOptionType rec {\n      name = \"unique\";\n      inherit (type) description descriptionClass check;\n      merge = mergeUniqueOption {\n        inherit message;\n        inherit (type) merge;\n      };\n      emptyValue = type.emptyValue;\n      getSubOptions = type.getSubOptions;\n      getSubModules = type.getSubModules;\n      substSubModules = m: uniq (type.substSubModules m);\n      functor = elemTypeFunctor name { elemType = type; } // {\n        type = payload: lib.types.unique { inherit message; } payload.elemType;\n      };\n      nestedTypes.elemType = type;\n    }","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.types.unique","path":["lib","types","unique"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1235,"column":3},"attr_expr":"unique =\n    { message }:\n    type:\n    mkOptionType rec {\n      name = \"unique\";\n      inherit (type) description descriptionClass check;\n      merge = mergeUniqueOption {\n        inherit message;\n        inherit (type) merge;\n      };\n      emptyValue = type.emptyValue;\n      getSubOptions = type.getSubOptions;\n      getSubModules = type.getSubModules;\n      substSubModules = m: uniq (type.substSubModules m);\n      functor = elemTypeFunctor name { elemType = type; } // {\n        type = payload: lib.types.unique { inherit message; } payload.elemType;\n      };\n      nestedTypes.elemType = type;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1236,"column":5},"lambda_expr":"{ message }:\n    type:\n    mkOptionType rec {\n      name = \"unique\";\n      inherit (type) description descriptionClass check;\n      merge = mergeUniqueOption {\n        inherit message;\n        inherit (type) merge;\n      };\n      emptyValue = type.emptyValue;\n      getSubOptions = type.getSubOptions;\n      getSubModules = type.getSubModules;\n      substSubModules = m: uniq (type.substSubModules m);\n      functor = elemTypeFunctor name { elemType = type; } // {\n        type = payload: lib.types.unique { inherit message; } payload.elemType;\n      };\n      nestedTypes.elemType = type;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1236,"column":5},"path":["lib","types","unique"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":1236,"column":5},"path":["lib","types","unique"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.versions.compareVersions","path":["lib","versions","compareVersions"],"aliases":[["builtins","compareVersions"],["lib","compareVersions"],["lib","strings","compareVersions"]],"signature":null,"is_primop":true,"primop_meta":{"name":"compareVersions","args":["s1","s2"],"experimental":false,"arity":2},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":6,"column":22},"attr_expr":"compareVersions","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":null,"path":["lib","versions","compareVersions"],"pos_type":"Lambda"}},"content":{"content":"\nCompare two strings representing versions and return `-1` if\nversion *s1* is older than version *s2*, `0` if they are the same,\nand `1` if *s1* is newer than *s2*. The version comparison\nalgorithm is the same as the one used by [`nix-env\n-u`](../command-ref/nix-env.md#operation---upgrade).\n","source":{"position":null,"path":["lib","versions","compareVersions"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.versions.major","path":["lib","versions","major"],"aliases":[],"signature":"major :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":56,"column":3},"attr_expr":"major = v: builtins.elemAt (splitVersion v) 0;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":56,"column":11},"lambda_expr":"major = v: builtins.elemAt (splitVersion v) 0;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":56,"column":3},"path":["lib","versions","major"],"pos_type":"Attribute"}},"content":{"content":"\nGet the major version string from a string.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmajor :: String -> String\n```\n\n# Examples\n:::{.example}\n## `major` usage example\n\n```nix\nmajor \"1.2.3\"\n=> \"1\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":56,"column":3},"path":["lib","versions","major"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.versions.majorMinor","path":["lib","versions","majorMinor"],"aliases":[],"signature":"majorMinor :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":141,"column":3},"attr_expr":"majorMinor = v: builtins.concatStringsSep \".\" (lib.take 2 (splitVersion v));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":141,"column":16},"lambda_expr":"majorMinor = v: builtins.concatStringsSep \".\" (lib.take 2 (splitVersion v));","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":141,"column":3},"path":["lib","versions","majorMinor"],"pos_type":"Attribute"}},"content":{"content":"\nGet string of the first two parts (major and minor)\nof a version string.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nmajorMinor :: String -> String\n```\n\n# Examples\n:::{.example}\n## `majorMinor` usage example\n\n```nix\nmajorMinor \"1.2.3\"\n=> \"1.2\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":141,"column":3},"path":["lib","versions","majorMinor"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.versions.minor","path":["lib","versions","minor"],"aliases":[],"signature":"minor :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":84,"column":3},"attr_expr":"minor = v: builtins.elemAt (splitVersion v) 1;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":84,"column":11},"lambda_expr":"minor = v: builtins.elemAt (splitVersion v) 1;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":84,"column":3},"path":["lib","versions","minor"],"pos_type":"Attribute"}},"content":{"content":"\nGet the minor version string from a string.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\nminor :: String -> String\n```\n\n# Examples\n:::{.example}\n## `minor` usage example\n\n```nix\nminor \"1.2.3\"\n=> \"2\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":84,"column":3},"path":["lib","versions","minor"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.versions.pad","path":["lib","versions","pad"],"aliases":[],"signature":"pad :: Int -> String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":177,"column":3},"attr_expr":"pad =\n    n: version:\n    let\n      numericVersion = lib.head (lib.splitString \"-\" version);\n      versionSuffix = lib.removePrefix numericVersion version;\n    in\n    lib.concatStringsSep \".\" (lib.take n (lib.splitVersion numericVersion ++ lib.genList (_: \"0\") n))\n    + versionSuffix;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":178,"column":5},"lambda_expr":"pad =\n    n: version:\n    let\n      numericVersion = lib.head (lib.splitString \"-\" version);\n      versionSuffix = lib.removePrefix numericVersion version;\n    in\n    lib.concatStringsSep \".\" (lib.take n (lib.splitVersion numericVersion ++ lib.genList (_: \"0\") n))\n    + versionSuffix;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":177,"column":3},"path":["lib","versions","pad"],"pos_type":"Attribute"}},"content":{"content":"\nPad a version string with zeros to match the given number of components.\n\n# Inputs\n\n`n`\n\n: 1\\. Function argument\n\n`version`\n\n: 2\\. Function argument\n\n# Type\n\n```\npad :: Int -> String -> String\n```\n\n# Examples\n:::{.example}\n## `pad` usage example\n\n```nix\npad 3 \"1.2\"\n=> \"1.2.0\"\npad 3 \"1.3-rc1\"\n=> \"1.3.0-rc1\"\npad 3 \"1.2.3.4\"\n=> \"1.2.3\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":177,"column":3},"path":["lib","versions","pad"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.versions.patch","path":["lib","versions","patch"],"aliases":[],"signature":"patch :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":112,"column":3},"attr_expr":"patch = v: builtins.elemAt (splitVersion v) 2;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":112,"column":11},"lambda_expr":"patch = v: builtins.elemAt (splitVersion v) 2;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":112,"column":3},"path":["lib","versions","patch"],"pos_type":"Attribute"}},"content":{"content":"\nGet the patch version string from a string.\n\n# Inputs\n\n`v`\n\n: 1\\. Function argument\n\n# Type\n\n```\npatch :: String -> String\n```\n\n# Examples\n:::{.example}\n## `patch` usage example\n\n```nix\npatch \"1.2.3\"\n=> \"3\"\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":112,"column":3},"path":["lib","versions","patch"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.versions.splitVersion","path":["lib","versions","splitVersion"],"aliases":[["builtins","splitVersion"],["lib","splitVersion"]],"signature":"splitVersion :: String -> [String]\n","is_primop":true,"primop_meta":{"name":"splitVersion","args":["s"],"experimental":false,"arity":1},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":28,"column":3},"attr_expr":"splitVersion = builtins.splitVersion;","lambda_position":null,"lambda_expr":null,"count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":28,"column":3},"path":["lib","versions","splitVersion"],"pos_type":"Attribute"}},"content":{"content":"\nBreak a version string into its component parts.\n\n# Type\n\n```\nsplitVersion :: String -> [String]\n```\n\n# Examples\n:::{.example}\n## `splitVersion` usage example\n\n```nix\nsplitVersion \"1.2.3\"\n=> [\"1\" \"2\" \"3\"]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/versions.nix","line":28,"column":3},"path":["lib","versions","splitVersion"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.gvariant.type.arrayOf","path":["lib","gvariant","type","arrayOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":32,"column":5},"attr_expr":"arrayOf = t: \"a${t}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":32,"column":15},"lambda_expr":"t: \"a${t}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":32,"column":15},"path":["lib","gvariant","type","arrayOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":32,"column":15},"path":["lib","gvariant","type","arrayOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.gvariant.type.dictionaryEntryOf","path":["lib","gvariant","type","dictionaryEntryOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":35,"column":5},"attr_expr":"dictionaryEntryOf = nameType: valueType: \"{${nameType}${valueType}}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":35,"column":25},"lambda_expr":"nameType: valueType: \"{${nameType}${valueType}}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":35,"column":25},"path":["lib","gvariant","type","dictionaryEntryOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":35,"column":25},"path":["lib","gvariant","type","dictionaryEntryOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.gvariant.type.maybeOf","path":["lib","gvariant","type","maybeOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":33,"column":5},"attr_expr":"maybeOf = t: \"m${t}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":33,"column":15},"lambda_expr":"t: \"m${t}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":33,"column":15},"path":["lib","gvariant","type","maybeOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":33,"column":15},"path":["lib","gvariant","type","maybeOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.gvariant.type.tupleOf","path":["lib","gvariant","type","tupleOf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":34,"column":5},"attr_expr":"tupleOf = ts: \"(${concatStrings ts})\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":34,"column":15},"lambda_expr":"ts: \"(${concatStrings ts})\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":34,"column":15},"path":["lib","gvariant","type","tupleOf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/gvariant.nix","line":34,"column":15},"path":["lib","gvariant","type","tupleOf"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.mergeAttrBy.buildInputs","path":["lib","misc","mergeAttrBy","buildInputs"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.cfg","path":["lib","misc","mergeAttrBy","cfg"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.configureFlags","path":["lib","misc","mergeAttrBy","configureFlags"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.flags","path":["lib","misc","mergeAttrBy","flags"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","meta"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.meta","path":["lib","misc","mergeAttrBy","meta"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","passthru"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.nativeBuildInputs","path":["lib","misc","mergeAttrBy","nativeBuildInputs"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.passthru","path":["lib","misc","mergeAttrBy","passthru"],"aliases":[["lib","mergeAttrs"],["lib","mergeAttrBy","cfg"],["lib","mergeAttrBy","flags"],["lib","mergeAttrBy","meta"],["lib","mergeAttrBy","passthru"],["lib","trivial","mergeAttrs"],["lib","misc","mergeAttrBy","cfg"],["lib","misc","mergeAttrBy","flags"],["lib","misc","mergeAttrBy","meta"]],"signature":"mergeAttrs :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":16},"lambda_expr":"mergeAttrs = x: y: x // y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}},"content":{"content":"\nMerge two attribute sets shallowly, right side trumps left\n\n# Inputs\n\n`x`\n\n: Left attribute set\n\n`y`\n\n: Right attribute set (higher precedence for equal keys)\n\n# Type\n\n```\nmergeAttrs :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.mergeAttrs` usage example\n\n```nix\nmergeAttrs { a = 1; b = 2; } { b = 3; c = 4; }\n=> { a = 1; b = 3; c = 4; }\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":340,"column":3},"path":["lib","trivial","mergeAttrs"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.patches","path":["lib","misc","mergeAttrBy","patches"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.postAll","path":["lib","misc","mergeAttrBy","postAll"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","prePhases"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.postInstall","path":["lib","misc","mergeAttrBy","postInstall"],"aliases":[["lib","mergeAttrBy","postInstall"],["lib","mergeAttrBy","preConfigure"],["lib","misc","mergeAttrBy","preConfigure"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"lambda_expr":"a: b: \"${a}\\n${b}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","misc","mergeAttrBy","postInstall"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","misc","mergeAttrBy","postInstall"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.mergeAttrBy.preConfigure","path":["lib","misc","mergeAttrBy","preConfigure"],"aliases":[["lib","mergeAttrBy","postInstall"],["lib","mergeAttrBy","preConfigure"],["lib","misc","mergeAttrBy","postInstall"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"lambda_expr":"a: b: \"${a}\\n${b}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","misc","mergeAttrBy","preConfigure"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/deprecated/misc.nix","line":398,"column":32},"path":["lib","misc","mergeAttrBy","preConfigure"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.misc.mergeAttrBy.prePhases","path":["lib","misc","mergeAttrBy","prePhases"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","propagatedBuildInputs"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.misc.mergeAttrBy.propagatedBuildInputs","path":["lib","misc","mergeAttrBy","propagatedBuildInputs"],"aliases":[["lib","concat"],["lib","mergeAttrBy","buildInputs"],["lib","mergeAttrBy","configureFlags"],["lib","mergeAttrBy","nativeBuildInputs"],["lib","mergeAttrBy","patches"],["lib","mergeAttrBy","postAll"],["lib","mergeAttrBy","prePhases"],["lib","mergeAttrBy","propagatedBuildInputs"],["lib","trivial","concat"],["lib","misc","mergeAttrBy","buildInputs"],["lib","misc","mergeAttrBy","configureFlags"],["lib","misc","mergeAttrBy","nativeBuildInputs"],["lib","misc","mergeAttrBy","patches"],["lib","misc","mergeAttrBy","postAll"],["lib","misc","mergeAttrBy","prePhases"]],"signature":"concat :: [a] -> [a] -> [a]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":982,"column":47},"attr_expr":"value","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":12},"lambda_expr":"concat = x: y: x ++ y;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}},"content":{"content":"\nConcatenate two lists\n\n# Inputs\n\n`x`\n\n: 1\\. Function argument\n\n`y`\n\n: 2\\. Function argument\n\n# Type\n\n```\nconcat :: [a] -> [a] -> [a]\n```\n\n# Examples\n:::{.example}\n## `lib.trivial.concat` usage example\n\n```nix\nconcat [ 1 2 ] [ 3 4 ]\n=> [ 1 2 3 4 ]\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":191,"column":3},"path":["lib","trivial","concat"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.network.ipv6.fromString","path":["lib","network","ipv6","fromString"],"aliases":[],"signature":"fromString :: String -> IPv6Address\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":43,"column":5},"attr_expr":"fromString =\n      addr:\n      let\n        splittedAddr = _ipv6.split addr;\n\n        addrInternal = splittedAddr.address;\n        prefixLength = splittedAddr.prefixLength;\n\n        address = _ipv6.toStringFromExpandedIp addrInternal;\n      in\n      {\n        inherit address prefixLength;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":44,"column":7},"lambda_expr":"fromString =\n      addr:\n      let\n        splittedAddr = _ipv6.split addr;\n\n        addrInternal = splittedAddr.address;\n        prefixLength = splittedAddr.prefixLength;\n\n        address = _ipv6.toStringFromExpandedIp addrInternal;\n      in\n      {\n        inherit address prefixLength;\n      };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":43,"column":5},"path":["lib","network","ipv6","fromString"],"pos_type":"Attribute"}},"content":{"content":"\nCreates an `IPv6Address` object from an IPv6 address as a string. If\nthe prefix length is omitted, it defaults to 64. The parser is limited\nto the first two versions of IPv6 addresses addressed in RFC 4291.\nThe form \"x:x:x:x:x:x:d.d.d.d\" is not yet implemented. Addresses are\nNOT compressed, so they are not always the same as the canonical text\nrepresentation of IPv6 addresses defined in RFC 5952.\n\n# Type\n\n```\nfromString :: String -> IPv6Address\n```\n\n# Examples\n\n```nix\nfromString \"2001:DB8::ffff/32\"\n=> {\n  address = \"2001:db8:0:0:0:0:0:ffff\";\n  prefixLength = 32;\n}\n```\n\n# Arguments\n\n- [addr] An IPv6 address with optional prefix length.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":43,"column":5},"path":["lib","network","ipv6","fromString"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.network.ipv6.mkEUI64Suffix","path":["lib","network","ipv6","mkEUI64Suffix"],"aliases":[["lib","mkEUI64Suffix"]],"signature":"mkEUI64Suffix :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":78,"column":5},"attr_expr":"mkEUI64Suffix =\n      mac:\n      pipe mac [\n        # match mac address\n        (match \"^([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})$\")\n\n        # check if there are matches\n        (\n          matches:\n          if matches == null then\n            throw ''\"${mac}\" is not a valid MAC address (expected 6 octets of hex digits)''\n          else\n            matches\n        )\n\n        # transform to result hextets\n        (octets: [\n          # combine 1st and 2nd octets into first hextet, flip U/L bit, 512 = 0x200\n          (toHexString (bitXor 512 (fromHexString ((elemAt octets 0) + (elemAt octets 1)))))\n\n          # combine 3rd and 4th octets, combine them, insert fffe pattern in between to get next two hextets\n          \"${elemAt octets 2}ff\"\n          \"fe${elemAt octets 3}\"\n\n          # combine 5th and 6th octets into the last hextet\n          ((elemAt octets 4) + (elemAt octets 5))\n        ])\n\n        # concat to result suffix\n        (concatStringsSep \":\")\n\n        toLower\n      ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":79,"column":7},"lambda_expr":"mkEUI64Suffix =\n      mac:\n      pipe mac [\n        # match mac address\n        (match \"^([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})[-:.]?([0-9A-Fa-f]{2})$\")\n\n        # check if there are matches\n        (\n          matches:\n          if matches == null then\n            throw ''\"${mac}\" is not a valid MAC address (expected 6 octets of hex digits)''\n          else\n            matches\n        )\n\n        # transform to result hextets\n        (octets: [\n          # combine 1st and 2nd octets into first hextet, flip U/L bit, 512 = 0x200\n          (toHexString (bitXor 512 (fromHexString ((elemAt octets 0) + (elemAt octets 1)))))\n\n          # combine 3rd and 4th octets, combine them, insert fffe pattern in between to get next two hextets\n          \"${elemAt octets 2}ff\"\n          \"fe${elemAt octets 3}\"\n\n          # combine 5th and 6th octets into the last hextet\n          ((elemAt octets 4) + (elemAt octets 5))\n        ])\n\n        # concat to result suffix\n        (concatStringsSep \":\")\n\n        toLower\n      ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":78,"column":5},"path":["lib","network","ipv6","mkEUI64Suffix"],"pos_type":"Attribute"}},"content":{"content":"\nConverts a 48-bit MAC address into a EUI-64 IPv6 address suffix.\n\n# Example\n\n```nix\nmkEUI64Suffix \"66:75:63:6B:20:75\"\n=> \"6475:63ff:fe6b:2075\"\n```\n\n# Type\n\n```\nmkEUI64Suffix :: String -> String\n```\n\n# Inputs\n\nmac\n: The MAC address (may contain these delimiters: `:`, `-` or `.` but it's not necessary)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/network/default.nix","line":78,"column":5},"path":["lib","network","ipv6","mkEUI64Suffix"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.subpath.components","path":["lib","path","subpath","components"],"aliases":[],"signature":"subpath.components :: String -> [String]\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":702,"column":3},"attr_expr":"subpath.components =\n    # The subpath string to split into components\n    subpath:\n    assert assertMsg (isValid subpath) ''\n      lib.path.subpath.components: Argument is not a valid subpath string:\n          ${subpathInvalidReason subpath}'';\n    splitRelPath subpath;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":704,"column":5},"lambda_expr":"subpath.components =\n    # The subpath string to split into components\n    subpath:\n    assert assertMsg (isValid subpath) ''\n      lib.path.subpath.components: Argument is not a valid subpath string:\n          ${subpathInvalidReason subpath}'';\n    splitRelPath subpath;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":702,"column":3},"path":["lib","path","subpath","components"],"pos_type":"Attribute"}},"content":{"content":"\nSplit [a subpath](#function-library-lib.path.subpath.isValid) into its path component strings.\nThrow an error if the subpath isn't valid.\nNote that the returned path components are also [valid subpath strings](#function-library-lib.path.subpath.isValid), though they are intentionally not [normalised](#function-library-lib.path.subpath.normalise).\n\nLaws:\n\n- Splitting a subpath into components and [joining](#function-library-lib.path.subpath.join) the components gives the same subpath but [normalised](#function-library-lib.path.subpath.normalise):\n\n      subpath.join (subpath.components s) == subpath.normalise s\n\n# Inputs\n\n`subpath`\n\n: The subpath string to split into components\n\n# Type\n\n```\nsubpath.components :: String -> [String]\n```\n\n# Examples\n:::{.example}\n## `subpath.components` usage example\n\n```nix\nsubpath.components \".\"\n=> [ ]\n\nsubpath.components \"./foo//bar/./baz/\"\n=> [ \"foo\" \"bar\" \"baz\" ]\n\nsubpath.components \"/foo\"\n=> <error>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":702,"column":3},"path":["lib","path","subpath","components"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.subpath.isValid","path":["lib","path","subpath","isValid"],"aliases":[],"signature":"subpath.isValid :: String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":565,"column":3},"attr_expr":"subpath.isValid =\n    # The value to check\n    value: subpathInvalidReason value == null;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":567,"column":5},"lambda_expr":"subpath.isValid =\n    # The value to check\n    value: subpathInvalidReason value == null;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":565,"column":3},"path":["lib","path","subpath","isValid"],"pos_type":"Attribute"}},"content":{"content":"\nWhether a value is a valid subpath string.\n\nA subpath string points to a specific file or directory within an absolute base directory.\nIt is a stricter form of a relative path that excludes `..` components, since those could escape the base directory.\n\n- The value is a string.\n\n- The string is not empty.\n\n- The string doesn't start with a `/`.\n\n- The string doesn't contain any `..` path components.\n\n# Inputs\n\n`value`\n\n: The value to check\n\n# Type\n\n```\nsubpath.isValid :: String -> Bool\n```\n\n# Examples\n:::{.example}\n## `subpath.isValid` usage example\n\n```nix\n# Not a string\nsubpath.isValid null\n=> false\n\n# Empty string\nsubpath.isValid \"\"\n=> false\n\n# Absolute path\nsubpath.isValid \"/foo\"\n=> false\n\n# Contains a `..` path component\nsubpath.isValid \"../foo\"\n=> false\n\n# Valid subpath\nsubpath.isValid \"foo/bar\"\n=> true\n\n# Doesn't need to be normalised\nsubpath.isValid \"./foo//bar/\"\n=> true\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":565,"column":3},"path":["lib","path","subpath","isValid"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.subpath.join","path":["lib","path","subpath","join"],"aliases":[],"signature":"subpath.join :: [String] -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":642,"column":3},"attr_expr":"subpath.join =\n    # The list of subpaths to join together\n    subpaths:\n    # Fast in case all paths are valid\n    if all isValid subpaths then\n      joinRelPath (concatMap splitRelPath subpaths)\n    else\n      # Otherwise we take our time to gather more info for a better error message\n      # Strictly go through each path, throwing on the first invalid one\n      # Tracks the list index in the fold accumulator\n      foldl' (\n        i: path:\n        if isValid path then\n          i + 1\n        else\n          throw ''\n            lib.path.subpath.join: Element at index ${toString i} is not a valid subpath string:\n                ${subpathInvalidReason path}''\n      ) 0 subpaths;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":644,"column":5},"lambda_expr":"subpath.join =\n    # The list of subpaths to join together\n    subpaths:\n    # Fast in case all paths are valid\n    if all isValid subpaths then\n      joinRelPath (concatMap splitRelPath subpaths)\n    else\n      # Otherwise we take our time to gather more info for a better error message\n      # Strictly go through each path, throwing on the first invalid one\n      # Tracks the list index in the fold accumulator\n      foldl' (\n        i: path:\n        if isValid path then\n          i + 1\n        else\n          throw ''\n            lib.path.subpath.join: Element at index ${toString i} is not a valid subpath string:\n                ${subpathInvalidReason path}''\n      ) 0 subpaths;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":642,"column":3},"path":["lib","path","subpath","join"],"pos_type":"Attribute"}},"content":{"content":"\nJoin subpath strings together using `/`, returning a normalised subpath string.\n\nLike `concatStringsSep \"/\"` but safer, specifically:\n\n- All elements must be [valid subpath strings](#function-library-lib.path.subpath.isValid).\n\n- The result gets [normalised](#function-library-lib.path.subpath.normalise).\n\n- The edge case of an empty list gets properly handled by returning the neutral subpath `\"./.\"`.\n\nLaws:\n\n- Associativity:\n\n      subpath.join [ x (subpath.join [ y z ]) ] == subpath.join [ (subpath.join [ x y ]) z ]\n\n- Identity - `\"./.\"` is the neutral element for normalised paths:\n\n      subpath.join [ ] == \"./.\"\n      subpath.join [ (subpath.normalise p) \"./.\" ] == subpath.normalise p\n      subpath.join [ \"./.\" (subpath.normalise p) ] == subpath.normalise p\n\n- Normalisation - the result is [normalised](#function-library-lib.path.subpath.normalise):\n\n      subpath.join ps == subpath.normalise (subpath.join ps)\n\n- For non-empty lists, the implementation is equivalent to [normalising](#function-library-lib.path.subpath.normalise) the result of `concatStringsSep \"/\"`.\n  Note that the above laws can be derived from this one:\n\n      ps != [] -> subpath.join ps == subpath.normalise (concatStringsSep \"/\" ps)\n\n# Inputs\n\n`subpaths`\n\n: The list of subpaths to join together\n\n# Type\n\n```\nsubpath.join :: [String] -> String\n```\n\n# Examples\n:::{.example}\n## `subpath.join` usage example\n\n```nix\nsubpath.join [ \"foo\" \"bar/baz\" ]\n=> \"./foo/bar/baz\"\n\n# normalise the result\nsubpath.join [ \"./foo\" \".\" \"bar//./baz/\" ]\n=> \"./foo/bar/baz\"\n\n# passing an empty list results in the current directory\nsubpath.join [ ]\n=> \"./.\"\n\n# elements must be valid subpath strings\nsubpath.join [ /foo ]\n=> <error>\nsubpath.join [ \"\" ]\n=> <error>\nsubpath.join [ \"/foo\" ]\n=> <error>\nsubpath.join [ \"../foo\" ]\n=> <error>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":642,"column":3},"path":["lib","path","subpath","join"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.path.subpath.normalise","path":["lib","path","subpath","normalise"],"aliases":[],"signature":"subpath.normalise :: String -> String\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":799,"column":3},"attr_expr":"subpath.normalise =\n    # The subpath string to normalise\n    subpath:\n    assert assertMsg (isValid subpath) ''\n      lib.path.subpath.normalise: Argument is not a valid subpath string:\n          ${subpathInvalidReason subpath}'';\n    joinRelPath (splitRelPath subpath);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":801,"column":5},"lambda_expr":"subpath.normalise =\n    # The subpath string to normalise\n    subpath:\n    assert assertMsg (isValid subpath) ''\n      lib.path.subpath.normalise: Argument is not a valid subpath string:\n          ${subpathInvalidReason subpath}'';\n    joinRelPath (splitRelPath subpath);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":799,"column":3},"path":["lib","path","subpath","normalise"],"pos_type":"Attribute"}},"content":{"content":"\nNormalise a subpath. Throw an error if the subpath isn't [valid](#function-library-lib.path.subpath.isValid).\n\n- Limit repeating `/` to a single one.\n\n- Remove redundant `.` components.\n\n- Remove trailing `/` and `/.`.\n\n- Add leading `./`.\n\nLaws:\n\n- Idempotency - normalising multiple times gives the same result:\n\n      subpath.normalise (subpath.normalise p) == subpath.normalise p\n\n- Uniqueness - there's only a single normalisation for the paths that lead to the same file system node:\n\n      subpath.normalise p != subpath.normalise q -> $(realpath ${p}) != $(realpath ${q})\n\n- Don't change the result when [appended](#function-library-lib.path.append) to a Nix path value:\n\n      append base p == append base (subpath.normalise p)\n\n- Don't change the path according to `realpath`:\n\n      $(realpath ${p}) == $(realpath ${subpath.normalise p})\n\n- Only error on [invalid subpaths](#function-library-lib.path.subpath.isValid):\n\n      builtins.tryEval (subpath.normalise p)).success == subpath.isValid p\n\n# Inputs\n\n`subpath`\n\n: The subpath string to normalise\n\n# Type\n\n```\nsubpath.normalise :: String -> String\n```\n\n# Examples\n:::{.example}\n## `subpath.normalise` usage example\n\n```nix\n# limit repeating `/` to a single one\nsubpath.normalise \"foo//bar\"\n=> \"./foo/bar\"\n\n# remove redundant `.` components\nsubpath.normalise \"foo/./bar\"\n=> \"./foo/bar\"\n\n# add leading `./`\nsubpath.normalise \"foo/bar\"\n=> \"./foo/bar\"\n\n# remove trailing `/`\nsubpath.normalise \"foo/bar/\"\n=> \"./foo/bar\"\n\n# remove trailing `/.`\nsubpath.normalise \"foo/bar/.\"\n=> \"./foo/bar\"\n\n# Return the current directory as `./.`\nsubpath.normalise \".\"\n=> \"./.\"\n\n# error on `..` path components\nsubpath.normalise \"foo/../bar\"\n=> <error>\n\n# error on empty string\nsubpath.normalise \"\"\n=> <error>\n\n# error on absolute path\nsubpath.normalise \"/foo\"\n=> <error>\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/path/default.nix","line":799,"column":3},"path":["lib","path","subpath","normalise"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.systems.architectures.canExecute","path":["lib","systems","architectures","canExecute"],"aliases":[],"signature":"canExecute :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":617,"column":3},"attr_expr":"canExecute = arch1: arch2: arch1 == arch2 || hasInferior arch1 arch2;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":617,"column":16},"lambda_expr":"canExecute = arch1: arch2: arch1 == arch2 || hasInferior arch1 arch2;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":617,"column":3},"path":["lib","systems","architectures","canExecute"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether one GCC architecture can execute the other.\n\n# Inputs\n\n`arch1`\n: GCC architecture in string\n\n`arch2`\n: GCC architecture in string\n\n# Type\n\n```\ncanExecute :: String -> String -> Bool\n```\n\n# Examples\n::: {.example}\n## `lib.systems.architectures.canExecute` usage example\n\n```nix\ncanExecute \"x86-64\" \"x86-64-v3\"\n=> false\ncanExecute \"x86-64-v3\" \"x86-64\"\n=> true\ncanExecute \"x86-64\" \"x86-64\"\n=> true\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":617,"column":3},"path":["lib","systems","architectures","canExecute"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.systems.architectures.hasInferior","path":["lib","systems","architectures","hasInferior"],"aliases":[],"signature":"hasInferior :: String -> String -> Bool\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":585,"column":3},"attr_expr":"hasInferior = arch1: arch2: inferiors ? ${arch1} && lib.elem arch2 inferiors.${arch1};","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":585,"column":17},"lambda_expr":"hasInferior = arch1: arch2: inferiors ? ${arch1} && lib.elem arch2 inferiors.${arch1};","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":585,"column":3},"path":["lib","systems","architectures","hasInferior"],"pos_type":"Attribute"}},"content":{"content":"\nCheck whether one GCC architecture has the the other inferior architecture.\n\n# Inputs\n\n`arch1`\n: GCC architecture in string\n\n`arch2`\n: GCC architecture in string\n\n# Type\n\n```\nhasInferior :: String -> String -> Bool\n```\n\n# Examples\n::: {.example}\n## `lib.systems.architectures.hasInferior` usage example\n\n```nix\nhasInferior \"x86-64-v3\" \"x86-64\"\n=> true\nhasInferior \"x86-64\" \"x86-64-v3\"\n=> false\nhasInferior \"x86-64\" \"x86-64\"\n=> false\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":585,"column":3},"path":["lib","systems","architectures","hasInferior"],"pos_type":"Attribute"}}},{"meta":{"title":"lib.systems.inspect.matchAnyAttrs","path":["lib","systems","inspect","matchAnyAttrs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":492,"column":3},"attr_expr":"matchAnyAttrs =\n    patterns:\n    if isList patterns then\n      attrs: any (pattern: matchAttrs pattern attrs) patterns\n    else\n      matchAttrs patterns;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":493,"column":5},"lambda_expr":"patterns:\n    if isList patterns then\n      attrs: any (pattern: matchAttrs pattern attrs) patterns\n    else\n      matchAttrs patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":493,"column":5},"path":["lib","systems","inspect","matchAnyAttrs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":493,"column":5},"path":["lib","systems","inspect","matchAnyAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.patternLogicalAnd","path":["lib","systems","inspect","patternLogicalAnd"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":466,"column":3},"attr_expr":"patternLogicalAnd =\n    pat1_: pat2_:\n    let\n      # patterns can be either a list or a (bare) singleton; turn\n      # them into singletons for uniform handling\n      pat1 = toList pat1_;\n      pat2 = toList pat2_;\n    in\n    concatMap (\n      attr1:\n      map (\n        attr2:\n        recursiveUpdateUntil (\n          path: subattr1: subattr2:\n          if (builtins.intersectAttrs subattr1 subattr2) == { } || subattr1 == subattr2 then\n            true\n          else\n            throw ''\n              pattern conflict at path ${toString path}:\n                ${toJSON subattr1}\n                ${toJSON subattr2}\n            ''\n        ) attr1 attr2\n      ) pat2\n    ) pat1;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":467,"column":5},"lambda_expr":"patternLogicalAnd =\n    pat1_: pat2_:\n    let\n      # patterns can be either a list or a (bare) singleton; turn\n      # them into singletons for uniform handling\n      pat1 = toList pat1_;\n      pat2 = toList pat2_;\n    in\n    concatMap (\n      attr1:\n      map (\n        attr2:\n        recursiveUpdateUntil (\n          path: subattr1: subattr2:\n          if (builtins.intersectAttrs subattr1 subattr2) == { } || subattr1 == subattr2 then\n            true\n          else\n            throw ''\n              pattern conflict at path ${toString path}:\n                ${toJSON subattr1}\n                ${toJSON subattr2}\n            ''\n        ) attr1 attr2\n      ) pat2\n    ) pat1;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":467,"column":5},"path":["lib","systems","inspect","patternLogicalAnd"],"pos_type":"Lambda"}},"content":{"content":"Since a pattern is a list-of-disjuncts, this needs to","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":467,"column":5},"path":["lib","systems","inspect","patternLogicalAnd"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.darwinArch","path":["lib","systems","parse","darwinArch"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":950,"column":3},"attr_expr":"darwinArch = cpu: if cpu.name == \"aarch64\" then \"arm64\" else cpu.name;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":950,"column":16},"lambda_expr":"cpu: if cpu.name == \"aarch64\" then \"arm64\" else cpu.name","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":950,"column":16},"path":["lib","systems","parse","darwinArch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":950,"column":16},"path":["lib","systems","parse","darwinArch"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.doubleFromSystem","path":["lib","systems","parse","doubleFromSystem"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":952,"column":3},"attr_expr":"doubleFromSystem =\n    {\n      cpu,\n      kernel,\n      abi,\n      ...\n    }:\n    if kernel.families ? darwin then \"${cpu.name}-darwin\" else \"${cpu.name}-${kernelName kernel}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":953,"column":5},"lambda_expr":"{\n      cpu,\n      kernel,\n      abi,\n      ...\n    }:\n    if kernel.families ? darwin then \"${cpu.name}-darwin\" else \"${cpu.name}-${kernelName kernel}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":953,"column":5},"path":["lib","systems","parse","doubleFromSystem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":953,"column":5},"path":["lib","systems","parse","doubleFromSystem"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.gnuNetBSDDefaultExecFormat","path":["lib","systems","parse","gnuNetBSDDefaultExecFormat"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":418,"column":3},"attr_expr":"gnuNetBSDDefaultExecFormat =\n    cpu:\n    if\n      cpu.bits == 32\n      && (cpu.family == \"arm\" || cpu.family == \"sparc\" || cpu.family == \"m68k\" || cpu.family == \"x86\")\n    then\n      execFormats.aout\n    else\n      execFormats.elf;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":419,"column":5},"lambda_expr":"gnuNetBSDDefaultExecFormat =\n    cpu:\n    if\n      cpu.bits == 32\n      && (cpu.family == \"arm\" || cpu.family == \"sparc\" || cpu.family == \"m68k\" || cpu.family == \"x86\")\n    then\n      execFormats.aout\n    else\n      execFormats.elf;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":419,"column":5},"path":["lib","systems","parse","gnuNetBSDDefaultExecFormat"],"pos_type":"Lambda"}},"content":{"content":"GNU build systems assume that older NetBSD architectures are using a.out.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":419,"column":5},"path":["lib","systems","parse","gnuNetBSDDefaultExecFormat"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.isCompatible","path":["lib","systems","parse","isCompatible"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":444,"column":3},"attr_expr":"isCompatible =\n    with cpuTypes;\n    a: b:\n    b == a\n    || any id [\n      # x86\n      (b == i386 && isCompatible a i486)\n      (b == i486 && isCompatible a i586)\n      (b == i586 && isCompatible a i686)\n\n      # XXX: Not true in some cases. Like in WSL mode.\n      (b == i686 && isCompatible a x86_64)\n\n      # ARMv4\n      (b == arm && isCompatible a armv5tel)\n\n      # ARMv5\n      (b == armv5tel && isCompatible a armv6l)\n\n      # ARMv6\n      (b == armv6m && isCompatible a armv6l)\n      (b == armv6l && isCompatible a armv7l)\n\n      # ARMv7\n      (b == armv7l && isCompatible a armv7a)\n      (b == armv7l && isCompatible a armv7r)\n      (b == armv7m && isCompatible a armv7a)\n      (b == armv7m && isCompatible a armv7r)\n\n      # ARMv8\n      (b == armv8a && isCompatible a aarch64)\n\n      # PowerPC\n      (b == powerpc && isCompatible a powerpc64)\n      (b == powerpcle && isCompatible a powerpc64le)\n\n      # MIPS\n      (b == mips && isCompatible a mips64)\n      (b == mipsel && isCompatible a mips64el)\n\n      # SPARC\n      (b == sparc && isCompatible a sparc64)\n    ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":446,"column":5},"lambda_expr":"a: b:\n    b == a\n    || any id [\n      # x86\n      (b == i386 && isCompatible a i486)\n      (b == i486 && isCompatible a i586)\n      (b == i586 && isCompatible a i686)\n\n      # XXX: Not true in some cases. Like in WSL mode.\n      (b == i686 && isCompatible a x86_64)\n\n      # ARMv4\n      (b == arm && isCompatible a armv5tel)\n\n      # ARMv5\n      (b == armv5tel && isCompatible a armv6l)\n\n      # ARMv6\n      (b == armv6m && isCompatible a armv6l)\n      (b == armv6l && isCompatible a armv7l)\n\n      # ARMv7\n      (b == armv7l && isCompatible a armv7a)\n      (b == armv7l && isCompatible a armv7r)\n      (b == armv7m && isCompatible a armv7a)\n      (b == armv7m && isCompatible a armv7r)\n\n      # ARMv8\n      (b == armv8a && isCompatible a aarch64)\n\n      # PowerPC\n      (b == powerpc && isCompatible a powerpc64)\n      (b == powerpcle && isCompatible a powerpc64le)\n\n      # MIPS\n      (b == mips && isCompatible a mips64)\n      (b == mipsel && isCompatible a mips64el)\n\n      # SPARC\n      (b == sparc && isCompatible a sparc64)\n    ]","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":446,"column":5},"path":["lib","systems","parse","isCompatible"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":446,"column":5},"path":["lib","systems","parse","isCompatible"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.isSystem","path":["lib","systems","parse","isSystem"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":780,"column":3},"attr_expr":"isSystem = isType \"system\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":157,"column":18},"lambda_expr":"x: (x._type or \"\") == type","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.parse.kernelName","path":["lib","systems","parse","kernelName"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":948,"column":3},"attr_expr":"kernelName = kernel: kernel.name + toString (kernel.version or \"\");","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":948,"column":16},"lambda_expr":"kernel: kernel.name + toString (kernel.version or \"\")","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":948,"column":16},"path":["lib","systems","parse","kernelName"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":948,"column":16},"path":["lib","systems","parse","kernelName"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.mkMuslSystem","path":["lib","systems","parse","mkMuslSystem"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":981,"column":3},"attr_expr":"mkMuslSystem =\n    parsed:\n    # The following line guarantees that the output of this function\n    # is a well-formed platform with no missing fields.\n    (\n      x:\n      lib.trivial.pipe x [\n        (x: removeAttrs x [ \"_type\" ])\n        mkSystem\n      ]\n    )\n      (\n        parsed\n        // {\n          abi =\n            {\n              gnu = abis.musl;\n              gnueabi = abis.musleabi;\n              gnueabihf = abis.musleabihf;\n              gnuabin32 = abis.muslabin32;\n              gnuabi64 = abis.muslabi64;\n              gnuabielfv2 = abis.musl;\n              gnuabielfv1 = abis.musl;\n              # The following entries ensure that this function is idempotent.\n              musleabi = abis.musleabi;\n              musleabihf = abis.musleabihf;\n              muslabin32 = abis.muslabin32;\n              muslabi64 = abis.muslabi64;\n            }\n            .${parsed.abi.name} or abis.musl;\n        }\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":982,"column":5},"lambda_expr":"mkMuslSystem =\n    parsed:\n    # The following line guarantees that the output of this function\n    # is a well-formed platform with no missing fields.\n    (\n      x:\n      lib.trivial.pipe x [\n        (x: removeAttrs x [ \"_type\" ])\n        mkSystem\n      ]\n    )\n      (\n        parsed\n        // {\n          abi =\n            {\n              gnu = abis.musl;\n              gnueabi = abis.musleabi;\n              gnueabihf = abis.musleabihf;\n              gnuabin32 = abis.muslabin32;\n              gnuabi64 = abis.muslabi64;\n              gnuabielfv2 = abis.musl;\n              gnuabielfv1 = abis.musl;\n              # The following entries ensure that this function is idempotent.\n              musleabi = abis.musleabi;\n              musleabihf = abis.musleabihf;\n              muslabin32 = abis.muslabin32;\n              muslabi64 = abis.muslabi64;\n            }\n            .${parsed.abi.name} or abis.musl;\n        }\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":982,"column":5},"path":["lib","systems","parse","mkMuslSystem"],"pos_type":"Lambda"}},"content":{"content":"to parsed platforms.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":982,"column":5},"path":["lib","systems","parse","mkMuslSystem"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.mkSkeletonFromList","path":["lib","systems","parse","mkSkeletonFromList"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":787,"column":3},"attr_expr":"mkSkeletonFromList =\n    l:\n    {\n      \"1\" =\n        if head l == \"avr\" then\n          {\n            cpu = head l;\n            kernel = \"none\";\n            abi = \"unknown\";\n          }\n        else\n          throw \"system string '${lib.concatStringsSep \"-\" l}' with 1 component is ambiguous\";\n      \"2\" = # We only do 2-part hacks for things Nix already supports\n        if elemAt l 1 == \"cygwin\" then\n          mkSkeletonFromList [\n            (head l)\n            \"pc\"\n            \"cygwin\"\n          ]\n        # MSVC ought to be the default ABI so this case isn't needed. But then it\n        # becomes difficult to handle the gnu* variants for Aarch32 correctly for\n        # minGW. So it's easier to make gnu* the default for the MinGW, but\n        # hack-in MSVC for the non-MinGW case right here.\n        else if elemAt l 1 == \"windows\" then\n          {\n            cpu = head l;\n            kernel = \"windows\";\n            abi = \"msvc\";\n          }\n        else if (elemAt l 1) == \"elf\" then\n          {\n            cpu = head l;\n            vendor = \"unknown\";\n            kernel = \"none\";\n            abi = elemAt l 1;\n          }\n        else\n          {\n            cpu = head l;\n            kernel = elemAt l 1;\n          };\n      \"3\" =\n        # cpu-kernel-environment\n        if\n          elemAt l 1 == \"linux\"\n          || elem (elemAt l 2) [\n            \"eabi\"\n            \"eabihf\"\n            \"elf\"\n            \"gnu\"\n          ]\n        then\n          {\n            cpu = head l;\n            kernel = elemAt l 1;\n            abi = elemAt l 2;\n            vendor = \"unknown\";\n          }\n        # cpu-vendor-os\n        else if\n          elemAt l 1 == \"apple\"\n          || elem (elemAt l 2) [\n            \"redox\"\n            \"mmixware\"\n            \"ghcjs\"\n            \"mingw32\"\n            \"uefi\"\n          ]\n          || hasPrefix \"freebsd\" (elemAt l 2)\n          || hasPrefix \"netbsd\" (elemAt l 2)\n          || hasPrefix \"openbsd\" (elemAt l 2)\n          || hasPrefix \"genode\" (elemAt l 2)\n          || hasPrefix \"wasm32\" (elemAt l 0)\n        then\n          {\n            cpu = head l;\n            vendor = elemAt l 1;\n            kernel =\n              if elemAt l 2 == \"mingw32\" then\n                \"windows\" # autotools breaks on -gnu for window\n              else\n                elemAt l 2;\n          }\n        # lots of tools expect a triplet for Cygwin, even though the vendor is just \"pc\"\n        else if elemAt l 2 == \"cygwin\" then\n          {\n            cpu = head l;\n            vendor = elemAt l 1;\n            kernel = \"cygwin\";\n          }\n        else\n          throw \"system string '${lib.concatStringsSep \"-\" l}' with 3 components is ambiguous\";\n      \"4\" = {\n        cpu = head l;\n        vendor = elemAt l 1;\n        kernel = elemAt l 2;\n        abi = elemAt l 3;\n      };\n    }\n    .${toString (length l)}\n    or (throw \"system string '${lib.concatStringsSep \"-\" l}' has invalid number of hyphen-separated components\");","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":788,"column":5},"lambda_expr":"l:\n    {\n      \"1\" =\n        if head l == \"avr\" then\n          {\n            cpu = head l;\n            kernel = \"none\";\n            abi = \"unknown\";\n          }\n        else\n          throw \"system string '${lib.concatStringsSep \"-\" l}' with 1 component is ambiguous\";\n      \"2\" = # We only do 2-part hacks for things Nix already supports\n        if elemAt l 1 == \"cygwin\" then\n          mkSkeletonFromList [\n            (head l)\n            \"pc\"\n            \"cygwin\"\n          ]\n        # MSVC ought to be the default ABI so this case isn't needed. But then it\n        # becomes difficult to handle the gnu* variants for Aarch32 correctly for\n        # minGW. So it's easier to make gnu* the default for the MinGW, but\n        # hack-in MSVC for the non-MinGW case right here.\n        else if elemAt l 1 == \"windows\" then\n          {\n            cpu = head l;\n            kernel = \"windows\";\n            abi = \"msvc\";\n          }\n        else if (elemAt l 1) == \"elf\" then\n          {\n            cpu = head l;\n            vendor = \"unknown\";\n            kernel = \"none\";\n            abi = elemAt l 1;\n          }\n        else\n          {\n            cpu = head l;\n            kernel = elemAt l 1;\n          };\n      \"3\" =\n        # cpu-kernel-environment\n        if\n          elemAt l 1 == \"linux\"\n          || elem (elemAt l 2) [\n            \"eabi\"\n            \"eabihf\"\n            \"elf\"\n            \"gnu\"\n          ]\n        then\n          {\n            cpu = head l;\n            kernel = elemAt l 1;\n            abi = elemAt l 2;\n            vendor = \"unknown\";\n          }\n        # cpu-vendor-os\n        else if\n          elemAt l 1 == \"apple\"\n          || elem (elemAt l 2) [\n            \"redox\"\n            \"mmixware\"\n            \"ghcjs\"\n            \"mingw32\"\n            \"uefi\"\n          ]\n          || hasPrefix \"freebsd\" (elemAt l 2)\n          || hasPrefix \"netbsd\" (elemAt l 2)\n          || hasPrefix \"openbsd\" (elemAt l 2)\n          || hasPrefix \"genode\" (elemAt l 2)\n          || hasPrefix \"wasm32\" (elemAt l 0)\n        then\n          {\n            cpu = head l;\n            vendor = elemAt l 1;\n            kernel =\n              if elemAt l 2 == \"mingw32\" then\n                \"windows\" # autotools breaks on -gnu for window\n              else\n                elemAt l 2;\n          }\n        # lots of tools expect a triplet for Cygwin, even though the vendor is just \"pc\"\n        else if elemAt l 2 == \"cygwin\" then\n          {\n            cpu = head l;\n            vendor = elemAt l 1;\n            kernel = \"cygwin\";\n          }\n        else\n          throw \"system string '${lib.concatStringsSep \"-\" l}' with 3 components is ambiguous\";\n      \"4\" = {\n        cpu = head l;\n        vendor = elemAt l 1;\n        kernel = elemAt l 2;\n        abi = elemAt l 3;\n      };\n    }\n    .${toString (length l)}\n    or (throw \"system string '${lib.concatStringsSep \"-\" l}' has invalid number of hyphen-separated components\")","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":788,"column":5},"path":["lib","systems","parse","mkSkeletonFromList"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":788,"column":5},"path":["lib","systems","parse","mkSkeletonFromList"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.mkSystem","path":["lib","systems","parse","mkSystem"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":782,"column":3},"attr_expr":"mkSystem =\n    components:\n    assert types.parsedPlatform.check components;\n    setType \"system\" components;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":783,"column":5},"lambda_expr":"components:\n    assert types.parsedPlatform.check components;\n    setType \"system\" components","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":783,"column":5},"path":["lib","systems","parse","mkSystem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":783,"column":5},"path":["lib","systems","parse","mkSystem"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.mkSystemFromSkeleton","path":["lib","systems","parse","mkSystemFromSkeleton"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":890,"column":3},"attr_expr":"mkSystemFromSkeleton =\n    {\n      cpu,\n      # Optional, but fallback too complex for here.\n      # Inferred below instead.\n      vendor ?\n        assert false;\n        null,\n      kernel,\n      # Also inferred below\n      abi ?\n        assert false;\n        null,\n    }@args:\n    let\n      getCpu = name: cpuTypes.${name} or (throw \"Unknown CPU type: ${name}\");\n      getVendor = name: vendors.${name} or (throw \"Unknown vendor: ${name}\");\n      getKernel = name: kernels.${name} or (throw \"Unknown kernel: ${name}\");\n      getAbi = name: abis.${name} or (throw \"Unknown ABI: ${name}\");\n\n      parsed = {\n        cpu = getCpu args.cpu;\n        vendor =\n          if args ? vendor then\n            getVendor args.vendor\n          else if isDarwin parsed then\n            vendors.apple\n          else if (isWindows parsed || isCygwin parsed) then\n            vendors.pc\n          else\n            vendors.unknown;\n        kernel =\n          if hasPrefix \"darwin\" args.kernel then\n            getKernel \"darwin\"\n          else if hasPrefix \"netbsd\" args.kernel then\n            getKernel \"netbsd\"\n          else\n            getKernel (removeAbiSuffix args.kernel);\n        abi =\n          if args ? abi then\n            getAbi args.abi\n          else if isLinux parsed || isWindows parsed then\n            if isAarch32 parsed then\n              if versionAtLeast (parsed.cpu.version or \"0\") \"6\" then abis.gnueabihf else abis.gnueabi\n            # Default ppc64 BE to ELFv1\n            else if isPower64 parsed && isBigEndian parsed then\n              abis.gnuabielfv1\n            else\n              abis.gnu\n          else\n            abis.unknown;\n      };\n\n    in\n    mkSystem parsed;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":891,"column":5},"lambda_expr":"mkSystemFromSkeleton =\n    {\n      cpu,\n      # Optional, but fallback too complex for here.\n      # Inferred below instead.\n      vendor ?\n        assert false;\n        null,\n      kernel,\n      # Also inferred below\n      abi ?\n        assert false;\n        null,\n    }@args:\n    let\n      getCpu = name: cpuTypes.${name} or (throw \"Unknown CPU type: ${name}\");\n      getVendor = name: vendors.${name} or (throw \"Unknown vendor: ${name}\");\n      getKernel = name: kernels.${name} or (throw \"Unknown kernel: ${name}\");\n      getAbi = name: abis.${name} or (throw \"Unknown ABI: ${name}\");\n\n      parsed = {\n        cpu = getCpu args.cpu;\n        vendor =\n          if args ? vendor then\n            getVendor args.vendor\n          else if isDarwin parsed then\n            vendors.apple\n          else if (isWindows parsed || isCygwin parsed) then\n            vendors.pc\n          else\n            vendors.unknown;\n        kernel =\n          if hasPrefix \"darwin\" args.kernel then\n            getKernel \"darwin\"\n          else if hasPrefix \"netbsd\" args.kernel then\n            getKernel \"netbsd\"\n          else\n            getKernel (removeAbiSuffix args.kernel);\n        abi =\n          if args ? abi then\n            getAbi args.abi\n          else if isLinux parsed || isWindows parsed then\n            if isAarch32 parsed then\n              if versionAtLeast (parsed.cpu.version or \"0\") \"6\" then abis.gnueabihf else abis.gnueabi\n            # Default ppc64 BE to ELFv1\n            else if isPower64 parsed && isBigEndian parsed then\n              abis.gnuabielfv1\n            else\n              abis.gnu\n          else\n            abis.unknown;\n      };\n\n    in\n    mkSystem parsed;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":891,"column":5},"path":["lib","systems","parse","mkSystemFromSkeleton"],"pos_type":"Lambda"}},"content":{"content":"This should revert the job done by config.guess from the gcc compiler.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":891,"column":5},"path":["lib","systems","parse","mkSystemFromSkeleton"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.mkSystemFromString","path":["lib","systems","parse","mkSystemFromString"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":946,"column":3},"attr_expr":"mkSystemFromString = s: mkSystemFromSkeleton (mkSkeletonFromList (splitString \"-\" s));","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":946,"column":24},"lambda_expr":"s: mkSystemFromSkeleton (mkSkeletonFromList (splitString \"-\" s))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":946,"column":24},"path":["lib","systems","parse","mkSystemFromString"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":946,"column":24},"path":["lib","systems","parse","mkSystemFromString"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.parse.tripleFromSystem","path":["lib","systems","parse","tripleFromSystem"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":961,"column":3},"attr_expr":"tripleFromSystem =\n    {\n      cpu,\n      vendor,\n      kernel,\n      abi,\n      ...\n    }@sys:\n    assert isSystem sys;\n    let\n      optExecFormat = optionalString (\n        kernel.name == \"netbsd\" && gnuNetBSDDefaultExecFormat cpu != kernel.execFormat\n      ) kernel.execFormat.name;\n      optAbi = optionalString (abi != abis.unknown) \"-${abi.name}\";\n      cpuName = if kernel.families ? darwin then darwinArch cpu else cpu.name;\n    in\n    \"${cpuName}-${vendor.name}-${kernelName kernel}${optExecFormat}${optAbi}\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":962,"column":5},"lambda_expr":"{\n      cpu,\n      vendor,\n      kernel,\n      abi,\n      ...\n    }@sys:\n    assert isSystem sys;\n    let\n      optExecFormat = optionalString (\n        kernel.name == \"netbsd\" && gnuNetBSDDefaultExecFormat cpu != kernel.execFormat\n      ) kernel.execFormat.name;\n      optAbi = optionalString (abi != abis.unknown) \"-${abi.name}\";\n      cpuName = if kernel.families ? darwin then darwinArch cpu else cpu.name;\n    in\n    \"${cpuName}-${vendor.name}-${kernelName kernel}${optExecFormat}${optAbi}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":962,"column":5},"path":["lib","systems","parse","tripleFromSystem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/parse.nix","line":962,"column":5},"path":["lib","systems","parse","tripleFromSystem"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.platforms.select","path":["lib","systems","platforms","select"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/platforms.nix","line":600,"column":3},"attr_expr":"select =\n    platform:\n    # x86\n    if platform.isx86 then\n      pc\n\n    # ARM\n    else if platform.isAarch32 then\n      let\n        version = platform.parsed.cpu.version or null;\n      in\n      if version == null then\n        pc\n      else if lib.versionOlder version \"6\" then\n        sheevaplug\n      else if lib.versionOlder version \"7\" then\n        raspberrypi\n      else\n        armv7l-hf-multiplatform\n\n    else if platform.isAarch64 then\n      if platform.isDarwin then apple-m1 else aarch64-multiplatform\n\n    else if platform.isLoongArch64 then\n      loongarch64-multiplatform\n\n    else if platform.isRiscV then\n      riscv-multiplatform\n\n    else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then\n      (import ./examples.nix { inherit lib; }).mipsel-linux-gnu\n\n    else if platform.isPower64 then\n      if platform.isLittleEndian then powernv else ppc64\n\n    else if platform.isSh4 then\n      {\n        linux-kernel = {\n          target = \"vmlinux\";\n          # SH arch doesn't have a 'make install' target.\n          installTarget = \"vmlinux\";\n        };\n      }\n\n    else\n      { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/platforms.nix","line":601,"column":5},"lambda_expr":"select =\n    platform:\n    # x86\n    if platform.isx86 then\n      pc\n\n    # ARM\n    else if platform.isAarch32 then\n      let\n        version = platform.parsed.cpu.version or null;\n      in\n      if version == null then\n        pc\n      else if lib.versionOlder version \"6\" then\n        sheevaplug\n      else if lib.versionOlder version \"7\" then\n        raspberrypi\n      else\n        armv7l-hf-multiplatform\n\n    else if platform.isAarch64 then\n      if platform.isDarwin then apple-m1 else aarch64-multiplatform\n\n    else if platform.isLoongArch64 then\n      loongarch64-multiplatform\n\n    else if platform.isRiscV then\n      riscv-multiplatform\n\n    else if platform.parsed.cpu == lib.systems.parse.cpuTypes.mipsel then\n      (import ./examples.nix { inherit lib; }).mipsel-linux-gnu\n\n    else if platform.isPower64 then\n      if platform.isLittleEndian then powernv else ppc64\n\n    else if platform.isSh4 then\n      {\n        linux-kernel = {\n          target = \"vmlinux\";\n          # SH arch doesn't have a 'make install' target.\n          installTarget = \"vmlinux\";\n        };\n      }\n\n    else\n      { };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/platforms.nix","line":601,"column":5},"path":["lib","systems","platforms","select"],"pos_type":"Lambda"}},"content":{"content":"included in the platform in order to further elaborate it.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/platforms.nix","line":601,"column":5},"path":["lib","systems","platforms","select"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.ints.between","path":["lib","types","ints","between"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":497,"column":15},"attr_expr":"between","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":454,"column":9},"lambda_expr":"lowest: highest:\n        assert lib.assertMsg (lowest <= highest) \"ints.between: lowest must be smaller than highest\";\n        addCheck int (x: x >= lowest && x <= highest)\n        // {\n          name = \"intBetween\";\n          description = \"integer between ${betweenDesc lowest highest}\";\n        }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":454,"column":9},"path":["lib","types","ints","between"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":454,"column":9},"path":["lib","types","ints","between"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.types.numbers.between","path":["lib","types","numbers","between"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":540,"column":7},"attr_expr":"between =\n        lowest: highest:\n        assert lib.assertMsg (lowest <= highest) \"numbers.between: lowest must be smaller than highest\";\n        addCheck number (x: x >= lowest && x <= highest)\n        // {\n          name = \"numberBetween\";\n          description = \"integer or floating point number between ${betweenDesc lowest highest}\";\n        };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":541,"column":9},"lambda_expr":"lowest: highest:\n        assert lib.assertMsg (lowest <= highest) \"numbers.between: lowest must be smaller than highest\";\n        addCheck number (x: x >= lowest && x <= highest)\n        // {\n          name = \"numberBetween\";\n          description = \"integer or floating point number between ${betweenDesc lowest highest}\";\n        }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":541,"column":9},"path":["lib","types","numbers","between"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/types.nix","line":541,"column":9},"path":["lib","types","numbers","between"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.architectures.predicates.aesSupport","path":["lib","systems","architectures","predicates","aesSupport"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":632,"column":7},"attr_expr":"aesSupport = featureSupport \"aes\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.avx2Support","path":["lib","systems","architectures","predicates","avx2Support"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":630,"column":7},"attr_expr":"avx2Support = featureSupport \"avx2\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.avx512Support","path":["lib","systems","architectures","predicates","avx512Support"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":631,"column":7},"attr_expr":"avx512Support = featureSupport \"avx512\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.avxSupport","path":["lib","systems","architectures","predicates","avxSupport"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":629,"column":7},"attr_expr":"avxSupport = featureSupport \"avx\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.fma4Support","path":["lib","systems","architectures","predicates","fma4Support"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":634,"column":7},"attr_expr":"fma4Support = featureSupport \"fma4\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.fmaSupport","path":["lib","systems","architectures","predicates","fmaSupport"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":633,"column":7},"attr_expr":"fmaSupport = featureSupport \"fma\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.lasxSupport","path":["lib","systems","architectures","predicates","lasxSupport"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":636,"column":7},"attr_expr":"lasxSupport = featureSupport \"lasx\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.lsxSupport","path":["lib","systems","architectures","predicates","lsxSupport"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":635,"column":7},"attr_expr":"lsxSupport = featureSupport \"lsx\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.sse3Support","path":["lib","systems","architectures","predicates","sse3Support"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":624,"column":7},"attr_expr":"sse3Support = featureSupport \"sse3\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.sse4_1Support","path":["lib","systems","architectures","predicates","sse4_1Support"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":626,"column":7},"attr_expr":"sse4_1Support = featureSupport \"sse4_1\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.sse4_2Support","path":["lib","systems","architectures","predicates","sse4_2Support"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":627,"column":7},"attr_expr":"sse4_2Support = featureSupport \"sse4_2\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.sse4_aSupport","path":["lib","systems","architectures","predicates","sse4_aSupport"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":628,"column":7},"attr_expr":"sse4_aSupport = featureSupport \"sse4a\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.architectures.predicates.ssse3Support","path":["lib","systems","architectures","predicates","ssse3Support"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":625,"column":7},"attr_expr":"ssse3Support = featureSupport \"ssse3\";","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/architectures.nix","line":621,"column":33},"lambda_expr":"x: builtins.elem feature features.${x} or [ ]","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.is32bit","path":["lib","systems","inspect","predicates","is32bit"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.is64bit","path":["lib","systems","inspect","predicates","is64bit"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isAarch","path":["lib","systems","inspect","predicates","isAarch"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isAarch32","path":["lib","systems","inspect","predicates","isAarch32"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isAarch64","path":["lib","systems","inspect","predicates","isAarch64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isAbiElfv1","path":["lib","systems","inspect","predicates","isAbiElfv1"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isAbiElfv2","path":["lib","systems","inspect","predicates","isAbiElfv2"],"aliases":[["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isAbiElfv2"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isAbiElfv2"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isAlpha","path":["lib","systems","inspect","predicates","isAlpha"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isAndroid","path":["lib","systems","inspect","predicates","isAndroid"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isAndroid"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isAndroid"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isArc","path":["lib","systems","inspect","predicates","isArc"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isArmv7","path":["lib","systems","inspect","predicates","isArmv7"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isArmv7"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isArmv7"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isAvr","path":["lib","systems","inspect","predicates","isAvr"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isBSD","path":["lib","systems","inspect","predicates","isBSD"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isBigEndian","path":["lib","systems","inspect","predicates","isBigEndian"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isCygwin","path":["lib","systems","inspect","predicates","isCygwin"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isDarwin","path":["lib","systems","inspect","predicates","isDarwin"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isEabi","path":["lib","systems","inspect","predicates","isEabi"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isEfi","path":["lib","systems","inspect","predicates","isEfi"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isEfi"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isEfi"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isElf","path":["lib","systems","inspect","predicates","isElf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isFreeBSD","path":["lib","systems","inspect","predicates","isFreeBSD"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isGenode","path":["lib","systems","inspect","predicates","isGenode"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isGhcjs","path":["lib","systems","inspect","predicates","isGhcjs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isGnu","path":["lib","systems","inspect","predicates","isGnu"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isGnu"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isGnu"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isILP32","path":["lib","systems","inspect","predicates","isILP32"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isILP32"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isILP32"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isJavaScript","path":["lib","systems","inspect","predicates","isJavaScript"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isLinux","path":["lib","systems","inspect","predicates","isLinux"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isLittleEndian","path":["lib","systems","inspect","predicates","isLittleEndian"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isLoongArch64","path":["lib","systems","inspect","predicates","isLoongArch64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isM68k","path":["lib","systems","inspect","predicates","isM68k"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMacOS","path":["lib","systems","inspect","predicates","isMacOS"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMacho","path":["lib","systems","inspect","predicates","isMacho"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMicroBlaze","path":["lib","systems","inspect","predicates","isMicroBlaze"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMinGW","path":["lib","systems","inspect","predicates","isMinGW"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMips","path":["lib","systems","inspect","predicates","isMips"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMips32","path":["lib","systems","inspect","predicates","isMips32"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMips64","path":["lib","systems","inspect","predicates","isMips64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMips64n32","path":["lib","systems","inspect","predicates","isMips64n32"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMips64n64","path":["lib","systems","inspect","predicates","isMips64n64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMmix","path":["lib","systems","inspect","predicates","isMmix"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMsp430","path":["lib","systems","inspect","predicates","isMsp430"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMsvc","path":["lib","systems","inspect","predicates","isMsvc"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isMusl","path":["lib","systems","inspect","predicates","isMusl"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isMusl"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isMusl"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isNetBSD","path":["lib","systems","inspect","predicates","isNetBSD"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isNone","path":["lib","systems","inspect","predicates","isNone"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isOpenBSD","path":["lib","systems","inspect","predicates","isOpenBSD"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isOr1k","path":["lib","systems","inspect","predicates","isOr1k"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isPE","path":["lib","systems","inspect","predicates","isPE"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isPower","path":["lib","systems","inspect","predicates","isPower"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isPower64","path":["lib","systems","inspect","predicates","isPower64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isRedox","path":["lib","systems","inspect","predicates","isRedox"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isRiscV","path":["lib","systems","inspect","predicates","isRiscV"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isRiscV32","path":["lib","systems","inspect","predicates","isRiscV32"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isRiscV64","path":["lib","systems","inspect","predicates","isRiscV64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isRx","path":["lib","systems","inspect","predicates","isRx"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isS390","path":["lib","systems","inspect","predicates","isS390"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isS390x","path":["lib","systems","inspect","predicates","isS390x"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isSh4","path":["lib","systems","inspect","predicates","isSh4"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isSparc","path":["lib","systems","inspect","predicates","isSparc"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isSparc64","path":["lib","systems","inspect","predicates","isSparc64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isSunOS","path":["lib","systems","inspect","predicates","isSunOS"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isUClibc","path":["lib","systems","inspect","predicates","isUClibc"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUefi"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isUClibc"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isUClibc"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isUefi","path":["lib","systems","inspect","predicates","isUefi"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUnix"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isUefi"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isUefi"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isUnix","path":["lib","systems","inspect","predicates","isUnix"],"aliases":[["lib","systems","inspect","predicates","isAbiElfv2"],["lib","systems","inspect","predicates","isAndroid"],["lib","systems","inspect","predicates","isArmv7"],["lib","systems","inspect","predicates","isEfi"],["lib","systems","inspect","predicates","isGnu"],["lib","systems","inspect","predicates","isILP32"],["lib","systems","inspect","predicates","isMusl"],["lib","systems","inspect","predicates","isUClibc"],["lib","systems","inspect","predicates","isUefi"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"lambda_expr":"attrs: any (pattern: matchAttrs pattern attrs) patterns","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isUnix"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/systems/inspect.nix","line":495,"column":7},"path":["lib","systems","inspect","predicates","isUnix"],"pos_type":"Lambda"}}},{"meta":{"title":"lib.systems.inspect.predicates.isVc4","path":["lib","systems","inspect","predicates","isVc4"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isWasi","path":["lib","systems","inspect","predicates","isWasi"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isWasm","path":["lib","systems","inspect","predicates","isWasm"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isWindows","path":["lib","systems","inspect","predicates","isWindows"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isi686","path":["lib","systems","inspect","predicates","isi686"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isiOS","path":["lib","systems","inspect","predicates","isiOS"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isx86","path":["lib","systems","inspect","predicates","isx86"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isx86_32","path":["lib","systems","inspect","predicates","isx86_32"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"lib.systems.inspect.predicates.isx86_64","path":["lib","systems","inspect","predicates","isx86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/attrsets.nix","line":1801,"column":14},"lambda_expr":"attrs:\n    assert isAttrs pattern;\n    all (\n      # Compare equality between `pattern` & `attrs`.\n      attr:\n      # Missing attr, not equal.\n      attrs ? ${attr}\n      && (\n        let\n          lhs = pattern.${attr};\n          rhs = attrs.${attr};\n        in\n        # If attrset check recursively\n        if isAttrs lhs then isAttrs rhs && matchAttrs lhs rhs else lhs == rhs\n      )\n    ) (attrNames pattern)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"make-disk-image","path":["make-disk-image"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/build/src/eval.nix","line":67,"column":45},"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/nixos/lib/make-disk-image.nix","line":100,"column":1},"lambda_expr":"{\n  pkgs,\n  lib,\n\n  # The NixOS configuration to be installed onto the disk image.\n  config,\n\n  # The size of the disk, in MiB (1024*1024 bytes).\n  # if \"auto\" size is calculated based on the contents copied to it and\n  #   additionalSpace is taken into account.\n  diskSize ? \"auto\",\n\n  # additional disk space to be added to the image if diskSize \"auto\"\n  # is used\n  additionalSpace ? \"512M\",\n\n  # size of the boot partition, is only used if partitionTableType is\n  # either \"efi\", \"hybrid\", or \"legacy+boot\"\n  # This will be undersized slightly, as this is actually the offset of\n  # the end of the partition. Generally it will be 1MiB smaller.\n  bootSize ? \"256M\",\n\n  # The files and directories to be placed in the target file system.\n  # This is a list of attribute sets {source, target, mode, user, group} where\n  # `source' is the file system object (regular file or directory) to be\n  # grafted in the file system at path `target', `mode' is a string containing\n  # the permissions that will be set (ex. \"755\"), `user' and `group' are the\n  # user and group name that will be set as owner of the files.\n  # `mode', `user', and `group' are optional.\n  # When setting one of `user' or `group', the other needs to be set too.\n  contents ? [ ],\n\n  # Type of partition table to use; described in the `Image Partitioning` section above.\n  partitionTableType ? \"legacy\",\n\n  # Whether to invoke `switch-to-configuration boot` during image creation\n  installBootLoader ? true,\n\n  # Whether to output have EFIVARS available in $out/efi-vars.fd and use it during disk creation\n  touchEFIVars ? false,\n\n  # OVMF firmware derivation\n  OVMF ? pkgs.OVMF.fd,\n\n  # EFI firmware\n  efiFirmware ? OVMF.firmware,\n\n  # EFI variables\n  efiVariables ? OVMF.variables,\n\n  # The root file system type.\n  fsType ? \"ext4\",\n\n  # Filesystem label\n  label ? if onlyNixStore then \"nix-store\" else \"nixos\",\n\n  # The initial NixOS configuration file to be copied to\n  # /etc/nixos/configuration.nix.\n  configFile ? null,\n\n  # Shell code executed after the VM has finished.\n  postVM ? \"\",\n\n  # Guest memory size in MiB (1024*1024 bytes)\n  memSize ? 1024,\n\n  # Copy the contents of the Nix store to the root of the image and\n  # skip further setup. Incompatible with `contents`,\n  # `installBootLoader` and `configFile`.\n  onlyNixStore ? false,\n\n  name ? \"nixos-disk-image\",\n\n  # Disk image format, one of qcow2, qcow2-compressed, vdi, vpc, raw.\n  format ? \"raw\",\n\n  # Disk image filename, without any extensions (e.g. `image_1`).\n  baseName ? \"nixos\",\n\n  # Whether to fix:\n  #   - GPT Disk Unique Identifier (diskGUID)\n  #   - GPT Partition Unique Identifier: depends on the layout, root partition UUID can be controlled through `rootGPUID` option\n  #   - GPT Partition Type Identifier: fixed according to the layout, e.g. ESP partition, etc. through `parted` invocation.\n  #   - Filesystem Unique Identifier when fsType = ext4 for *root partition*.\n  # BIOS/MBR support is \"best effort\" at the moment.\n  # Boot partitions may not be deterministic.\n  # Also, to fix last time checked of the ext4 partition if fsType = ext4.\n  deterministic ? true,\n\n  # GPT Partition Unique Identifier for root partition.\n  rootGPUID ? \"F222513B-DED1-49FA-B591-20CE86A2FE7F\",\n  # When fsType = ext4, this is the root Filesystem Unique Identifier.\n  # TODO: support other filesystems someday.\n  rootFSUID ? (if fsType == \"ext4\" then rootGPUID else null),\n\n  # Whether a nix channel based on the current source tree should be\n  # made available inside the image. Useful for interactive use of nix\n  # utils, but changes the hash of the image when the sources are\n  # updated.\n  copyChannel ? true,\n\n  # Additional store paths to copy to the image's store.\n  additionalPaths ? [ ],\n}:\n\nassert (\n  lib.assertOneOf \"partitionTableType\" partitionTableType [\n    \"legacy\"\n    \"legacy+boot\"\n    \"legacy+gpt\"\n    \"efi\"\n    \"efixbootldr\"\n    \"hybrid\"\n    \"none\"\n  ]\n);\nassert (\n  lib.assertMsg (fsType == \"ext4\" && deterministic -> rootFSUID != null)\n    \"In deterministic mode with a ext4 partition, rootFSUID must be non-null, by default, it is equal to rootGPUID.\"\n);\n# We use -E offset=X below, which is only supported by e2fsprogs\nassert (\n  lib.assertMsg (partitionTableType != \"none\" -> fsType == \"ext4\")\n    \"to produce a partition table, we need to use -E offset flag which is support only for fsType = ext4\"\n);\nassert (\n  lib.assertMsg\n    (\n      touchEFIVars\n      ->\n        partitionTableType == \"hybrid\"\n        || partitionTableType == \"efi\"\n        || partitionTableType == \"efixbootldr\"\n        || partitionTableType == \"legacy+gpt\"\n    )\n    \"EFI variables can be used only with a partition table of type: hybrid, efi, efixbootldr, or legacy+gpt.\"\n);\n# If only Nix store image, then: contents must be empty, configFile must be unset, and we should no install bootloader.\nassert (\n  lib.assertMsg (onlyNixStore -> contents == [ ] && configFile == null && !installBootLoader)\n    \"In a only Nix store image, the contents must be empty, no configuration must be provided and no bootloader should be installed.\"\n);\n# Either both or none of {user,group} need to be set\nassert (\n  lib.assertMsg (lib.all (\n    attrs: ((attrs.user or null) == null) == ((attrs.group or null) == null)\n  ) contents) \"Contents of the disk image should set none of {user, group} or both at the same time.\"\n);\n\nlet\n  format' = format;\nin\nlet\n\n  format = if format' == \"qcow2-compressed\" then \"qcow2\" else format';\n\n  compress = lib.optionalString (format' == \"qcow2-compressed\") \"-c\";\n\n  filename =\n    \"${baseName}.\"\n    + {\n      qcow2 = \"qcow2\";\n      vdi = \"vdi\";\n      vpc = \"vhd\";\n      raw = \"img\";\n    }\n    .${format} or format;\n\n  rootPartition =\n    {\n      # switch-case\n      legacy = \"1\";\n      \"legacy+boot\" = \"2\";\n      \"legacy+gpt\" = \"2\";\n      efi = \"2\";\n      efixbootldr = \"3\";\n      hybrid = \"3\";\n    }\n    .${partitionTableType};\n\n  partitionDiskScript =\n    {\n      # switch-case\n      legacy = ''\n        parted --script $diskImage -- \\\n          mklabel msdos \\\n          mkpart primary ext4 1MiB 100% \\\n          print\n      '';\n      \"legacy+boot\" = ''\n        parted --script $diskImage -- \\\n          mklabel msdos \\\n          mkpart primary fat32 1MiB $bootSizeMiB \\\n          set 1 boot on \\\n          mkpart primary ext4 $bootSizeMiB 100% \\\n          print\n      '';\n      \"legacy+gpt\" = ''\n        parted --script $diskImage -- \\\n          mklabel gpt \\\n          mkpart no-fs 1MiB 2MiB \\\n          set 1 bios_grub on \\\n          mkpart primary ext4 2MiB 100% \\\n          align-check optimal 2 \\\n          print\n        ${lib.optionalString deterministic ''\n          sgdisk \\\n          --disk-guid=97FD5997-D90B-4AA3-8D16-C1723AEA73C \\\n          --partition-guid=1:1C06F03B-704E-4657-B9CD-681A087A2FDC \\\n          --partition-guid=2:970C694F-AFD0-4B99-B750-CDB7A329AB6F \\\n          --partition-guid=3:${rootGPUID} \\\n          $diskImage\n        ''}\n      '';\n      efi = ''\n        parted --script $diskImage -- \\\n          mklabel gpt \\\n          mkpart ESP fat32 8MiB $bootSizeMiB \\\n          set 1 boot on \\\n          align-check optimal 1 \\\n          mkpart primary ext4 $bootSizeMiB 100% \\\n          align-check optimal 2 \\\n          print\n        ${lib.optionalString deterministic ''\n          sgdisk \\\n          --disk-guid=97FD5997-D90B-4AA3-8D16-C1723AEA73C \\\n          --partition-guid=1:1C06F03B-704E-4657-B9CD-681A087A2FDC \\\n          --partition-guid=2:${rootGPUID} \\\n          $diskImage\n        ''}\n      '';\n      efixbootldr = ''\n        parted --script $diskImage -- \\\n          mklabel gpt \\\n          mkpart ESP fat32 8MiB 100MiB \\\n          set 1 boot on \\\n          align-check optimal 1 \\\n          mkpart BOOT fat32 100MiB $bootSizeMiB \\\n          set 2 bls_boot on \\\n          align-check optimal 2 \\\n          mkpart ROOT ext4 $bootSizeMiB 100% \\\n          align-check optimal 3 \\\n          print\n        ${lib.optionalString deterministic ''\n          sgdisk \\\n          --disk-guid=97FD5997-D90B-4AA3-8D16-C1723AEA73C \\\n          --partition-guid=1:1C06F03B-704E-4657-B9CD-681A087A2FDC  \\\n          --partition-guid=2:970C694F-AFD0-4B99-B750-CDB7A329AB6F  \\\n          --partition-guid=3:${rootGPUID} \\\n          $diskImage\n        ''}\n      '';\n      hybrid = ''\n        parted --script $diskImage -- \\\n          mklabel gpt \\\n          mkpart ESP fat32 8MiB $bootSizeMiB \\\n          set 1 boot on \\\n          align-check optimal 1 \\\n          mkpart no-fs 0 1024KiB \\\n          set 2 bios_grub on \\\n          mkpart primary ext4 $bootSizeMiB 100% \\\n          align-check optimal 3 \\\n          print\n        ${lib.optionalString deterministic ''\n          sgdisk \\\n          --disk-guid=97FD5997-D90B-4AA3-8D16-C1723AEA73C \\\n          --partition-guid=1:1C06F03B-704E-4657-B9CD-681A087A2FDC \\\n          --partition-guid=2:970C694F-AFD0-4B99-B750-CDB7A329AB6F \\\n          --partition-guid=3:${rootGPUID} \\\n          $diskImage\n        ''}\n      '';\n      none = \"\";\n    }\n    .${partitionTableType};\n\n  useEFIBoot = touchEFIVars;\n\n  nixpkgs = lib.cleanSource pkgs.path;\n\n  # FIXME: merge with channel.nix / make-channel.nix.\n  channelSources = pkgs.runCommand \"nixos-${config.system.nixos.version}\" { } ''\n    mkdir -p $out\n    cp -prd ${nixpkgs.outPath} $out/nixos\n    chmod -R u+w $out/nixos\n    if [ ! -e $out/nixos/nixpkgs ]; then\n      ln -s . $out/nixos/nixpkgs\n    fi\n    rm -rf $out/nixos/.git\n    echo -n ${config.system.nixos.versionSuffix} > $out/nixos/.version-suffix\n  '';\n\n  binPath = lib.makeBinPath (\n    with pkgs;\n    [\n      rsync\n      util-linux\n      parted\n      e2fsprogs\n      lkl\n      config.system.build.nixos-install\n      nixos-enter\n      nix\n      systemdMinimal\n    ]\n    ++ lib.optional deterministic gptfdisk\n    ++ stdenv.initialPath\n  );\n\n  # I'm preserving the line below because I'm going to search for it across nixpkgs to consolidate\n  # image building logic. The comment right below this now appears in 4 different places in nixpkgs :)\n  # !!! should use XML.\n  sources = map (x: x.source) contents;\n  targets = map (x: x.target) contents;\n  modes = map (x: x.mode or \"''\") contents;\n  users = map (x: x.user or \"''\") contents;\n  groups = map (x: x.group or \"''\") contents;\n\n  basePaths = [ config.system.build.toplevel ] ++ lib.optional copyChannel channelSources;\n\n  additionalPaths' = lib.subtractLists basePaths additionalPaths;\n\n  closureInfo = pkgs.closureInfo {\n    rootPaths = basePaths ++ additionalPaths';\n  };\n\n  blockSize = toString (4 * 1024); # ext4fs block size (not block device sector size)\n\n  prepareImage = ''\n    export PATH=${binPath}\n\n    # Yes, mkfs.ext4 takes different units in different contexts. Fun.\n    sectorsToKilobytes() {\n      echo $(( ( \"$1\" * 512 ) / 1024 ))\n    }\n\n    sectorsToBytes() {\n      echo $(( \"$1\" * 512  ))\n    }\n\n    # Given lines of numbers, adds them together\n    sum_lines() {\n      local acc=0\n      while read -r number; do\n        acc=$((acc+number))\n      done\n      echo \"$acc\"\n    }\n\n    mebibyte=$(( 1024 * 1024 ))\n\n    # Approximative percentage of reserved space in an ext4 fs over 512MiB.\n    # 0.05208587646484375\n    #  × 1000, integer part: 52\n    compute_fudge() {\n      echo $(( $1 * 52 / 1000 ))\n    }\n\n    round_to_nearest() {\n      echo $(( ( $1 / $2 + 1) * $2 ))\n    }\n\n    mkdir $out\n\n    root=\"$PWD/root\"\n    mkdir -p $root\n\n    # Copy arbitrary other files into the image\n    # Semi-shamelessly copied from make-etc.sh.\n    set -f\n    sources_=(${lib.concatStringsSep \" \" sources})\n    targets_=(${lib.concatStringsSep \" \" targets})\n    modes_=(${lib.concatStringsSep \" \" modes})\n    set +f\n\n    for ((i = 0; i < ''${#targets_[@]}; i++)); do\n      source=\"''${sources_[$i]}\"\n      target=\"''${targets_[$i]}\"\n      mode=\"''${modes_[$i]}\"\n\n      if [ -n \"$mode\" ]; then\n        rsync_chmod_flags=\"--chmod=$mode\"\n      else\n        rsync_chmod_flags=\"\"\n      fi\n      # Unfortunately cptofs only supports modes, not ownership, so we can't use\n      # rsync's --chown option. Instead, we change the ownerships in the\n      # VM script with chown.\n      rsync_flags=\"-a --no-o --no-g $rsync_chmod_flags\"\n      if [[ \"$source\" =~ '*' ]]; then\n        # If the source name contains '*', perform globbing.\n        mkdir -p $root/$target\n        for fn in $source; do\n          rsync $rsync_flags \"$fn\" $root/$target/\n        done\n      else\n        mkdir -p $root/$(dirname $target)\n        if [ -e $root/$target ]; then\n          echo \"duplicate entry $target -> $source\"\n          exit 1\n        elif [ -d $source ]; then\n          # Append a slash to the end of source to get rsync to copy the\n          # directory _to_ the target instead of _inside_ the target.\n          # (See `man rsync`'s note on a trailing slash.)\n          rsync $rsync_flags $source/ $root/$target\n        else\n          rsync $rsync_flags $source $root/$target\n        fi\n      fi\n    done\n\n    export HOME=$TMPDIR\n\n    # Provide a Nix database so that nixos-install can copy closures.\n    export NIX_STATE_DIR=$TMPDIR/state\n    nix-store --load-db < ${closureInfo}/registration\n\n    chmod 755 \"$TMPDIR\"\n    echo \"running nixos-install...\"\n    nixos-install --root $root --no-bootloader --no-root-passwd \\\n      --system ${config.system.build.toplevel} \\\n      ${if copyChannel then \"--channel ${channelSources}\" else \"--no-channel-copy\"} \\\n      --substituters \"\"\n\n    ${lib.optionalString (additionalPaths' != [ ]) ''\n      nix --extra-experimental-features nix-command copy --to $root --no-check-sigs ${lib.concatStringsSep \" \" additionalPaths'}\n    ''}\n\n    diskImage=nixos.raw\n\n    bootSize=$(round_to_nearest $(numfmt --from=iec '${bootSize}') $mebibyte)\n    bootSizeMiB=$(( bootSize / 1024 / 1024 ))MiB\n\n    ${\n      if diskSize == \"auto\" then\n        ''\n          ${\n            if\n              partitionTableType == \"efi\" || partitionTableType == \"efixbootldr\" || partitionTableType == \"hybrid\"\n            then\n              ''\n                # Add the GPT at the end\n                gptSpace=$(( 512 * 34 * 1 ))\n                # Normally we'd need to account for alignment and things, if bootSize\n                # represented the actual size of the boot partition. But it instead\n                # represents the offset at which it ends.\n                # So we know bootSize is the reserved space in front of the partition.\n                reservedSpace=$(( gptSpace + bootSize ))\n              ''\n            else if partitionTableType == \"legacy+gpt\" then\n              ''\n                # Add the GPT at the end\n                gptSpace=$(( 512 * 34 * 1 ))\n                # And include the bios_grub partition; the ext4 partition starts at 2MiB exactly.\n                reservedSpace=$(( gptSpace + 2 * mebibyte ))\n              ''\n            else if partitionTableType == \"legacy\" then\n              ''\n                # Add the 1MiB aligned reserved space (includes MBR)\n                reservedSpace=$(( mebibyte ))\n              ''\n            else if partitionTableType == \"legacy+boot\" then\n              ''\n                # The explanation from the above \"efi\" case applies here too,\n                # but gptSpace is not needed without a GPT.\n                reservedSpace=$(( bootSize ))\n              ''\n            else\n              ''\n                reservedSpace=0\n              ''\n          }\n          additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') + reservedSpace ))\n\n          # Compute required space in filesystem blocks\n          diskUsage=$(find . ! -type d -print0 | du --files0-from=- --apparent-size --count-links --block-size \"${blockSize}\" | cut -f1 | sum_lines)\n          # Each inode takes space!\n          numInodes=$(find . | wc -l)\n          # Convert to bytes, inodes take two blocks each!\n          diskUsage=$(( (diskUsage + 2 * numInodes) * ${blockSize} ))\n          # Then increase the required space to account for the reserved blocks.\n          fudge=$(compute_fudge $diskUsage)\n          requiredFilesystemSpace=$(( diskUsage + fudge ))\n\n          # Round up to the nearest block size.\n          # This ensures whole $blockSize bytes block sizes in the filesystem\n          # and helps towards aligning partitions optimally.\n          requiredFilesystemSpace=$(round_to_nearest $requiredFilesystemSpace ${blockSize})\n\n          diskSize=$(( requiredFilesystemSpace + additionalSpace ))\n\n          # Round up to the nearest mebibyte.\n          # This ensures whole 512 bytes sector sizes in the disk image\n          # and helps towards aligning partitions optimally.\n          diskSize=$(round_to_nearest $diskSize $mebibyte)\n\n          truncate -s \"$diskSize\" $diskImage\n\n          printf \"Automatic disk size...\\n\"\n          printf \"  Closure space use: %d bytes\\n\" $diskUsage\n          printf \"  fudge: %d bytes\\n\" $fudge\n          printf \"  Filesystem size needed: %d bytes\\n\" $requiredFilesystemSpace\n          printf \"  Additional space: %d bytes\\n\" $additionalSpace\n          printf \"  Disk image size: %d bytes\\n\" $diskSize\n        ''\n      else\n        ''\n          truncate -s ${toString diskSize}M $diskImage\n        ''\n    }\n\n    ${partitionDiskScript}\n\n    ${\n      if partitionTableType != \"none\" then\n        ''\n          # Get start & length of the root partition in sectors to $START and $SECTORS.\n          eval $(partx $diskImage -o START,SECTORS --nr ${rootPartition} --pairs)\n\n          mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K\n        ''\n      else\n        ''\n          mkfs.${fsType} -b ${blockSize} -F -L ${label} $diskImage\n        ''\n    }\n\n    echo \"copying staging root to image...\"\n    cptofs -p ${lib.optionalString (partitionTableType != \"none\") \"-P ${rootPartition}\"} \\\n           -t ${fsType} \\\n           -i $diskImage \\\n           $root${lib.optionalString onlyNixStore builtins.storeDir}/* / ||\n      (echo >&2 \"ERROR: cptofs failed. diskSize might be too small for closure.\"; exit 1)\n  '';\n\n  moveOrConvertImage = ''\n    ${\n      if format == \"raw\" then\n        ''\n          mv $diskImage $out/${filename}\n        ''\n      else\n        ''\n          ${pkgs.qemu-utils}/bin/qemu-img convert -f raw -O ${format} ${compress} $diskImage $out/${filename}\n        ''\n    }\n    diskImage=$out/${filename}\n  '';\n\n  createEFIVars = ''\n    efiVars=$out/efi-vars.fd\n    cp ${efiVariables} $efiVars\n    chmod 0644 $efiVars\n  '';\n\n  createHydraBuildProducts = ''\n    mkdir -p $out/nix-support\n    echo \"file ${format}-image $out/${filename}\" >> $out/nix-support/hydra-build-products\n  '';\n\n  buildImage = pkgs.vmTools.runInLinuxVM (\n    pkgs.runCommand name\n      {\n        preVM = prepareImage + lib.optionalString touchEFIVars createEFIVars;\n        buildInputs = with pkgs; [\n          util-linux\n          e2fsprogs\n          dosfstools\n        ];\n        postVM = moveOrConvertImage + createHydraBuildProducts + postVM;\n        QEMU_OPTS = lib.concatStringsSep \" \" (\n          lib.optional useEFIBoot \"-drive if=pflash,format=raw,unit=0,readonly=on,file=${efiFirmware}\"\n          ++ lib.optionals touchEFIVars [\n            \"-drive if=pflash,format=raw,unit=1,file=$efiVars\"\n          ]\n          ++ lib.optionals (OVMF.systemManagementModeRequired or false) [\n            \"-machine\"\n            \"q35,smm=on\"\n            \"-global\"\n            \"driver=cfi.pflash01,property=secure,value=on\"\n          ]\n        );\n        inherit memSize;\n      }\n      ''\n        export PATH=${binPath}:$PATH\n\n        rootDisk=${if partitionTableType != \"none\" then \"/dev/vda${rootPartition}\" else \"/dev/vda\"}\n\n        # It is necessary to set root filesystem unique identifier in advance, otherwise\n        # bootloader might get the wrong one and fail to boot.\n        # At the end, we reset again because we want deterministic timestamps.\n        ${lib.optionalString (fsType == \"ext4\" && deterministic) ''\n          tune2fs -T now ${lib.optionalString deterministic \"-U ${rootFSUID}\"} -c 0 -i 0 $rootDisk\n        ''}\n        # make systemd-boot find ESP without udev\n        mkdir /dev/block\n        ln -s /dev/vda1 /dev/block/254:1\n\n        mountPoint=/mnt\n        mkdir $mountPoint\n        mount $rootDisk $mountPoint\n\n        # Create the ESP and mount it. Unlike e2fsprogs, mkfs.vfat doesn't support an\n        # '-E offset=X' option, so we can't do this outside the VM.\n        ${lib.optionalString (partitionTableType == \"efi\" || partitionTableType == \"hybrid\") ''\n          mkdir -p /mnt/boot\n          mkfs.vfat -n ESP /dev/vda1\n          mount /dev/vda1 /mnt/boot\n\n          ${lib.optionalString touchEFIVars \"mount -t efivarfs efivarfs /sys/firmware/efi/efivars\"}\n        ''}\n        ${lib.optionalString (partitionTableType == \"efixbootldr\") ''\n          mkdir -p /mnt/{boot,efi}\n          mkfs.vfat -n ESP /dev/vda1\n          mkfs.vfat -n BOOT /dev/vda2\n          mount /dev/vda1 /mnt/efi\n          mount /dev/vda2 /mnt/boot\n\n          ${lib.optionalString touchEFIVars \"mount -t efivarfs efivarfs /sys/firmware/efi/efivars\"}\n        ''}\n        ${lib.optionalString (partitionTableType == \"legacy+boot\") ''\n          mkdir -p /mnt/boot\n          mkfs.vfat -n BOOT /dev/vda1\n          mount /dev/vda1 /mnt/boot\n        ''}\n\n        # Install a configuration.nix\n        mkdir -p /mnt/etc/nixos\n        ${lib.optionalString (configFile != null) ''\n          cp ${configFile} /mnt/etc/nixos/configuration.nix\n        ''}\n\n        ${lib.optionalString installBootLoader ''\n          # In this throwaway resource, we only have /dev/vda, but the actual VM may refer to another disk for bootloader, e.g. /dev/vdb\n          # Use this option to create a symlink from vda to any arbitrary device you want.\n          ${lib.optionalString (config.boot.loader.grub.enable) (\n            lib.concatMapStringsSep \" \" (\n              device:\n              lib.optionalString (device != \"/dev/vda\") ''\n                mkdir -p \"$(dirname ${device})\"\n                ln -s /dev/vda ${device}\n              ''\n            ) config.boot.loader.grub.devices\n          )}\n          ${\n            let\n              limine = config.boot.loader.limine;\n            in\n            lib.optionalString (limine.enable && limine.biosSupport && limine.biosDevice != \"/dev/vda\") ''\n              mkdir -p \"$(dirname ${limine.biosDevice})\"\n              ln -s /dev/vda ${limine.biosDevice}\n            ''\n          }\n\n          # Set up core system link, bootloader (sd-boot, GRUB, uboot, etc.), etc.\n\n          # NOTE: systemd-boot-builder.py calls nix-env --list-generations which\n          # clobbers $HOME/.nix-defexpr/channels/nixos This would cause a  folder\n          # /homeless-shelter to show up in the final image which  in turn breaks\n          # nix builds in the target image if sandboxing is turned off (through\n          # __noChroot for example).\n          export HOME=$TMPDIR\n          NIXOS_INSTALL_BOOTLOADER=1 nixos-enter --root $mountPoint -- /nix/var/nix/profiles/system/bin/switch-to-configuration boot\n        ''}\n\n        # Set the ownerships of the contents. The modes are set in preVM.\n        # No globbing on targets, so no need to set -f\n        targets_=(${lib.concatStringsSep \" \" targets})\n        users_=(${lib.concatStringsSep \" \" users})\n        groups_=(${lib.concatStringsSep \" \" groups})\n        for ((i = 0; i < ''${#targets_[@]}; i++)); do\n          target=\"''${targets_[$i]}\"\n          user=\"''${users_[$i]}\"\n          group=\"''${groups_[$i]}\"\n          if [ -n \"$user$group\" ]; then\n            # We have to nixos-enter since we need to use the user and group of the VM\n            nixos-enter --root $mountPoint -- chown -R \"$user:$group\" \"$target\"\n          fi\n        done\n\n        umount -R /mnt\n\n        # Make sure resize2fs works. Note that resize2fs has stricter criteria for resizing than a normal\n        # mount, so the `-c 0` and `-i 0` don't affect it. Setting it to `now` doesn't produce deterministic\n        # output, of course, but we can fix that when/if we start making images deterministic.\n        # In deterministic mode, this is fixed to 1970-01-01 (UNIX timestamp 0).\n        # This two-step approach is necessary otherwise `tune2fs` will want a fresher filesystem to perform\n        # some changes.\n        ${lib.optionalString (fsType == \"ext4\") ''\n          tune2fs -T now ${lib.optionalString deterministic \"-U ${rootFSUID}\"} -c 0 -i 0 $rootDisk\n          ${lib.optionalString deterministic \"tune2fs -f -T 19700101 $rootDisk\"}\n        ''}\n      ''\n  );\nin\nif onlyNixStore then\n  pkgs.runCommand name { } (prepareImage + moveOrConvertImage + createHydraBuildProducts + postVM)\nelse\n  buildImage","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/nixos/lib/make-disk-image.nix","line":100,"column":1},"path":["make-disk-image"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/nixos/lib/make-disk-image.nix","line":100,"column":1},"path":["make-disk-image"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.ociTools.buildContainer","path":["pkgs","ociTools","buildContainer"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/oci-tools/default.nix","line":9,"column":3},"attr_expr":"buildContainer =\n    {\n      args,\n      mounts ? { },\n      os ? \"linux\",\n      arch ? \"x86_64\",\n      readonly ? false,\n    }:\n    let\n      sysMounts = {\n        \"/proc\" = {\n          type = \"proc\";\n          source = \"proc\";\n        };\n        \"/dev\" = {\n          type = \"tmpfs\";\n          source = \"tmpfs\";\n          options = [\n            \"nosuid\"\n            \"strictatime\"\n            \"mode=755\"\n            \"size=65536k\"\n          ];\n        };\n        \"/dev/pts\" = {\n          type = \"devpts\";\n          source = \"devpts\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"newinstance\"\n            \"ptmxmode=0666\"\n            \"mode=755\"\n            \"gid=5\"\n          ];\n        };\n        \"/dev/shm\" = {\n          type = \"tmpfs\";\n          source = \"shm\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n            \"mode=1777\"\n            \"size=65536k\"\n          ];\n        };\n        \"/dev/mqueue\" = {\n          type = \"mqueue\";\n          source = \"mqueue\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n          ];\n        };\n        \"/sys\" = {\n          type = \"sysfs\";\n          source = \"sysfs\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n            \"ro\"\n          ];\n        };\n        \"/sys/fs/cgroup\" = {\n          type = \"cgroup\";\n          source = \"cgroup\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n            \"relatime\"\n            \"ro\"\n          ];\n        };\n      };\n      config = writeText \"config.json\" (\n        builtins.toJSON {\n          ociVersion = \"1.0.0\";\n          platform = {\n            inherit os arch;\n          };\n\n          linux = {\n            namespaces = map (type: { inherit type; }) [\n              \"pid\"\n              \"network\"\n              \"mount\"\n              \"ipc\"\n              \"uts\"\n            ];\n          };\n\n          root = {\n            path = \"rootfs\";\n            inherit readonly;\n          };\n\n          process = {\n            inherit args;\n            user = {\n              uid = 0;\n              gid = 0;\n            };\n            cwd = \"/\";\n          };\n\n          mounts = lib.mapAttrsToList (\n            destination:\n            {\n              type,\n              source,\n              options ? null,\n            }:\n            {\n              inherit\n                destination\n                type\n                source\n                options\n                ;\n            }\n          ) sysMounts;\n        }\n      );\n    in\n    runCommand \"join\" { } ''\n      set -o pipefail\n      mkdir -p $out/rootfs/{dev,proc,sys}\n      cp ${config} $out/config.json\n      xargs tar c < ${writeClosure args} | tar -xC $out/rootfs/\n    '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/oci-tools/default.nix","line":10,"column":5},"lambda_expr":"{\n      args,\n      mounts ? { },\n      os ? \"linux\",\n      arch ? \"x86_64\",\n      readonly ? false,\n    }:\n    let\n      sysMounts = {\n        \"/proc\" = {\n          type = \"proc\";\n          source = \"proc\";\n        };\n        \"/dev\" = {\n          type = \"tmpfs\";\n          source = \"tmpfs\";\n          options = [\n            \"nosuid\"\n            \"strictatime\"\n            \"mode=755\"\n            \"size=65536k\"\n          ];\n        };\n        \"/dev/pts\" = {\n          type = \"devpts\";\n          source = \"devpts\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"newinstance\"\n            \"ptmxmode=0666\"\n            \"mode=755\"\n            \"gid=5\"\n          ];\n        };\n        \"/dev/shm\" = {\n          type = \"tmpfs\";\n          source = \"shm\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n            \"mode=1777\"\n            \"size=65536k\"\n          ];\n        };\n        \"/dev/mqueue\" = {\n          type = \"mqueue\";\n          source = \"mqueue\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n          ];\n        };\n        \"/sys\" = {\n          type = \"sysfs\";\n          source = \"sysfs\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n            \"ro\"\n          ];\n        };\n        \"/sys/fs/cgroup\" = {\n          type = \"cgroup\";\n          source = \"cgroup\";\n          options = [\n            \"nosuid\"\n            \"noexec\"\n            \"nodev\"\n            \"relatime\"\n            \"ro\"\n          ];\n        };\n      };\n      config = writeText \"config.json\" (\n        builtins.toJSON {\n          ociVersion = \"1.0.0\";\n          platform = {\n            inherit os arch;\n          };\n\n          linux = {\n            namespaces = map (type: { inherit type; }) [\n              \"pid\"\n              \"network\"\n              \"mount\"\n              \"ipc\"\n              \"uts\"\n            ];\n          };\n\n          root = {\n            path = \"rootfs\";\n            inherit readonly;\n          };\n\n          process = {\n            inherit args;\n            user = {\n              uid = 0;\n              gid = 0;\n            };\n            cwd = \"/\";\n          };\n\n          mounts = lib.mapAttrsToList (\n            destination:\n            {\n              type,\n              source,\n              options ? null,\n            }:\n            {\n              inherit\n                destination\n                type\n                source\n                options\n                ;\n            }\n          ) sysMounts;\n        }\n      );\n    in\n    runCommand \"join\" { } ''\n      set -o pipefail\n      mkdir -p $out/rootfs/{dev,proc,sys}\n      cp ${config} $out/config.json\n      xargs tar c < ${writeClosure args} | tar -xC $out/rootfs/\n    ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/oci-tools/default.nix","line":10,"column":5},"path":["pkgs","ociTools","buildContainer"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/oci-tools/default.nix","line":10,"column":5},"path":["pkgs","ociTools","buildContainer"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.ociTools.override","path":["pkgs","ociTools","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.ociTools.overrideDerivation","path":["pkgs","ociTools","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","ociTools","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","ociTools","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs._internalCallByNamePackageFile","path":["pkgs","_internalCallByNamePackageFile"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/by-name-overlay.nix","line":52,"column":3},"attr_expr":"_internalCallByNamePackageFile = file: self.callPackage file { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/by-name-overlay.nix","line":52,"column":36},"lambda_expr":"_internalCallByNamePackageFile = file: self.callPackage file { };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/by-name-overlay.nix","line":52,"column":36},"path":["pkgs","_internalCallByNamePackageFile"],"pos_type":"Lambda"}},"content":{"content":"Because at that point the code in ./stage.nix can be changed to not allow definitions in `all-packages.nix` to override ones from `pkgs/by-name` anymore and throw an error if that happens instead.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/by-name-overlay.nix","line":52,"column":36},"path":["pkgs","_internalCallByNamePackageFile"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.addAttrsToDerivation","path":["pkgs","addAttrsToDerivation"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":210,"column":3},"attr_expr":"addAttrsToDerivation = extraAttrs: overrideMkDerivationArgs (_: extraAttrs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":210,"column":26},"lambda_expr":"addAttrsToDerivation = extraAttrs: overrideMkDerivationArgs (_: extraAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":210,"column":26},"path":["pkgs","addAttrsToDerivation"],"pos_type":"Lambda"}},"content":{"content":"\nModify a stdenv so that the specified attributes are added to\nevery derivation returned by its mkDerivation function.\n\nExample:\n  stdenvNoOptimise =\n    addAttrsToDerivation\n      { env.NIX_CFLAGS_COMPILE = \"-O0\"; }\n      stdenv;\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":210,"column":26},"path":["pkgs","addAttrsToDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.aggregateModules","path":["pkgs","aggregateModules"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8453,"column":3},"attr_expr":"aggregateModules =\n    modules:\n    callPackage ../os-specific/linux/kmod/aggregator.nix {\n      inherit (buildPackages) kmod;\n      inherit modules;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8454,"column":5},"lambda_expr":"modules:\n    callPackage ../os-specific/linux/kmod/aggregator.nix {\n      inherit (buildPackages) kmod;\n      inherit modules;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8454,"column":5},"path":["pkgs","aggregateModules"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8454,"column":5},"path":["pkgs","aggregateModules"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.antigravity-fhsWithPackages","path":["pkgs","antigravity-fhsWithPackages"],"aliases":[["pkgs","code-cursor-fhsWithPackages"],["pkgs","kiro-fhsWithPackages"],["pkgs","vscode-fhsWithPackages"],["pkgs","vscodium-fhsWithPackages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10340,"column":3},"attr_expr":"antigravity-fhsWithPackages = antigravity.fhsWithPackages;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"lambda_expr":"f: fhs { additionalPkgs = f; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","antigravity-fhsWithPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","antigravity-fhsWithPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.apacheHttpdPackagesFor","path":["pkgs","apacheHttpdPackagesFor"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7734,"column":3},"attr_expr":"apacheHttpdPackagesFor =\n    apacheHttpd: self:\n    let\n      callPackage = newScope self;\n    in\n    {\n      inherit apacheHttpd;\n      mod_auth_mellon = callPackage ../servers/http/apache-modules/mod_auth_mellon { };\n      mod_ca = callPackage ../servers/http/apache-modules/mod_ca { };\n      mod_crl = callPackage ../servers/http/apache-modules/mod_crl { };\n      mod_cspnonce = callPackage ../servers/http/apache-modules/mod_cspnonce { };\n      mod_csr = callPackage ../servers/http/apache-modules/mod_csr { };\n      mod_dnssd = callPackage ../servers/http/apache-modules/mod_dnssd { };\n      mod_fastcgi = callPackage ../servers/http/apache-modules/mod_fastcgi { };\n      mod_itk = callPackage ../servers/http/apache-modules/mod_itk { };\n      mod_jk = callPackage ../servers/http/apache-modules/mod_jk { };\n      mod_mbtiles = callPackage ../servers/http/apache-modules/mod_mbtiles { };\n      mod_ocsp = callPackage ../servers/http/apache-modules/mod_ocsp { };\n      mod_perl = callPackage ../servers/http/apache-modules/mod_perl { };\n      mod_pkcs12 = callPackage ../servers/http/apache-modules/mod_pkcs12 { };\n      mod_python = callPackage ../servers/http/apache-modules/mod_python { };\n      mod_scep = callPackage ../servers/http/apache-modules/mod_scep { };\n      mod_spkac = callPackage ../servers/http/apache-modules/mod_spkac { };\n      mod_tile = callPackage ../servers/http/apache-modules/mod_tile { };\n      mod_timestamp = callPackage ../servers/http/apache-modules/mod_timestamp { };\n      mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { };\n      php = pkgs.php.override { inherit apacheHttpd; };\n      subversion = pkgs.subversion.override {\n        httpServer = true;\n        inherit apacheHttpd;\n      };\n    }\n    // lib.optionalAttrs config.allowAliases {\n      mod_evasive = throw \"mod_evasive is not supported on Apache httpd 2.4\";\n      mod_wsgi = self.mod_wsgi2;\n      mod_wsgi2 = throw \"mod_wsgi2 has been removed since Python 2 is EOL. Use mod_wsgi3 instead\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7735,"column":5},"lambda_expr":"apacheHttpd: self:\n    let\n      callPackage = newScope self;\n    in\n    {\n      inherit apacheHttpd;\n      mod_auth_mellon = callPackage ../servers/http/apache-modules/mod_auth_mellon { };\n      mod_ca = callPackage ../servers/http/apache-modules/mod_ca { };\n      mod_crl = callPackage ../servers/http/apache-modules/mod_crl { };\n      mod_cspnonce = callPackage ../servers/http/apache-modules/mod_cspnonce { };\n      mod_csr = callPackage ../servers/http/apache-modules/mod_csr { };\n      mod_dnssd = callPackage ../servers/http/apache-modules/mod_dnssd { };\n      mod_fastcgi = callPackage ../servers/http/apache-modules/mod_fastcgi { };\n      mod_itk = callPackage ../servers/http/apache-modules/mod_itk { };\n      mod_jk = callPackage ../servers/http/apache-modules/mod_jk { };\n      mod_mbtiles = callPackage ../servers/http/apache-modules/mod_mbtiles { };\n      mod_ocsp = callPackage ../servers/http/apache-modules/mod_ocsp { };\n      mod_perl = callPackage ../servers/http/apache-modules/mod_perl { };\n      mod_pkcs12 = callPackage ../servers/http/apache-modules/mod_pkcs12 { };\n      mod_python = callPackage ../servers/http/apache-modules/mod_python { };\n      mod_scep = callPackage ../servers/http/apache-modules/mod_scep { };\n      mod_spkac = callPackage ../servers/http/apache-modules/mod_spkac { };\n      mod_tile = callPackage ../servers/http/apache-modules/mod_tile { };\n      mod_timestamp = callPackage ../servers/http/apache-modules/mod_timestamp { };\n      mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { };\n      php = pkgs.php.override { inherit apacheHttpd; };\n      subversion = pkgs.subversion.override {\n        httpServer = true;\n        inherit apacheHttpd;\n      };\n    }\n    // lib.optionalAttrs config.allowAliases {\n      mod_evasive = throw \"mod_evasive is not supported on Apache httpd 2.4\";\n      mod_wsgi = self.mod_wsgi2;\n      mod_wsgi2 = throw \"mod_wsgi2 has been removed since Python 2 is EOL. Use mod_wsgi3 instead\";\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7735,"column":5},"path":["pkgs","apacheHttpdPackagesFor"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7735,"column":5},"path":["pkgs","apacheHttpdPackagesFor"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.apparmorRulesFromClosure","path":["pkgs","apparmorRulesFromClosure"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8222,"column":34},"attr_expr":"apparmorRulesFromClosure","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/li/libapparmor/apparmorRulesFromClosure.nix","line":6,"column":1},"lambda_expr":"{\n  # The store path of the derivation is given in $path\n  additionalRules ? [ ],\n  # TODO: factorize here some other common paths\n  # that may emerge from use cases.\n  baseRules ? [\n    \"$path r\"\n    \"$path/etc/** r\"\n    \"$path/share/** mr\"\n    # Note that not all libraries are prefixed with \"lib\",\n    # eg. glibc-2.30/lib/ld-2.30.so\n    \"$path/lib/**.so* mr\"\n    \"$path/lib64/**.so* mr\"\n    # eg. glibc-2.30/lib/gconv/gconv-modules\n    \"$path/lib/** r\"\n    \"$path/lib64/** r\"\n    # Internal executables\n    \"$path/libexec/** ixr\"\n  ],\n  name ? \"\",\n}:\nrootPaths:\nrunCommand (\"apparmor-closure-rules\" + lib.optionalString (name != \"\") \"-${name}\") { } ''\n  touch $out\n  while read -r path\n  do printf >>$out \"%s,\\n\" ${\n    lib.concatMapStringsSep \" \" (x: \"\\\"${x}\\\"\") (baseRules ++ additionalRules)\n  }\n  done <${closureInfo { inherit rootPaths; }}/store-paths\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/li/libapparmor/apparmorRulesFromClosure.nix","line":6,"column":1},"path":["pkgs","apparmorRulesFromClosure"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/li/libapparmor/apparmorRulesFromClosure.nix","line":6,"column":1},"path":["pkgs","apparmorRulesFromClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.appendOverlays","path":["pkgs","appendOverlays"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":266,"column":5},"attr_expr":"appendOverlays =\n      extraOverlays:\n      if extraOverlays == [ ] then\n        self.__splicedPackages\n      else\n        nixpkgsFun { overlays = args.overlays ++ extraOverlays; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":267,"column":7},"lambda_expr":"appendOverlays =\n      extraOverlays:\n      if extraOverlays == [ ] then\n        self.__splicedPackages\n      else\n        nixpkgsFun { overlays = args.overlays ++ extraOverlays; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":267,"column":7},"path":["pkgs","appendOverlays"],"pos_type":"Lambda"}},"content":{"content":"in one go when calling Nixpkgs, for performance and simplicity.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":267,"column":7},"path":["pkgs","appendOverlays"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.applyPatches","path":["pkgs","applyPatches"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":1006,"column":3},"attr_expr":"applyPatches = lib.extendMkDerivation {\n    constructDrv = stdenvNoCC.mkDerivation;\n\n    extendDrvArgs =\n      finalAttrs:\n      {\n        src,\n        ...\n      }@args:\n      assert lib.assertMsg (\n        !args ? meta\n      ) \"applyPatches will not merge 'meta', change it in 'src' instead\";\n      assert lib.assertMsg (\n        !args ? passthru\n      ) \"applyPatches will not merge 'passthru', change it in 'src' instead\";\n      let\n        keepAttrs = names: lib.filterAttrs (name: val: lib.elem name names);\n        # enables tools like nix-update to determine what src attributes to replace\n        extraPassthru = lib.optionalAttrs (lib.isAttrs finalAttrs.src) (\n          keepAttrs [\n            \"rev\"\n            \"tag\"\n            \"url\"\n            \"outputHash\"\n            \"outputHashAlgo\"\n          ] finalAttrs.src\n        );\n      in\n      {\n        name =\n          args.name or (\n            if builtins.isPath finalAttrs.src then\n              baseNameOf finalAttrs.src + \"-patched\"\n            else if builtins.isAttrs finalAttrs.src && (finalAttrs.src ? name) then\n              finalAttrs.src.name + \"-patched\"\n            else\n              throw \"applyPatches: please supply a `name` argument because a default name can only be computed when the `src` is a path or is an attribute set with a `name` attribute.\"\n          );\n\n        # Manually setting `name` can mess up positioning.\n        # This should fix it.\n        pos = builtins.unsafeGetAttrPos \"src\" args;\n\n        preferLocalBuild = true;\n        allowSubstitutes = false;\n\n        # unconditionally disable phases that are we don't want\n        phases = [\n          \"unpackPhase\"\n          \"patchPhase\"\n          \"installPhase\"\n        ];\n\n        installPhase = \"cp -R ./ $out\";\n\n        # passthru the git and hash info for nix-update, as well\n        # as all the src's passthru attrs.\n        passthru = extraPassthru // finalAttrs.src.passthru or { };\n\n        # Carry (and merge) information from the underlying `src` if present.\n        meta = lib.optionalAttrs (finalAttrs.src ? meta) (removeAttrs finalAttrs.src.meta [ \"position\" ]);\n      };\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":862,"column":5},"lambda_expr":"{\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.aspellWithDicts","path":["pkgs","aspellWithDicts"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5957,"column":3},"attr_expr":"aspellWithDicts = callPackage ../development/libraries/aspell/aspell-with-dicts.nix {\n    aspell = aspell.override { searchNixProfiles = false; };\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/aspell/aspell-with-dicts.nix","line":15,"column":1},"lambda_expr":"f:\n\nlet\n  # Dictionaries we want\n  dicts = f aspellDicts;\n\nin\nbuildEnv {\n  name = \"aspell-env\";\n  nativeBuildInputs = [ makeWrapper ];\n  paths = [ aspell ] ++ dicts;\n  postBuild = ''\n    # Construct wrappers in /bin\n    unlink \"$out/bin\"\n    mkdir -p \"$out/bin\"\n    pushd \"${aspell}/bin\"\n    for prg in *; do\n      if [ -f \"$prg\" ]; then\n        makeWrapper \"${aspell}/bin/$prg\" \"$out/bin/$prg\" --set ASPELL_CONF \"dict-dir $out/lib/aspell; data-dir $out/share/aspell\"\n      fi\n    done\n    popd\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/aspell/aspell-with-dicts.nix","line":15,"column":1},"path":["pkgs","aspellWithDicts"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/aspell/aspell-with-dicts.nix","line":15,"column":1},"path":["pkgs","aspellWithDicts"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.bitlbee-plugins","path":["pkgs","bitlbee-plugins"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8959,"column":3},"attr_expr":"bitlbee-plugins = callPackage ../applications/networking/instant-messengers/bitlbee/plugins.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix","line":7,"column":1},"lambda_expr":"plugins:\nrunCommandLocal \"bitlbee-plugins\"\n  {\n    inherit plugins;\n    buildInputs = [\n      bitlbee\n      plugins\n    ];\n  }\n  ''\n    mkdir -p $out/lib/bitlbee\n    for plugin in $plugins; do\n      for thing in $(ls $plugin/lib/bitlbee); do\n        ln -s $plugin/lib/bitlbee/$thing $out/lib/bitlbee/\n      done\n    done\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix","line":7,"column":1},"path":["pkgs","bitlbee-plugins"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix","line":7,"column":1},"path":["pkgs","bitlbee-plugins"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildArmTrustedFirmware","path":["pkgs","buildArmTrustedFirmware"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8209,"column":5},"attr_expr":"buildArmTrustedFirmware","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.buildBazelPackage","path":["pkgs","buildBazelPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5333,"column":3},"attr_expr":"buildBazelPackage = callPackage ../build-support/build-bazel-package { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-bazel-package/default.nix","line":8,"column":1},"lambda_expr":"args@{\n  name ? \"${args.pname}-${args.version}\",\n  bazel,\n  bazelFlags ? [ ],\n  bazelBuildFlags ? [ ],\n  bazelTestFlags ? [ ],\n  bazelRunFlags ? [ ],\n  runTargetFlags ? [ ],\n  bazelFetchFlags ? [ ],\n  bazelTargets ? [ ],\n  bazelTestTargets ? [ ],\n  bazelRunTarget ? null,\n  buildAttrs,\n  fetchAttrs,\n\n  # Newer versions of Bazel are moving away from built-in rules_cc and instead\n  # allow fetching it as an external dependency in a WORKSPACE file[1]. If\n  # removed in the fixed-output fetch phase, building will fail to download it.\n  # This can be seen e.g. in #73097\n  #\n  # This option allows configuring the removal of rules_cc in cases where a\n  # project depends on it via an external dependency.\n  #\n  # [1]: https://github.com/bazelbuild/rules_cc\n  removeRulesCC ? true,\n  removeLocalConfigCc ? true,\n  removeLocalConfigSh ? true,\n  removeLocal ? true,\n\n  # Use build --nobuild instead of fetch. This allows fetching the dependencies\n  # required for the build as configured, rather than fetching all the dependencies\n  # which may not work in some situations (e.g. Java code which ends up relying on\n  # Debian-specific /usr/share/java paths, but doesn't in the configured build).\n  fetchConfigured ? true,\n\n  # Don’t add Bazel --copt and --linkopt from NIX_CFLAGS_COMPILE /\n  # NIX_LDFLAGS. This is necessary when using a custom toolchain which\n  # Bazel wants all headers / libraries to come from, like when using\n  # CROSSTOOL. Weirdly, we can still get the flags through the wrapped\n  # compiler.\n  dontAddBazelOpts ? false,\n  ...\n}:\n\nlet\n  fArgs =\n    removeAttrs args [\n      \"buildAttrs\"\n      \"fetchAttrs\"\n      \"removeRulesCC\"\n    ]\n    // {\n      inherit\n        name\n        bazelFlags\n        bazelBuildFlags\n        bazelTestFlags\n        bazelRunFlags\n        runTargetFlags\n        bazelFetchFlags\n        bazelTargets\n        bazelTestTargets\n        bazelRunTarget\n        dontAddBazelOpts\n        ;\n    };\n  fBuildAttrs = fArgs // buildAttrs;\n  fFetchAttrs =\n    fArgs\n    // removeAttrs fetchAttrs [\n      \"hash\"\n      \"sha256\"\n    ];\n  bazelCmd =\n    {\n      cmd,\n      additionalFlags,\n      targets,\n      targetRunFlags ? [ ],\n    }:\n    lib.optionalString (targets != [ ]) ''\n      concatTo bazelFlagsArray bazelFlags\n\n      # See footnote called [USER and BAZEL_USE_CPP_ONLY_TOOLCHAIN variables]\n      BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \\\n      USER=homeless-shelter \\\n      bazel \\\n        --batch \\\n        --output_base=\"$bazelOut\" \\\n        --output_user_root=\"$bazelUserRoot\" \\\n        ${cmd} \\\n        --curses=no \\\n        \"''${copts[@]}\" \\\n        \"''${host_copts[@]}\" \\\n        \"''${linkopts[@]}\" \\\n        \"''${host_linkopts[@]}\" \\\n        \"''${bazelFlagsArray[@]}\" \\\n        ${lib.strings.concatStringsSep \" \" additionalFlags} \\\n        ${lib.strings.concatStringsSep \" \" targets} \\\n        ${\n          lib.optionalString (targetRunFlags != [ ]) \" -- \" + lib.strings.concatStringsSep \" \" targetRunFlags\n        }\n    '';\n  # we need this to chmod dangling symlinks on darwin, gnu coreutils refuses to do so:\n  # chmod: cannot operate on dangling symlink '$symlink'\n  chmodder = writeCBin \"chmodder\" ''\n    #include <stdio.h>\n    #include <stdlib.h>\n    #include <sys/types.h>\n    #include <sys/stat.h>\n    #include <errno.h>\n    #include <string.h>\n\n    int main(int argc, char** argv) {\n      mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO;\n      if (argc != 2) {\n        fprintf(stderr, \"usage: chmodder file\");\n        exit(EXIT_FAILURE);\n      }\n      if (lchmod(argv[1], mode) != 0) {\n        fprintf(stderr, \"failed to lchmod '%s': %s\", argv[0], strerror(errno));\n        exit(EXIT_FAILURE);\n      }\n    }\n  '';\nin\nstdenv.mkDerivation (\n  fBuildAttrs\n  // {\n\n    deps = stdenv.mkDerivation (\n      fFetchAttrs\n      // {\n        name = \"${name}-deps.tar\";\n\n        impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ fFetchAttrs.impureEnvVars or [ ];\n\n        nativeBuildInputs = fFetchAttrs.nativeBuildInputs or [ ] ++ [ bazel ];\n\n        preHook = fFetchAttrs.preHook or \"\" + ''\n          export bazelOut=\"$(echo ''${NIX_BUILD_TOP}/output | sed -e 's,//,/,g')\"\n          export bazelUserRoot=\"$(echo ''${NIX_BUILD_TOP}/tmp | sed -e 's,//,/,g')\"\n          export HOME=\"$NIX_BUILD_TOP\"\n          export USER=\"nix\"\n          # This is needed for git_repository with https remotes\n          export GIT_SSL_CAINFO=\"${cacert}/etc/ssl/certs/ca-bundle.crt\"\n          # This is needed for Bazel fetchers that are themselves programs (e.g.\n          # rules_go using the go toolchain)\n          export SSL_CERT_FILE=\"${cacert}/etc/ssl/certs/ca-bundle.crt\"\n        '';\n\n        buildPhase =\n          fFetchAttrs.buildPhase or ''\n            runHook preBuild\n\n            ${bazelCmd {\n              cmd = if fetchConfigured then \"build --nobuild\" else \"fetch\";\n              additionalFlags = [\n                # We disable multithreading for the fetching phase since it can lead to timeouts with many dependencies/threads:\n                # https://github.com/bazelbuild/bazel/issues/6502\n                \"--loading_phase_threads=1\"\n                \"$bazelFetchFlags\"\n              ]\n              ++ (\n                if fetchConfigured then\n                  [\n                    \"--jobs\"\n                    \"$NIX_BUILD_CORES\"\n                  ]\n                else\n                  [ ]\n              );\n              targets = fFetchAttrs.bazelTargets ++ fFetchAttrs.bazelTestTargets;\n            }}\n\n            runHook postBuild\n          '';\n\n        installPhase =\n          fFetchAttrs.installPhase or (\n            ''\n              runHook preInstall\n\n              # Remove all built in external workspaces, Bazel will recreate them when building\n              rm -rf $bazelOut/external/{bazel_tools,\\@bazel_tools.marker}\n              ${lib.optionalString removeRulesCC \"rm -rf $bazelOut/external/{rules_cc,\\\\@rules_cc.marker}\"}\n\n              rm -rf $bazelOut/external/{embedded_jdk,\\@embedded_jdk.marker}\n              ${lib.optionalString removeLocalConfigCc \"rm -rf $bazelOut/external/{local_config_cc,\\\\@local_config_cc.marker}\"}\n              ${lib.optionalString removeLocal \"rm -rf $bazelOut/external/{local_*,\\\\@local_*.marker}\"}\n\n              # For bazel version >= 6 with bzlmod.\n              ${lib.optionalString removeLocalConfigCc \"rm -rf $bazelOut/external/*[~+]{local_config_cc,local_config_cc.marker}\"}\n              ${lib.optionalString removeLocalConfigSh \"rm -rf $bazelOut/external/*[~+]{local_config_sh,local_config_sh.marker}\"}\n              ${lib.optionalString removeLocal \"rm -rf $bazelOut/external/*[~+]{local_jdk,local_jdk.marker}\"}\n\n              # Clear markers\n              find $bazelOut/external -name '@*\\.marker' -exec sh -c 'echo > {}' \\;\n\n              # Remove all vcs files\n              rm -rf $(find $bazelOut/external -type d -name .git)\n              rm -rf $(find $bazelOut/external -type d -name .svn)\n              rm -rf $(find $bazelOut/external -type d -name .hg)\n\n              # Removing top-level symlinks along with their markers.\n              # This is needed because they sometimes point to temporary paths (?).\n              # For example, in Tensorflow-gpu build:\n              # platforms -> NIX_BUILD_TOP/tmp/install/35282f5123611afa742331368e9ae529/_embedded_binaries/platforms\n              find $bazelOut/external -maxdepth 1 -type l | while read symlink; do\n                name=\"$(basename \"$symlink\")\"\n                rm \"$symlink\"\n                test -f \"$bazelOut/external/@$name.marker\" && rm \"$bazelOut/external/@$name.marker\" || true\n              done\n\n              # Patching symlinks to remove build directory reference\n              find $bazelOut/external -type l | while read symlink; do\n                new_target=\"$(readlink \"$symlink\" | sed \"s,$NIX_BUILD_TOP,NIX_BUILD_TOP,\")\"\n                rm \"$symlink\"\n                ln -sf \"$new_target\" \"$symlink\"\n            ''\n            + lib.optionalString stdenv.hostPlatform.isDarwin ''\n              # on linux symlink permissions cannot be modified, so we modify those on darwin to match the linux ones\n              ${chmodder}/bin/chmodder \"$symlink\"\n            ''\n            + ''\n              done\n\n              echo '${bazel.name}' > $bazelOut/external/.nix-bazel-version\n\n              (cd $bazelOut/ && tar cf $out --sort=name --mtime='@1' --owner=0 --group=0 --numeric-owner external/)\n\n              runHook postInstall\n            ''\n          );\n\n        dontFixup = true;\n\n        inherit (lib.fetchers.normalizeHash { hashTypes = [ \"sha256\" ]; } fetchAttrs)\n          outputHash\n          outputHashAlgo\n          ;\n      }\n      // (\n        if fFetchAttrs.__structuredAttrs or false then\n          {\n            # With __structuredAttrs = true, the build always fails with “output $out is not allowed to refer to the following paths: $out”.\n            # This appears to be the same issue as in 283bca9648fc1afb01d3e4c3b5919251429da907.\n            outputChecks.out.allowedRequisites = [ \"out\" ];\n          }\n        else\n          {\n            allowedRequisites = [ ];\n          }\n      )\n    );\n\n    nativeBuildInputs = fBuildAttrs.nativeBuildInputs or [ ] ++ [\n      (bazel.override { enableNixHacks = true; })\n    ];\n\n    preHook = fBuildAttrs.preHook or \"\" + ''\n      export bazelOut=\"$NIX_BUILD_TOP/output\"\n      export bazelUserRoot=\"$NIX_BUILD_TOP/tmp\"\n      export HOME=\"$NIX_BUILD_TOP\"\n    '';\n\n    preConfigure = ''\n      mkdir -p \"$bazelOut\"\n\n      (cd $bazelOut && tar xf $deps)\n\n      test \"${bazel.name}\" = \"$(<$bazelOut/external/.nix-bazel-version)\" || {\n        echo \"fixed output derivation was built for a different bazel version\" >&2\n        echo \"     got: $(<$bazelOut/external/.nix-bazel-version)\" >&2\n        echo \"expected: ${bazel.name}\" >&2\n        exit 1\n      }\n\n      chmod -R +w $bazelOut\n      find $bazelOut -type l | while read symlink; do\n        if [[ $(readlink \"$symlink\") == *NIX_BUILD_TOP* ]]; then\n          ln -sf $(readlink \"$symlink\" | sed \"s,NIX_BUILD_TOP,$NIX_BUILD_TOP,\") \"$symlink\"\n        fi\n      done\n    ''\n    + fBuildAttrs.preConfigure or \"\";\n\n    buildPhase =\n      fBuildAttrs.buildPhase or ''\n        runHook preBuild\n\n        # Bazel sandboxes the execution of the tools it invokes, so even though we are\n        # calling the correct nix wrappers, the values of the environment variables\n        # the wrappers are expecting will not be set. So instead of relying on the\n        # wrappers picking them up, pass them in explicitly via `--copt`, `--linkopt`\n        # and related flags.\n\n        copts=()\n        host_copts=()\n        linkopts=()\n        host_linkopts=()\n        if [ -z \"''${dontAddBazelOpts:-}\" ]; then\n          for flag in $NIX_CFLAGS_COMPILE; do\n            copts+=( \"--copt=$flag\" )\n            host_copts+=( \"--host_copt=$flag\" )\n          done\n          for flag in $NIX_CXXSTDLIB_COMPILE; do\n            copts+=( \"--copt=$flag\" )\n            host_copts+=( \"--host_copt=$flag\" )\n          done\n          for flag in $NIX_LDFLAGS; do\n            linkopts+=( \"--linkopt=-Wl,$flag\" )\n            host_linkopts+=( \"--host_linkopt=-Wl,$flag\" )\n          done\n        fi\n\n        ${bazelCmd {\n          cmd = \"test\";\n          additionalFlags = [\n            \"--test_output=errors\"\n          ]\n          ++ fBuildAttrs.bazelTestFlags\n          ++ [\n            \"--jobs\"\n            \"$NIX_BUILD_CORES\"\n          ];\n          targets = fBuildAttrs.bazelTestTargets;\n        }}\n        ${bazelCmd {\n          cmd = \"build\";\n          additionalFlags = fBuildAttrs.bazelBuildFlags ++ [\n            \"--jobs\"\n            \"$NIX_BUILD_CORES\"\n          ];\n          targets = fBuildAttrs.bazelTargets;\n        }}\n        ${bazelCmd {\n          cmd = \"run\";\n          additionalFlags = fBuildAttrs.bazelRunFlags ++ [\n            \"--jobs\"\n            \"$NIX_BUILD_CORES\"\n          ];\n          # Bazel run only accepts a single target, but `bazelCmd` expects `targets` to be a list.\n          targets = lib.optionals (fBuildAttrs.bazelRunTarget != null) [ fBuildAttrs.bazelRunTarget ];\n          targetRunFlags = fBuildAttrs.runTargetFlags;\n        }}\n        runHook postBuild\n      '';\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-bazel-package/default.nix","line":8,"column":1},"path":["pkgs","buildBazelPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-bazel-package/default.nix","line":8,"column":1},"path":["pkgs","buildBazelPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildDartApplication","path":["pkgs","buildDartApplication"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11792,"column":3},"attr_expr":"buildDartApplication = callPackage ../build-support/dart/build-dart-application { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildDartApplication"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildDartApplication"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildDotnetGlobalTool","path":["pkgs","buildDotnetGlobalTool"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":485,"column":5},"attr_expr":"buildDotnetGlobalTool","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix","line":9,"column":1},"lambda_expr":"fnOrAttrs:\n\nbuildDotnetModule (\n  finalAttrs:\n  (\n    {\n      pname,\n      version,\n      # Name of the nuget package to install, if different from pname\n      nugetName ? pname,\n      # Hash of the nuget package to install, will be given on first build\n      # nugetHash uses SRI hash and should be preferred\n      nugetHash ? \"\",\n      nugetSha256 ? \"\",\n      # Additional nuget deps needed by the tool package\n      nugetDeps ? (_: [ ]),\n      # Executables to wrap into `$out/bin`, same as in `buildDotnetModule`, but with\n      # a default of `pname` instead of null, to avoid auto-wrapping everything\n      executables ? pname,\n      # The dotnet runtime to use, dotnet tools need a full SDK to function\n      dotnet-runtime ? dotnet-sdk,\n      ...\n    }@args:\n    let\n      nupkg = fetchNupkg {\n        pname = nugetName;\n        inherit version;\n        sha256 = nugetSha256;\n        hash = nugetHash;\n        installable = true;\n      };\n    in\n    args\n    // {\n      inherit\n        pname\n        version\n        dotnet-runtime\n        executables\n        ;\n\n      src = emptyDirectory;\n\n      buildInputs = [ nupkg ];\n\n      dotnetGlobalTool = true;\n\n      useDotnetFromEnv = true;\n\n      dontBuild = true;\n\n      installPhase = ''\n        runHook preInstall\n\n        dotnet tool install --tool-path $out/lib/${pname} ${nugetName} --version ${version}\n\n        # remove files that contain nix store paths to temp nuget sources we made\n        find $out -name 'project.assets.json' -delete\n        find $out -name '.nupkg.metadata' -delete\n\n        runHook postInstall\n      '';\n\n      passthru = {\n        updateScript = ./update.sh;\n        nupkg = nupkg;\n      }\n      // args.passthru or { };\n    }\n  )\n    (if lib.isFunction fnOrAttrs then fnOrAttrs finalAttrs else fnOrAttrs)\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix","line":9,"column":1},"path":["pkgs","buildDotnetGlobalTool"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-global-tool/default.nix","line":9,"column":1},"path":["pkgs","buildDotnetGlobalTool"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildDotnetModule","path":["pkgs","buildDotnetModule"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":484,"column":5},"attr_expr":"buildDotnetModule","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-module/default.nix","line":193,"column":1},"lambda_expr":"fnOrAttrs:\nstdenvNoCC.mkDerivation (\n  finalAttrs:\n  let\n    args = if lib.isFunction fnOrAttrs then fnOrAttrs (args' // finalAttrs) else fnOrAttrs;\n    args' = transformArgs finalAttrs args;\n    inherit (args')\n      nugetDeps\n      runtimeId\n      meta\n      dotnet-sdk\n      ;\n    args'' = removeAttrs args' [\n      \"nugetDeps\"\n      \"runtimeId\"\n      \"installPath\"\n      \"executables\"\n      \"projectFile\"\n      \"projectReferences\"\n      \"runtimeDeps\"\n      \"disabledTests\"\n      \"testProjectFile\"\n      \"buildType\"\n      \"selfContainedBuild\"\n      \"useDotnet\"\n      \"useAppHost\"\n      \"dotnet-sdk\"\n    ];\n  in\n  if nugetDeps != null then\n    addNuGetDeps {\n      inherit nugetDeps;\n      overrideFetchAttrs =\n        old:\n        lib.optionalAttrs ((args'.runtimeId or null) == null) rec {\n          dotnetRuntimeIds = map (system: dotnetCorePackages.systemToDotnetRid system) meta.platforms;\n          buildInputs =\n            old.buildInputs\n            ++ lib.concatLists (lib.attrValues (lib.getAttrs dotnetRuntimeIds dotnet-sdk.targetPackages));\n        };\n    } args'' finalAttrs\n  else\n    args''\n)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-module/default.nix","line":193,"column":1},"path":["pkgs","buildDotnetModule"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-module/default.nix","line":193,"column":1},"path":["pkgs","buildDotnetModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildDotnetPackage","path":["pkgs","buildDotnetPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":491,"column":3},"attr_expr":"buildDotnetPackage = callPackage ../build-support/dotnet/build-dotnet-package { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-package/default.nix","line":10,"column":1},"lambda_expr":"attrsOrig@{\n  pname,\n  version,\n  nativeBuildInputs ? [ ],\n  xBuildFiles ? [ ],\n  xBuildFlags ? [ \"/p:Configuration=Release\" ],\n  outputFiles ? [ \"bin/Release/*\" ],\n  dllFiles ? [ \"*.dll\" ],\n  exeFiles ? [ \"*.exe\" ],\n  # Additional arguments to pass to the makeWrapper function, which wraps\n  # generated binaries.\n  makeWrapperArgs ? [ ],\n  ...\n}:\nlet\n  arrayToShell = (a: toString (map (lib.escape (lib.stringToCharacters \"\\\\ ';$`()|<>\\t\")) a));\n\n  attrs = {\n    inherit pname version;\n\n    nativeBuildInputs = [\n      pkg-config\n      makeWrapper\n      dotnetbuildhelpers\n      mono\n    ]\n    ++ nativeBuildInputs;\n\n    configurePhase = ''\n      runHook preConfigure\n\n      [ -z \"''${dontPlacateNuget-}\" ] && placate-nuget.sh\n      [ -z \"''${dontPlacatePaket-}\" ] && placate-paket.sh\n      [ -z \"''${dontPatchFSharpTargets-}\" ] && patch-fsharp-targets.sh\n\n      runHook postConfigure\n    '';\n\n    buildPhase = ''\n      runHook preBuild\n\n      echo Building dotNET packages...\n\n      # Probably needs to be moved to fsharp\n      if pkg-config FSharp.Core\n      then\n        export FSharpTargetsPath=\"$(dirname $(pkg-config FSharp.Core --variable=Libraries))/Microsoft.FSharp.Targets\"\n      fi\n\n      ran=\"\"\n      for xBuildFile in ${arrayToShell xBuildFiles} ''${xBuildFilesExtra}\n      do\n        ran=\"yes\"\n        xbuild ${arrayToShell xBuildFlags} ''${xBuildFlagsArray} $xBuildFile\n      done\n\n      [ -z \"$ran\" ] && xbuild ${arrayToShell xBuildFlags} ''${xBuildFlagsArray}\n\n      runHook postBuild\n    '';\n\n    dontStrip = true;\n\n    installPhase = ''\n      runHook preInstall\n\n      target=\"$out/lib/dotnet/${pname}\"\n      mkdir -p \"$target\"\n\n      cp -rv ${arrayToShell outputFiles} \"''${outputFilesArray[@]}\" \"$target\"\n\n      if [ -z \"''${dontRemoveDuplicatedDlls-}\" ]\n      then\n        pushd \"$out\"\n        remove-duplicated-dlls.sh\n        popd\n      fi\n\n      set -f\n      for dllPattern in ${arrayToShell dllFiles} ''${dllFilesArray[@]}\n      do\n        set +f\n        for dll in \"$target\"/$dllPattern\n        do\n          [ -f \"$dll\" ] || continue\n          if pkg-config $(basename -s .dll \"$dll\")\n          then\n            echo \"$dll already exported by a buildInputs, not re-exporting\"\n          else\n            create-pkg-config-for-dll.sh \"$out/lib/pkgconfig\" \"$dll\"\n          fi\n        done\n      done\n\n      set -f\n      for exePattern in ${arrayToShell exeFiles} ''${exeFilesArray[@]}\n      do\n        set +f\n        for exe in \"$target\"/$exePattern\n        do\n          [ -f \"$exe\" ] || continue\n          mkdir -p \"$out\"/bin\n          commandName=\"$(basename -s .exe \"$(echo \"$exe\" | tr \"[A-Z]\" \"[a-z]\")\")\"\n          makeWrapper \\\n            \"${mono}/bin/mono\" \\\n            \"$out\"/bin/\"$commandName\" \\\n            --add-flags \"\\\"$exe\\\"\" \\\n            ''${makeWrapperArgs}\n        done\n      done\n\n      runHook postInstall\n    '';\n  };\nin\nstdenv.mkDerivation (attrs // (removeAttrs attrsOrig [ \"nativeBuildInputs\" ]))","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-package/default.nix","line":10,"column":1},"path":["pkgs","buildDotnetPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/build-dotnet-package/default.nix","line":10,"column":1},"path":["pkgs","buildDotnetPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildDubPackage","path":["pkgs","buildDubPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2181,"column":5},"attr_expr":"buildDubPackage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildDubPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildDubPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildEmscriptenPackage","path":["pkgs","buildEmscriptenPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2215,"column":3},"attr_expr":"buildEmscriptenPackage = callPackage ../development/em-modules/generic { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/em-modules/generic/default.nix","line":8,"column":1},"lambda_expr":"argsFun:\n\nlet\n  wrapDerivation = f: pkgs.stdenv.mkDerivation (finalAttrs: f (lib.toFunction argsFun finalAttrs));\nin\nwrapDerivation (\n  {\n    buildInputs ? [ ],\n    nativeBuildInputs ? [ ],\n\n    enableParallelBuilding ? true,\n\n    meta ? { },\n    ...\n  }@args:\n\n  args\n  // {\n\n    pname = \"emscripten-${lib.getName args}\";\n    version = lib.getVersion args;\n    buildInputs = [\n      emscripten\n      python3\n    ]\n    ++ buildInputs;\n    nativeBuildInputs = [\n      emscripten\n      python3\n    ]\n    ++ nativeBuildInputs;\n\n    env = args.env or { } // {\n      # fake conftest results with emscripten's python magic\n      EMCONFIGURE_JS = 2;\n    };\n\n    # removes archive indices\n    dontStrip = args.dontStrip or true;\n\n    configurePhase =\n      args.configurePhase or ''\n        # FIXME: Some tests require writing at $HOME\n        HOME=$TMPDIR\n        runHook preConfigure\n\n        emconfigure ./configure --prefix=$out\n\n        mkdir -p .emscriptencache\n        export EM_CACHE=$(pwd)/.emscriptencache\n\n        runHook postConfigure\n      '';\n\n    buildPhase =\n      args.buildPhase or ''\n        runHook preBuild\n\n        HOME=$TMPDIR\n\n        emmake make\n\n        runHook postBuild\n      '';\n\n    doCheck = true;\n\n    checkPhase =\n      args.checkPhase or ''\n        runHook preCheck\n\n        echo \"Please provide a test for your emscripten based library/tool, see libxml2 as an exmple on how to use emcc/node to verify your build\"\n        echo \"\"\n        echo \"In normal C 'unresolved symbols' would yield an error and a breake of execution. In contrast, in emscripten they are only a warning which is ok given that emscripten assumptions about shared libraries.\"\n        echo \"  -> https://github.com/kripken/emscripten/wiki/Linking\"\n        echo \"So just assume the dependencies were built using hydra, then YOU WILL NEVER see the warning and your code depending on a library will always fail!\"\n        exit 1\n\n        runHook postCheck\n      '';\n\n    enableParallelBuilding = args.enableParallelBuilding or true;\n\n    meta = {\n      # Add default meta information\n      platforms = lib.platforms.all;\n      # Do not build this automatically\n      hydraPlatforms = [ ];\n    }\n    // meta\n    // {\n      # add an extra maintainer to every package\n      maintainers = (meta.maintainers or [ ]) ++ [ lib.maintainers.qknight ];\n    };\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/em-modules/generic/default.nix","line":8,"column":1},"path":["pkgs","buildEmscriptenPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/em-modules/generic/default.nix","line":8,"column":1},"path":["pkgs","buildEmscriptenPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildEnv","path":["pkgs","buildEnv"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":364,"column":3},"attr_expr":"buildEnv = callPackage ../build-support/buildenv { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/buildenv/default.nix","line":35,"column":7},"lambda_expr":"finalAttrs:\n      {\n        # The manifest file (if any).  A symlink $out/manifest will be\n        # created to it.\n        manifest ? \"\",\n\n        # The paths to symlink.\n        paths,\n\n        # Whether to ignore collisions or abort.\n        ignoreCollisions ? false,\n\n        # Whether to ignore outputs that are a single file instead of a directory.\n        ignoreSingleFileOutputs ? false,\n\n        # Whether to include closures of all input paths.\n        includeClosures ? false,\n\n        # If there is a collision, check whether the contents and permissions match\n        # and only if not, throw a collision error.\n        checkCollisionContents ? true,\n\n        # The paths (relative to each element of `paths') that we want to\n        # symlink (e.g., [\"/bin\"]).  Any file not inside any of the\n        # directories in the list is not symlinked.\n        pathsToLink ? [ \"/\" ],\n\n        # The package outputs to include. By default, only the default\n        # output is included.\n        extraOutputsToInstall ? [ ],\n\n        # Root the result in directory \"$out${extraPrefix}\", e.g. \"/share\".\n        extraPrefix ? \"\",\n\n        # Shell commands to run after building the symlink tree.\n        postBuild ? \"\",\n\n        passthru ? { },\n        meta ? { },\n\n        # Additional stdenv.mkDerivation arguments\n        # such as nativeBuildInputs/buildInputs for postBuild dependencies.\n        derivationArgs ? { },\n\n        # Placeholder name arguments.\n        name ? null,\n        pname ? null,\n        version ? null,\n\n        # `stdenv.mkDerivation` args before introducing derivationArgs.\n        nativeBuildInputs ? null,\n        buildInputs ? null,\n      }@args:\n      let\n        compatArgs = {\n          ${if args ? nativeBuildInputs then \"nativeBuildInputs\" else null} = nativeBuildInputs;\n          ${if args ? buildInputs then \"buildInputs\" else null} = buildInputs;\n        };\n      in\n      compatArgs\n      // derivationArgs\n      // {\n        # Explicitly opt in: builder.pl reads all configuration from file $ENV[\"NIX_ATTRS_JSON_FILE\"].\n        __structuredAttrs = true;\n\n        inherit\n          extraOutputsToInstall\n          manifest\n          ignoreCollisions\n          checkCollisionContents\n          ignoreSingleFileOutputs\n          includeClosures\n          meta\n          pathsToLink\n          extraPrefix\n          postBuild\n          ;\n\n        chosenOutputs = map (drv: {\n          paths =\n            # First add the usual output(s): respect if user has chosen explicitly,\n            # and otherwise use `meta.outputsToInstall`. The attribute is guaranteed\n            # to exist in mkDerivation-created cases. The other cases (e.g. runCommand)\n            # aren't expected to have multiple outputs.\n            (\n              if\n                (!drv ? outputSpecified || !drv.outputSpecified) && drv.meta.outputsToInstall or null != null\n              then\n                map (outName: drv.${outName}) drv.meta.outputsToInstall\n              else\n                [ drv ]\n            )\n            # Add any extra outputs specified by the caller of `buildEnv`.\n            ++ concatMap (\n              outName: if drv ? ${outName} then [ drv.${outName} ] else [ ]\n            ) finalAttrs.extraOutputsToInstall;\n          priority = drv.meta.priority or lib.meta.defaultPriority;\n          # Silently use the original `paths` if `passthru.paths` is missing.\n        }) finalAttrs.passthru.paths or paths;\n\n        extraPathsFrom = lib.optionalString finalAttrs.includeClosures (\n          # filter all null elements and concatenate the output paths together\n          # in the final closure\n          writeClosure (lib.concatMap (p: if p == null then [ ] else p.paths) finalAttrs.chosenOutputs)\n        );\n\n        preferLocalBuild = derivationArgs.preferLocalBuild or true;\n        allowSubstitutes = derivationArgs.allowSubstitutes or false;\n\n        buildCommand = ''\n          ${buildPackages.perl}/bin/perl -w ${builder}\n          eval \"$postBuild\"\n        '';\n\n        passthru = {\n          # The `paths` attribute is referenced and overridden from passthru\n          inherit paths;\n        }\n        // derivationArgs.passthru or { }\n        // passthru;\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/buildenv/default.nix","line":35,"column":7},"path":["pkgs","buildEnv"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/buildenv/default.nix","line":35,"column":7},"path":["pkgs","buildEnv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildFHSEnv","path":["pkgs","buildFHSEnv"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":366,"column":3},"attr_expr":"buildFHSEnv = buildFHSEnvBubblewrap;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-bubblewrap/default.nix","line":14,"column":1},"lambda_expr":"{\n  pname ? throw \"You must provide either `name` or `pname`\",\n  version ? throw \"You must provide either `name` or `version`\",\n  name ? \"${pname}-${version}\",\n  runScript ? \"bash\",\n  nativeBuildInputs ? [ ],\n  extraInstallCommands ? \"\",\n  executableName ? args.pname or name,\n  meta ? { },\n  passthru ? { },\n  extraPreBwrapCmds ? \"\",\n  extraBwrapArgs ? [ ],\n  unshareUser ? false,\n  unshareIpc ? false,\n  unsharePid ? false,\n  unshareNet ? false,\n  unshareUts ? false,\n  unshareCgroup ? false,\n  privateTmp ? false,\n  chdirToPwd ? true,\n  dieWithParent ? true,\n  ...\n}@args:\n\n# NOTE:\n# `pname` and `version` will throw if they were not provided.\n# Use `name` instead of directly evaluating `pname` or `version`.\n#\n# If you need `pname` or `version` specifically, use `args` instead:\n# e.g. `args.pname or ...`.\n\nlet\n  inherit (lib)\n    concatLines\n    concatStringsSep\n    escapeShellArgs\n    filter\n    optionalString\n    splitString\n    ;\n\n  inherit (lib.attrsets) removeAttrs;\n\n  # The splicing code does not handle `pkgsi686Linux` well, so we have to be\n  # explicit about which package set it's coming from.\n  inherit (pkgsHostTarget) pkgsi686Linux;\n\n  # we don't know which have been supplied, and want to avoid defaulting missing attrs to null. Passed into runCommandLocal\n  nameAttrs = lib.filterAttrs (\n    key: value:\n    builtins.elem key [\n      \"name\"\n      \"pname\"\n      \"version\"\n    ]\n  ) args;\n\n  buildFHSEnv = callPackage ./buildFHSEnv.nix { };\n\n  fhsenv = buildFHSEnv (\n    removeAttrs args [\n      \"runScript\"\n      \"extraInstallCommands\"\n      \"meta\"\n      \"passthru\"\n      \"extraPreBwrapCmds\"\n      \"extraBwrapArgs\"\n      \"dieWithParent\"\n      \"unshareUser\"\n      \"unshareCgroup\"\n      \"unshareUts\"\n      \"unshareNet\"\n      \"unsharePid\"\n      \"unshareIpc\"\n      \"privateTmp\"\n    ]\n  );\n\n  etcBindEntries =\n    let\n      files = [\n        # NixOS Compatibility\n        \"static\"\n        \"nix\" # mainly for nixVersions.git users, but also for access to nix/netrc\n        # Shells\n        \"shells\"\n        \"bashrc\"\n        \"zshenv\"\n        \"zshrc\"\n        \"zinputrc\"\n        \"zprofile\"\n        # Users, Groups, NSS\n        \"passwd\"\n        \"group\"\n        \"shadow\"\n        \"hosts\"\n        \"resolv.conf\"\n        \"nsswitch.conf\"\n        # User profiles\n        \"profiles\"\n        # Sudo & Su\n        \"login.defs\"\n        \"sudoers\"\n        \"sudoers.d\"\n        # Time\n        \"localtime\"\n        \"zoneinfo\"\n        # Other Core Stuff\n        \"machine-id\"\n        \"os-release\"\n        # PAM\n        \"pam.d\"\n        # Fonts\n        \"fonts\"\n        # ALSA\n        \"alsa\"\n        \"asound.conf\"\n        # SSL\n        \"ssl/certs\"\n        \"ca-certificates\"\n        \"pki\"\n        # Custom dconf profiles\n        \"dconf\"\n      ];\n    in\n    map (path: \"/etc/${path}\") files;\n\n  # Here's the problem case:\n  # - we need to run bash to run the init script\n  # - LD_PRELOAD may be set to another dynamic library, requiring us to discover its dependencies\n  # - oops! ldconfig is part of the init script, and it hasn't run yet\n  # - everything explodes\n  #\n  # In particular, this happens with fhsenvs in fhsenvs, e.g. when running\n  # a wrapped game from Steam.\n  #\n  # So, instead of doing that, we build a tiny static (important!) shim\n  # that executes ldconfig in a completely clean environment to generate\n  # the initial cache, and then execs into the \"real\" init, which is the\n  # first time we see anything dynamically linked at all.\n  #\n  # Also, the real init is placed strategically at /init, so we don't\n  # have to recompile this every time.\n  containerInit =\n    runCommandCC \"container-init\"\n      {\n        buildInputs = [ stdenv.cc.libc.static or null ];\n      }\n      ''\n        $CXX -static -s -o $out ${./container-init.cc}\n      '';\n\n  realInit =\n    run:\n    writeShellScript \"${name}-init\" ''\n      source /etc/profile\n      exec ${run} \"$@\"\n    '';\n\n  indentLines = str: concatLines (map (s: \"  \" + s) (filter (s: s != \"\") (splitString \"\\n\" str)));\n  bwrapCmd =\n    {\n      initArgs ? \"\",\n    }:\n    ''\n      ignored=(/nix /dev /proc /etc ${optionalString privateTmp \"/tmp\"})\n      ro_mounts=()\n      symlinks=()\n      etc_ignored=()\n\n      ${extraPreBwrapCmds}\n\n      # loop through all entries of root in the fhs environment, except its /etc.\n      for i in ${fhsenv}/*; do\n        path=\"/''${i##*/}\"\n        if [[ $path == '/etc' ]]; then\n          :\n        elif [[ -L $i ]]; then\n          symlinks+=(--symlink \"$(${coreutils}/bin/readlink \"$i\")\" \"$path\")\n          ignored+=(\"$path\")\n        else\n          ro_mounts+=(--ro-bind \"$i\" \"$path\")\n          ignored+=(\"$path\")\n        fi\n      done\n\n      # loop through the entries of /etc in the fhs environment.\n      if [[ -d ${fhsenv}/etc ]]; then\n        for i in ${fhsenv}/etc/*; do\n          path=\"/''${i##*/}\"\n          # NOTE: we're binding /etc/fonts and /etc/ssl/certs from the host so we\n          # don't want to override it with a path from the FHS environment.\n          if [[ $path == '/fonts' || $path == '/ssl' ]]; then\n            continue\n          fi\n          if [[ -L $i ]]; then\n            symlinks+=(--symlink \"$i\" \"/etc$path\")\n          else\n            ro_mounts+=(--ro-bind \"$i\" \"/etc$path\")\n          fi\n          etc_ignored+=(\"/etc$path\")\n        done\n      fi\n\n      # propagate /etc from the actual host if nested\n      if [[ -e /.host-etc ]]; then\n        ro_mounts+=(--ro-bind /.host-etc /.host-etc)\n      else\n        ro_mounts+=(--ro-bind /etc /.host-etc)\n      fi\n\n      declare -A etc_ignored_set\n      for ign in \"''${etc_ignored[@]}\"; do\n        etc_ignored_set[$ign]=1\n      done\n\n      # link selected etc entries from the actual root\n      for i in ${escapeShellArgs etcBindEntries}; do\n        if [[ -n \"''${etc_ignored_set[$i]:-}\" ]]; then\n          continue\n        fi\n        if [[ -e $i ]]; then\n          symlinks+=(--symlink \"/.host-etc/''${i#/etc/}\" \"$i\")\n        fi\n      done\n\n      declare -A ignored_set\n      for ign in \"''${ignored[@]}\"; do\n        ignored_set[$ign]=1\n      done\n\n      declare -a auto_mounts\n      # loop through all directories in the root\n      for dir in /*; do\n        # if it is a directory and not already provided by the FHS env or\n        # explicitly ignored, bind-mount it into the chroot. Use exact match\n        # via associative array because regex substring matching incorrectly\n        # skips prefixes (e.g. /sb would match /sbin and never get mounted,\n        # breaking --chdir when CWD is on a custom mount like /sb/project).\n        # https://github.com/NixOS/nixpkgs/issues/241151\n        if [[ -d \"$dir\" ]] && [[ -z \"''${ignored_set[$dir]:-}\" ]]; then\n          # add it to the mount list\n          auto_mounts+=(--bind \"$dir\" \"$dir\")\n        fi\n      done\n\n      declare -a x11_args\n      # Always mount a tmpfs on /tmp/.X11-unix\n      # Rationale: https://github.com/flatpak/flatpak/blob/be2de97e862e5ca223da40a895e54e7bf24dbfb9/common/flatpak-run.c#L277\n      x11_args+=(--tmpfs /tmp/.X11-unix)\n\n      # Try to guess X socket path. This doesn't cover _everything_, but it covers some things.\n      if [[ \"$DISPLAY\" == *:* ]]; then\n        # recover display number from $DISPLAY formatted [host]:num[.screen]\n        display_nr=''${DISPLAY/#*:} # strip host\n        display_nr=''${display_nr/%.*} # strip screen\n        local_socket=/tmp/.X11-unix/X$display_nr\n        x11_args+=(--ro-bind-try \"$local_socket\" \"$local_socket\")\n      fi\n\n      ${optionalString privateTmp ''\n        # sddm places XAUTHORITY in /tmp\n        if [[ \"$XAUTHORITY\" == /tmp/* ]]; then\n          x11_args+=(--ro-bind-try \"$XAUTHORITY\" \"$XAUTHORITY\")\n        fi\n\n        # dbus-run-session puts the socket in /tmp\n        IFS=\";\" read -ra addrs <<<\"$DBUS_SESSION_BUS_ADDRESS\"\n        for addr in \"''${addrs[@]}\"; do\n          [[ \"$addr\" == unix:* ]] || continue\n          IFS=\",\" read -ra parts <<<\"''${addr#unix:}\"\n          for part in \"''${parts[@]}\"; do\n            printf -v part '%s' \"''${part//\\\\/\\\\\\\\}\"\n            printf -v part '%b' \"''${part//%/\\\\x}\"\n            [[ \"$part\" == path=/tmp/* ]] || continue\n            x11_args+=(--ro-bind-try \"''${part#path=}\" \"''${part#path=}\")\n          done\n        done\n      ''}\n\n      cmd=(\n        ${bubblewrap}/bin/bwrap\n        --dev-bind /dev /dev\n        --proc /proc\n        ${optionalString chdirToPwd ''--chdir \"$(pwd)\"''}\n        ${optionalString unshareUser \"--unshare-user\"}\n        ${optionalString unshareIpc \"--unshare-ipc\"}\n        ${optionalString unsharePid \"--unshare-pid\"}\n        ${optionalString unshareNet \"--unshare-net\"}\n        ${optionalString unshareUts \"--unshare-uts\"}\n        ${optionalString unshareCgroup \"--unshare-cgroup\"}\n        ${optionalString dieWithParent \"--die-with-parent\"}\n        --bind /nix /nix\n        ${optionalString privateTmp \"--tmpfs /tmp\"}\n        # Our glibc will look for the cache in its own path in `/nix/store`.\n        # As such, we need a cache to exist there, because pressure-vessel\n        # depends on the existence of an ld cache. However, adding one\n        # globally proved to be a bad idea (see #100655), the solution we\n        # settled on being mounting one via bwrap.\n        # Also, the cache needs to go to both 32 and 64 bit glibcs, for games\n        # of both architectures to work.\n        --tmpfs ${glibc}/etc \\\n        --tmpfs /etc \\\n        --symlink /etc/ld.so.conf ${glibc}/etc/ld.so.conf \\\n        --symlink /etc/ld.so.cache ${glibc}/etc/ld.so.cache \\\n        --ro-bind ${glibc}/etc/rpc ${glibc}/etc/rpc \\\n        --remount-ro ${glibc}/etc \\\n        --symlink ${realInit runScript} /init \\\n    ''\n    + optionalString fhsenv.isMultiBuild (indentLines ''\n      --tmpfs ${pkgsi686Linux.glibc}/etc \\\n      --symlink /etc/ld.so.conf ${pkgsi686Linux.glibc}/etc/ld.so.conf \\\n      --symlink /etc/ld.so.cache ${pkgsi686Linux.glibc}/etc/ld.so.cache \\\n      --ro-bind ${pkgsi686Linux.glibc}/etc/rpc ${pkgsi686Linux.glibc}/etc/rpc \\\n      --remount-ro ${pkgsi686Linux.glibc}/etc \\\n    '')\n    + ''\n        \"''${ro_mounts[@]}\"\n        \"''${symlinks[@]}\"\n        \"''${auto_mounts[@]}\"\n        \"''${x11_args[@]}\"\n        ${concatStringsSep \"\\n  \" extraBwrapArgs}\n        ${containerInit} ${initArgs}\n      )\n      exec \"''${cmd[@]}\"\n    '';\n\n  bin = writeShellScript \"${name}-bwrap\" (bwrapCmd {\n    initArgs = ''\"$@\"'';\n  });\nin\nrunCommandLocal name\n  (\n    nameAttrs\n    // {\n      inherit nativeBuildInputs;\n\n      passthru = passthru // {\n        env =\n          runCommandLocal \"${name}-shell-env\"\n            {\n              shellHook = bwrapCmd { };\n            }\n            ''\n              echo >&2 \"\"\n              echo >&2 \"*** User chroot 'env' attributes are intended for interactive nix-shell sessions, not for building! ***\"\n              echo >&2 \"\"\n              exit 1\n            '';\n        inherit args fhsenv;\n      };\n\n      meta = {\n        mainProgram = executableName;\n      }\n      // meta;\n    }\n  )\n  ''\n    mkdir -p $out/bin\n    ln -s ${bin} $out/bin/${executableName}\n\n    ${extraInstallCommands}\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-bubblewrap/default.nix","line":14,"column":1},"path":["pkgs","buildFHSEnv"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-bubblewrap/default.nix","line":14,"column":1},"path":["pkgs","buildFHSEnv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildFHSEnvBubblewrap","path":["pkgs","buildFHSEnvBubblewrap"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":368,"column":3},"attr_expr":"buildFHSEnvBubblewrap = callPackage ../build-support/build-fhsenv-bubblewrap { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-bubblewrap/default.nix","line":14,"column":1},"lambda_expr":"{\n  pname ? throw \"You must provide either `name` or `pname`\",\n  version ? throw \"You must provide either `name` or `version`\",\n  name ? \"${pname}-${version}\",\n  runScript ? \"bash\",\n  nativeBuildInputs ? [ ],\n  extraInstallCommands ? \"\",\n  executableName ? args.pname or name,\n  meta ? { },\n  passthru ? { },\n  extraPreBwrapCmds ? \"\",\n  extraBwrapArgs ? [ ],\n  unshareUser ? false,\n  unshareIpc ? false,\n  unsharePid ? false,\n  unshareNet ? false,\n  unshareUts ? false,\n  unshareCgroup ? false,\n  privateTmp ? false,\n  chdirToPwd ? true,\n  dieWithParent ? true,\n  ...\n}@args:\n\n# NOTE:\n# `pname` and `version` will throw if they were not provided.\n# Use `name` instead of directly evaluating `pname` or `version`.\n#\n# If you need `pname` or `version` specifically, use `args` instead:\n# e.g. `args.pname or ...`.\n\nlet\n  inherit (lib)\n    concatLines\n    concatStringsSep\n    escapeShellArgs\n    filter\n    optionalString\n    splitString\n    ;\n\n  inherit (lib.attrsets) removeAttrs;\n\n  # The splicing code does not handle `pkgsi686Linux` well, so we have to be\n  # explicit about which package set it's coming from.\n  inherit (pkgsHostTarget) pkgsi686Linux;\n\n  # we don't know which have been supplied, and want to avoid defaulting missing attrs to null. Passed into runCommandLocal\n  nameAttrs = lib.filterAttrs (\n    key: value:\n    builtins.elem key [\n      \"name\"\n      \"pname\"\n      \"version\"\n    ]\n  ) args;\n\n  buildFHSEnv = callPackage ./buildFHSEnv.nix { };\n\n  fhsenv = buildFHSEnv (\n    removeAttrs args [\n      \"runScript\"\n      \"extraInstallCommands\"\n      \"meta\"\n      \"passthru\"\n      \"extraPreBwrapCmds\"\n      \"extraBwrapArgs\"\n      \"dieWithParent\"\n      \"unshareUser\"\n      \"unshareCgroup\"\n      \"unshareUts\"\n      \"unshareNet\"\n      \"unsharePid\"\n      \"unshareIpc\"\n      \"privateTmp\"\n    ]\n  );\n\n  etcBindEntries =\n    let\n      files = [\n        # NixOS Compatibility\n        \"static\"\n        \"nix\" # mainly for nixVersions.git users, but also for access to nix/netrc\n        # Shells\n        \"shells\"\n        \"bashrc\"\n        \"zshenv\"\n        \"zshrc\"\n        \"zinputrc\"\n        \"zprofile\"\n        # Users, Groups, NSS\n        \"passwd\"\n        \"group\"\n        \"shadow\"\n        \"hosts\"\n        \"resolv.conf\"\n        \"nsswitch.conf\"\n        # User profiles\n        \"profiles\"\n        # Sudo & Su\n        \"login.defs\"\n        \"sudoers\"\n        \"sudoers.d\"\n        # Time\n        \"localtime\"\n        \"zoneinfo\"\n        # Other Core Stuff\n        \"machine-id\"\n        \"os-release\"\n        # PAM\n        \"pam.d\"\n        # Fonts\n        \"fonts\"\n        # ALSA\n        \"alsa\"\n        \"asound.conf\"\n        # SSL\n        \"ssl/certs\"\n        \"ca-certificates\"\n        \"pki\"\n        # Custom dconf profiles\n        \"dconf\"\n      ];\n    in\n    map (path: \"/etc/${path}\") files;\n\n  # Here's the problem case:\n  # - we need to run bash to run the init script\n  # - LD_PRELOAD may be set to another dynamic library, requiring us to discover its dependencies\n  # - oops! ldconfig is part of the init script, and it hasn't run yet\n  # - everything explodes\n  #\n  # In particular, this happens with fhsenvs in fhsenvs, e.g. when running\n  # a wrapped game from Steam.\n  #\n  # So, instead of doing that, we build a tiny static (important!) shim\n  # that executes ldconfig in a completely clean environment to generate\n  # the initial cache, and then execs into the \"real\" init, which is the\n  # first time we see anything dynamically linked at all.\n  #\n  # Also, the real init is placed strategically at /init, so we don't\n  # have to recompile this every time.\n  containerInit =\n    runCommandCC \"container-init\"\n      {\n        buildInputs = [ stdenv.cc.libc.static or null ];\n      }\n      ''\n        $CXX -static -s -o $out ${./container-init.cc}\n      '';\n\n  realInit =\n    run:\n    writeShellScript \"${name}-init\" ''\n      source /etc/profile\n      exec ${run} \"$@\"\n    '';\n\n  indentLines = str: concatLines (map (s: \"  \" + s) (filter (s: s != \"\") (splitString \"\\n\" str)));\n  bwrapCmd =\n    {\n      initArgs ? \"\",\n    }:\n    ''\n      ignored=(/nix /dev /proc /etc ${optionalString privateTmp \"/tmp\"})\n      ro_mounts=()\n      symlinks=()\n      etc_ignored=()\n\n      ${extraPreBwrapCmds}\n\n      # loop through all entries of root in the fhs environment, except its /etc.\n      for i in ${fhsenv}/*; do\n        path=\"/''${i##*/}\"\n        if [[ $path == '/etc' ]]; then\n          :\n        elif [[ -L $i ]]; then\n          symlinks+=(--symlink \"$(${coreutils}/bin/readlink \"$i\")\" \"$path\")\n          ignored+=(\"$path\")\n        else\n          ro_mounts+=(--ro-bind \"$i\" \"$path\")\n          ignored+=(\"$path\")\n        fi\n      done\n\n      # loop through the entries of /etc in the fhs environment.\n      if [[ -d ${fhsenv}/etc ]]; then\n        for i in ${fhsenv}/etc/*; do\n          path=\"/''${i##*/}\"\n          # NOTE: we're binding /etc/fonts and /etc/ssl/certs from the host so we\n          # don't want to override it with a path from the FHS environment.\n          if [[ $path == '/fonts' || $path == '/ssl' ]]; then\n            continue\n          fi\n          if [[ -L $i ]]; then\n            symlinks+=(--symlink \"$i\" \"/etc$path\")\n          else\n            ro_mounts+=(--ro-bind \"$i\" \"/etc$path\")\n          fi\n          etc_ignored+=(\"/etc$path\")\n        done\n      fi\n\n      # propagate /etc from the actual host if nested\n      if [[ -e /.host-etc ]]; then\n        ro_mounts+=(--ro-bind /.host-etc /.host-etc)\n      else\n        ro_mounts+=(--ro-bind /etc /.host-etc)\n      fi\n\n      declare -A etc_ignored_set\n      for ign in \"''${etc_ignored[@]}\"; do\n        etc_ignored_set[$ign]=1\n      done\n\n      # link selected etc entries from the actual root\n      for i in ${escapeShellArgs etcBindEntries}; do\n        if [[ -n \"''${etc_ignored_set[$i]:-}\" ]]; then\n          continue\n        fi\n        if [[ -e $i ]]; then\n          symlinks+=(--symlink \"/.host-etc/''${i#/etc/}\" \"$i\")\n        fi\n      done\n\n      declare -A ignored_set\n      for ign in \"''${ignored[@]}\"; do\n        ignored_set[$ign]=1\n      done\n\n      declare -a auto_mounts\n      # loop through all directories in the root\n      for dir in /*; do\n        # if it is a directory and not already provided by the FHS env or\n        # explicitly ignored, bind-mount it into the chroot. Use exact match\n        # via associative array because regex substring matching incorrectly\n        # skips prefixes (e.g. /sb would match /sbin and never get mounted,\n        # breaking --chdir when CWD is on a custom mount like /sb/project).\n        # https://github.com/NixOS/nixpkgs/issues/241151\n        if [[ -d \"$dir\" ]] && [[ -z \"''${ignored_set[$dir]:-}\" ]]; then\n          # add it to the mount list\n          auto_mounts+=(--bind \"$dir\" \"$dir\")\n        fi\n      done\n\n      declare -a x11_args\n      # Always mount a tmpfs on /tmp/.X11-unix\n      # Rationale: https://github.com/flatpak/flatpak/blob/be2de97e862e5ca223da40a895e54e7bf24dbfb9/common/flatpak-run.c#L277\n      x11_args+=(--tmpfs /tmp/.X11-unix)\n\n      # Try to guess X socket path. This doesn't cover _everything_, but it covers some things.\n      if [[ \"$DISPLAY\" == *:* ]]; then\n        # recover display number from $DISPLAY formatted [host]:num[.screen]\n        display_nr=''${DISPLAY/#*:} # strip host\n        display_nr=''${display_nr/%.*} # strip screen\n        local_socket=/tmp/.X11-unix/X$display_nr\n        x11_args+=(--ro-bind-try \"$local_socket\" \"$local_socket\")\n      fi\n\n      ${optionalString privateTmp ''\n        # sddm places XAUTHORITY in /tmp\n        if [[ \"$XAUTHORITY\" == /tmp/* ]]; then\n          x11_args+=(--ro-bind-try \"$XAUTHORITY\" \"$XAUTHORITY\")\n        fi\n\n        # dbus-run-session puts the socket in /tmp\n        IFS=\";\" read -ra addrs <<<\"$DBUS_SESSION_BUS_ADDRESS\"\n        for addr in \"''${addrs[@]}\"; do\n          [[ \"$addr\" == unix:* ]] || continue\n          IFS=\",\" read -ra parts <<<\"''${addr#unix:}\"\n          for part in \"''${parts[@]}\"; do\n            printf -v part '%s' \"''${part//\\\\/\\\\\\\\}\"\n            printf -v part '%b' \"''${part//%/\\\\x}\"\n            [[ \"$part\" == path=/tmp/* ]] || continue\n            x11_args+=(--ro-bind-try \"''${part#path=}\" \"''${part#path=}\")\n          done\n        done\n      ''}\n\n      cmd=(\n        ${bubblewrap}/bin/bwrap\n        --dev-bind /dev /dev\n        --proc /proc\n        ${optionalString chdirToPwd ''--chdir \"$(pwd)\"''}\n        ${optionalString unshareUser \"--unshare-user\"}\n        ${optionalString unshareIpc \"--unshare-ipc\"}\n        ${optionalString unsharePid \"--unshare-pid\"}\n        ${optionalString unshareNet \"--unshare-net\"}\n        ${optionalString unshareUts \"--unshare-uts\"}\n        ${optionalString unshareCgroup \"--unshare-cgroup\"}\n        ${optionalString dieWithParent \"--die-with-parent\"}\n        --bind /nix /nix\n        ${optionalString privateTmp \"--tmpfs /tmp\"}\n        # Our glibc will look for the cache in its own path in `/nix/store`.\n        # As such, we need a cache to exist there, because pressure-vessel\n        # depends on the existence of an ld cache. However, adding one\n        # globally proved to be a bad idea (see #100655), the solution we\n        # settled on being mounting one via bwrap.\n        # Also, the cache needs to go to both 32 and 64 bit glibcs, for games\n        # of both architectures to work.\n        --tmpfs ${glibc}/etc \\\n        --tmpfs /etc \\\n        --symlink /etc/ld.so.conf ${glibc}/etc/ld.so.conf \\\n        --symlink /etc/ld.so.cache ${glibc}/etc/ld.so.cache \\\n        --ro-bind ${glibc}/etc/rpc ${glibc}/etc/rpc \\\n        --remount-ro ${glibc}/etc \\\n        --symlink ${realInit runScript} /init \\\n    ''\n    + optionalString fhsenv.isMultiBuild (indentLines ''\n      --tmpfs ${pkgsi686Linux.glibc}/etc \\\n      --symlink /etc/ld.so.conf ${pkgsi686Linux.glibc}/etc/ld.so.conf \\\n      --symlink /etc/ld.so.cache ${pkgsi686Linux.glibc}/etc/ld.so.cache \\\n      --ro-bind ${pkgsi686Linux.glibc}/etc/rpc ${pkgsi686Linux.glibc}/etc/rpc \\\n      --remount-ro ${pkgsi686Linux.glibc}/etc \\\n    '')\n    + ''\n        \"''${ro_mounts[@]}\"\n        \"''${symlinks[@]}\"\n        \"''${auto_mounts[@]}\"\n        \"''${x11_args[@]}\"\n        ${concatStringsSep \"\\n  \" extraBwrapArgs}\n        ${containerInit} ${initArgs}\n      )\n      exec \"''${cmd[@]}\"\n    '';\n\n  bin = writeShellScript \"${name}-bwrap\" (bwrapCmd {\n    initArgs = ''\"$@\"'';\n  });\nin\nrunCommandLocal name\n  (\n    nameAttrs\n    // {\n      inherit nativeBuildInputs;\n\n      passthru = passthru // {\n        env =\n          runCommandLocal \"${name}-shell-env\"\n            {\n              shellHook = bwrapCmd { };\n            }\n            ''\n              echo >&2 \"\"\n              echo >&2 \"*** User chroot 'env' attributes are intended for interactive nix-shell sessions, not for building! ***\"\n              echo >&2 \"\"\n              exit 1\n            '';\n        inherit args fhsenv;\n      };\n\n      meta = {\n        mainProgram = executableName;\n      }\n      // meta;\n    }\n  )\n  ''\n    mkdir -p $out/bin\n    ln -s ${bin} $out/bin/${executableName}\n\n    ${extraInstallCommands}\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-bubblewrap/default.nix","line":14,"column":1},"path":["pkgs","buildFHSEnvBubblewrap"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-bubblewrap/default.nix","line":14,"column":1},"path":["pkgs","buildFHSEnvBubblewrap"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildFHSEnvChroot","path":["pkgs","buildFHSEnvChroot"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":367,"column":3},"attr_expr":"buildFHSEnvChroot = callPackage ../build-support/build-fhsenv-chroot { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-chroot/default.nix","line":14,"column":1},"lambda_expr":"args@{\n  name,\n  version ? null,\n  runScript ? \"bash\",\n  nativeBuildInputs ? [ ],\n  extraInstallCommands ? \"\",\n  meta ? { },\n  passthru ? { },\n  ...\n}:\n\nlet\n  env = buildFHSEnv (\n    removeAttrs args [\n      \"version\"\n      \"runScript\"\n      \"extraInstallCommands\"\n      \"meta\"\n      \"passthru\"\n    ]\n  );\n\n  chrootenv = callPackage ./chrootenv { };\n\n  init =\n    run:\n    writeScript \"${name}-init\" ''\n      #! ${stdenv.shell}\n      for i in ${env}/* /host/*; do\n        path=\"/''${i##*/}\"\n        [ -e \"$path\" ] || ${coreutils}/bin/ln -s \"$i\" \"$path\"\n      done\n\n      [ -d \"$1\" ] && [ -r \"$1\" ] && cd \"$1\"\n      shift\n\n      source /etc/profile\n      exec ${run} \"$@\"\n    '';\n\n  versionStr = lib.optionalString (version != null) (\"-\" + version);\n\n  nameAndVersion = name + versionStr;\n\nin\nrunCommandLocal nameAndVersion\n  {\n    inherit nativeBuildInputs meta;\n\n    passthru = passthru // {\n      env =\n        runCommandLocal \"${name}-shell-env\"\n          {\n            shellHook = ''\n              exec ${chrootenv}/bin/chrootenv ${init runScript} \"$(pwd)\"\n            '';\n          }\n          ''\n            echo >&2 \"\"\n            echo >&2 \"*** User chroot 'env' attributes are intended for interactive nix-shell sessions, not for building! ***\"\n            echo >&2 \"\"\n            exit 1\n          '';\n    };\n  }\n  ''\n    mkdir -p $out/bin\n    cat <<EOF >$out/bin/${name}\n    #! ${stdenv.shell}\n    exec ${chrootenv}/bin/chrootenv ${init runScript} \"\\$(pwd)\" \"\\$@\"\n    EOF\n    chmod +x $out/bin/${name}\n    ${extraInstallCommands}\n  ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-chroot/default.nix","line":14,"column":1},"path":["pkgs","buildFHSEnvChroot"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-fhsenv-chroot/default.nix","line":14,"column":1},"path":["pkgs","buildFHSEnvChroot"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildGo125Module","path":["pkgs","buildGo125Module"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7477,"column":3},"attr_expr":"buildGo125Module = callPackage ../build-support/go/module.nix {\n    go = buildPackages.go_1_25;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGo125Module"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGo125Module"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildGo126Module","path":["pkgs","buildGo126Module"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7482,"column":3},"attr_expr":"buildGo126Module = callPackage ../build-support/go/module.nix {\n    go = buildPackages.go_1_26;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGo126Module"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGo126Module"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildGoLatestModule","path":["pkgs","buildGoLatestModule"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7474,"column":3},"attr_expr":"buildGoLatestModule = buildGo126Module;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGoLatestModule"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGoLatestModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildGoModule","path":["pkgs","buildGoModule"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7471,"column":3},"attr_expr":"buildGoModule = buildGo126Module;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGoModule"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGoModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildGraalvmNativeImage","path":["pkgs","buildGraalvmNativeImage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4243,"column":3},"attr_expr":"buildGraalvmNativeImage = callPackage ../build-support/build-graalvm-native-image { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGraalvmNativeImage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildGraalvmNativeImage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildHomeAssistantComponent","path":["pkgs","buildHomeAssistantComponent"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7851,"column":3},"attr_expr":"buildHomeAssistantComponent = callPackage ../servers/home-assistant/build-custom-component { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildHomeAssistantComponent"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildHomeAssistantComponent"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildLakePackage","path":["pkgs","buildLakePackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":370,"column":3},"attr_expr":"buildLakePackage = callPackage ../build-support/lake { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildLakePackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildLakePackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildLinux","path":["pkgs","buildLinux"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8344,"column":25},"attr_expr":"buildLinux","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","buildLinux"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","buildLinux"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildMaven","path":["pkgs","buildMaven"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5668,"column":19},"attr_expr":"buildMaven","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/ma/maven/build-maven.nix","line":24,"column":1},"lambda_expr":"infoFile:\nlet\n  info = lib.importJSON infoFile;\n\n  dependencies = lib.flatten (\n    map (\n      dep:\n      let\n        inherit (dep)\n          sha1\n          groupId\n          artifactId\n          version\n          metadata\n          repository-id\n          ;\n        versionDir = dep.unresolved-version or version;\n        authenticated = dep.authenticated or false;\n        url = dep.url or \"\";\n\n        fetch =\n          if (url != \"\") then\n            ((if authenticated then requireFile else fetchurl) {\n              inherit url sha1;\n            })\n          else\n            \"\";\n\n        fetchMetadata = (if authenticated then requireFile else fetchurl) {\n          inherit (metadata) url sha1;\n        };\n\n        layout = \"${builtins.replaceStrings [ \".\" ] [ \"/\" ] groupId}/${artifactId}/${versionDir}\";\n      in\n      lib.optional (url != \"\") {\n        layout = \"${layout}/${fetch.name}\";\n        drv = fetch;\n      }\n      ++ lib.optionals (dep ? metadata) (\n        [\n          {\n            layout = \"${layout}/maven-metadata-${repository-id}.xml\";\n            drv = fetchMetadata;\n          }\n        ]\n        ++ lib.optional (fetch != \"\") {\n          layout = \"${layout}/${builtins.replaceStrings [ version ] [ dep.unresolved-version ] fetch.name}\";\n          drv = fetch;\n        }\n      )\n    ) info.dependencies\n  );\n\n  repo = linkFarm \"maven-repository\" (\n    lib.forEach dependencies (dependency: {\n      name = dependency.layout;\n      path = dependency.drv;\n    })\n  );\n\n  settings = writeText \"settings.xml\" ''\n    <settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\"\n      xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n      xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0\n                          http://maven.apache.org/xsd/settings-1.0.0.xsd\">\n      <localRepository>${repo}</localRepository>\n    </settings>\n  '';\n\n  src = dirOf infoFile;\nin\n{\n  inherit repo settings info;\n\n  build = stdenv.mkDerivation {\n    name = \"${info.project.artifactId}-${info.project.version}.jar\";\n\n    src = builtins.filterSource (\n      path: type:\n      (toString path) != (toString (src + \"/target\")) && (toString path) != (toString (src + \"/.git\"))\n    ) src;\n\n    buildInputs = [ maven ];\n\n    buildPhase = \"mvn --offline --settings ${settings} compile\";\n\n    installPhase = ''\n      mvn --offline --settings ${settings} package\n      mv target/*.jar $out\n    '';\n  };\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/ma/maven/build-maven.nix","line":24,"column":1},"path":["pkgs","buildMaven"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/ma/maven/build-maven.nix","line":24,"column":1},"path":["pkgs","buildMaven"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildMozillaMach","path":["pkgs","buildMozillaMach"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9174,"column":3},"attr_expr":"buildMozillaMach =\n    opts: callPackage (import ../build-support/build-mozilla-mach/default.nix opts) { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9175,"column":5},"lambda_expr":"opts: callPackage (import ../build-support/build-mozilla-mach/default.nix opts) { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9175,"column":5},"path":["pkgs","buildMozillaMach"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9175,"column":5},"path":["pkgs","buildMozillaMach"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildNavidromePlugin","path":["pkgs","buildNavidromePlugin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2659,"column":3},"attr_expr":"buildNavidromePlugin = callPackage ../by-name/na/navidrome/plugins/build-plugin.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/na/navidrome/plugins/build-plugin.nix","line":8,"column":1},"lambda_expr":"{\n  pname,\n  src,\n  version,\n  vendorHash,\n  meta,\n  ...\n}@args:\n\nbuildGoModule (\n  finalAttrs:\n  {\n    inherit\n      pname\n      version\n      src\n      vendorHash\n      ;\n\n    env = {\n      CGO_ENABLED = \"0\";\n    }\n    // (args.env or { });\n\n    postBuild = ''\n      GOOS=wasip1 \\\n      GOARCH=wasm \\\n      go build \\\n        -buildmode=c-shared \\\n        -o $GOPATH/bin/plugin.wasm .\n    '';\n\n    postInstall = ''\n      mkdir $out/share\n      pushd $(mktemp -d)\n      cp $GOPATH/bin/plugin.wasm .\n      cp ${finalAttrs.src}/manifest.json .\n      ${lib.getExe zip} \\\n        $out/share/${finalAttrs.pname}.ndp \\\n        plugin.wasm \\\n        manifest.json\n      popd\n      rm -r $out/bin\n    '';\n\n    passthru = {\n      isNavidromePlugin = true;\n    }\n    // args.passthru or { };\n\n    meta = {\n      inherit (navidrome.meta) platforms maintainers;\n    }\n    // args.meta or { };\n  }\n  // removeAttrs args [\n    \"meta\"\n    \"passthru\"\n  ]\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/na/navidrome/plugins/build-plugin.nix","line":8,"column":1},"path":["pkgs","buildNavidromePlugin"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/na/navidrome/plugins/build-plugin.nix","line":8,"column":1},"path":["pkgs","buildNavidromePlugin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildNimPackage","path":["pkgs","buildNimPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4407,"column":3},"attr_expr":"buildNimPackage = callPackage ../build-support/build-nim-package.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-nim-package.nix","line":81,"column":1},"lambda_expr":"buildNimPackageArgs:\nlet\n  composition =\n    finalAttrs:\n    let\n      postPkg = baseAttrs // (asFunc ((asFunc buildNimPackageArgs) finalAttrs)) baseAttrs;\n\n      lockAttrs = lib.attrsets.optionalAttrs (builtins.hasAttr \"lockFile\" postPkg) (\n        builtins.fromJSON (builtins.readFile postPkg.lockFile)\n      );\n\n      lockDepends = lockAttrs.depends or [ ];\n\n      lockFileNimFlags = map fodFromLockEntry lockDepends;\n\n      postNimOverrides = builtins.foldl' (\n        prevAttrs:\n        { packages, ... }@lockAttrs:\n        builtins.foldl' (\n          prevAttrs: name:\n          if (builtins.hasAttr name nimOverrides) then\n            (prevAttrs // (nimOverrides.${name} lockAttrs prevAttrs))\n          else\n            prevAttrs\n        ) prevAttrs packages\n      ) postPkg lockDepends;\n\n      finalOverride =\n        {\n          depsBuildBuild ? [ ],\n          nativeBuildInputs ? [ ],\n          nimFlags ? [ ],\n          requiredNimVersion ? defaultNimVersion,\n          passthru ? { },\n          ...\n        }:\n        (\n          if requiredNimVersion == 1 then\n            {\n              depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;\n              nativeBuildInputs = [ nim1 ] ++ nativeBuildInputs;\n            }\n          else if requiredNimVersion == 2 then\n            {\n              depsBuildBuild = [ nim_builder ] ++ depsBuildBuild;\n              nativeBuildInputs = [ nim2 ] ++ nativeBuildInputs;\n            }\n          else\n            throw \"requiredNimVersion ${toString requiredNimVersion} is not valid\"\n        )\n        // {\n          nimFlags = lockFileNimFlags ++ nimFlags;\n          passthru = passthru // {\n            # allow overriding the result of buildNimPackageArgs before this composition is applied\n            # this allows overriding the lockFile for packages built using buildNimPackage\n            # this is adapted from mkDerivationExtensible in stdenv.mkDerivation\n            overrideNimAttrs =\n              f0:\n              let\n                f =\n                  self: super:\n                  let\n                    x = f0 super;\n                  in\n                  if builtins.isFunction x then f0 self super else x;\n              in\n              buildNimPackage (\n                self:\n                let\n                  super = (asFunc ((asFunc buildNimPackageArgs) self)) baseAttrs;\n                in\n                super // (if builtins.isFunction f0 || f0 ? __functor then f self super else f0)\n              );\n          };\n        };\n\n      attrs = postNimOverrides // finalOverride postNimOverrides;\n    in\n    lib.trivial.warnIf (builtins.hasAttr \"nimBinOnly\" attrs)\n      \"the nimBinOnly attribute is deprecated for buildNimPackage\"\n      attrs;\n\nin\nstdenv.mkDerivation composition","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-nim-package.nix","line":81,"column":1},"path":["pkgs","buildNimPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-nim-package.nix","line":81,"column":1},"path":["pkgs","buildNimPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildNimSbom","path":["pkgs","buildNimSbom"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4408,"column":3},"attr_expr":"buildNimSbom = callPackage ../build-support/build-nim-sbom.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-nim-sbom.nix","line":200,"column":1},"lambda_expr":"callerArg: sbomArg:\nlet\n  sbom = if builtins.isAttrs sbomArg then sbomArg else builtins.fromJSON (builtins.readFile sbomArg);\n  overrideSbom = f: stdenv.mkDerivation (compose callerArg (sbom // (f sbom)));\nin\n(stdenv.mkDerivation (compose callerArg sbom)) // { inherit overrideSbom; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-nim-sbom.nix","line":200,"column":1},"path":["pkgs","buildNimSbom"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/build-nim-sbom.nix","line":200,"column":1},"path":["pkgs","buildNimSbom"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildNpmPackage","path":["pkgs","buildNpmPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2711,"column":3},"attr_expr":"buildNpmPackage = callPackage ../build-support/node/build-npm-package { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildNpmPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildNpmPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildOptee","path":["pkgs","buildOptee"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5738,"column":5},"attr_expr":"buildOptee","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.buildPgrxExtension","path":["pkgs","buildPgrxExtension"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4531,"column":3},"attr_expr":"buildPgrxExtension = callPackage ../development/tools/rust/cargo-pgrx/buildPgrxExtension.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildPgrxExtension"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildPgrxExtension"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildRubyGem","path":["pkgs","buildRubyGem"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5067,"column":3},"attr_expr":"buildRubyGem = callPackage ../development/ruby-modules/gem { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/gem/default.nix","line":33,"column":3},"lambda_expr":"{\n    name ? null,\n    gemName,\n    version ? null,\n    type ? \"gem\",\n    document ? [ ], # e.g. [ \"ri\" \"rdoc\" ]\n    platform ? \"ruby\",\n    ruby ? defs.ruby,\n    stdenv ? ruby.stdenv,\n    namePrefix ? \"${ruby.pname}${lib.versions.majorMinor (toString ruby.version)}-\",\n    nativeBuildInputs ? [ ],\n    buildInputs ? [ ],\n    meta ? { },\n    patches ? [ ],\n    gemPath ? [ ],\n    dontStrip ? false,\n    # Assume we don't have to build unless strictly necessary (e.g. the source is a\n    # git checkout).\n    # If you need to apply patches, make sure to set `dontBuild = false`;\n    dontBuild ? true,\n    dontInstallManpages ? false,\n    propagatedBuildInputs ? [ ],\n    propagatedUserEnvPkgs ? [ ],\n    buildFlags ? [ ],\n    passthru ? { },\n    # bundler expects gems to be stored in the cache directory for certain actions\n    # such as `bundler install --redownload`.\n    # At the cost of increasing the store size, you can keep the gems to have closer\n    # alignment with what Bundler expects.\n    keepGemCache ? false,\n    ...\n  }@attrs:\n\n  let\n    src =\n      attrs.src or (\n        if type == \"gem\" then\n          fetchurl {\n            urls = map (remote: \"${remote}/gems/${gemName}-${suffix}.gem\") (\n              attrs.source.remotes or [ \"https://rubygems.org\" ]\n            );\n            inherit (attrs.source) sha256;\n            meta = {\n              identifiers.purlParts = {\n                type = \"gem\";\n                # https://github.com/package-url/purl-spec/blob/18fd3e395dda53c00bc8b11fe481666dc7b3807a/types-doc/gem-definition.md\n                spec = \"${gemName}@${version}?platform=${platform}\";\n              };\n            };\n          }\n        else if type == \"git\" then\n          fetchgit {\n            inherit (attrs.source)\n              url\n              rev\n              sha256\n              fetchSubmodules\n              ;\n          }\n        else if type == \"url\" then\n          fetchurl attrs.source\n        else\n          throw \"buildRubyGem: don't know how to build a gem of type \\\"${type}\\\"\"\n      );\n\n    # See: https://github.com/rubygems/rubygems/blob/7a7b234721c375874b7e22b1c5b14925b943f04e/bundler/lib/bundler/source/git.rb#L103\n    suffix =\n      if type == \"git\" then\n        builtins.substring 0 12 attrs.source.rev\n      else if platform != \"ruby\" then\n        \"${version}-${platform}\"\n      else\n        version;\n\n    documentFlag = if document == [ ] then \"-N\" else \"--document ${lib.concatStringsSep \",\" document}\";\n\n  in\n\n  stdenv.mkDerivation (\n    (removeAttrs attrs [ \"source\" ])\n    // {\n      inherit ruby;\n      inherit dontBuild;\n      inherit dontStrip;\n      inherit suffix;\n      inherit version;\n      gemType = type;\n      pname = gemName;\n      name = attrs.name or \"${namePrefix}${gemName}-${suffix}\";\n\n      nativeBuildInputs = [\n        ruby\n        makeWrapper\n      ]\n      ++ lib.optionals (type == \"git\") [ gitMinimal ]\n      ++ lib.optionals (type != \"gem\") [ bundler ]\n      ++ nativeBuildInputs;\n\n      buildInputs = [\n        ruby\n      ]\n      ++ buildInputs;\n\n      inherit src;\n\n      unpackPhase =\n        attrs.unpackPhase or ''\n          runHook preUnpack\n\n          if [[ -f $src && $src == *.gem ]]; then\n            if [[ -z \"''${dontBuild-}\" ]]; then\n              # we won't know the name of the directory that RubyGems creates,\n              # so we'll just use a glob to find it and move it over.\n              gempkg=\"$src\"\n              sourceRoot=source\n              gem unpack $gempkg --target=container\n              cp -r container/* $sourceRoot\n              rm -r container\n\n              # copy out the original gemspec, for convenience during patching /\n              # overrides.\n              gem specification $gempkg  --ruby > original.gemspec\n              gemspec=$(readlink -f .)/original.gemspec\n            else\n              gempkg=\"$src\"\n            fi\n          else\n            # Fall back to the original thing for everything else.\n            dontBuild=\"\"\n            preUnpack=\"\" postUnpack=\"\" unpackPhase\n          fi\n\n          runHook postUnpack\n        '';\n\n      # As of ruby 3.0, ruby headers require -fdeclspec when building with clang\n      # Introduced in https://github.com/ruby/ruby/commit/0958e19ffb047781fe1506760c7cbd8d7fe74e57\n      env = lib.optionalAttrs (attrs ? env) attrs.env // {\n        NIX_CFLAGS_COMPILE = toString (\n          lib.optionals\n            (ruby.rubyEngine == \"ruby\" && stdenv.cc.isClang && lib.versionAtLeast ruby.version.major \"3\")\n            [\n              \"-fdeclspec\"\n            ]\n          ++ lib.optional (attrs.env.NIX_CFLAGS_COMPILE or \"\" != \"\") attrs.env.NIX_CFLAGS_COMPILE\n        );\n      };\n\n      buildPhase =\n        attrs.buildPhase or ''\n          runHook preBuild\n\n          if [[ \"$gemType\" == \"gem\" ]]; then\n            if [[ -z \"$gemspec\" ]]; then\n              gemspec=\"$(find . -name '*.gemspec')\"\n              echo \"found the following gemspecs:\"\n              echo \"$gemspec\"\n              gemspec=\"$(echo \"$gemspec\" | head -n1)\"\n            fi\n\n            exec 3>&1\n            output=\"$(gem build $gemspec | tee >(cat - >&3))\"\n            exec 3>&-\n\n            gempkg=$(echo \"$output\" | grep -oP 'File: \\K(.*)')\n\n            echo \"gem package built: $gempkg\"\n          elif [[ \"$gemType\" == \"git\" ]]; then\n            git init\n            # remove variations to improve the likelihood of a bit-reproducible output\n            rm -rf .git/logs/ .git/hooks/ .git/index .git/FETCH_HEAD .git/ORIG_HEAD .git/refs/remotes/origin/HEAD .git/config\n            # support `git ls-files`\n            git add .\n          fi\n\n          runHook postBuild\n        '';\n\n      # Note:\n      #   We really do need to keep the $out/${ruby.gemPath}/cache.\n      #   This is very important in order for many parts of RubyGems/Bundler to not blow up.\n      #   See https://github.com/bundler/bundler/issues/3327\n      installPhase =\n        attrs.installPhase or ''\n          runHook preInstall\n\n          export GEM_HOME=$out/${ruby.gemPath}\n          mkdir -p $GEM_HOME\n\n          # When __structuredAttrs is enabled, this is not added to the environment by default,\n          # but nix-bundle-install.rb needs it.\n          export ruby\n\n          local -a flagsArray\n          concatTo flagsArray buildFlags\n\n          echo \"buildFlags: ''${flagsArray[@]}\"\n\n          ${lib.optionalString (type == \"url\") ''\n            ruby ${./nix-bundle-install.rb} \\\n              \"path\" \\\n              '${gemName}' \\\n              '${version}' \\\n              '${lib.escapeShellArgs buildFlags}'\n          ''}\n          ${lib.optionalString (type == \"git\") ''\n            ruby ${./nix-bundle-install.rb} \\\n              \"git\" \\\n              '${gemName}' \\\n              '${version}' \\\n              '${lib.escapeShellArgs buildFlags}' \\\n              '${attrs.source.url}' \\\n              '.' \\\n              '${attrs.source.rev}'\n          ''}\n\n          ${lib.optionalString (type == \"gem\") ''\n            if [[ -z \"$gempkg\" ]]; then\n              echo \"failure: \\$gempkg path unspecified\" 1>&2\n              exit 1\n            elif [[ ! -f \"$gempkg\" ]]; then\n              echo \"failure: \\$gempkg path invalid\" 1>&2\n              exit 1\n            fi\n\n            gem install \\\n              --local \\\n              --force \\\n              --http-proxy 'http://nodtd.invalid' \\\n              --ignore-dependencies \\\n              --install-dir \"$GEM_HOME\" \\\n              --build-root '/' \\\n              --backtrace \\\n              --no-env-shebang \\\n              ${documentFlag} \\\n              $gempkg -- \"''${flagsArray[@]}\"\n\n            # looks like useless files which break build repeatability and consume space\n            pushd $out/${ruby.gemPath}\n            find doc/ -iname created.rid -delete -print\n            find gems/*/ext/ extensions/ \\( -iname Makefile -o -iname mkmf.log -o -iname gem_make.out \\) -delete -print\n            ${lib.optionalString (!keepGemCache) \"rm -fvr cache\"}\n            popd\n\n            # write out metadata and binstubs\n            spec=$(echo $out/${ruby.gemPath}/specifications/*.gemspec)\n            ruby ${./gem-post-build.rb} \"$spec\"\n          ''}\n\n          ${lib.optionalString (!dontInstallManpages) ''\n            for section in {1..9}; do\n              mandir=\"$out/share/man/man$section\"\n              find $out/lib \\( -wholename \"*/man/*.$section\" -o -wholename \"*/man/man$section/*.$section\" \\) \\\n                -execdir mkdir -p $mandir \\; -execdir cp '{}' $mandir \\;\n            done\n          ''}\n\n          # For Ruby-generated binstubs, shebang paths are already in Nix store but for\n          # ruby used to build the package. Update them to match the host system. Note\n          # that patchShebangsAuto ignores scripts where shebang line is already in Nix\n          # store.\n          if [[ -d $GEM_HOME/bin ]]; then\n            patchShebangs --update --host -- \"$GEM_HOME\"/bin\n          fi\n\n          runHook postInstall\n        '';\n\n      propagatedBuildInputs = gemPath ++ propagatedBuildInputs;\n      propagatedUserEnvPkgs = gemPath ++ propagatedUserEnvPkgs;\n\n      passthru = passthru // {\n        isRubyGem = true;\n      };\n      meta = {\n        # default to Ruby's platforms\n        platforms = ruby.meta.platforms;\n        mainProgram = gemName;\n      }\n      // meta;\n    }\n  )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/gem/default.nix","line":33,"column":3},"path":["pkgs","buildRubyGem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/gem/default.nix","line":33,"column":3},"path":["pkgs","buildRubyGem"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildRustCrate","path":["pkgs","buildRustCrate"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4499,"column":3},"attr_expr":"buildRustCrate =\n    let\n      # Returns a true if the builder's rustc was built with support for the target.\n      targetAlreadyIncluded = lib.elem stdenv.hostPlatform.rust.rustcTarget (\n        lib.splitString \",\" (\n          lib.removePrefix \"--target=\" (\n            lib.elemAt (lib.filter (\n              f: lib.hasPrefix \"--target=\" f\n            ) pkgsBuildBuild.rustc.unwrapped.configureFlags) 0\n          )\n        )\n      );\n    in\n    callPackage ../build-support/rust/build-rust-crate (\n      { }\n      // lib.optionalAttrs (stdenv.hostPlatform.libc == null) {\n        stdenv = stdenvNoCC; # Some build targets without libc will fail to evaluate with a normal stdenv.\n      }\n      // lib.optionalAttrs targetAlreadyIncluded { inherit (pkgsBuildBuild) rustc cargo; } # Optimization.\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-crate/default.nix","line":154,"column":1},"lambda_expr":"crate_:\nlib.makeOverridable\n  (\n    # The rust compiler to use.\n    #\n    # Default: pkgs.rustc\n    {\n      rust ? rustc,\n      # The cargo package to use for getting some metadata.\n      #\n      # Default: pkgs.cargo\n      cargo ? cargo,\n      # Whether to build a release version (`true`) or a debug\n      # version (`false`). Debug versions are faster to build\n      # but might be much slower at runtime.\n      release,\n      # Whether to print rustc invocations etc.\n      #\n      # Example: false\n      # Default: true\n      verbose,\n      # A list of rust/cargo features to enable while building the crate.\n      # Example: [ \"std\" \"async\" ]\n      features,\n      # Additional native build inputs for building this crate.\n      nativeBuildInputs,\n      # Additional build inputs for building this crate.\n      #\n      # Example: [ pkgs.openssl ]\n      buildInputs,\n      # Allows to override the parameters to buildRustCrate\n      # for any rust dependency in the transitive build tree.\n      #\n      # Default: pkgs.defaultCrateOverrides\n      #\n      # Example:\n      #\n      # pkgs.defaultCrateOverrides // {\n      #   hello = attrs: { buildInputs = [ openssl ]; };\n      # }\n      crateOverrides,\n      # Rust library dependencies, i.e. other libraries that were built\n      # with buildRustCrate.\n      dependencies,\n      # Rust build dependencies, i.e. other libraries that were built\n      # with buildRustCrate and are used by a build script.\n      buildDependencies,\n      # Specify the \"extern\" name of a library if it differs from the library target.\n      # See above for an extended explanation.\n      #\n      # Default: no renames.\n      #\n      # Example:\n      #\n      # `crateRenames` supports two formats.\n      #\n      # The simple version is an attrset that maps the\n      # `crateName`s of the dependencies to their alternative\n      # names.\n      #\n      # ```nix\n      # {\n      #   my_crate_name = \"my_alternative_name\";\n      #   # ...\n      # }\n      # ```\n      #\n      # The extended version is also keyed by the `crateName`s but allows\n      # different names for different crate versions:\n      #\n      # ```nix\n      # {\n      #   my_crate_name = [\n      #       { version = \"1.2.3\"; rename = \"my_alternative_name01\"; }\n      #       { version = \"3.2.3\"; rename = \"my_alternative_name03\"; }\n      #   ]\n      #   # ...\n      # }\n      # ```\n      #\n      # This roughly corresponds to the following snippet in Cargo.toml:\n      #\n      # ```toml\n      # [dependencies]\n      # my_alternative_name01 = { package = \"my_crate_name\", version = \"0.1\" }\n      # my_alternative_name03 = { package = \"my_crate_name\", version = \"0.3\" }\n      # ```\n      #\n      # Dependencies which use the lib target name as extern name, do not need\n      # to be specified in the crateRenames, even if their crate name differs.\n      #\n      # Including multiple versions of a crate is very popular during\n      # ecosystem transitions, e.g. from futures 0.1 to futures 0.3.\n      crateRenames,\n      # A list of extra options to pass to rustc.\n      #\n      # Example: [ \"-Z debuginfo=2\" ]\n      # Default: []\n      extraRustcOpts,\n      # A list of extra options to pass to rustc when building a build.rs.\n      #\n      # Example: [ \"-Z debuginfo=2\" ]\n      # Default: []\n      extraRustcOptsForBuildRs,\n      # Extra rustc options for proc-macro crates, replacing\n      # `extraRustcOpts`. Lets callers keep instrumentation flags\n      # (sanitizers, coverage) off host dylibs, mirroring Cargo's\n      # behaviour of not applying RUSTFLAGS to host artifacts.\n      # Default: null (inherit `extraRustcOpts`)\n      extraRustcOptsForProcMacro,\n      # The lint level cap passed to rustc via `--cap-lints`.\n      # See <https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints>.\n      #\n      # rustc honours only the first `--cap-lints` it sees, so appending a\n      # second one via `extraRustcOpts` has no effect. Use this parameter\n      # instead if you need lints to fire (e.g. when running clippy).\n      #\n      # When left at `null`, resolves to `\"allow\"` if `lints` is empty (the\n      # usual case for third-party dependencies), or `\"forbid\"` if `lints`\n      # is set (so your own crate's lint policy actually applies).\n      #\n      # Example: \"warn\"\n      # Default: null (auto: \"allow\" or \"forbid\" depending on `lints`)\n      capLints,\n      # Lint configuration mirroring Cargo.toml's `[lints]` table.\n      # See <https://doc.rust-lang.org/cargo/reference/manifest.html#the-lints-section>.\n      #\n      # Keys are tool names (`rust`, `clippy`, `rustdoc`); values are attrsets\n      # mapping lint names to either a level string (`\"allow\"`, `\"warn\"`,\n      # `\"force-warn\"`, `\"deny\"`, `\"forbid\"`) or an attrset\n      # `{ level = \"...\"; priority = <int>; }`. Lower priorities are emitted\n      # first so that higher-priority (more specific) lints can override them.\n      #\n      # Setting a non-empty `lints` raises the default `capLints` from\n      # `\"allow\"` to `\"forbid\"` so the lints actually fire.\n      #\n      # Example:\n      #   {\n      #     rust = {\n      #       unsafe_code = \"forbid\";\n      #       unused = { level = \"deny\"; priority = -1; };\n      #     };\n      #     clippy.all = \"warn\";\n      #   }\n      # Default: {}\n      lints,\n      # Whether to enable building tests.\n      # Use true to enable.\n      # Default: false\n      buildTests,\n      # Passed to stdenv.mkDerivation.\n      preUnpack,\n      # Passed to stdenv.mkDerivation.\n      postUnpack,\n      # Passed to stdenv.mkDerivation.\n      prePatch,\n      # Passed to stdenv.mkDerivation.\n      patches,\n      # Passed to stdenv.mkDerivation.\n      postPatch,\n      # Passed to stdenv.mkDerivation.\n      preConfigure,\n      # Passed to stdenv.mkDerivation.\n      postConfigure,\n      # Passed to stdenv.mkDerivation.\n      preBuild,\n      # Passed to stdenv.mkDerivation.\n      postBuild,\n      # Passed to stdenv.mkDerivation.\n      preInstall,\n      # Passed to stdenv.mkDerivation.\n      postInstall,\n    }:\n\n    let\n      crate = crate_ // (lib.attrByPath [ crate_.crateName ] (attr: { }) crateOverrides crate_);\n      dependencies_ = dependencies;\n      buildDependencies_ = buildDependencies;\n      processedAttrs = [\n        \"src\"\n        \"propagatedBuildInputs\"\n        \"nativeBuildInputs\"\n        \"buildInputs\"\n        \"crateBin\"\n        \"crateLib\"\n        \"libName\"\n        \"libPath\"\n        \"buildDependencies\"\n        \"dependencies\"\n        \"features\"\n        \"crateRenames\"\n        \"crateName\"\n        \"version\"\n        \"build\"\n        \"authors\"\n        \"colors\"\n        \"edition\"\n        \"buildTests\"\n        \"codegenUnits\"\n        \"links\"\n        \"capLints\"\n        \"lints\"\n      ];\n      extraDerivationAttrs = removeAttrs crate processedAttrs;\n      nativeBuildInputs_ = nativeBuildInputs;\n      buildInputs_ = buildInputs;\n      extraRustcOpts_ = extraRustcOpts;\n      extraRustcOptsForBuildRs_ = extraRustcOptsForBuildRs;\n      extraRustcOptsForProcMacro_ = extraRustcOptsForProcMacro;\n      buildTests_ = buildTests;\n      procMacro = lib.attrByPath [ \"procMacro\" ] false crate;\n      # For proc-macros, prefer the *ForProcMacro variant at each level\n      # (crate attr, override arg) and fall back to extraRustcOpts.\n      crateExtraRustcOpts =\n        if procMacro && crate ? extraRustcOptsForProcMacro then\n          crate.extraRustcOptsForProcMacro\n        else\n          crate.extraRustcOpts or [ ];\n      overrideExtraRustcOpts =\n        if procMacro && extraRustcOptsForProcMacro_ != null then\n          extraRustcOptsForProcMacro_\n        else\n          extraRustcOpts_;\n      resolvedLints = crate.lints or lints;\n      lintFlags = lintsToRustcFlags resolvedLints;\n      resolvedCapLints =\n        let\n          requested = crate.capLints or capLints;\n        in\n        if requested != null then\n          requested\n        else if resolvedLints != { } then\n          \"forbid\"\n        else\n          \"allow\";\n\n      # crate2nix has a hack for the old bash based build script that did split\n      # entries at `,`. No we have to work around that hack.\n      # https://github.com/kolloch/crate2nix/blame/5b19c1b14e1b0e5522c3e44e300d0b332dc939e7/crate2nix/templates/build.nix.tera#L89\n      crateBin = lib.filter (bin: !(bin ? name && bin.name == \",\")) (crate.crateBin or [ ]);\n      hasCrateBin = crate ? crateBin;\n\n      buildCrate = import ./build-crate.nix {\n        inherit\n          lib\n          stdenv\n          mkRustcDepArgs\n          mkRustcFeatureArgs\n          needUnstableCLI\n          ;\n        rustc = rust;\n      };\n    in\n    stdenv.mkDerivation (\n      rec {\n\n        inherit (crate) crateName;\n        inherit\n          preUnpack\n          postUnpack\n          prePatch\n          patches\n          postPatch\n          preConfigure\n          postConfigure\n          preBuild\n          postBuild\n          preInstall\n          postInstall\n          buildTests\n          ;\n\n        src = crate.src or (fetchCrate { inherit (crate) crateName version sha256; });\n        name = \"rust_${crate.crateName}-${crate.version}${lib.optionalString buildTests_ \"-test\"}\";\n        version = crate.version;\n        depsBuildBuild = [ pkgsBuildBuild.stdenv.cc ];\n        nativeBuildInputs = [\n          rust\n          cargo\n          jq\n        ]\n        ++ lib.optionals stdenv.hasCC [ stdenv.cc ]\n        ++ lib.optionals stdenv.buildPlatform.isDarwin [ libiconv ]\n        ++ (crate.nativeBuildInputs or [ ])\n        ++ nativeBuildInputs_;\n        buildInputs =\n          lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]\n          ++ (crate.buildInputs or [ ])\n          ++ buildInputs_\n          ++ completePropagatedBuildInputs;\n        dependencies = map lib.getLib dependencies_;\n        buildDependencies = map lib.getLib buildDependencies_;\n\n        completeDeps = lib.unique (dependencies ++ lib.concatMap (dep: dep.completeDeps) dependencies);\n        completeBuildDeps = lib.unique (\n          buildDependencies\n          ++ lib.concatMap (dep: dep.completeBuildDeps ++ dep.completeDeps) buildDependencies\n        );\n\n        # Propagated native build inputs from this crate and all transitive Rust\n        # dependencies. Analogous to completeDeps but for native library deps:\n        # a crate can declare `propagatedBuildInputs` in its override and they\n        # will automatically be added to the buildInputs of every crate that\n        # depends on it, without having to repeat them up the dependency tree.\n        completePropagatedBuildInputs = lib.unique (\n          (crate.propagatedBuildInputs or [ ])\n          ++ lib.concatMap (dep: dep.completePropagatedBuildInputs or [ ]) dependencies\n        );\n\n        # Create a list of features that are enabled by the crate itself and\n        # through the features argument of buildRustCrate. Exclude features\n        # with a forward slash, since they are passed through to dependencies,\n        # and dep: features, since they're internal-only and do nothing except\n        # enable optional dependencies.\n        crateFeatures = lib.optionals (crate ? features) (\n          builtins.filter (f: !(lib.hasInfix \"/\" f || lib.hasPrefix \"dep:\" f)) (crate.features ++ features)\n        );\n\n        libName = if crate ? libName then crate.libName else crate.crateName;\n        libPath = lib.optionalString (crate ? libPath) crate.libPath;\n\n        # Seed the symbol hashes with something unique every time.\n        # https://doc.rust-lang.org/1.0.0/rustc/metadata/loader/index.html#frobbing-symbols\n        metadata =\n          let\n            depsMetadata = lib.foldl' (str: dep: str + dep.metadata) \"\" (dependencies ++ buildDependencies);\n            hashedMetadata = builtins.hashString \"sha256\" (\n              crateName\n              + \"-\"\n              + crateVersion\n              + \"___\"\n              + toString (mkRustcFeatureArgs crateFeatures)\n              + \"___\"\n              + depsMetadata\n              + \"___\"\n              + stdenv.hostPlatform.rust.rustcTarget\n            );\n          in\n          lib.substring 0 10 hashedMetadata;\n\n        build = crate.build or \"\";\n        # Either set to a concrete sub path to the crate root\n        # or use `null` for auto-detect.\n        workspace_member = crate.workspace_member or \".\";\n        crateAuthors = if crate ? authors && lib.isList crate.authors then crate.authors else [ ];\n        crateDescription = crate.description or \"\";\n        crateHomepage = crate.homepage or \"\";\n        crateLicense = crate.license or \"\";\n        crateLicenseFile = crate.license-file or \"\";\n        crateLinks = crate.links or \"\";\n        crateReadme = crate.readme or \"\";\n        crateRepository = crate.repository or \"\";\n        crateRustVersion = crate.rust-version or \"\";\n        crateVersion = crate.version;\n        crateType =\n          if procMacro then\n            [ \"proc-macro\" ]\n          else if lib.attrByPath [ \"plugin\" ] false crate then\n            [ \"dylib\" ]\n          else\n            (crate.type or [ \"lib\" ]);\n        colors = lib.attrByPath [ \"colors\" ] \"always\" crate;\n        extraLinkFlags = lib.concatStringsSep \" \" (crate.extraLinkFlags or [ ]);\n        edition = crate.edition or null;\n        codegenUnits = if crate ? codegenUnits then crate.codegenUnits else defaultCodegenUnits;\n        extraRustcOpts =\n          crateExtraRustcOpts\n          ++ overrideExtraRustcOpts\n          ++ lintFlags\n          ++ (lib.optional (edition != null) \"--edition ${edition}\");\n        extraRustcOptsForBuildRs =\n          lib.optionals (crate ? extraRustcOptsForBuildRs) crate.extraRustcOptsForBuildRs\n          ++ extraRustcOptsForBuildRs_\n          ++ lintFlags\n          ++ (lib.optional (edition != null) \"--edition ${edition}\");\n        capLints = resolvedCapLints;\n\n        configurePhase = configureCrate {\n          inherit\n            crateName\n            crateType\n            buildDependencies\n            completeDeps\n            completeBuildDeps\n            crateDescription\n            crateFeatures\n            crateRenames\n            libName\n            build\n            workspace_member\n            release\n            libPath\n            crateVersion\n            crateLinks\n            extraLinkFlags\n            extraRustcOptsForBuildRs\n            capLints\n            crateLicense\n            crateLicenseFile\n            crateReadme\n            crateRepository\n            crateRustVersion\n            crateAuthors\n            crateHomepage\n            verbose\n            colors\n            codegenUnits\n            ;\n        };\n        buildPhase = buildCrate {\n          inherit\n            crateName\n            dependencies\n            crateFeatures\n            crateRenames\n            libName\n            release\n            libPath\n            crateType\n            metadata\n            hasCrateBin\n            crateBin\n            verbose\n            colors\n            extraRustcOpts\n            buildTests\n            codegenUnits\n            capLints\n            ;\n        };\n        dontStrip = !release;\n\n        # We need to preserve metadata in .rlib, which might get stripped on macOS. See https://github.com/NixOS/nixpkgs/issues/218712\n        stripExclude = [ \"*.rlib\" ];\n\n        installPhase = installCrate crateName metadata buildTests;\n\n        # depending on the test setting we are either producing something with bins\n        # and libs or just test binaries\n        outputs =\n          if buildTests then\n            [ \"out\" ]\n          else\n            [\n              \"out\"\n              \"lib\"\n            ];\n        outputDev = if buildTests then [ \"out\" ] else [ \"lib\" ];\n\n        meta = {\n          mainProgram = crateName;\n          badPlatforms = [\n            # Rust is currently unable to target the n32 ABI\n            lib.systems.inspect.patterns.isMips64n32\n          ];\n        };\n      }\n      // extraDerivationAttrs\n    )\n  )\n  {\n    rust = crate_.rust or rustc;\n    cargo = crate_.cargo or cargo;\n    release = crate_.release or true;\n    verbose = crate_.verbose or true;\n    extraRustcOpts = [ ];\n    extraRustcOptsForBuildRs = [ ];\n    extraRustcOptsForProcMacro = null;\n    capLints = null;\n    lints = { };\n    features = [ ];\n    nativeBuildInputs = [ ];\n    buildInputs = [ ];\n    crateOverrides = defaultCrateOverrides;\n    preUnpack = crate_.preUnpack or \"\";\n    postUnpack = crate_.postUnpack or \"\";\n    prePatch = crate_.prePatch or \"\";\n    patches = crate_.patches or [ ];\n    postPatch = crate_.postPatch or \"\";\n    preConfigure = crate_.preConfigure or \"\";\n    postConfigure = crate_.postConfigure or \"\";\n    preBuild = crate_.preBuild or \"\";\n    postBuild = crate_.postBuild or \"\";\n    preInstall = crate_.preInstall or \"\";\n    postInstall = crate_.postInstall or \"\";\n    dependencies = crate_.dependencies or [ ];\n    buildDependencies = crate_.buildDependencies or [ ];\n    crateRenames = crate_.crateRenames or { };\n    buildTests = crate_.buildTests or false;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-crate/default.nix","line":154,"column":1},"path":["pkgs","buildRustCrate"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-crate/default.nix","line":154,"column":1},"path":["pkgs","buildRustCrate"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildTeleport","path":["pkgs","buildTeleport"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3288,"column":3},"attr_expr":"buildTeleport = callPackage ../build-support/teleport { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/teleport/default.nix","line":23,"column":1},"lambda_expr":"{\n  version,\n  hash,\n  cargoHash,\n  pnpmHash,\n  vendorHash,\n  wasm-bindgen-cli,\n  buildGoModule,\n\n  withRdpClient ? true,\n  extPatches ? [ ],\n}:\nlet\n\n  # This repo has a private submodule \"e\" which fetchgit cannot handle without failing.\n  src = fetchFromGitHub {\n    owner = \"gravitational\";\n    repo = \"teleport\";\n    tag = \"v${version}\";\n    inherit hash;\n  };\n  pname = \"teleport\";\n  inherit version;\n\n  rdpClient = rustPlatform.buildRustPackage (finalAttrs: {\n    pname = \"teleport-rdpclient\";\n    inherit cargoHash;\n    inherit version src;\n\n    buildAndTestSubdir = \"lib/srv/desktop/rdp/rdpclient\";\n\n    buildInputs = [ openssl ];\n    nativeBuildInputs = [ pkg-config ];\n\n    # https://github.com/NixOS/nixpkgs/issues/161570 ,\n    # buildRustPackage sets strictDeps = true;\n    nativeCheckInputs = finalAttrs.buildInputs;\n\n    env.OPENSSL_NO_VENDOR = \"1\";\n\n    postInstall = ''\n      mkdir -p $out/include\n      cp ${finalAttrs.buildAndTestSubdir}/librdpclient.h $out/include/\n    '';\n  });\n\n  webassets = stdenv.mkDerivation {\n    pname = \"teleport-webassets\";\n    inherit src version;\n\n    cargoDeps = rustPlatform.fetchCargoVendor {\n      inherit src;\n      hash = cargoHash;\n    };\n\n    pnpmDeps = fetchPnpmDeps {\n      inherit\n        src\n        pname\n        version\n        ;\n      pnpm = pnpm_10_29_2;\n      fetcherVersion = 3;\n      hash = pnpmHash;\n    };\n\n    nativeBuildInputs = [\n      binaryen\n      cargo\n      nodejs\n      pnpmConfigHook\n      pnpm_10_29_2\n      rustc\n      rustc.llvmPackages.lld\n      rustPlatform.cargoSetupHook\n      wasm-bindgen-cli\n      wasm-pack\n    ];\n\n    patches = [\n      ./disable-wasm-opt-for-ironrdp.patch\n    ];\n\n    configurePhase = ''\n      runHook preConfigure\n\n      export HOME=$(mktemp -d)\n\n      runHook postConfigure\n    '';\n\n    buildPhase = ''\n      PATH=$PATH:$PWD/node_modules/.bin\n\n      pushd web/packages\n      pushd shared\n      # https://github.com/gravitational/teleport/blob/6b91fe5bbb9e87db4c63d19f94ed4f7d0f9eba43/web/packages/teleport/README.md?plain=1#L18-L20\n      RUST_MIN_STACK=16777216 wasm-pack build ./libs/ironrdp --target web --mode no-install\n      popd\n      pushd teleport\n      vite build\n      popd\n      popd\n    '';\n\n    installPhase = ''\n      mkdir -p $out\n      cp -R webassets/. $out\n    '';\n  };\nin\nbuildGoModule (finalAttrs: {\n  inherit pname src version;\n  inherit vendorHash;\n  proxyVendor = true;\n\n  subPackages = [\n    \"tool/tbot\"\n    \"tool/tctl\"\n    \"tool/teleport\"\n    \"tool/tsh\"\n  ];\n  tags = [\n    \"libfido2\"\n    \"webassets_embed\"\n  ]\n  ++ lib.optional withRdpClient \"desktop_access_rdp\";\n\n  buildInputs = [\n    openssl\n    libfido2\n  ];\n  nativeBuildInputs = [\n    makeWrapper\n    pkg-config\n  ];\n\n  patches = extPatches ++ [\n    ./0001-fix-add-nix-path-to-exec-env.patch\n    ./rdpclient.patch\n  ];\n\n  # Reduce closure size for client machines\n  outputs = [\n    \"out\"\n    \"client\"\n  ];\n\n  preBuild = ''\n    cp -r ${webassets} webassets\n  ''\n  + lib.optionalString withRdpClient ''\n    ln -s ${rdpClient}/lib/* lib/\n    ln -s ${rdpClient}/include/* lib/srv/desktop/rdp/rdpclient/\n  '';\n\n  # Multiple tests fail in the build sandbox\n  # due to trying to spawn nixbld's shell (/noshell), etc.\n  doCheck = false;\n\n  postInstall = ''\n    mkdir -p $client/bin\n    mv {$out,$client}/bin/tsh\n    # make xdg-open overrideable at runtime\n    wrapProgram $client/bin/tsh --suffix PATH : ${lib.makeBinPath [ xdg-utils ]}\n    ln -s {$client,$out}/bin/tsh\n  '';\n\n  doInstallCheck = true;\n\n  installCheckPhase = ''\n    export HOME=$(mktemp -d)\n    $out/bin/tsh version | grep ${version} > /dev/null\n    $client/bin/tsh version | grep ${version} > /dev/null\n    $out/bin/tbot version | grep ${version} > /dev/null\n    $out/bin/tctl version | grep ${version} > /dev/null\n    $out/bin/teleport version | grep ${version} > /dev/null\n  '';\n\n  passthru.tests = nixosTests.teleport;\n\n  meta = {\n    description = \"Certificate authority and access plane for SSH, Kubernetes, web applications, and databases\";\n    homepage = \"https://goteleport.com/\";\n    license = lib.licenses.agpl3Plus;\n    maintainers = with lib.maintainers; [\n      arianvp\n      justinas\n      sigma\n      tomberek\n      techknowlogick\n      juliusfreudenberger\n    ];\n    platforms = lib.platforms.unix;\n    # go-libfido2 is broken on platforms with less than 64-bit because it defines an array\n    # which occupies more than 31 bits of address space.\n    broken = stdenv.hostPlatform.parsed.cpu.bits < 64;\n  };\n})","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/teleport/default.nix","line":23,"column":1},"path":["pkgs","buildTeleport"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/teleport/default.nix","line":23,"column":1},"path":["pkgs","buildTeleport"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildTypstPackage","path":["pkgs","buildTypstPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10188,"column":3},"attr_expr":"buildTypstPackage = callPackage ../build-support/build-typst-package.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildTypstPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","buildTypstPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildUBoot","path":["pkgs","buildUBoot"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8617,"column":5},"attr_expr":"buildUBoot","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.buildVscode","path":["pkgs","buildVscode"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10323,"column":3},"attr_expr":"buildVscode = callPackage ../applications/editors/vscode/generic.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":47,"column":1},"lambda_expr":"{\n  # Attributes inherit from specific versions\n  version,\n  vscodeVersion ? version,\n  src,\n  meta,\n  sourceRoot,\n  commandLineArgs,\n  executableName,\n  longName,\n  shortName,\n  pname,\n  libraryName ? \"vscode\",\n  iconName ? \"vs${executableName}\",\n  updateScript,\n  dontFixup ? false,\n  rev ? null,\n  vscodeServer ? null,\n  sourceExecutableName ? executableName,\n  useVSCodeRipgrep ? false,\n  hasVsceSign ? false,\n  patchVSCodePath ? true,\n\n  # Populate passthru.tests\n  tests,\n\n  extraNativeBuildInputs ? [ ],\n\n  # Customize FHS environment\n  # Function that takes default buildFHSEnv arguments and returns modified arguments\n  customizeFHSEnv ? args: args,\n}:\n\nstdenv.mkDerivation (\n  finalAttrs:\n  let\n\n    # Vscode and variants allow for users to download and use extensions\n    # which often include the usage of pre-built binaries.\n    # This has been an on-going painpoint for many users, as\n    # a full extension update cycle has to be done through nixpkgs\n    # in order to create or update extensions.\n    # See: #83288 #91179 #73810 #41189\n    #\n    # buildFHSEnv allows for users to use the existing vscode\n    # extension tooling without significant pain.\n    fhs =\n      {\n        additionalPkgs ? pkgs: [ ],\n      }:\n      let\n        defaultArgs = {\n          # also determines the name of the wrapped command\n          pname = executableName;\n          inherit version;\n\n          # additional libraries which are commonly needed for extensions\n          targetPkgs =\n            pkgs:\n            (with pkgs; [\n              # ld-linux-x86-64-linux.so.2 and others\n              glibc\n\n              # dotnet\n              curl\n              icu\n              libunwind\n              libuuid\n              lttng-ust\n              openssl\n              zlib\n\n              # mono\n              krb5\n\n              # Needed for headless browser-in-vscode based plugins such as\n              # anything based on Puppeteer https://pptr.dev .\n              # e.g. Roo Code\n              glib\n              nspr\n              nss\n              dbus\n              at-spi2-atk\n              cups\n              expat\n              libxkbcommon\n              libx11\n              libxcomposite\n              libxdamage\n              libxcb\n              libxext\n              libxfixes\n              libxrandr\n              cairo\n              pango\n              alsa-lib\n              libgbm\n              udev\n              libudev0-shim\n            ])\n            ++ additionalPkgs pkgs;\n\n          extraBwrapArgs = [\n            \"--bind-try /etc/nixos/ /etc/nixos/\"\n            \"--ro-bind-try /etc/xdg/ /etc/xdg/\"\n          ];\n\n          # symlink shared assets, including icons and desktop entries\n          extraInstallCommands = ''\n            ln -s \"${finalAttrs.finalPackage}/share\" \"$out/\"\n          '';\n\n          runScript = \"${finalAttrs.finalPackage}/bin/${executableName}\";\n\n          # vscode likes to kill the parent so that the\n          # gui application isn't attached to the terminal session\n          dieWithParent = false;\n\n          passthru = {\n            inherit executableName;\n            inherit (finalAttrs.finalPackage) pname version; # for home-manager module\n          };\n\n          meta = meta // {\n            description = \"Wrapped variant of ${pname} which launches in a FHS compatible environment, should allow for easy usage of extensions without nix-specific modifications\";\n          };\n        };\n        customizedArgs = customizeFHSEnv defaultArgs;\n      in\n      buildFHSEnv customizedArgs;\n  in\n  {\n\n    inherit\n      pname\n      version\n      src\n      sourceRoot\n      dontFixup\n      ;\n\n    passthru = {\n      inherit\n        executableName\n        longName\n        tests\n        updateScript\n        vscodeVersion\n        ;\n      fhs = fhs { };\n      fhsWithPackages = f: fhs { additionalPkgs = f; };\n    }\n    // lib.optionalAttrs (vscodeServer != null) {\n      inherit rev vscodeServer;\n    };\n\n    desktopItems = [\n      (makeDesktopItem {\n        name = executableName;\n        desktopName = longName;\n        comment = \"Code Editing. Redefined.\";\n        genericName = \"Text Editor\";\n        exec = \"${executableName} %F\";\n        icon = iconName;\n        startupNotify = true;\n        startupWMClass = shortName;\n        categories = [\n          \"Utility\"\n          \"TextEditor\"\n          \"Development\"\n          \"IDE\"\n        ];\n        keywords = [ \"vscode\" ];\n        actions.new-empty-window = {\n          name = \"New Empty Window\";\n          exec = \"${executableName} --new-window %F\";\n          icon = iconName;\n        };\n      })\n      (makeDesktopItem {\n        name = executableName + \"-url-handler\";\n        desktopName = longName + \" - URL Handler\";\n        comment = \"Code Editing. Redefined.\";\n        genericName = \"Text Editor\";\n        exec = executableName + \" --open-url %U\";\n        icon = iconName;\n        startupNotify = true;\n        categories = [\n          \"Utility\"\n          \"TextEditor\"\n          \"Development\"\n          \"IDE\"\n        ];\n        mimeTypes = [ \"x-scheme-handler/${iconName}\" ];\n        keywords = [ \"vscode\" ];\n        noDisplay = true;\n      })\n    ];\n\n    buildInputs = [\n      libsecret\n    ]\n    ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [\n      alsa-lib\n      at-spi2-atk\n      libgbm\n      nss\n      nspr\n      systemdLibs\n      webkitgtk_4_1\n      libxkbfile\n    ];\n\n    runtimeDependencies = lib.optionals stdenv.hostPlatform.isLinux [\n      systemdLibs\n      fontconfig.lib\n      libdbusmenu\n      wayland\n      libsecret\n    ];\n\n    nativeBuildInputs = [\n      unzip\n      imagemagick\n    ]\n    ++ extraNativeBuildInputs\n    ++ lib.optionals stdenv.hostPlatform.isLinux [\n      autoPatchelfHook\n      asar\n      copyDesktopItems\n      jq\n      # override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651\n      # Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset.\n      (buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; })\n    ];\n\n    # autoPatchelfHook cannot index libwebkit2gtk-4.1.so because pyelftools\n    # fails to parse it (ELFError: String Table not found).  Ignore the\n    # missing dep and add the library path via appendRunpaths so it is still\n    # available at runtime for libmsalruntime.so (Microsoft Authentication).\n    autoPatchelfIgnoreMissingDeps = lib.optionals stdenv.hostPlatform.isLinux [\n      \"libwebkit2gtk-4.1.so.0\"\n    ];\n    appendRunpaths = lib.optionals stdenv.hostPlatform.isLinux [\n      \"${webkitgtk_4_1}/lib\"\n    ];\n\n    dontBuild = true;\n    dontConfigure = true;\n    noDumpEnvVars = true;\n\n    stripExclude = lib.optional hasVsceSign [\n      # vsce-sign is a single executable application built with Node.js, and it becomes non-functional if stripped\n      \"lib/vscode/resources/app/node_modules/@vscode/vsce-sign/bin/vsce-sign\"\n    ];\n\n    installPhase = ''\n      runHook preInstall\n    ''\n    + (\n      if stdenv.hostPlatform.isDarwin then\n        ''\n          mkdir -p \"$out/Applications/${longName}.app\" \"$out/bin\"\n          cp -r ./* \"$out/Applications/${longName}.app\"\n          ln -s \"$out/Applications/${longName}.app/Contents/Resources/app/bin/${sourceExecutableName}\" \"$out/bin/${executableName}\"\n        ''\n      else\n        (\n          ''\n            mkdir -p \"$out/lib/${libraryName}\" \"$out/bin\"\n            cp -r ./* \"$out/lib/${libraryName}\"\n\n            ln -s \"$out/lib/${libraryName}/bin/${sourceExecutableName}\" \"$out/bin/${executableName}\"\n          ''\n          # These are named vscode.png, vscode-insiders.png, etc to match the name in upstream *.deb packages.\n          + ''\n            mkdir -p \"$out/share/pixmaps\"\n            icon_file=\"$out/lib/${libraryName}/resources/app/resources/linux/code.png\"\n            cp \"$icon_file\" \"$out/share/pixmaps/${iconName}.png\"\n\n            # Dynamically determine size of icon and place in appropriate directory\n            size=$(identify -format \"%wx%h\" \"$icon_file\")\n            mkdir -p \"$out/share/icons/hicolor/$size/apps\"\n            cp \"$icon_file\" \"$out/share/icons/hicolor/$size/apps/${iconName}.png\"\n          ''\n        )\n        # Override the previously determined VSCODE_PATH with the one we know to be correct\n        + (lib.optionalString patchVSCodePath ''\n          sed -i \"/ELECTRON=/iVSCODE_PATH='$out/lib/${libraryName}'\" \"$out/bin/${executableName}\"\n          grep -q \"VSCODE_PATH='$out/lib/${libraryName}'\" \"$out/bin/${executableName}\" # check if sed succeeded\n        '')\n        # Remove native encryption code, as it derives the key from the executable path which does not work for us.\n        # The credentials should be stored in a secure keychain already, so the benefit of this is questionable\n        # in the first place.\n        + ''\n          rm -rf $out/lib/${libraryName}/resources/app/node_modules/vscode-encrypt\n        ''\n    )\n    + ''\n      runHook postInstall\n    '';\n\n    preFixup = ''\n      gappsWrapperArgs+=(\n          ${\n            # we cannot use runtimeDependencies otherwise libdbusmenu do not work on kde\n            lib.optionalString stdenv.hostPlatform.isLinux\n              \"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libdbusmenu ]}\"\n          }\n        --prefix PATH : ${\n          lib.makeBinPath (\n            [\n              # for moving files to trash\n              glib\n\n              # for launcher and bundled helper scripts\n              gawk\n              gnugrep\n              gnused\n              coreutils\n              which\n            ]\n            # provides `getconf` for ps-fallback script that only runs on Linux\n            # https://github.com/microsoft/vscode/blob/97c807618b413805fde466739ba14f77a1f12307/src/vs/base/node/ps.sh#L2\n            # https://github.com/microsoft/vscode/blob/97c807618b413805fde466739ba14f77a1f12307/src/vs/base/node/ps.ts#L203-L217\n            ++ lib.optional stdenv.hostPlatform.isLinux getconf\n          )\n        }\n        --add-flags \"\\''${NIXOS_OZONE_WL:+\\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true --wayland-text-input-version=3}}\"\n        --add-flags ${lib.escapeShellArg commandLineArgs}\n      )\n    '';\n\n    # See https://github.com/NixOS/nixpkgs/issues/49643#issuecomment-873853897\n    # linux only because of https://github.com/NixOS/nixpkgs/issues/138729\n    postPatch =\n      lib.optionalString stdenv.hostPlatform.isLinux (\n        # disable update checks\n        ''\n          tmpProductJson=\"$(mktemp)\"\n          jq 'del(.updateUrl, .backupUpdateUrl)' resources/app/product.json > \"$tmpProductJson\"\n          mv \"$tmpProductJson\" resources/app/product.json\n        ''\n        # this is a fix for \"save as root\" functionality\n        + ''\n          packed=\"resources/app/node_modules.asar\"\n          unpacked=\"resources/app/node_modules\"\n          asar extract \"$packed\" \"$unpacked\"\n          substituteInPlace $unpacked/@vscode/sudo-prompt/index.js \\\n            --replace-fail \"/usr/bin/pkexec\" \"/run/wrappers/bin/pkexec\" \\\n            --replace-fail \"/bin/bash\" \"${bash}/bin/bash\"\n          rm -rf \"$packed\"\n        ''\n        # without this symlink loading JsChardet, the library that is used for auto encoding detection when files.autoGuessEncoding is true,\n        # fails to load with: electron/js2c/renderer_init: Error: Cannot find module 'jschardet'\n        # and the window immediately closes which renders VSCode unusable\n        # see https://github.com/NixOS/nixpkgs/issues/152939 for full log\n        + ''\n          ln -rs \"$unpacked\" \"$packed\"\n        ''\n      )\n      + (\n        let\n          vscodeRipgrep =\n            if stdenv.hostPlatform.isDarwin then\n              if lib.versionAtLeast vscodeVersion \"1.94.0\" then\n                \"Contents/Resources/app/node_modules/@vscode/ripgrep/bin/rg\"\n              else\n                \"Contents/Resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg\"\n            else\n              \"resources/app/node_modules/@vscode/ripgrep/bin/rg\";\n        in\n        if !useVSCodeRipgrep then\n          ''\n            rm ${vscodeRipgrep}\n            ln -s ${ripgrep}/bin/rg ${vscodeRipgrep}\n          ''\n        else\n          ''\n            chmod +x ${vscodeRipgrep}\n          ''\n      );\n\n    postFixup = lib.optionalString stdenv.hostPlatform.isLinux (\n      ''\n        patchelf \\\n          --add-needed ${libglvnd}/lib/libGLESv2.so.2 \\\n          --add-needed ${libglvnd}/lib/libGL.so.1 \\\n          --add-needed ${libglvnd}/lib/libEGL.so.1 \\\n          $out/lib/${libraryName}/${executableName}\n      ''\n      + (lib.optionalString hasVsceSign ''\n        patchelf \\\n          --add-needed ${lib.getLib openssl}/lib/libssl.so \\\n          $out/lib/vscode/resources/app/node_modules/@vscode/vsce-sign/bin/vsce-sign\n      '')\n    );\n\n    inherit meta;\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":47,"column":1},"path":["pkgs","buildVscode"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":47,"column":1},"path":["pkgs","buildVscode"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.buildWasmBindgenCli","path":["pkgs","buildWasmBindgenCli"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3367,"column":3},"attr_expr":"buildWasmBindgenCli = callPackage ../build-support/wasm-bindgen-cli { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/wasm-bindgen-cli/default.nix","line":13,"column":1},"lambda_expr":"{\n  version ? src.version,\n  src,\n  cargoDeps,\n}:\n\nrustPlatform.buildRustPackage {\n  pname = \"wasm-bindgen-cli\";\n\n  inherit version src cargoDeps;\n\n  __structuredAttrs = true;\n\n  nativeBuildInputs = [ pkg-config ];\n\n  buildInputs = [\n    openssl\n  ]\n  ++ lib.optionals stdenv.hostPlatform.isDarwin [\n    curl\n  ];\n\n  nativeCheckInputs = [ nodejs_latest ];\n\n  # tests require it to be ran in the wasm-bindgen monorepo\n  doCheck = false;\n\n  passthru.updateScript = nix-update-script { };\n\n  meta = {\n    homepage = \"https://wasm-bindgen.github.io/wasm-bindgen/\";\n    license = with lib.licenses; [\n      asl20 # or\n      mit\n    ];\n    description = \"Facilitating high-level interactions between wasm modules and JavaScript\";\n    maintainers = with lib.maintainers; [\n      rizary\n      insipx\n    ];\n    mainProgram = \"wasm-bindgen\";\n  };\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/wasm-bindgen-cli/default.nix","line":13,"column":1},"path":["pkgs","buildWasmBindgenCli"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/wasm-bindgen-cli/default.nix","line":13,"column":1},"path":["pkgs","buildWasmBindgenCli"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.bundlerApp","path":["pkgs","bundlerApp"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5072,"column":3},"attr_expr":"bundlerApp = callPackage ../development/ruby-modules/bundler-app { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-app/default.nix","line":18,"column":1},"lambda_expr":"{\n  # use the name of the name in question; its version will be picked up from the gemset\n  pname,\n  # Gemdir is the location of the Gemfile{,.lock} and gemset.nix; usually ./.\n  # This is required unless gemfile, lockfile, and gemset are all provided\n  gemdir ? null,\n  # Exes is the list of executables provided by the gems in the Gemfile\n  exes ? [ ],\n  # Scripts are ruby programs depend on gems in the Gemfile (e.g. scripts/rails)\n  scripts ? [ ],\n  ruby ? defs.ruby,\n  gemfile ? null,\n  lockfile ? null,\n  gemset ? null,\n  preferLocalBuild ? false,\n  allowSubstitutes ? false,\n  installManpages ? true,\n  meta ? { },\n  nativeBuildInputs ? [ ],\n  buildInputs ? [ ],\n  postBuild ? \"\",\n  gemConfig ? null,\n  passthru ? { },\n}@args:\n\nlet\n  basicEnv =\n    (callPackage ../bundled-common {\n      inherit ruby;\n    })\n      args;\n\n  cmdArgs =\n    removeAttrs args [\n      \"postBuild\"\n      \"gemConfig\"\n      \"passthru\"\n      \"gemset\"\n      \"gemdir\"\n    ]\n    // {\n      inherit preferLocalBuild allowSubstitutes; # pass the defaults\n      inherit (basicEnv) version pname;\n\n      nativeBuildInputs = nativeBuildInputs ++ lib.optionals (scripts != [ ]) [ makeWrapper ];\n\n      meta = {\n        mainProgram = pname;\n        inherit (ruby.meta) platforms;\n      }\n      // meta;\n      passthru =\n        basicEnv.passthru\n        // {\n          inherit basicEnv;\n          inherit (basicEnv) env;\n        }\n        // passthru;\n    };\nin\nrunCommand basicEnv.name cmdArgs ''\n  mkdir -p $out/bin\n  ${(lib.concatMapStrings (x: \"ln -s '${basicEnv}/bin/${x}' $out/bin/${x};\\n\") exes)}\n  ${\n    (lib.concatMapStrings (\n      s:\n      \"makeWrapper $out/bin/$(basename ${s}) $srcdir/${s} \"\n      + \"--set BUNDLE_GEMFILE ${basicEnv.confFiles}/Gemfile \"\n      + \"--unset BUNDLE_PATH \"\n      + \"--set BUNDLE_FROZEN 1 \"\n      + \"--set GEM_HOME ${basicEnv}/${ruby.gemPath} \"\n      + \"--set GEM_PATH ${basicEnv}/${ruby.gemPath} \"\n      + \"--chdir \\\"$srcdir\\\";\\n\"\n    ) scripts)\n  }\n\n  ${lib.optionalString installManpages ''\n    for section in {1..9}; do\n      mandir=\"$out/share/man/man$section\"\n\n      # See: https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/ruby-modules/gem/default.nix#L184-L200\n      # See: https://github.com/rubygems/rubygems/blob/7a7b234721c375874b7e22b1c5b14925b943f04e/bundler/lib/bundler.rb#L285-L291\n      find -L ${basicEnv}/${ruby.gemPath}/${\n        lib.optionalString (basicEnv.gemType == \"git\" || basicEnv.gemType == \"url\") \"bundler/\"\n      }gems/${basicEnv.name} \\( -wholename \"*/man/*.$section\" -o -wholename \"*/man/man$section/*.$section\" \\) -print -execdir mkdir -p $mandir \\; -execdir cp '{}' $mandir \\;\n    done\n    compressManPages \"''${!outputMan}\"\n  ''}\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-app/default.nix","line":18,"column":1},"path":["pkgs","bundlerApp"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-app/default.nix","line":18,"column":1},"path":["pkgs","bundlerApp"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.bundlerEnv","path":["pkgs","bundlerEnv"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5071,"column":3},"attr_expr":"bundlerEnv = callPackage ../development/ruby-modules/bundler-env { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-env/default.nix","line":12,"column":1},"lambda_expr":"{\n  name ? null,\n  pname ? null,\n  gemdir ? null,\n  gemfile ? null,\n  lockfile ? null,\n  gemset ? null,\n  groups ? [ \"default\" ],\n  ruby ? defs.ruby,\n  copyGemFiles ? false, # Copy gem files instead of symlinking\n  gemConfig ? defaultGemConfig,\n  postBuild ? null,\n  document ? [ ],\n  meta ? { },\n  ignoreCollisions ? false,\n  passthru ? { },\n  ...\n}@args:\n\nlet\n  inherit\n    (import ../bundled-common/functions.nix {\n      inherit\n        lib\n        ruby\n        gemConfig\n        groups\n        ;\n    })\n    genStubsScript\n    ;\n\n  basicEnv = (callPackage ../bundled-common { inherit bundler; }) (\n    args\n    // {\n      inherit pname name;\n      mainGemName = pname;\n    }\n  );\n\n  inherit (basicEnv) envPaths;\n  # Idea here is a mkDerivation that gen-bin-stubs new stubs \"as specified\" -\n  # either specific executables or the bin/ for certain gem(s), but\n  # incorporates the basicEnv as a requirement so that its $out is in our path.\n\n  # When stubbing the bins for a gem, we should use the gem expression\n  # directly, which means that basicEnv should somehow make it available.\n\n  # Different use cases should use different variations on this file, rather\n  # than the expression trying to deduce a use case.\n\nin\n# The basicEnv should be put into passthru so that e.g. nix-shell can use it.\nif pname == null then\n  basicEnv // { inherit name basicEnv; }\nelse\n  let\n    bundlerEnvArgs = {\n      inherit ignoreCollisions;\n\n      inherit (basicEnv) pname version;\n\n      paths = envPaths;\n      pathsToLink = [ \"/lib\" ];\n\n      postBuild =\n        genStubsScript {\n          inherit\n            lib\n            runCommand\n            ruby\n            bundler\n            groups\n            ;\n          confFiles = basicEnv.confFiles;\n          binPaths = [ basicEnv.gems.${pname} ];\n        }\n        + lib.optionalString (postBuild != null) postBuild;\n\n      meta = {\n        platforms = ruby.meta.platforms;\n      }\n      // meta;\n      passthru =\n        basicEnv.passthru\n        // {\n          inherit basicEnv;\n          inherit (basicEnv) env;\n        }\n        // passthru;\n    };\n  in\n  if copyGemFiles then\n    runCommand basicEnv.name bundlerEnvArgs ''\n      mkdir -p $out\n      for i in $paths; do\n        ${buildPackages.rsync}/bin/rsync -a $i/lib $out/\n      done\n      eval \"$postBuild\"\n    ''\n  else\n    buildEnv bundlerEnvArgs","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-env/default.nix","line":12,"column":1},"path":["pkgs","bundlerEnv"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-env/default.nix","line":12,"column":1},"path":["pkgs","bundlerEnv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.bundlerUpdateScript","path":["pkgs","bundlerUpdateScript"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5073,"column":3},"attr_expr":"bundlerUpdateScript = callPackage ../development/ruby-modules/bundler-update-script { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-update-script/default.nix","line":13,"column":1},"lambda_expr":"attrPath:\n\nlet\n  updateScript = writeScript \"bundler-update-script\" ''\n    #!${runtimeShell}\n    PATH=${\n      lib.makeBinPath [\n        bundler\n        bundix\n        coreutils\n        git\n        nix\n        nixfmt\n      ]\n    }\n    set -o errexit\n    set -o nounset\n    set -o pipefail\n\n    attrPath=$1\n\n    toplevel=$(git rev-parse --show-toplevel)\n    position=$(nix --extra-experimental-features nix-command eval -f \"$toplevel\" --raw \"$attrPath.meta.position\")\n    gemdir=$(dirname \"$position\")\n\n    cd \"$gemdir\"\n\n    rm -f gemset.nix Gemfile.lock\n    export BUNDLE_FORCE_RUBY_PLATFORM=1\n    bundler lock --update\n    bundix\n    nixfmt gemset.nix\n  '';\nin\n[\n  updateScript\n  attrPath\n]","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-update-script/default.nix","line":13,"column":1},"path":["pkgs","bundlerUpdateScript"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/ruby-modules/bundler-update-script/default.nix","line":13,"column":1},"path":["pkgs","bundlerUpdateScript"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.callPackage","path":["pkgs","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":120,"column":3},"attr_expr":"callPackage = pkgs.newScope { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.callPackages","path":["pkgs","callPackages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":122,"column":3},"attr_expr":"callPackages = lib.callPackagesWith pkgsForCall;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":357,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      auto = intersectAttrs (functionArgs f) autoArgs;\n      mirrorArgs = mirrorFunctionArgs f;\n      origArgs = auto // args;\n      pkgs = f origArgs;\n      mkAttrOverridable = name: _: makeOverridable (mirrorArgs (newArgs: (f newArgs).${name})) origArgs;\n    in\n    if isDerivation pkgs then\n      throw (\n        \"function `callPackages` was called on a *single* derivation \"\n        + ''\"${pkgs.name or \"<unknown-name>\"}\";''\n        + \" did you mean to use `callPackage` instead?\"\n      )\n    else\n      mapAttrs mkAttrOverridable pkgs","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.closureInfo","path":["pkgs","closureInfo"],"aliases":null,"signature":"closureInfo :: { rootPaths :: [Path]; } -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":856,"column":3},"attr_expr":"closureInfo = callPackage ../build-support/closure-info.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/closure-info.nix","line":40,"column":1},"lambda_expr":"{ rootPaths }:\n\nassert builtins.langVersion >= 5;\n\nstdenvNoCC.mkDerivation {\n  name = \"closure-info\";\n\n  __structuredAttrs = true;\n\n  exportReferencesGraph.closure = rootPaths;\n\n  preferLocalBuild = true;\n\n  nativeBuildInputs = [\n    coreutils\n    jq\n  ];\n\n  empty = rootPaths == [ ];\n\n  buildCommand = ''\n    out=''${outputs[out]}\n\n    mkdir $out\n\n    if [[ -n \"$empty\" ]]; then\n      echo 0 > $out/total-nar-size\n      touch $out/registration $out/store-paths\n    else\n      jq -r \".closure | map(.narSize) | add\" < \"$NIX_ATTRS_JSON_FILE\" > $out/total-nar-size\n      jq -r '.closure | map([.path, .narHash, .narSize, \"\", (.references | length)] + .references) | add | map(\"\\(.)\\n\") | add' < \"$NIX_ATTRS_JSON_FILE\" | head -n -1 > $out/registration\n      jq -r '.closure[].path' < \"$NIX_ATTRS_JSON_FILE\" > $out/store-paths\n    fi\n\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/closure-info.nix","line":40,"column":1},"path":["pkgs","closureInfo"],"pos_type":"Lambda"}},"content":{"content":"\nProduces metadata about the closure of the given root paths.\n\n1. Total NAR size in `$out/total-nar-size`.\n2. Registration, suitable for `nix-store --load-db`, in `$out/registration`.\n   Can also be used with `nix-store --register-validity --hash-given`.\n3. All store paths for the closure in `$out/store-paths`.\n\n# Inputs\n\n`rootPaths` ([Path])\n\n: List of root paths to include in the closure information.\n\n# Type\n\n```\nclosureInfo :: { rootPaths :: [Path]; } -> Derivation\n```\n\n# Examples\n:::{.example}\n## `pkgs.closureInfo` usage example\n```\npkgs.closureInfo {\n  rootPaths = [ pkgs.hello pkgs.bc pkgs.dwarf2json ];\n}\n=>\n«derivation /nix/store/...-closure-info.drv»\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/closure-info.nix","line":40,"column":1},"path":["pkgs","closureInfo"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.code-cursor-fhsWithPackages","path":["pkgs","code-cursor-fhsWithPackages"],"aliases":[["pkgs","antigravity-fhsWithPackages"],["pkgs","kiro-fhsWithPackages"],["pkgs","vscode-fhsWithPackages"],["pkgs","vscodium-fhsWithPackages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10343,"column":3},"attr_expr":"code-cursor-fhsWithPackages = code-cursor.fhsWithPackages;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"lambda_expr":"f: fhs { additionalPkgs = f; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","code-cursor-fhsWithPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","code-cursor-fhsWithPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.compressDrv","path":["pkgs","compressDrv"],"aliases":null,"signature":"compressDrv :: Derivation -> { formats :: [String]; compressors :: { ${fileExtension} :: String; } } -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11854,"column":3},"attr_expr":"compressDrv = callPackage ../build-support/compress-drv { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/compress-drv/default.nix","line":55,"column":1},"lambda_expr":"drv:\n{\n  formats,\n  compressors,\n  extraFindOperands ? \"\",\n}:\nlet\n  validProg =\n    ext: prog:\n    let\n      matches = (builtins.length (builtins.split \"\\\\{}\" prog) - 1) / 2;\n    in\n    lib.assertMsg (\n      matches == 1\n    ) \"compressor ${ext} needs to have exactly one '{}', found ${toString matches}\";\n  mkCmd =\n    ext: prog:\n    assert validProg ext prog;\n    ''\n      find -L $out -type f -regextype posix-extended -iregex '.*\\.(${formatsPipe})' ${extraFindOperands} -print0 \\\n        | xargs -0 -P$NIX_BUILD_CORES -I{} ${prog}\n    '';\n  formatsPipe = lib.concatStringsSep \"|\" formats;\nin\nrunCommand \"${drv.name}-compressed\"\n  (\n    (lib.optionalAttrs (drv ? pname) { inherit (drv) pname; })\n    // (lib.optionalAttrs (drv ? version) { inherit (drv) version; })\n    // (lib.optionalAttrs (drv ? passthru) { inherit (drv) passthru; })\n    // (lib.optionalAttrs (drv ? meta) { inherit (drv) meta; })\n  )\n  ''\n    mkdir $out\n\n    # cannot use lndir here, because it stop recursing at symlinks that point to directories\n    (cd ${drv}; find -L -type d -exec mkdir -p $out/{} ';')\n    (cd ${drv}; find -L -type f -exec ln -s ${drv}/{} $out/{} ';')\n\n    ${lib.concatStringsSep \"\\n\\n\" (lib.mapAttrsToList mkCmd compressors)}\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/compress-drv/default.nix","line":55,"column":1},"path":["pkgs","compressDrv"],"pos_type":"Lambda"}},"content":{"content":"\nCompresses files of a given derivation, and returns a new derivation with\ncompressed files\n\n# Inputs\n\n`formats` ([String])\n\n: List of file extensions to compress. Example: `[\"txt\" \"svg\" \"xml\"]`.\n\n`extraFindOperands` (String)\n\n: Extra command line parameters to pass to the find command.\n  This can be used to exclude certain files.\n  For example: `-not -iregex \".*(\\/apps\\/.*\\/l10n\\/).*\"`\n\n`compressors` ( { ${fileExtension} :: String })\n\n: Map a desired extension (e.g. `gz`) to a compress program.\n\n  The compressor program that will be executed to get the `COMPRESSOR` extension.\n  The program should have a single \" {}\", which will be the replaced with the\n  target filename.\n\n  Compressor must:\n\n  - read symlinks (thus --force is needed to gzip, zstd, xz).\n  - keep the original file in place (--keep).\n\n# Type\n\n```\ncompressDrv :: Derivation -> { formats :: [String]; compressors :: { ${fileExtension} :: String; } } -> Derivation\n```\n\n# Examples\n:::{.example}\n## `pkgs.compressDrv` usage example\n```\ncompressDrv pkgs.spdx-license-list-data.json {\n  formats = [\"json\"];\n  compressors = {\n    gz = \"${zopfli}/bin/zopfli --keep {}\";\n  };\n}\n=>\n«derivation /nix/store/...-spdx-license-list-data-3.24.0-compressed.drv»\n```\n\nSee also pkgs.compressDrvWeb, which is a wrapper on top of compressDrv, for broader usage\nexamples.\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/compress-drv/default.nix","line":55,"column":1},"path":["pkgs","compressDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.compressDrvWeb","path":["pkgs","compressDrvWeb"],"aliases":null,"signature":"compressDrvWeb :: Derivation -> { formats :: [String]; extraFormats :: [String]; compressors :: { ${fileExtension} :: String; } } -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11856,"column":3},"attr_expr":"compressDrvWeb = callPackage ../build-support/compress-drv/web.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/compress-drv/web.nix","line":113,"column":1},"lambda_expr":"drv:\n{\n  formats ? [\n    \"css\"\n    \"eot\"\n    \"htm\"\n    \"html\"\n    \"js\"\n    \"json\"\n    \"map\"\n    \"otf\"\n    \"svg\"\n    \"ttf\"\n    \"txt\"\n    \"webmanifest\"\n    \"xml\"\n  ],\n  extraFormats ? [ ],\n  compressors ? {\n    br = \"${lib.getExe brotli} --keep --no-copy-stat {}\";\n    gz = \"${lib.getExe zopfli} --keep {}\";\n    # --force is required to not fail on symlinks\n    # for details on the compression level see\n    # https://github.com/NixOS/nixpkgs/pull/332752#issuecomment-2275110390\n    zstd = \"${lib.getExe zstd} --force --keep --quiet -19 {}\";\n  },\n  extraFindOperands ? \"\",\n}:\ncompressDrv drv {\n  formats = formats ++ extraFormats;\n  compressors = compressors;\n  inherit extraFindOperands;\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/compress-drv/web.nix","line":113,"column":1},"path":["pkgs","compressDrvWeb"],"pos_type":"Lambda"}},"content":{"content":"\ncompressDrvWeb compresses a derivation for common web server use.\n\nUseful when one wants to pre-compress certain static assets and pass them to\nthe web server.\n\n# Inputs\n\n`formats` ([String])\n\n: List of file extensions to compress.\n\n  Defaults to common formats that compress well.\n\n`extraFindOperands` (String)\n\n: See compressDrv for details.\n\n`extraFormats` ([String])\n\n: Extra extensions to compress in addition to `formats`.\n\n`compressors` ( { ${fileExtension} :: String })\n\n: Map a desired extension (e.g. `gz`) to a compress program.\n\n# Type\n\n```\ncompressDrvWeb :: Derivation -> { formats :: [String]; extraFormats :: [String]; compressors :: { ${fileExtension} :: String; } } -> Derivation\n```\n\n# Examples\n:::{.example}\n## `pkgs.compressDrvWeb` full usage example with `pkgs.gamja` and a webserver\n```nix\n\nFor example, building `pkgs.gamja` produces the following output:\n\n  /nix/store/2wn1qbk8gp4y2m8xvafxv1b2dcdqj8fz-gamja-1.0.0-beta.9/\n  ├── index.2fd01148.js\n  ├── index.2fd01148.js.map\n  ├── index.37aa9a8a.css\n  ├── index.37aa9a8a.css.map\n  ├── index.html\n  └── manifest.webmanifest\n\nWith `pkgs.compressDrvWeb`, one can compress these files:\n\n```nix\npkgs.compressDrvWeb pkgs.gamja {}\n=>\n«derivation /nix/store/...-gamja-compressed.drv»\n```\n\n```bash\n/nix/store/f5ryid7zrw2hid7h9kil5g5j29q5r2f7-gamja-1.0.0-beta.9-compressed\n├── index.2fd01148.js -> /nix/store/2wn1qbk8gp4y2m8xvafxv1b2dcdqj8fz-gamja-1.0.0-beta.9/index.2fd01148.js\n├── index.2fd01148.js.br\n├── index.2fd01148.js.gz\n├── index.2fd01148.js.map -> /nix/store/2wn1qbk8gp4y2m8xvafxv1b2dcdqj8fz-gamja-1.0.0-beta.9/index.2fd01148.js.map\n├── index.2fd01148.js.map.br\n├── index.2fd01148.js.map.gz\n├── index.37aa9a8a.css -> /nix/store/2wn1qbk8gp4y2m8xvafxv1b2dcdqj8fz-gamja-1.0.0-beta.9/index.37aa9a8a.css\n├── index.37aa9a8a.css.br\n├── index.37aa9a8a.css.gz\n├── index.37aa9a8a.css.map -> /nix/store/2wn1qbk8gp4y2m8xvafxv1b2dcdqj8fz-gamja-1.0.0-beta.9/index.37aa9a8a.css.map\n├── index.37aa9a8a.css.map.br\n├── index.37aa9a8a.css.map.gz\n├── index.html -> /nix/store/2wn1qbk8gp4y2m8xvafxv1b2dcdqj8fz-gamja-1.0.0-beta.9/index.html\n├── index.html.br\n├── index.html.gz\n├── manifest.webmanifest -> /nix/store/2wn1qbk8gp4y2m8xvafxv1b2dcdqj8fz-gamja-1.0.0-beta.9/manifest.webmanifest\n├── manifest.webmanifest.br\n└── manifest.webmanifest.gz\n```\n\nWhen the `-compressed` derivation is passed to a properly configured web server,\nit enables direct serving of the pre-compressed files.\n\n```shell-session\n$ curl -I -H 'Accept-Encoding: br' https://irc.example.org/\n<...>\ncontent-encoding: br\n<...>\n```\n\nFor example, a caddy configuration snippet for gamja to serve\nthe static assets (JS, CSS files) pre-compressed:\n\n```nix\n{\n  virtualHosts.\"irc.example.org\".extraConfig = ''\n    root * ${pkgs.compressDrvWeb pkgs.gamja {}}\n    file_server browse {\n        precompressed br gzip\n    }\n  '';\n}\n```\n\nThis feature is also available in nginx via `ngx_brotli` and\n`ngx_http_gzip_static_module`.\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/compress-drv/web.nix","line":113,"column":1},"path":["pkgs","compressDrvWeb"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.compressFirmwareXz","path":["pkgs","compressFirmwareXz"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":808,"column":3},"attr_expr":"compressFirmwareXz = callPackage ../build-support/kernel/compress-firmware.nix { type = \"xz\"; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/kernel/compress-firmware.nix","line":8,"column":1},"lambda_expr":"firmware:\n\nlet\n  compressor =\n    {\n      xz = {\n        ext = \"xz\";\n        nativeBuildInputs = [ ];\n        cmd = file: target: ''xz -9c -T1 -C crc32 --lzma2=dict=2MiB \"${file}\" > \"${target}\"'';\n      };\n      zstd = {\n        ext = \"zst\";\n        nativeBuildInputs = [ zstd ];\n        cmd = file: target: ''zstd -T1 -19 --long --check -f \"${file}\" -o \"${target}\"'';\n      };\n    }\n    .${type} or (throw \"Unsupported compressor type for firmware.\");\n\n  args = {\n    outputChecks.out.allowedRequisites = [ \"out\" ];\n    __structuredAttrs = true;\n    inherit (compressor) nativeBuildInputs;\n  }\n  // lib.optionalAttrs (firmware ? meta) { inherit (firmware) meta; };\nin\n\nrunCommand \"${firmware.name}-${type}\" args ''\n  mkdir -p $out/lib\n  (cd ${firmware} && find lib/firmware -type d -print0) |\n      (cd $out && xargs -0 mkdir -v --)\n  (cd ${firmware} && find lib/firmware -type f -print0) |\n      (cd $out && xargs -0rtP \"$NIX_BUILD_CORES\" -n1 \\\n          sh -c '${compressor.cmd \"${firmware}/$1\" \"$1.${compressor.ext}\"}' --)\n  (cd ${firmware} && find lib/firmware -type l) | while read link; do\n      target=\"$(readlink \"${firmware}/$link\")\"\n      if [ -f \"${firmware}/$link\" ]; then\n        ln -vs -- \"''${target/^${firmware}/$out}.${compressor.ext}\" \"$out/$link.${compressor.ext}\"\n      else\n        ln -vs -- \"''${target/^${firmware}/$out}\" \"$out/$link\"\n      fi\n  done\n\n  echo \"Checking for broken symlinks:\"\n  find -L $out -type l -print -execdir false -- '{}' '+'\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/kernel/compress-firmware.nix","line":8,"column":1},"path":["pkgs","compressFirmwareXz"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/kernel/compress-firmware.nix","line":8,"column":1},"path":["pkgs","compressFirmwareXz"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.compressFirmwareZstd","path":["pkgs","compressFirmwareZstd"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":810,"column":3},"attr_expr":"compressFirmwareZstd = callPackage ../build-support/kernel/compress-firmware.nix { type = \"zstd\"; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/kernel/compress-firmware.nix","line":8,"column":1},"lambda_expr":"firmware:\n\nlet\n  compressor =\n    {\n      xz = {\n        ext = \"xz\";\n        nativeBuildInputs = [ ];\n        cmd = file: target: ''xz -9c -T1 -C crc32 --lzma2=dict=2MiB \"${file}\" > \"${target}\"'';\n      };\n      zstd = {\n        ext = \"zst\";\n        nativeBuildInputs = [ zstd ];\n        cmd = file: target: ''zstd -T1 -19 --long --check -f \"${file}\" -o \"${target}\"'';\n      };\n    }\n    .${type} or (throw \"Unsupported compressor type for firmware.\");\n\n  args = {\n    outputChecks.out.allowedRequisites = [ \"out\" ];\n    __structuredAttrs = true;\n    inherit (compressor) nativeBuildInputs;\n  }\n  // lib.optionalAttrs (firmware ? meta) { inherit (firmware) meta; };\nin\n\nrunCommand \"${firmware.name}-${type}\" args ''\n  mkdir -p $out/lib\n  (cd ${firmware} && find lib/firmware -type d -print0) |\n      (cd $out && xargs -0 mkdir -v --)\n  (cd ${firmware} && find lib/firmware -type f -print0) |\n      (cd $out && xargs -0rtP \"$NIX_BUILD_CORES\" -n1 \\\n          sh -c '${compressor.cmd \"${firmware}/$1\" \"$1.${compressor.ext}\"}' --)\n  (cd ${firmware} && find lib/firmware -type l) | while read link; do\n      target=\"$(readlink \"${firmware}/$link\")\"\n      if [ -f \"${firmware}/$link\" ]; then\n        ln -vs -- \"''${target/^${firmware}/$out}.${compressor.ext}\" \"$out/$link.${compressor.ext}\"\n      else\n        ln -vs -- \"''${target/^${firmware}/$out}\" \"$out/$link\"\n      fi\n  done\n\n  echo \"Checking for broken symlinks:\"\n  find -L $out -type l -print -execdir false -- '{}' '+'\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/kernel/compress-firmware.nix","line":8,"column":1},"path":["pkgs","compressFirmwareZstd"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/kernel/compress-firmware.nix","line":8,"column":1},"path":["pkgs","compressFirmwareZstd"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.concatScript","path":["pkgs","concatScript"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":447,"column":3},"attr_expr":"concatScript =\n    name: files:\n    concatTextFile {\n      inherit name files;\n      executable = true;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":448,"column":5},"lambda_expr":"concatScript =\n    name: files:\n    concatTextFile {\n      inherit name files;\n      executable = true;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":448,"column":5},"path":["pkgs","concatScript"],"pos_type":"Lambda"}},"content":{"content":"\nWrites a text file to nix store with and mark it as executable.\n\nExample:\n# Writes contents of files to /nix/store/<store path>\nconcatScript \"my-file\" [ file1 file2 ]\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":448,"column":5},"path":["pkgs","concatScript"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.concatText","path":["pkgs","concatText"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":435,"column":3},"attr_expr":"concatText = name: files: concatTextFile { inherit name files; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":435,"column":16},"lambda_expr":"concatText = name: files: concatTextFile { inherit name files; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":435,"column":16},"path":["pkgs","concatText"],"pos_type":"Lambda"}},"content":{"content":"\nWrites a text file to nix store with no optional parameters available.\n\nExample:\n\n# Writes contents of files to /nix/store/<store path>\nconcatText \"my-file\" [ file1 file2 ]\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":435,"column":16},"path":["pkgs","concatText"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.concatTextFile","path":["pkgs","concatTextFile"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":391,"column":3},"attr_expr":"concatTextFile =\n    {\n      name, # the name of the derivation\n      files,\n      executable ? false, # run chmod +x ?\n      destination ? \"\", # relative path appended to $out eg \"/bin/foo\"\n      checkPhase ? \"\", # syntax checks, e.g. for scripts\n      meta ? { },\n      passthru ? { },\n    }:\n    runCommandLocal name\n      {\n        inherit\n          files\n          executable\n          checkPhase\n          meta\n          passthru\n          destination\n          ;\n      }\n      ''\n        file=$out$destination\n        mkdir -p \"$(dirname \"$file\")\"\n        cat $files > \"$file\"\n\n        if [ -n \"$executable\" ]; then\n          chmod +x \"$file\"\n        fi\n\n        eval \"$checkPhase\"\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":392,"column":5},"lambda_expr":"concatTextFile =\n    {\n      name, # the name of the derivation\n      files,\n      executable ? false, # run chmod +x ?\n      destination ? \"\", # relative path appended to $out eg \"/bin/foo\"\n      checkPhase ? \"\", # syntax checks, e.g. for scripts\n      meta ? { },\n      passthru ? { },\n    }:\n    runCommandLocal name\n      {\n        inherit\n          files\n          executable\n          checkPhase\n          meta\n          passthru\n          destination\n          ;\n      }\n      ''\n        file=$out$destination\n        mkdir -p \"$(dirname \"$file\")\"\n        cat $files > \"$file\"\n\n        if [ -n \"$executable\" ]; then\n          chmod +x \"$file\"\n        fi\n\n        eval \"$checkPhase\"\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":392,"column":5},"path":["pkgs","concatTextFile"],"pos_type":"Lambda"}},"content":{"content":"\nconcat a list of files to the nix store.\nThe contents of files are added to the file in the store.\n\nExample:\n\n# Writes my-file to /nix/store/<store path>\nconcatTextFile {\n  name = \"my-file\";\n  files = [ drv1 \"${drv2}/path/to/file\" ];\n}\n\nSee also the `concatText` helper function below.\n\n# Writes executable my-file to /nix/store/<store path>/bin/my-file\nconcatTextFile {\n  name = \"my-file\";\n  files = [ drv1 \"${drv2}/path/to/file\" ];\n  executable = true;\n  destination = \"/bin/my-file\";\n}\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":392,"column":5},"path":["pkgs","concatTextFile"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.copyPathToStore","path":["pkgs","copyPathToStore"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":982,"column":3},"attr_expr":"copyPathToStore = builtins.filterSource (p: t: true);","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.copyPathsToStore","path":["pkgs","copyPathsToStore"],"aliases":[],"signature":null,"is_primop":true,"primop_meta":{"name":null,"args":null,"experimental":null,"arity":null},"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":986,"column":3},"attr_expr":"copyPathsToStore = map copyPathToStore;","lambda_position":null,"lambda_expr":null,"count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.darwinMinVersionHook","path":["pkgs","darwinMinVersionHook"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7427,"column":3},"attr_expr":"darwinMinVersionHook =\n    deploymentTarget:\n    makeSetupHook {\n      name = \"darwin-deployment-target-hook-${deploymentTarget}\";\n      substitutions = {\n        darwinMinVersionVariable = lib.escapeShellArg stdenv.hostPlatform.darwinMinVersionVariable;\n        deploymentTarget = lib.escapeShellArg deploymentTarget;\n      };\n      meta.license = lib.licenses.mit;\n    } ../os-specific/darwin/darwin-min-version-hook/setup-hook.sh;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7428,"column":5},"lambda_expr":"deploymentTarget:\n    makeSetupHook {\n      name = \"darwin-deployment-target-hook-${deploymentTarget}\";\n      substitutions = {\n        darwinMinVersionVariable = lib.escapeShellArg stdenv.hostPlatform.darwinMinVersionVariable;\n        deploymentTarget = lib.escapeShellArg deploymentTarget;\n      };\n      meta.license = lib.licenses.mit;\n    } ../os-specific/darwin/darwin-min-version-hook/setup-hook.sh","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7428,"column":5},"path":["pkgs","darwinMinVersionHook"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7428,"column":5},"path":["pkgs","darwinMinVersionHook"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.datadog-integrations-core","path":["pkgs","datadog-integrations-core"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9021,"column":3},"attr_expr":"datadog-integrations-core =\n    extras:\n    callPackage ../tools/networking/dd-agent/integrations-core.nix {\n      extraIntegrations = extras;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9022,"column":5},"lambda_expr":"extras:\n    callPackage ../tools/networking/dd-agent/integrations-core.nix {\n      extraIntegrations = extras;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9022,"column":5},"path":["pkgs","datadog-integrations-core"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9022,"column":5},"path":["pkgs","datadog-integrations-core"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallDirectoryToNix","path":["pkgs","dhallDirectoryToNix"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":386,"column":3},"attr_expr":"dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/directory-to-nix.nix","line":14,"column":1},"lambda_expr":"{\n  src,\n  # The file to import, relative to the src root directory\n  file ? \"package.dhall\",\n}@args:\n\nlet\n  generatedPkg = dhallPackages.generateDhallDirectoryPackage args;\n\n  builtPkg = dhallPackages.callPackage generatedPkg { };\n\nin\ndhallPackageToNix builtPkg","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/directory-to-nix.nix","line":14,"column":1},"path":["pkgs","dhallDirectoryToNix"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/directory-to-nix.nix","line":14,"column":1},"path":["pkgs","dhallDirectoryToNix"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallPackageToNix","path":["pkgs","dhallPackageToNix"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":388,"column":3},"attr_expr":"dhallPackageToNix = callPackage ../build-support/dhall/package-to-nix.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/package-to-nix.nix","line":15,"column":1},"lambda_expr":"dhallPackage:\nlet\n  drv = stdenv.mkDerivation {\n    name = \"dhall-compiled-package.nix\";\n\n    buildCommand = ''\n      # Dhall requires that the cache is writable, even if it is never written to.\n      # We copy the cache from the input package to the current directory and\n      # set the cache as writable.\n      cp -r \"${dhallPackage}/.cache\" ./\n      export XDG_CACHE_HOME=$PWD/.cache\n      chmod -R +w ./.cache\n\n      dhall-to-nix <<< \"${dhallPackage}/binary.dhall\" > $out\n    '';\n\n    nativeBuildInputs = [ dhall-nix ];\n  };\n\nin\nimport drv","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/package-to-nix.nix","line":15,"column":1},"path":["pkgs","dhallPackageToNix"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/package-to-nix.nix","line":15,"column":1},"path":["pkgs","dhallPackageToNix"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dhallToNix","path":["pkgs","dhallToNix"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":390,"column":3},"attr_expr":"dhallToNix = callPackage ../build-support/dhall/to-nix.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/to-nix.nix","line":27,"column":5},"lambda_expr":"code:\n    let\n      file = writeText \"dhall-expression\" code;\n\n      drv = stdenv.mkDerivation {\n        name = \"dhall-compiled.nix\";\n\n        buildCommand = ''\n          dhall-to-nix <<< \"${file}\" > $out\n        '';\n\n        buildInputs = [ dhall-nix ];\n      };\n\n    in\n    import drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/to-nix.nix","line":27,"column":5},"path":["pkgs","dhallToNix"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dhall/to-nix.nix","line":27,"column":5},"path":["pkgs","dhallToNix"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dictDBCollector","path":["pkgs","dictDBCollector"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7813,"column":3},"attr_expr":"dictDBCollector = callPackage ../servers/dict/dictd-db-collector.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/servers/dict/dictd-db-collector.nix","line":8,"column":3},"lambda_expr":"{\n    dictlist,\n    allowList ? [ \"127.0.0.1\" ],\n    denyList ? [ ],\n  }:\n\n  /*\n    dictlist is a list of form\n    [ { filename = /path/to/files/basename;\n    name = \"name\"; } ]\n    basename.dict.dz and basename.index should be\n    dict files. Or look below for other options.\n    allowList is a list of IP/domain *-wildcarded strings\n    denyList is the same..\n  */\n\n  let\n    link_arguments = map (x: ''\"${x.filename}\" '') dictlist;\n    databases = lib.concatStrings (map (x: \"${x.name}  ${x.filename}\\n\") dictlist);\n    allow = lib.concatStrings (map (x: \"allow ${x}\\n\") allowList);\n    deny = lib.concatStrings (map (x: \"deny ${x}\\n\") denyList);\n    accessSection = \"\n  access {\n    ${allow}\n    ${deny}\n  }\n\";\n    installPhase = ''\n        mkdir -p $out/share/dictd\n      cd $out/share/dictd\n      echo \"${databases}\" >databases.names\n      echo \"${accessSection}\" > dictd.conf\n      for j in ${toString link_arguments}; do\n        name=\"$(egrep '  '\"$j\"\\$ databases.names)\"\n        name=''${name%  $j}\n        if test -d \"$j\"; then\n          if test -d \"$j\"/share/dictd ; then\n            echo \"Got store path $j\"\n            j=\"$j\"/share/dictd\n          fi\n          echo \"Directory reference: $j\"\n          i=$(ls \"$j\"\"/\"*.index)\n          i=\"''${i%.index}\";\n        else\n          i=\"$j\";\n        fi\n        echo \"Basename is $i\"\n        locale=$(cat \"$(dirname \"$i\")\"/locale)\n        base=\"$(basename \"$i\")\"\n        echo \"Locale is $locale\"\n        export LC_ALL=$locale\n        export LANG=$locale\n        if test -e \"$i\".dict.dz; then\n          ln -s \"$i\".dict.dz\n        else\n          cp \"$i\".dict .\n          source_date=$(date --utc --date=@$SOURCE_DATE_EPOCH \"+%F %T\")\n          faketime -f \"$source_date\" dictzip \"$base\".dict\n        fi\n        ln -s \"$i\".index .\n        dictfmt_index2word --locale $locale < \"$base\".index > \"$base\".word || true\n        dictfmt_index2suffix --locale $locale < \"$base\".index > \"$base\".suffix || true\n\n        echo \"database $name {\" >> dictd.conf\n        echo \"  data $out/share/dictd/$base.dict.dz\" >> dictd.conf\n        echo \"  index $out/share/dictd/$base.index\" >> dictd.conf\n        echo \"  index_word $out/share/dictd/$base.word\" >> dictd.conf\n        echo \"  index_suffix $out/share/dictd/$base.suffix\" >> dictd.conf\n        echo \"}\" >> dictd.conf\n      done\n    '';\n\n  in\n\n  stdenv.mkDerivation {\n    name = \"dictd-dbs\";\n\n    nativeBuildInputs = [ libfaketime ];\n    buildInputs = [ dict ];\n\n    dontUnpack = true;\n    inherit installPhase;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/servers/dict/dictd-db-collector.nix","line":8,"column":3},"path":["pkgs","dictDBCollector"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/servers/dict/dictd-db-collector.nix","line":8,"column":3},"path":["pkgs","dictDBCollector"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.diffPlugins","path":["pkgs","diffPlugins"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":437,"column":3},"attr_expr":"diffPlugins = (callPackage ../build-support/plugins.nix { }).diffPlugins;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/plugins.nix","line":14,"column":17},"lambda_expr":"diffPlugins = expectedPlugins: foundPluginsFilePath: ''\n    # sort both lists first\n    plugins_expected=$(mktemp)\n    (${lib.concatMapStrings (s: \"echo \\\"${s}\\\";\") expectedPlugins}) \\\n      | sort -u > \"$plugins_expected\"\n    plugins_found=$(mktemp)\n    sort -u \"${foundPluginsFilePath}\" > \"$plugins_found\"\n\n    if ! mismatches=\"$(diff -y \"$plugins_expected\" \"$plugins_found\")\"; then\n      echo \"The the list of expected plugins (left side) doesn't match\" \\\n          \"the list of plugins we found (right side):\" >&2\n      echo \"$mismatches\" >&2\n      exit 1\n    fi\n  '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/plugins.nix","line":14,"column":17},"path":["pkgs","diffPlugins"],"pos_type":"Lambda"}},"content":{"content":"\nTakes a list of expected plugin names\nand compares it to the found plugins given in the file,\none plugin per line.\nIf the lists differ, the build fails with a nice message.\n\nThis is helpful to ensure maintainers don’t miss\nthe addition or removal of a plugin.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/plugins.nix","line":14,"column":17},"path":["pkgs","diffPlugins"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.directoryListingUpdater","path":["pkgs","directoryListingUpdater"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":188,"column":3},"attr_expr":"directoryListingUpdater = callPackage ../common-updater/directory-listing-updater.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/directory-listing-updater.nix","line":7,"column":1},"lambda_expr":"{\n  pname ? null,\n  version ? null,\n  attrPath ? null,\n  allowedVersions ? \"\",\n  ignoredVersions ? \"\",\n  rev-prefix ? \"\",\n  rev-suffix ? \"\",\n  odd-unstable ? false,\n  patchlevel-unstable ? false,\n  url ? null,\n  extraRegex ? null,\n}:\n\ngenericUpdater {\n  inherit\n    pname\n    version\n    attrPath\n    allowedVersions\n    ignoredVersions\n    rev-prefix\n    rev-suffix\n    odd-unstable\n    patchlevel-unstable\n    ;\n  versionLister = \"${common-updater-scripts}/bin/list-directory-versions ${\n    lib.optionalString (url != null) \"--url=${lib.escapeShellArg url}\"\n  } ${lib.optionalString (extraRegex != null) \"--extra-regex=${lib.escapeShellArg extraRegex}\"}\";\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/directory-listing-updater.nix","line":7,"column":1},"path":["pkgs","directoryListingUpdater"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/directory-listing-updater.nix","line":7,"column":1},"path":["pkgs","directoryListingUpdater"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerAutoLayer","path":["pkgs","dockerAutoLayer"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":904,"column":3},"attr_expr":"dockerAutoLayer = callPackage ../build-support/docker/auto-layer.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/auto-layer.nix","line":9,"column":1},"lambda_expr":"{\n  closureRoots,\n  excludePaths ? [ ],\n  maxLayers ? 100,\n  fromImage ? null,\n  debug ? false,\n}:\n\nrunCommand \"layers.json\"\n  {\n    __structuredAttrs = true;\n    exportReferencesGraph.graph = closureRoots;\n    inherit fromImage maxLayers;\n    nativeBuildInputs = [\n      jq\n      python3\n    ];\n    excludePathsFile = writeText \"excludePaths\" (lib.concatMapStrings (x: x + \"\\n\") excludePaths);\n  }\n  ''\n    # Compute the number of layers that are already used by a potential\n    # 'fromImage' as well as the customization layer. Ensure that there is\n    # still at least one layer available to store the image contents.\n    # one layer will be taken up by the customisation layer\n    usedLayers=1\n\n    if [ -n \"$fromImage\" ]; then\n      # subtract number of base image layers\n      baseImageLayersCount=$(tar -xOf \"$fromImage\" manifest.json | jq '.[0].Layers | length')\n      (( usedLayers += baseImageLayersCount ))\n    fi\n\n    if ! (( $usedLayers < $maxLayers )); then\n      echo >&2 \"Error: usedLayers $usedLayers layers to store 'fromImage' and\" \\\n                \"'extraCommands', but only maxLayers=$maxLayers were\" \\\n                \"allowed. At least 1 layer is required to store contents.\"\n      exit 1\n    fi\n    availableLayers=$(( maxLayers - usedLayers ))\n\n    jq .graph \"$NIX_ATTRS_JSON_FILE\" > referencesGraph\n    ${lib.optionalString debug \"export DEBUG=1\"}\n    python3 ${./auto-layer.py} referencesGraph $excludePathsFile $availableLayers > $out\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/auto-layer.nix","line":9,"column":1},"path":["pkgs","dockerAutoLayer"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/auto-layer.nix","line":9,"column":1},"path":["pkgs","dockerAutoLayer"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dockerMakeLayers","path":["pkgs","dockerMakeLayers"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":906,"column":3},"attr_expr":"dockerMakeLayers = callPackage ../build-support/docker/make-layers.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/make-layers.nix","line":8,"column":1},"lambda_expr":"{\n  closureRoots,\n  excludePaths ? [ ],\n  # This could be a path to (or a derivation producing a path to)\n  # a json file containing the pipeline\n  pipeline ? [ ],\n  debug ? false,\n}:\nif closureRoots == [ ] then\n  builtins.toFile \"docker-layers-empty\" \"[]\"\nelse\n  runCommand \"docker-layers\"\n    {\n      __structuredAttrs = true;\n      # graph, exclude_paths and pipeline are expected by the\n      # flatten_references_graph executable.\n      exportReferencesGraph.graph = closureRoots;\n      exclude_paths = excludePaths;\n      inherit pipeline;\n      nativeBuildInputs = [\n        coreutils\n        flatten-references-graph\n        jq\n      ];\n    }\n    ''\n      . .attrs.sh\n\n      flatten_references_graph_arg=.attrs.json\n\n      echo \"pipeline: $pipeline\"\n\n      if jq -e '.pipeline | type == \"string\"' .attrs.json; then\n        jq '. + { \"pipeline\": $pipeline[0] }' \\\n          --slurpfile pipeline \"$pipeline\" \\\n          .attrs.json > flatten_references_graph_arg.json\n\n        flatten_references_graph_arg=flatten_references_graph_arg.json\n      fi\n\n      ${lib.optionalString debug \"export DEBUG=True\"}\n      flatten_references_graph \"$flatten_references_graph_arg\" > ''${outputs[out]}\n    ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/make-layers.nix","line":8,"column":1},"path":["pkgs","dockerMakeLayers"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/docker/make-layers.nix","line":8,"column":1},"path":["pkgs","dockerMakeLayers"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.dontRecurseIntoAttrs","path":["pkgs","dontRecurseIntoAttrs"],"aliases":[["pkgs","forceSystem"],["pkgs","hiPrio"],["pkgs","lowPrio"],["pkgs","makeOverridable"],["pkgs","recurseIntoAttrs"],["pkgs","runCommandNoCC"],["pkgs","runCommandNoCCLocal"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","dontRecurseIntoAttrs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","dontRecurseIntoAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.eggDerivation","path":["pkgs","eggDerivation"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3554,"column":5},"attr_expr":"eggDerivation","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/chicken/5/eggDerivation.nix","line":8,"column":1},"lambda_expr":"{\n  src,\n  buildInputs ? [ ],\n  chickenInstallFlags ? [ ],\n  cscOptions ? [ ],\n  ...\n}@args:\n\nlet\n  nameVersionAssertion =\n    pred: lib.assertMsg pred \"either name or both pname and version must be given\";\n  pname =\n    if args ? pname then\n      assert nameVersionAssertion (!args ? name && args ? version);\n      args.pname\n    else\n      assert nameVersionAssertion (args ? name && !args ? version);\n      lib.getName args.name;\n  version = if args ? version then args.version else lib.getVersion args.name;\n  name = if args ? name then args.name else \"${args.pname}-${args.version}\";\n  overrides = callPackage ./overrides.nix { };\n  override = if builtins.hasAttr pname overrides then builtins.getAttr pname overrides else lib.id;\nin\n(stdenv.mkDerivation (\n  {\n    pname = \"chicken-${pname}\";\n    inherit version;\n    propagatedBuildInputs = buildInputs;\n    nativeBuildInputs = [\n      chicken\n      makeWrapper\n    ];\n    buildInputs = [ chicken ];\n\n    strictDeps = true;\n\n    env = {\n      CSC_OPTIONS = lib.concatStringsSep \" \" cscOptions;\n    }\n    // (args.env or { });\n\n    buildPhase = ''\n      runHook preBuild\n      chicken-install -cached -no-install -host ${lib.escapeShellArgs chickenInstallFlags}\n      runHook postBuild\n    '';\n\n    installPhase = ''\n      runHook preInstall\n\n      export CHICKEN_INSTALL_PREFIX=$out\n      export CHICKEN_INSTALL_REPOSITORY=$out/lib/chicken/${toString chicken.binaryVersion}\n      chicken-install -cached -host ${lib.escapeShellArgs chickenInstallFlags}\n\n      # Patching generated .egg-info instead of original .egg to work around https://bugs.call-cc.org/ticket/1855\n      csi -e \"(write (cons '(version \\\"${version}\\\") (read)))\" < \"$CHICKEN_INSTALL_REPOSITORY/${pname}.egg-info\" > \"${pname}.egg-info.new\"\n      mv \"${pname}.egg-info.new\" \"$CHICKEN_INSTALL_REPOSITORY/${pname}.egg-info\"\n\n      for f in $out/bin/*\n      do\n        wrapProgram $f \\\n          --prefix CHICKEN_REPOSITORY_PATH : \"$out/lib/chicken/${toString chicken.binaryVersion}:$CHICKEN_REPOSITORY_PATH\" \\\n          --prefix CHICKEN_INCLUDE_PATH : \"$CHICKEN_INCLUDE_PATH:$out/share\" \\\n          --prefix PATH : \"$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_PATH\"\n      done\n\n      runHook postInstall\n    '';\n\n    dontConfigure = true;\n\n    meta = {\n      inherit (chicken.meta) platforms;\n    }\n    // args.meta or { };\n  }\n  // removeAttrs args [\n    \"name\"\n    \"pname\"\n    \"version\"\n    \"buildInputs\"\n    \"meta\"\n  ]\n)).overrideAttrs\n  override","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/chicken/5/eggDerivation.nix","line":8,"column":1},"path":["pkgs","eggDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/chicken/5/eggDerivation.nix","line":8,"column":1},"path":["pkgs","eggDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.emacsPackagesFor","path":["pkgs","emacsPackagesFor"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9100,"column":3},"attr_expr":"emacsPackagesFor =\n    emacs:\n    import ./emacs-packages.nix {\n      inherit lib;\n      emacs' = emacs;\n      pkgs' = pkgs; # default pkgs used for bootstrapping the emacs package set\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9101,"column":5},"lambda_expr":"emacs:\n    import ./emacs-packages.nix {\n      inherit lib;\n      emacs' = emacs;\n      pkgs' = pkgs; # default pkgs used for bootstrapping the emacs package set\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9101,"column":5},"path":["pkgs","emacsPackagesFor"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9101,"column":5},"path":["pkgs","emacsPackagesFor"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.enableDebugging","path":["pkgs","enableDebugging"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":981,"column":3},"attr_expr":"enableDebugging = pkg: pkg.override { stdenv = stdenvAdapters.keepDebugInfo pkg.stdenv; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":981,"column":21},"lambda_expr":"enableDebugging = pkg: pkg.override { stdenv = stdenvAdapters.keepDebugInfo pkg.stdenv; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":981,"column":21},"path":["pkgs","enableDebugging"],"pos_type":"Lambda"}},"content":{"content":"intended to be used like nix-build -E 'with import <nixpkgs> { }; enableDebugging fooPackage'","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":981,"column":21},"path":["pkgs","enableDebugging"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.ensureNewerSourcesHook","path":["pkgs","ensureNewerSourcesHook"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":309,"column":3},"attr_expr":"ensureNewerSourcesHook =\n    { year }:\n    makeSetupHook\n      {\n        name = \"ensure-newer-sources-hook\";\n        meta.license = lib.licenses.mit;\n      }\n      (\n        writeScript \"ensure-newer-sources-hook.sh\" ''\n          postUnpackHooks+=(_ensureNewerSources)\n          _ensureNewerSources() {\n            local r=$sourceRoot\n            # Avoid passing option-looking directory to find. The example is diffoscope-269:\n            #   https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/378\n            [[ $r == -* ]] && r=\"./$r\"\n            '${findutils}/bin/find' \"$r\" \\\n              '!' -newermt '${year}-01-01' -exec touch -h -d '${year}-01-02' '{}' '+'\n          }\n        ''\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":310,"column":5},"lambda_expr":"{ year }:\n    makeSetupHook\n      {\n        name = \"ensure-newer-sources-hook\";\n        meta.license = lib.licenses.mit;\n      }\n      (\n        writeScript \"ensure-newer-sources-hook.sh\" ''\n          postUnpackHooks+=(_ensureNewerSources)\n          _ensureNewerSources() {\n            local r=$sourceRoot\n            # Avoid passing option-looking directory to find. The example is diffoscope-269:\n            #   https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/378\n            [[ $r == -* ]] && r=\"./$r\"\n            '${findutils}/bin/find' \"$r\" \\\n              '!' -newermt '${year}-01-01' -exec touch -h -d '${year}-01-02' '{}' '+'\n          }\n        ''\n      )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":310,"column":5},"path":["pkgs","ensureNewerSourcesHook"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":310,"column":5},"path":["pkgs","ensureNewerSourcesHook"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.extend","path":["pkgs","extend"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":280,"column":5},"attr_expr":"extend = f: self.appendOverlays [ f ];","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":280,"column":14},"lambda_expr":"extend = f: self.appendOverlays [ f ];","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":280,"column":14},"path":["pkgs","extend"],"pos_type":"Lambda"}},"content":{"content":"Prefer appendOverlays if used repeatedly.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/stage.nix","line":280,"column":14},"path":["pkgs","extend"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchCrate","path":["pkgs","fetchCrate"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":704,"column":3},"attr_expr":"fetchCrate = callPackage ../build-support/rust/fetchcrate.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetchcrate.nix","line":7,"column":1},"lambda_expr":"{\n  crateName ? args.pname,\n  pname ? null,\n  # The `dl` field of the registry's index configuration\n  # https://doc.rust-lang.org/cargo/reference/registry-index.html#index-configuration\n  registryDl ? \"https://crates.io/api/v1/crates\",\n  version,\n  unpack ? true,\n  ...\n}@args:\n\nassert pname == null || pname == crateName;\n\n(if unpack then fetchzip else fetchurl) (\n  {\n    name = \"${crateName}-${version}.tar.gz\";\n    url = \"${registryDl}/${crateName}/${version}/download\";\n\n    passthru = { inherit pname version; };\n  }\n  // lib.optionalAttrs unpack {\n    extension = \"tar.gz\";\n  }\n  // removeAttrs args [\n    \"crateName\"\n    \"pname\"\n    \"registryDl\"\n    \"version\"\n    \"unpack\"\n  ]\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetchcrate.nix","line":7,"column":1},"path":["pkgs","fetchCrate"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetchcrate.nix","line":7,"column":1},"path":["pkgs","fetchCrate"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchDebianPatch","path":["pkgs","fetchDebianPatch"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":700,"column":3},"attr_expr":"fetchDebianPatch = callPackage ../build-support/fetchdebianpatch { } // {\n    tests = pkgs.tests.fetchDebianPatch;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdebianpatch/default.nix","line":4,"column":3},"lambda_expr":"{\n    pname,\n    version,\n    debianRevision ? null,\n    area ? \"main\",\n    patch,\n    name ? patch,\n    hash,\n  }:\n  let\n    inherit (lib.strings) hasPrefix substring;\n    prefix = substring 0 (if hasPrefix \"lib\" pname then 4 else 1) pname;\n    versionString = if debianRevision == null then version else \"${version}-${debianRevision}\";\n  in\n  fetchpatch {\n    inherit name hash;\n    url =\n      \"https://sources.debian.org/data/${area}/${prefix}/\"\n      + \"${pname}/${versionString}/debian/patches/${patch}\";\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdebianpatch/default.nix","line":4,"column":3},"path":["pkgs","fetchDebianPatch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdebianpatch/default.nix","line":4,"column":3},"path":["pkgs","fetchDebianPatch"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchDockerConfig","path":["pkgs","fetchDockerConfig"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":509,"column":3},"attr_expr":"fetchDockerConfig = callPackage ../build-support/fetchdocker/fetchDockerConfig.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/fetchDockerConfig.nix","line":12,"column":1},"lambda_expr":"args@{\n  repository ? \"library\",\n  imageName,\n  tag,\n  ...\n}:\n\ngeneric-fetcher (\n  {\n    fetcher = \"hocker-config\";\n    name = \"${repository}_${imageName}_${tag}-config.json\";\n    tag = \"unused\";\n  }\n  // args\n)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/fetchDockerConfig.nix","line":12,"column":1},"path":["pkgs","fetchDockerConfig"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/fetchDockerConfig.nix","line":12,"column":1},"path":["pkgs","fetchDockerConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchDockerLayer","path":["pkgs","fetchDockerLayer"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":511,"column":3},"attr_expr":"fetchDockerLayer = callPackage ../build-support/fetchdocker/fetchDockerLayer.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/fetchDockerLayer.nix","line":12,"column":1},"lambda_expr":"args@{ layerDigest, ... }:\n\ngeneric-fetcher (\n  {\n    fetcher = \"hocker-layer\";\n    name = \"docker-layer-${layerDigest}.tar.gz\";\n    tag = \"unused\";\n  }\n  // args\n)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/fetchDockerLayer.nix","line":12,"column":1},"path":["pkgs","fetchDockerLayer"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/fetchDockerLayer.nix","line":12,"column":1},"path":["pkgs","fetchDockerLayer"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFirefoxAddon","path":["pkgs","fetchFirefoxAddon"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":620,"column":3},"attr_expr":"fetchFirefoxAddon = callPackage ../build-support/fetchfirefoxaddon { } // {\n    tests = pkgs.tests.fetchFirefoxAddon;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchfirefoxaddon/default.nix","line":11,"column":1},"lambda_expr":"{\n  name,\n  url ? null,\n  sha1 ? \"\",\n  sha256 ? \"\",\n  sha512 ? \"\",\n  fixedExtid ? null,\n  hash ? \"\",\n  src ? \"\",\n}:\n\nlet\n  extid = if fixedExtid == null then \"nixos@${name}\" else fixedExtid;\n  source =\n    if url == null then\n      src\n    else\n      fetchurl {\n        url = url;\n        inherit\n          sha1\n          sha256\n          sha512\n          hash\n          ;\n      };\nin\nstdenv.mkDerivation {\n  inherit name;\n\n  passthru = {\n    inherit extid;\n  };\n\n  builder = writeScript \"xpibuilder\" ''\n    echo \"firefox addon $name into $out\"\n\n    UUID=\"${extid}\"\n    mkdir -p \"$out/$UUID\"\n    unzip -q ${source} -d \"$out/$UUID\"\n    NEW_MANIFEST=$(jq '. + {\"applications\": { \"gecko\": { \"id\": \"${extid}\" }}, \"browser_specific_settings\":{\"gecko\":{\"id\": \"${extid}\"}}}' \"$out/$UUID/manifest.json\")\n    echo \"$NEW_MANIFEST\" > \"$out/$UUID/manifest.json\"\n    cd \"$out/$UUID\"\n    zip -r -q -FS \"$out/$UUID.xpi\" *\n    strip-nondeterminism \"$out/$UUID.xpi\"\n    rm -r \"$out/$UUID\"\n  '';\n\n  nativeBuildInputs = [\n    jq\n    strip-nondeterminism\n    unzip\n    zip\n  ];\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchfirefoxaddon/default.nix","line":11,"column":1},"path":["pkgs","fetchFirefoxAddon"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchfirefoxaddon/default.nix","line":11,"column":1},"path":["pkgs","fetchFirefoxAddon"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFrom9Front","path":["pkgs","fetchFrom9Front"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":724,"column":3},"attr_expr":"fetchFrom9Front = callPackage ../build-support/fetch9front { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetch9front/default.nix","line":8,"column":3},"lambda_expr":"{\n    owner,\n    repo,\n    rev,\n    domain ? \"git.9front.org\",\n    name ? \"source\",\n    leaveDotGit ? false,\n    deepClone ? false,\n    ... # For hash agility\n  }@args:\n\n  let\n    passthruAttrs = removeAttrs args [\n      \"domain\"\n      \"owner\"\n      \"repo\"\n      \"rev\"\n      \"leaveDotGit\"\n      \"deepClone\"\n    ];\n\n    useFetchGit = leaveDotGit || deepClone;\n    fetcher = if useFetchGit then fetchgit else fetchzip;\n\n    gitRepoUrl = \"git://${domain}/${owner}/${repo}\";\n\n    fetcherArgs =\n      (\n        if useFetchGit then\n          {\n            # git9 does not support shallow fetches\n            inherit rev leaveDotGit;\n            url = gitRepoUrl;\n          }\n        else\n          {\n            url = \"https://${domain}/${owner}/${repo}/${rev}/snap.tar.gz\";\n\n            passthru = {\n              inherit gitRepoUrl;\n            };\n          }\n      )\n      // passthruAttrs\n      // {\n        inherit name;\n      };\n  in\n\n  fetcher fetcherArgs // { inherit rev; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetch9front/default.nix","line":8,"column":3},"path":["pkgs","fetchFrom9Front"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetch9front/default.nix","line":8,"column":3},"path":["pkgs","fetchFrom9Front"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromBitbucket","path":["pkgs","fetchFromBitbucket"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":714,"column":3},"attr_expr":"fetchFromBitbucket = callPackage ../build-support/fetchbitbucket { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchbitbucket/default.nix","line":9,"column":3},"lambda_expr":"{\n    owner,\n    repo,\n    tag ? null,\n    rev ? null,\n    name ? repoRevToNameMaybe repo (lib.revOrTag rev tag) \"bitbucket\",\n    fetchSubmodules ? false,\n    leaveDotGit ? false,\n    deepClone ? false,\n    forceFetchGit ? false,\n    fetchLFS ? false,\n    rootDir ? \"\",\n    sparseCheckout ? lib.optional (rootDir != \"\") rootDir,\n    meta ? { },\n    ... # For hash agility\n  }@args:\n\n  assert (\n    lib.assertMsg (lib.xor (tag == null) (\n      rev == null\n    )) \"fetchFromBitbucket requires one of either `rev` or `tag` to be provided (not both).\"\n  );\n\n  let\n    position = (\n      if args.meta.description or null != null then\n        builtins.unsafeGetAttrPos \"description\" args.meta\n      else if tag != null then\n        builtins.unsafeGetAttrPos \"tag\" args\n      else\n        builtins.unsafeGetAttrPos \"rev\" args\n    );\n    baseUrl = \"https://bitbucket.org/${owner}/${repo}\";\n    newMeta =\n      meta\n      // {\n        homepage = meta.homepage or baseUrl;\n      }\n      // lib.optionalAttrs (position != null) {\n        # to indicate where derivation originates, similar to make-derivation.nix's mkDerivation\n        position = \"${position.file}:${toString position.line}\";\n      };\n    gitRepoUrl = \"${baseUrl}.git\";\n\n    # the tag is escaped to support mercurial-based tags as bitbucket supports them\n    revWithTag = if tag != null then \"refs/tags/${lib.strings.escapeURL tag}\" else rev;\n\n    passthruAttrs = removeAttrs args [\n      \"owner\"\n      \"repo\"\n      \"rev\"\n      \"tag\"\n      \"fetchSubmodules\"\n      \"forceFetchGit\"\n    ];\n\n    useFetchGit =\n      fetchSubmodules\n      || (leaveDotGit == true)\n      || deepClone\n      || forceFetchGit\n      || fetchLFS\n      || (rootDir != \"\")\n      || (sparseCheckout != [ ]);\n\n    fetcher = if useFetchGit then fetchgit else fetchzip;\n\n    fetcherArgs =\n      (\n        if useFetchGit then\n          {\n            inherit\n              rev\n              tag\n              deepClone\n              fetchSubmodules\n              sparseCheckout\n              fetchLFS\n              ;\n            url = gitRepoUrl;\n          }\n          // lib.optionalAttrs (leaveDotGit != null) { inherit leaveDotGit; }\n        else\n          {\n            url = \"https://bitbucket.org/${owner}/${repo}/get/${revWithTag}.tar.gz\";\n            extension = \"tar.gz\";\n            passthru = {\n              inherit gitRepoUrl;\n            };\n          }\n      )\n      // passthruAttrs\n      // {\n        inherit name;\n      };\n  in\n  fetcher fetcherArgs\n  // {\n    meta = newMeta;\n    inherit owner repo tag;\n    rev = revWithTag;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchbitbucket/default.nix","line":9,"column":3},"path":["pkgs","fetchFromBitbucket"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchbitbucket/default.nix","line":9,"column":3},"path":["pkgs","fetchFromBitbucket"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromCodeberg","path":["pkgs","fetchFromCodeberg"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":710,"column":3},"attr_expr":"fetchFromCodeberg = callPackage ../build-support/fetchcodeberg { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchcodeberg/default.nix","line":2,"column":22},"lambda_expr":"args: fetchFromGitea ({ domain = \"codeberg.org\"; } // args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchcodeberg/default.nix","line":2,"column":22},"path":["pkgs","fetchFromCodeberg"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchcodeberg/default.nix","line":2,"column":22},"path":["pkgs","fetchFromCodeberg"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromForgejo","path":["pkgs","fetchFromForgejo"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":708,"column":3},"attr_expr":"fetchFromForgejo = fetchFromGitea;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","fetchFromForgejo"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","fetchFromForgejo"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromGitHub","path":["pkgs","fetchFromGitHub"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":712,"column":3},"attr_expr":"fetchFromGitHub = callPackage ../build-support/fetchgithub { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","fetchFromGitHub"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","fetchFromGitHub"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromGitLab","path":["pkgs","fetchFromGitLab"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":720,"column":3},"attr_expr":"fetchFromGitLab = callPackage ../build-support/fetchgitlab { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitlab/default.nix","line":10,"column":3},"lambda_expr":"{\n    owner,\n    repo,\n    rev ? null,\n    tag ? null,\n    name ? repoRevToNameMaybe repo (lib.revOrTag rev tag) \"gitlab\",\n    protocol ? \"https\",\n    domain ? \"gitlab.com\",\n    group ? null,\n    fetchSubmodules ? false,\n    leaveDotGit ? false,\n    deepClone ? false,\n    forceFetchGit ? false,\n    sparseCheckout ? [ ],\n    private ? false,\n    varPrefix ? null,\n    ... # For hash agility\n  }@args:\n\n  assert (\n    lib.assertMsg (lib.xor (tag == null) (\n      rev == null\n    )) \"fetchFromGitLab requires one of either `rev` or `tag` to be provided (not both).\"\n  );\n\n  let\n    slug = lib.concatStringsSep \"/\" (\n      (lib.optional (group != null) group)\n      ++ [\n        owner\n        repo\n      ]\n    );\n    revWithTag = if tag != null then \"refs/tags/\" + tag else rev;\n    escapedSlug = lib.replaceStrings [ \".\" \"/\" ] [ \"%2E\" \"%2F\" ] slug;\n    escapedRevWithTag = lib.replaceStrings [ \"+\" \"%\" \"/\" ] [ \"%2B\" \"%25\" \"%2F\" ] revWithTag;\n    passthruAttrs = removeAttrs args [\n      \"protocol\"\n      \"domain\"\n      \"owner\"\n      \"group\"\n      \"repo\"\n      \"rev\"\n      \"tag\"\n      \"fetchSubmodules\"\n      \"forceFetchGit\"\n      \"private\"\n      \"varPrefix\"\n      \"leaveDotGit\"\n      \"deepClone\"\n    ];\n\n    varBase = \"NIX${lib.optionalString (varPrefix != null) \"_${varPrefix}\"}_GITLAB_PRIVATE_\";\n    useFetchGit =\n      fetchSubmodules || leaveDotGit || deepClone || forceFetchGit || (sparseCheckout != [ ]);\n    fetcher = if useFetchGit then fetchgit else fetchzip;\n\n    privateAttrs = lib.optionalAttrs private (\n      lib.throwIfNot (protocol == \"https\") \"private token login is only supported for https\" {\n        netrcPhase = ''\n          if [ -z \"''$${varBase}USERNAME\" -o -z \"''$${varBase}PASSWORD\" ]; then\n            echo \"Error: Private fetchFromGitLab requires the nix building process (nix-daemon in multi user mode) to have the ${varBase}USERNAME and ${varBase}PASSWORD env vars set.\" >&2\n            exit 1\n          fi\n        ''\n        + (\n          if useFetchGit then\n            # GitLab supports HTTP Basic Authentication only when Git is used:\n            # https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html#project-access-tokens\n            ''\n              cat > netrc <<EOF\n              machine ${domain}\n                      login ''$${varBase}USERNAME\n                      password ''$${varBase}PASSWORD\n              EOF\n            ''\n          else\n            # Access via the GitLab API requires a custom header and does not work\n            # with HTTP Basic Authentication:\n            # https://docs.gitlab.com/ee/api/#personalprojectgroup-access-tokens\n            ''\n              # needed because fetchurl always sets --netrc-file if a netrcPhase is present\n              touch netrc\n\n              cat > private-token <<EOF\n              PRIVATE-TOKEN: ''$${varBase}PASSWORD\n              EOF\n              curlOpts=\"$curlOpts --header @./private-token\"\n            ''\n        );\n        netrcImpureEnvVars = [\n          \"${varBase}USERNAME\"\n          \"${varBase}PASSWORD\"\n        ];\n      }\n    );\n\n    gitRepoUrl = \"${protocol}://${domain}/${slug}.git\";\n\n    fetcherArgs =\n      (\n        if useFetchGit then\n          {\n            inherit\n              rev\n              deepClone\n              tag\n              fetchSubmodules\n              sparseCheckout\n              leaveDotGit\n              ;\n            url = gitRepoUrl;\n          }\n        else\n          {\n            url = \"${protocol}://${domain}/api/v4/projects/${escapedSlug}/repository/archive.tar.gz?sha=${escapedRevWithTag}\";\n\n            passthru = {\n              inherit gitRepoUrl;\n            };\n          }\n      )\n      // privateAttrs\n      // passthruAttrs\n      // {\n        inherit name;\n      };\n  in\n\n  fetcher fetcherArgs\n  // {\n    meta.homepage = \"${protocol}://${domain}/${slug}/\";\n    inherit\n      tag\n      owner\n      repo\n      ;\n    rev = revWithTag;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitlab/default.nix","line":10,"column":3},"path":["pkgs","fetchFromGitLab"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitlab/default.nix","line":10,"column":3},"path":["pkgs","fetchFromGitLab"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromGitea","path":["pkgs","fetchFromGitea"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":706,"column":3},"attr_expr":"fetchFromGitea = callPackage ../build-support/fetchgitea { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitea/default.nix","line":6,"column":3},"lambda_expr":"{ domain, ... }@args:\n\n  fetchFromGitHub ((removeAttrs args [ \"domain\" ]) // { githubBase = domain; })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitea/default.nix","line":6,"column":3},"path":["pkgs","fetchFromGitea"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitea/default.nix","line":6,"column":3},"path":["pkgs","fetchFromGitea"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromGitiles","path":["pkgs","fetchFromGitiles"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":722,"column":3},"attr_expr":"fetchFromGitiles = callPackage ../build-support/fetchgitiles { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitiles/default.nix","line":8,"column":3},"lambda_expr":"{\n    url,\n    rev ? null,\n    tag ? null,\n    name ? repoRevToNameMaybe url (lib.revOrTag rev tag) \"gitiles\",\n    ...\n  }@args:\n\n  assert (\n    lib.assertMsg (lib.xor (tag == null) (\n      rev == null\n    )) \"fetchFromGitiles requires one of either `rev` or `tag` to be provided (not both).\"\n  );\n\n  let\n    realrev = (if tag != null then \"refs/tags/\" + tag else rev);\n  in\n\n  fetchzip (\n    {\n      inherit name;\n      url = \"${url}/+archive/${realrev}.tar.gz\";\n      stripRoot = false;\n      meta.homepage = url;\n    }\n    // removeAttrs args [\n      \"url\"\n      \"tag\"\n      \"rev\"\n    ]\n  )\n  // {\n    inherit rev tag;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitiles/default.nix","line":8,"column":3},"path":["pkgs","fetchFromGitiles"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitiles/default.nix","line":8,"column":3},"path":["pkgs","fetchFromGitiles"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromRadicle","path":["pkgs","fetchFromRadicle"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":728,"column":3},"attr_expr":"fetchFromRadicle = callPackage ../build-support/fetchradicle { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchradicle/default.nix","line":4,"column":3},"lambda_expr":"{\n    seed,\n    repo,\n    node ? null,\n    rev ? null,\n    tag ? null,\n    ...\n  }@args:\n\n  assert lib.assertMsg (lib.xor (tag != null) (\n    rev != null\n  )) \"fetchFromRadicle requires one of either `rev` or `tag` to be provided (not both).\";\n\n  let\n    namespacePrefix = lib.optionalString (node != null) \"refs/namespaces/${node}/\";\n    rev' = if tag != null then \"refs/tags/${tag}\" else rev;\n  in\n\n  fetchgit (\n    {\n      url = \"https://${seed}/${repo}.git\";\n      rev = \"${namespacePrefix}${rev'}\";\n    }\n    // removeAttrs args [\n      \"seed\"\n      \"repo\"\n      \"node\"\n      \"rev\"\n      \"tag\"\n    ]\n  )\n  // {\n    inherit\n      seed\n      repo\n      node\n      rev\n      tag\n      ;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchradicle/default.nix","line":4,"column":3},"path":["pkgs","fetchFromRadicle"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchradicle/default.nix","line":4,"column":3},"path":["pkgs","fetchFromRadicle"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromRepoOrCz","path":["pkgs","fetchFromRepoOrCz"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":726,"column":3},"attr_expr":"fetchFromRepoOrCz = callPackage ../build-support/fetchrepoorcz { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchrepoorcz/default.nix","line":8,"column":1},"lambda_expr":"{\n  repo,\n  rev,\n  name ? repoRevToNameMaybe repo rev \"repoorcz\",\n  ... # For hash agility\n}@args:\nfetchzip (\n  {\n    inherit name;\n    url = \"https://repo.or.cz/${repo}.git/snapshot/${rev}.tar.gz\";\n    meta.homepage = \"https://repo.or.cz/${repo}.git/\";\n  }\n  // removeAttrs args [\n    \"repo\"\n    \"rev\"\n  ]\n)\n// {\n  inherit rev;\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchrepoorcz/default.nix","line":8,"column":1},"path":["pkgs","fetchFromRepoOrCz"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchrepoorcz/default.nix","line":8,"column":1},"path":["pkgs","fetchFromRepoOrCz"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromSavannah","path":["pkgs","fetchFromSavannah"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":716,"column":3},"attr_expr":"fetchFromSavannah = callPackage ../build-support/fetchsavannah { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsavannah/default.nix","line":9,"column":3},"lambda_expr":"{\n    repo,\n    rev,\n    name ? repoRevToNameMaybe repo rev \"savannah\",\n    ... # For hash agility\n  }@args:\n  let\n    result =\n      fetchzip (\n        {\n          inherit name;\n          url =\n            let\n              repo' = lib.last (lib.strings.splitString \"/\" repo); # support repo like emacs/elpa\n            in\n            \"https://cgit.git.savannah.gnu.org/cgit/${repo}.git/snapshot/${repo'}-${rev}.tar.gz\";\n          meta.homepage = \"https://cgit.git.savannah.gnu.org/cgit/${repo}.git/\";\n          passthru.gitRepoUrl = \"https://cgit.git.savannah.gnu.org/git/${repo}.git\";\n        }\n        // removeAttrs args [\n          \"repo\"\n          \"rev\"\n        ]\n      )\n      // {\n        inherit rev;\n      };\n  in\n  lib.warnOnInstantiate \"`fetchFromSavannah` is deprecated and will be removed in a future release.\" result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsavannah/default.nix","line":9,"column":3},"path":["pkgs","fetchFromSavannah"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsavannah/default.nix","line":9,"column":3},"path":["pkgs","fetchFromSavannah"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchFromSourcehut","path":["pkgs","fetchFromSourcehut"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":718,"column":3},"attr_expr":"fetchFromSourcehut = callPackage ../build-support/fetchsourcehut { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsourcehut/default.nix","line":18,"column":3},"lambda_expr":"{\n    owner,\n    repo,\n    rev ? null,\n    tag ? null,\n    name ? repoRevToNameMaybe repo (lib.revOrTag rev tag) \"sourcehut\",\n    domain ? \"sr.ht\",\n    vc ? \"git\",\n    fetchSubmodules ? false,\n    ... # For hash agility\n  }@args:\n\n  assert (\n    lib.assertMsg (lib.xor (tag == null) (\n      rev == null\n    )) \"fetchFromSourcehut requires one of either `rev` or `tag` to be provided (not both).\"\n  );\n\n  assert (\n    assertOneOf \"vc\" vc [\n      \"hg\"\n      \"git\"\n    ]\n  );\n\n  let\n    urlFor = resource: \"https://${resource}.${domain}/${owner}/${repo}\";\n    rev' = if tag != null then tag else rev;\n    baseUrl = urlFor vc;\n    baseArgs = {\n      inherit name;\n    }\n    // removeAttrs args [\n      \"owner\"\n      \"repo\"\n      \"rev\"\n      \"tag\"\n      \"domain\"\n      \"vc\"\n      \"name\"\n      \"fetchSubmodules\"\n    ];\n    vcArgs = baseArgs // {\n      rev = rev';\n      url = baseUrl;\n    };\n    fetcher = if fetchSubmodules then vc else \"zip\";\n    cases = {\n      git = {\n        fetch = fetchgit;\n        arguments = vcArgs // {\n          fetchSubmodules = true;\n        };\n      };\n      hg = {\n        fetch = fetchhg;\n        arguments = vcArgs // {\n          fetchSubrepos = true;\n        };\n      };\n      zip = {\n        fetch = fetchzip;\n        arguments = baseArgs // {\n          url = \"${baseUrl}/archive/${rev'}.tar.gz\";\n          postFetch = optionalString (vc == \"hg\") ''\n            rm -f \"$out/.hg_archival.txt\"\n          ''; # impure file; see #12002\n          passthru = (args.passthru or { }) // {\n            gitRepoUrl = urlFor \"git\";\n          };\n        };\n      };\n    };\n  in\n  cases.${fetcher}.fetch cases.${fetcher}.arguments\n  // {\n    rev = rev';\n    meta.homepage = \"${baseUrl}\";\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsourcehut/default.nix","line":18,"column":3},"path":["pkgs","fetchFromSourcehut"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsourcehut/default.nix","line":18,"column":3},"path":["pkgs","fetchFromSourcehut"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchHex","path":["pkgs","fetchHex"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4825,"column":5},"attr_expr":"fetchHex","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"lambda_expr":"{\n  pkg,\n  version,\n  sha256,\n  meta ? { },\n}:\n\nstdenv.mkDerivation {\n  pname = pkg;\n  inherit version;\n  dontBuild = true;\n  dontConfigure = true;\n  dontFixup = true;\n\n  src = fetchurl {\n    url = \"https://repo.hex.pm/tarballs/${pkg}-${version}.tar\";\n    inherit sha256;\n  };\n\n  unpackCmd = ''\n    tar -xf $curSrc contents.tar.gz CHECKSUM metadata.config\n    mkdir contents\n    tar -C contents -xzf contents.tar.gz\n    mv metadata.config contents/hex_metadata.config\n\n    # To make the extracted hex tarballs appear legitimate to mix, we need to\n    # make sure they contain not just the contents of contents.tar.gz but also\n    # a .hex file with some lock metadata.\n    # We use an old version of .hex file per hex's mix_task_test.exs since it\n    # is just plain-text instead of an encoded format.\n    # See: https://github.com/hexpm/hex/blob/main/test/hex/mix_task_test.exs#L410\n    echo -n \"${pkg},${version},$(cat CHECKSUM | tr '[:upper:]' '[:lower:]'),hexpm\" > contents/.hex\n  '';\n\n  installPhase = ''\n    runHook preInstall\n    mkdir \"$out\"\n    cp -Hrt \"$out\" .\n    success=1\n    runHook postInstall\n  '';\n\n  inherit meta;\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"path":["pkgs","fetchHex"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/beam-modules/fetch-hex.nix","line":7,"column":1},"path":["pkgs","fetchHex"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchItchIo","path":["pkgs","fetchItchIo"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":733,"column":3},"attr_expr":"fetchItchIo = callPackage ../build-support/fetchitchio { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchItchIo"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchItchIo"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchMavenArtifact","path":["pkgs","fetchMavenArtifact"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":530,"column":3},"attr_expr":"fetchMavenArtifact = callPackage ../build-support/fetchmavenartifact { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchmavenartifact/default.nix","line":17,"column":1},"lambda_expr":"args@{\n  # Example: \"org.apache.httpcomponents\"\n  groupId,\n  # Example: \"httpclient\"\n  artifactId,\n  # Example: \"4.3.6\"\n  version,\n  # Example: \"jdk11\"\n  classifier ? null,\n  # List of maven repositories from where to fetch the artifact.\n  # Example: [ http://oss.sonatype.org/content/repositories/public ].\n  repos ? defaultRepos,\n  # The `url` and `urls` parameters, if specified should point to the JAR\n  # file and will take precedence over the `repos` parameter. Only one of `url`\n  # and `urls` can be specified, not both.\n  url ? \"\",\n  urls ? [ ],\n  # Metadata\n  meta ? { },\n  # The rest of the arguments are just forwarded to `fetchurl`.\n  ...\n}:\n\n# only one of url and urls can be specified at a time.\nassert (url == \"\") || (urls == [ ]);\n# if repos is empty, then url or urls must be specified.\nassert (repos != [ ]) || (url != \"\") || (urls != [ ]);\n\nlet\n  pname =\n    (lib.replaceStrings [ \".\" ] [ \"_\" ] groupId)\n    + \"_\"\n    + (lib.replaceStrings [ \".\" ] [ \"_\" ] artifactId);\n  suffix = lib.optionalString (classifier != null) \"-${classifier}\";\n  filename = \"${artifactId}-${version}${suffix}.jar\";\n  mkJarUrl =\n    repoUrl:\n    lib.concatStringsSep \"/\" [\n      (lib.removeSuffix \"/\" repoUrl)\n      (lib.replaceStrings [ \".\" ] [ \"/\" ] groupId)\n      artifactId\n      version\n      filename\n    ];\n  urls_ =\n    if url != \"\" then\n      [ url ]\n    else if urls != [ ] then\n      urls\n    else\n      map mkJarUrl repos;\n  jar = fetchurl (\n    removeAttrs args [\n      \"groupId\"\n      \"artifactId\"\n      \"version\"\n      \"classifier\"\n      \"repos\"\n      \"url\"\n      \"meta\"\n    ]\n    // {\n      urls = urls_;\n      name = \"${pname}-${version}.jar\";\n    }\n  );\nin\nstdenv.mkDerivation {\n  inherit pname version meta;\n  dontUnpack = true;\n  # By moving the jar to $out/share/java we make it discoverable by java\n  # packages packages that mention this derivation in their buildInputs.\n  installPhase = ''\n    mkdir -p $out/share/java\n    ln -s ${jar} $out/share/java/${filename}\n  '';\n  # We also add a `jar` attribute that can be used to easily obtain the path\n  # to the downloaded jar file.\n  passthru.jar = jar;\n}","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchmavenartifact/default.nix","line":17,"column":1},"path":["pkgs","fetchMavenArtifact"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchmavenartifact/default.nix","line":17,"column":1},"path":["pkgs","fetchMavenArtifact"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchNextcloudApp","path":["pkgs","fetchNextcloudApp"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":624,"column":3},"attr_expr":"fetchNextcloudApp = callPackage ../build-support/fetchnextcloudapp { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchnextcloudapp/default.nix","line":8,"column":1},"lambda_expr":"{\n  name ?\n    if appName == null || appVersion == null then null else \"nextcloud-app-${appName}-${appVersion}\",\n  url,\n  hash ? \"\",\n  sha256 ? \"\",\n  sha512 ? \"\",\n  appName ? null,\n  appVersion ? null,\n  license,\n  patches ? [ ],\n  description ? null,\n  longDescription ? description,\n  homepage ? null,\n  maintainers ? [ ],\n  teams ? [ ],\n  unpack ? false, # whether to use fetchzip rather than fetchurl\n}:\napplyPatches {\n  ${if name == null then null else \"name\"} = name;\n  inherit patches;\n\n  src = (if unpack then fetchzip else fetchurl) {\n    inherit url;\n    ${if hash == \"\" then null else \"hash\"} = hash;\n    ${if sha256 == \"\" then null else \"sha256\"} = sha256;\n    ${if sha512 == \"\" then null else \"sha512\"} = sha512;\n\n    meta = {\n      license = lib.licenses.${license};\n      ${if description == null then null else \"description\"} = description;\n      ${if longDescription == null then null else \"longDescription\"} = longDescription;\n      ${if homepage == null then null else \"homepage\"} = homepage;\n      inherit maintainers teams;\n      sourceProvenance = with lib.sourceTypes; [\n        fromSource\n        binaryBytecode # vendored deps, compiled vue templates, etc\n      ];\n    };\n  };\n  prePatch = ''\n    if [ ! -f ./appinfo/info.xml ]; then\n      echo \"appinfo/info.xml doesn't exist in $out, aborting!\"\n      exit 1\n    fi\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchnextcloudapp/default.nix","line":8,"column":1},"path":["pkgs","fetchNextcloudApp"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchnextcloudapp/default.nix","line":8,"column":1},"path":["pkgs","fetchNextcloudApp"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchNpmDeps","path":["pkgs","fetchNpmDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2716,"column":5},"attr_expr":"fetchNpmDeps","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/node/prefetch-npm-deps/default.nix","line":209,"column":5},"lambda_expr":"{\n      name ? \"npm-deps\",\n      hash ? \"\",\n      forceGitDeps ? false,\n      forceEmptyCache ? false,\n      nativeBuildInputs ? [ ],\n      # A string with a JSON attrset specifying registry mirrors, for example\n      #   {\"registry.example.org\": \"my-mirror.local/registry.example.org\"}\n      npmRegistryOverridesString ? config.npmRegistryOverridesString,\n      # Fetcher format version. Bump this to invalidate all existing hashes.\n      # Version 1: original format (tarballs only)\n      # Version 2: includes packuments for workspace support\n      fetcherVersion ? 1,\n      ...\n    }@args:\n    let\n      hash_ =\n        if hash != \"\" then\n          {\n            outputHash = hash;\n          }\n        else\n          {\n            outputHash = \"\";\n            outputHashAlgo = \"sha256\";\n          };\n\n      forceGitDeps_ = lib.optionalAttrs forceGitDeps { FORCE_GIT_DEPS = true; };\n      forceEmptyCache_ = lib.optionalAttrs forceEmptyCache { FORCE_EMPTY_CACHE = true; };\n    in\n    stdenvNoCC.mkDerivation (\n      args\n      // {\n        inherit name;\n\n        nativeBuildInputs = nativeBuildInputs ++ [ prefetch-npm-deps ];\n\n        buildPhase = ''\n          runHook preBuild\n\n          if [[ -f npm-shrinkwrap.json ]]; then\n            local -r srcLockfile=\"npm-shrinkwrap.json\"\n          elif [[ -f package-lock.json ]]; then\n            local -r srcLockfile=\"package-lock.json\"\n          else\n            echo\n            echo \"ERROR: No lock file!\"\n            echo\n            echo \"package-lock.json or npm-shrinkwrap.json is required to make sure\"\n            echo \"that npmDepsHash doesn't change when packages are updated on npm.\"\n            echo\n            echo \"Hint: You can copy a vendored package-lock.json file via postPatch.\"\n            echo\n\n            exit 1\n          fi\n\n          outputHash=\"${hash_.outputHash}\" prefetch-npm-deps $srcLockfile $out\n\n          runHook postBuild\n        '';\n\n        dontInstall = true;\n\n        # NIX_NPM_TOKENS environment variable should be a JSON mapping in the shape of:\n        # `{ \"registry.example.com\": \"example-registry-bearer-token\", ... }`\n        impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [ \"NIX_NPM_TOKENS\" ];\n\n        env = {\n          NIX_NPM_REGISTRY_OVERRIDES = npmRegistryOverridesString;\n\n          # Fetcher version controls which features are enabled in prefetch-npm-deps\n          # Version 2+ enables packument fetching for workspace support\n          NPM_FETCHER_VERSION = toString fetcherVersion;\n\n          SSL_CERT_FILE =\n            if\n              (\n                hash_.outputHash == \"\"\n                || hash_.outputHash == lib.fakeSha256\n                || hash_.outputHash == lib.fakeSha512\n                || hash_.outputHash == lib.fakeHash\n              )\n            then\n              \"${cacert}/etc/ssl/certs/ca-bundle.crt\"\n            else\n              \"/no-cert-file.crt\";\n        }\n        // forceGitDeps_\n        // forceEmptyCache_;\n\n        outputHashMode = \"recursive\";\n      }\n      // hash_\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/node/prefetch-npm-deps/default.nix","line":209,"column":5},"path":["pkgs","fetchNpmDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/node/prefetch-npm-deps/default.nix","line":209,"column":5},"path":["pkgs","fetchNpmDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchNuGet","path":["pkgs","fetchNuGet"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":492,"column":3},"attr_expr":"fetchNuGet = callPackage ../build-support/dotnet/fetchnuget { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/fetchnuget/default.nix","line":8,"column":1},"lambda_expr":"attrs@{\n  pname,\n  version,\n  url ? \"https://www.nuget.org/api/v2/package/${pname}/${version}\",\n  sha256 ? \"\",\n  hash ? \"\",\n  md5 ? \"\",\n  ...\n}:\nif md5 != \"\" then\n  throw \"fetchnuget does not support md5 anymore, please use 'hash' attribute with SRI hash: ${\n    lib.generators.toPretty { } attrs\n  }\"\n# This is also detected in fetchurl, but we just throw here to avoid confusion\nelse if (sha256 != \"\" && hash != \"\") then\n  throw \"multiple hashes passed to fetchNuGet: ${lib.generators.toPretty { } url}\"\nelse\n  buildDotnetPackage (\n    {\n      src = fetchurl {\n        inherit url sha256 hash;\n        name = \"${pname}.${version}.zip\";\n      };\n\n      sourceRoot = \".\";\n\n      nativeBuildInputs = [ unzip ];\n\n      dontBuild = true;\n\n      preInstall = ''\n        function traverseRename () {\n          for e in *\n          do\n            t=\"$(echo \"$e\" | sed -e \"s/%20/\\ /g\" -e \"s/%2B/+/g\")\"\n            [ \"$t\" != \"$e\" ] && mv -vn \"$e\" \"$t\"\n            if [ -d \"$t\" ]\n            then\n              cd \"$t\"\n              traverseRename\n              cd ..\n            fi\n          done\n        }\n\n        traverseRename\n      '';\n    }\n    // attrs\n  )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/fetchnuget/default.nix","line":8,"column":1},"path":["pkgs","fetchNuGet"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/fetchnuget/default.nix","line":8,"column":1},"path":["pkgs","fetchNuGet"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchPnpmDeps","path":["pkgs","fetchPnpmDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3114,"column":5},"attr_expr":"fetchPnpmDeps","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","fetchPnpmDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","fetchPnpmDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchPypi","path":["pkgs","fetchPypi"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":735,"column":3},"attr_expr":"fetchPypi = callPackage ../build-support/fetchpypi { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpypi/default.nix","line":50,"column":3},"lambda_expr":"{\n    format ? \"setuptools\",\n    sha256 ? \"\",\n    hash ? \"\",\n    pname,\n    version,\n    ...\n  }@attrs:\n  let\n    url = computeUrl (\n      removeAttrs attrs [\n        \"sha256\"\n        \"hash\"\n      ]\n    );\n    meta = {\n      identifiers.purlParts = {\n        type = \"pypi\";\n        # https://github.com/package-url/purl-spec/blob/18fd3e395dda53c00bc8b11fe481666dc7b3807a/types-doc/pypi-definition.md\n        spec = \"${pname}@${version}\";\n      };\n    };\n  in\n  fetchurl {\n    inherit\n      url\n      sha256\n      hash\n      meta\n      ;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpypi/default.nix","line":50,"column":3},"path":["pkgs","fetchPypi"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpypi/default.nix","line":50,"column":3},"path":["pkgs","fetchPypi"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchPypiLegacy","path":["pkgs","fetchPypiLegacy"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":737,"column":3},"attr_expr":"fetchPypiLegacy = callPackage ../build-support/fetchpypilegacy { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpypilegacy/default.nix","line":23,"column":3},"lambda_expr":"{\n    # package name\n    pname,\n    # Package index\n    url ? null,\n    # Multiple package indices to consider\n    urls ? [ ],\n    # filename including extension\n    file,\n    # SRI hash\n    hash,\n    # allow overriding the derivation name\n    name ? null,\n    # allow overriding cacert using src.override { cacert = cacert.override { extraCertificateFiles = [ ./path/to/cert.pem ]; }; }\n    cacert ? pkgs.cacert,\n  }:\n  let\n    urls' = urls ++ optional (url != null) url;\n\n    pathParts = filter ({ prefix, path }: \"NETRC\" == prefix) builtins.nixPath;\n    netrc_file = if (pathParts != [ ]) then (head pathParts).path else \"\";\n\n  in\n  # Assert that we have at least one URL\n  assert urls' != [ ];\n  runCommand file\n    (\n      {\n        nativeBuildInputs = [\n          python3\n          cacert\n        ];\n        inherit impureEnvVars;\n        outputHashMode = \"flat\";\n        # if hash is empty select a default algo to let nix propose the actual hash.\n        outputHashAlgo = if hash == \"\" then \"sha256\" else null;\n        outputHash = hash;\n      }\n      // optionalAttrs (name != null) { inherit name; }\n      // optionalAttrs (!inPureEvalMode) { env.NETRC = netrc_file; }\n    )\n    ''\n      python ${./fetch-legacy.py} ${\n        concatStringsSep \" \" (map (url: \"--url ${escapeShellArg url}\") urls')\n      } --pname ${pname} --filename ${file}\n      mv ${file} $out\n    ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpypilegacy/default.nix","line":23,"column":3},"path":["pkgs","fetchPypiLegacy"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpypilegacy/default.nix","line":23,"column":3},"path":["pkgs","fetchPypiLegacy"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchRadiclePatch","path":["pkgs","fetchRadiclePatch"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":729,"column":3},"attr_expr":"fetchRadiclePatch = callPackage ../build-support/fetchradiclepatch { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchradiclepatch/default.nix","line":8,"column":3},"lambda_expr":"{\n    revision,\n    postFetch ? \"\",\n    nativeBuildInputs ? [ ],\n    ...\n  }@args:\n\n  assert lib.assertMsg (\n    !args ? rev && !args ? tag\n  ) \"fetchRadiclePatch does not accept `rev` or `tag` arguments.\";\n\n  fetchFromRadicle (\n    {\n      nativeBuildInputs = [ jq ] ++ nativeBuildInputs;\n      rev = revision;\n      leaveDotGit = true;\n      postFetch = ''\n        { read -r head; read -r base; } < <(jq -r '.oid, .base' $out/0)\n        git -C $out fetch --depth=1 \"$url\" \"$base\" \"$head\"\n        git -C $out diff \"$base\" \"$head\" > patch\n        rm -r $out\n        mv patch $out\n        ${postFetch}\n      '';\n    }\n    // removeAttrs args [\n      \"revision\"\n      \"postFetch\"\n      \"nativeBuildInputs\"\n      \"leaveDotGit\"\n    ]\n  )\n  // {\n    inherit revision;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchradiclepatch/default.nix","line":8,"column":3},"path":["pkgs","fetchRadiclePatch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchradiclepatch/default.nix","line":8,"column":3},"path":["pkgs","fetchRadiclePatch"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchRepoProject","path":["pkgs","fetchRepoProject"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":692,"column":3},"attr_expr":"fetchRepoProject = callPackage ../build-support/fetchrepoproject { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"lambda_expr":"args: fetcher (normalize args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchRepoProject"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchRepoProject"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchYarnDeps","path":["pkgs","fetchYarnDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":540,"column":5},"attr_expr":"fetchYarnDeps","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/node/fetch-yarn-deps/default.nix","line":103,"column":9},"lambda_expr":"{\n          name ? \"offline\",\n          src ? null,\n          hash ? \"\",\n          sha256 ? \"\",\n          ...\n        }@args:\n        let\n          hash_ =\n            if hash != \"\" then\n              {\n                outputHashAlgo = null;\n                outputHash = hash;\n              }\n            else if sha256 != \"\" then\n              {\n                outputHashAlgo = \"sha256\";\n                outputHash = sha256;\n              }\n            else\n              {\n                outputHashAlgo = \"sha256\";\n                outputHash = lib.fakeSha256;\n              };\n        in\n        stdenv.mkDerivation (\n          {\n            inherit name;\n\n            dontUnpack = src == null;\n            dontInstall = true;\n\n            nativeBuildInputs = [\n              prefetch-yarn-deps\n              cacert\n            ];\n\n            env = {\n              GIT_SSL_CAINFO = \"${cacert}/etc/ssl/certs/ca-bundle.crt\";\n              NODE_EXTRA_CA_CERTS = \"${cacert}/etc/ssl/certs/ca-bundle.crt\";\n            };\n\n            buildPhase = ''\n              runHook preBuild\n\n              yarnLock=''${yarnLock:=$PWD/yarn.lock}\n              mkdir -p $out\n              (cd $out; prefetch-yarn-deps --verbose --builder $yarnLock)\n\n              runHook postBuild\n            '';\n\n            outputHashMode = \"recursive\";\n          }\n          // hash_\n          // (removeAttrs args (\n            [\n              \"name\"\n              \"hash\"\n              \"sha256\"\n            ]\n            ++ (lib.optional (src == null) \"src\")\n          ))\n        )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/node/fetch-yarn-deps/default.nix","line":103,"column":9},"path":["pkgs","fetchYarnDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/node/fetch-yarn-deps/default.nix","line":103,"column":9},"path":["pkgs","fetchYarnDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchbzr","path":["pkgs","fetchbzr"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":494,"column":3},"attr_expr":"fetchbzr = callPackage ../build-support/fetchbzr { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"lambda_expr":"args: fetcher (normalize args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchbzr"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchbzr"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchcvs","path":["pkgs","fetchcvs"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":496,"column":3},"attr_expr":"fetchcvs =\n    if\n      stdenv.buildPlatform != stdenv.hostPlatform\n    # hack around splicing being crummy with things that (correctly) don't eval.\n    then\n      buildPackages.fetchcvs\n    else\n      callPackage ../build-support/fetchcvs { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchcvs/default.nix","line":15,"column":5},"lambda_expr":"{\n      cvsRoot,\n      module,\n      tag ? null,\n      date ? null,\n      outputHash,\n      outputHashAlgo,\n    }:\n\n    stdenvNoCC.mkDerivation {\n      name = \"cvs-export\";\n      builder = ./builder.sh;\n      nativeBuildInputs = [\n        cvs\n        openssh\n      ];\n\n      inherit outputHash outputHashAlgo;\n      outputHashMode = \"recursive\";\n\n      inherit\n        cvsRoot\n        module\n        tag\n        date\n        ;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchcvs/default.nix","line":15,"column":5},"path":["pkgs","fetchcvs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchcvs/default.nix","line":15,"column":5},"path":["pkgs","fetchcvs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchdarcs","path":["pkgs","fetchdarcs"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":505,"column":3},"attr_expr":"fetchdarcs = callPackage ../build-support/fetchdarcs { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdarcs/default.nix","line":10,"column":5},"lambda_expr":"{\n      # Repository to fetch\n      url,\n      # Additional list of repositories specifying alternative download\n      # location to be tried in order, if the prior repository failed to fetch.\n      mirrors ? [ ],\n      rev ? null,\n      context ? null,\n      outputHash ? lib.fakeHash,\n      outputHashAlgo ? null,\n      name ? \"fetchdarcs\",\n    }:\n\n    stdenvNoCC.mkDerivation {\n      builder = ./builder.sh;\n      nativeBuildInputs = [\n        cacert\n        darcs\n      ];\n\n      inherit outputHash outputHashAlgo;\n      outputHashMode = \"recursive\";\n\n      inherit\n        rev\n        context\n        name\n        ;\n\n      repositories = [ url ] ++ mirrors;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdarcs/default.nix","line":10,"column":5},"path":["pkgs","fetchdarcs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdarcs/default.nix","line":10,"column":5},"path":["pkgs","fetchdarcs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchdocker","path":["pkgs","fetchdocker"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":507,"column":3},"attr_expr":"fetchdocker = callPackage ../build-support/fetchdocker { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/default.nix","line":13,"column":1},"lambda_expr":"{\n  name,\n  registry ? \"https://registry-1.docker.io/v2/\",\n  repository ? \"library\",\n  imageName,\n  tag,\n  imageLayers,\n  imageConfig,\n  image ? \"${stripScheme registry}/${repository}/${imageName}:${tag}\",\n}:\n\n# Make sure there are *no* slashes in the repository or container\n# names since we use these to make the output derivation name for the\n# nix-store path.\nassert null == lib.findFirst (c: \"/\" == c) null (lib.stringToCharacters repository);\nassert null == lib.findFirst (c: \"/\" == c) null (lib.stringToCharacters imageName);\n\nlet\n  # Abuse paths to collapse possible double slashes\n  repoTag0 = toString (/. + \"/${stripScheme registry}/${repository}/${imageName}\");\n  repoTag1 = lib.removePrefix \"/\" repoTag0;\n\n  layers = map stripNixStore imageLayers;\n\n  manifest = writeText \"manifest.json\" (\n    builtins.toJSON [\n      {\n        Config = stripNixStore imageConfig;\n        Layers = layers;\n        RepoTags = [ \"${repoTag1}:${tag}\" ];\n      }\n    ]\n  );\n\n  repositories = writeText \"repositories\" (\n    builtins.toJSON {\n      ${repoTag1} = {\n        ${tag} = lib.last layers;\n      };\n    }\n  );\n\n  imageFileStorePaths = writeText \"imageFileStorePaths.txt\" (\n    lib.concatStringsSep \"\\n\" ((lib.unique imageLayers) ++ [ imageConfig ])\n  );\nin\nstdenv.mkDerivation {\n  builder = ./fetchdocker-builder.sh;\n  buildInputs = [ coreutils ];\n  preferLocalBuild = true;\n\n  inherit\n    name\n    imageName\n    repository\n    tag\n    ;\n  inherit\n    bash\n    gnutar\n    manifest\n    repositories\n    ;\n  inherit imageFileStorePaths;\n\n  passthru = {\n    inherit image;\n  };\n}","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/default.nix","line":13,"column":1},"path":["pkgs","fetchdocker"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchdocker/default.nix","line":13,"column":1},"path":["pkgs","fetchdocker"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchegg","path":["pkgs","fetchegg"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3553,"column":5},"attr_expr":"fetchegg","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/chicken/5/default.nix","line":17,"column":5},"lambda_expr":"{\n      pname,\n      version,\n      sha256,\n      ...\n    }:\n    fetchurl {\n      inherit sha256;\n      url = \"https://code.call-cc.org/egg-tarballs/5/${pname}/${pname}-${version}.tar.gz\";\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/chicken/5/default.nix","line":17,"column":5},"path":["pkgs","fetchegg"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/chicken/5/default.nix","line":17,"column":5},"path":["pkgs","fetchegg"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchfossil","path":["pkgs","fetchfossil"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":513,"column":3},"attr_expr":"fetchfossil = callPackage ../build-support/fetchfossil { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"lambda_expr":"args: fetcher (normalize args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchfossil"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchfossil"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchgit","path":["pkgs","fetchgit"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":515,"column":3},"attr_expr":"fetchgit =\n    (callPackage ../build-support/fetchgit {\n      git = buildPackages.gitMinimal;\n      cacert = buildPackages.cacert;\n      git-lfs = buildPackages.git-lfs;\n    })\n    // {\n      # fetchgit is a function, so we use // instead of passthru.\n      tests = pkgs.tests.fetchgit;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgit/default.nix","line":54,"column":7},"lambda_expr":"finalAttrs:\n      lib.fetchers.withNormalizedHash { } (\n        # NOTE Please document parameter additions or changes in\n        #   ../../../doc/build-helpers/fetchers.chapter.md\n        {\n          url,\n          tag ? null,\n          rev ? null,\n          name ? urlToName {\n            inherit url;\n            rev = lib.revOrTag finalAttrs.revCustom finalAttrs.tag;\n            # when rootDir is specified, avoid invalidating the result when rev changes\n            append = if rootDir != \"\" then \"-${lib.strings.sanitizeDerivationName rootDir}\" else \"\";\n          },\n          # When null, will default to: `deepClone || fetchTags`\n          leaveDotGit ? null,\n          outputHash ? lib.fakeHash,\n          outputHashAlgo ? null,\n          fetchSubmodules ? true,\n          deepClone ? false,\n          branchName ? null,\n          # When null, will default to: `lib.optional (rootdir != \"\") rootdir`\n          sparseCheckout ? null,\n          # When null, will default to: `rootDir != \"\"`\n          nonConeMode ? null,\n          nativeBuildInputs ? [ ],\n          # Shell code executed before the file has been fetched.  This, in\n          # particular, can do things like set NIX_PREFETCH_GIT_CHECKOUT_HOOK to\n          # run operations between the checkout completing and deleting the .git\n          # directory.\n          preFetch ? \"\",\n          # Shell code executed after `git checkout` and before .git directory removal/sanitization.\n          postCheckout ? \"\",\n          # Shell code executed after the file has been fetched\n          # successfully. This can do things like check or transform the file.\n          postFetch ? \"\",\n          preferLocalBuild ? true,\n          fetchLFS ? false,\n          # Shell code to build a netrc file for BASIC auth\n          netrcPhase ? null,\n          # Impure env vars (https://nixos.org/nix/manual/#sec-advanced-attributes)\n          # needed for netrcPhase\n          netrcImpureEnvVars ? [ ],\n          passthru ? { },\n          meta ? { },\n          allowedRequisites ? null,\n          # fetch all tags after tree (useful for git describe)\n          fetchTags ? false,\n          # make this subdirectory the root of the result\n          rootDir ? \"\",\n          # GIT_CONFIG_GLOBAL (as a file)\n          gitConfigFile ? config.gitConfigFile,\n          # Additional stdenvNoCC.mkDerivation arguments.\n          # It is typically for derived fetchers to pass down additional arguments,\n          # and the specified arguments have lower precedence than other mkDerivation arguments.\n          derivationArgs ? { },\n        }:\n\n        /*\n          NOTE:\n          fetchgit has one problem: git fetch only works for refs.\n          This is because fetching arbitrary (maybe dangling) commits creates garbage collection risks\n          and checking whether a commit belongs to a ref is expensive. This may\n          change in the future when some caching is added to git (?)\n          Usually refs are either tags (refs/tags/*) or branches (refs/heads/*)\n          Cloning branches will make the hash check fail when there is an update.\n          But not all patches we want can be accessed by tags.\n\n          The workaround is getting the last n commits so that it's likely that they\n          still contain the hash we want.\n\n          for now : increase depth iteratively (TODO)\n\n          real fix: ask git folks to add a\n          git fetch $HASH contained in $BRANCH\n          facility because checking that $HASH is contained in $BRANCH is less\n          expensive than fetching --depth $N.\n          Even if git folks implemented this feature soon it may take years until\n          server admins start using the new version?\n        */\n\n        let\n          finalHashHasColon = lib.hasInfix \":\" finalAttrs.hash;\n          finalHashColonMatch = lib.match \"([^:]+)[:](.*)\" finalAttrs.hash;\n        in\n\n        derivationArgs\n        // {\n          __structuredAttrs = true;\n\n          inherit name;\n\n          builder = ./builder.sh;\n          fetcher = ./nix-prefetch-git;\n\n          nativeBuildInputs = [\n            git\n            cacert\n          ]\n          ++ lib.optionals fetchLFS [ git-lfs ]\n          ++ nativeBuildInputs;\n\n          hash =\n            if outputHashAlgo == null || outputHash == \"\" || lib.hasPrefix outputHashAlgo outputHash then\n              outputHash\n            else\n              \"${outputHashAlgo}:${outputHash}\";\n\n          outputHash =\n            if finalAttrs.hash == \"\" then\n              lib.fakeHash\n            else if finalHashHasColon then\n              lib.elemAt finalHashColonMatch 1\n            else\n              finalAttrs.hash;\n          outputHashAlgo = if finalHashHasColon then lib.head finalHashColonMatch else null;\n          outputHashMode = \"recursive\";\n\n          sparseCheckout =\n            let\n              default = lib.optional (finalAttrs.rootDir != \"\") finalAttrs.rootDir;\n            in\n            lib.defaultTo default sparseCheckout;\n          sparseCheckoutText =\n            # Changed to throw on 2023-06-04\n            assert (\n              lib.assertMsg (lib.isList finalAttrs.sparseCheckout) \"Please provide directories/patterns for sparse checkout as a list of strings. Passing a (multi-line) string is not supported any more.\"\n            );\n            assert finalAttrs.nonConeMode -> (finalAttrs.sparseCheckout != [ ]);\n            # git-sparse-checkout(1) says:\n            # > When the --stdin option is provided, the directories or patterns are read\n            # > from standard in as a newline-delimited list instead of from the arguments.\n            builtins.concatStringsSep \"\\n\" finalAttrs.sparseCheckout;\n\n          inherit\n            url\n            fetchLFS\n            fetchSubmodules\n            deepClone\n            branchName\n            preFetch\n            postCheckout\n            postFetch\n            fetchTags\n            rootDir\n            gitConfigFile\n            ;\n          leaveDotGit =\n            if leaveDotGit != null then\n              assert fetchTags -> leaveDotGit;\n              assert rootDir != \"\" -> !leaveDotGit;\n              leaveDotGit\n            else\n              deepClone || fetchTags;\n          nonConeMode = lib.defaultTo (finalAttrs.rootDir != \"\") nonConeMode;\n          inherit tag;\n          revCustom = rev;\n          rev = getRevWithTag {\n            inherit (finalAttrs) tag;\n            rev = finalAttrs.revCustom;\n          };\n\n          postHook =\n            if netrcPhase == null then\n              null\n            else\n              ''\n                ${netrcPhase}\n                # required that git uses the netrc file\n                mv {,.}netrc\n                export NETRC=$PWD/.netrc\n                export HOME=$PWD\n              '';\n\n          impureEnvVars =\n            lib.fetchers.proxyImpureEnvVars\n            ++ netrcImpureEnvVars\n            ++ [\n              \"GIT_PROXY_COMMAND\"\n              \"NIX_GIT_SSL_CAINFO\"\n              \"SOCKS_SERVER\"\n\n              # This is a parameter intended to be set by setup hooks or preFetch\n              # scripts that want per-URL control over HTTP proxies used by Git\n              # (if per-URL control isn't needed, `http_proxy` etc. will\n              # suffice). It must be a whitespace-separated (with backslash as an\n              # escape character) list of pairs like this:\n              #\n              #   http://domain1/path1 proxy1 https://domain2/path2 proxy2\n              #\n              # where the URLs are as documented in the `git-config` manual page\n              # under `http.<url>.*`, and the proxies are as documented on the\n              # same page under `http.proxy`.\n              \"FETCHGIT_HTTP_PROXIES\"\n            ];\n\n          outputChecks.out = {\n            ${if allowedRequisites != null then \"allowedRequisites\" else null} = allowedRequisites;\n          };\n\n          inherit preferLocalBuild;\n\n          meta = meta // {\n            identifiers = {\n              purlParts = {\n                type = \"generic\";\n                # https://github.com/package-url/purl-spec/blob/18fd3e395dda53c00bc8b11fe481666dc7b3807a/types-doc/generic-definition.md\n                spec = \"${name}?vcs_url=${url}@${(lib.revOrTag rev tag)}\";\n              };\n            }\n            // meta.identifiers or { };\n          };\n\n          env = {\n            NIX_PREFETCH_GIT_CHECKOUT_HOOK = finalAttrs.postCheckout;\n          };\n\n          passthru = {\n            gitRepoUrl = url;\n          }\n          // passthru;\n        }\n      )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgit/default.nix","line":54,"column":7},"path":["pkgs","fetchgit"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgit/default.nix","line":54,"column":7},"path":["pkgs","fetchgit"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchgitLocal","path":["pkgs","fetchgitLocal"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":526,"column":3},"attr_expr":"fetchgitLocal = callPackage ../build-support/fetchgitlocal { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitlocal/default.nix","line":8,"column":3},"lambda_expr":"src:\n\n  let\n    srcStr = toString src;\n\n    # Adds the current directory (respecting ignored files) to the git store, and returns the hash\n    gitHashFile =\n      runCommand \"put-in-git\"\n        {\n          nativeBuildInputs = [ git ];\n          dummy = builtins.currentTime; # impure, do every time\n          preferLocalBuild = true;\n        }\n        ''\n          cd ${srcStr}\n          DOT_GIT=$(git rev-parse --resolve-git-dir .git) # path to repo\n\n          cp $DOT_GIT/index $DOT_GIT/index-user # backup index\n          git reset # reset index\n          git add . # add current directory\n\n          # hash of current directory\n          # remove trailing newline\n          git rev-parse $(git write-tree) \\\n            | tr -d '\\n' > $out\n\n          mv $DOT_GIT/index-user $DOT_GIT/index # restore index\n        '';\n\n    gitHash = builtins.readFile gitHashFile; # cache against git hash\n\n    nixPath =\n      runCommand \"put-in-nix\"\n        {\n          nativeBuildInputs = [ git ];\n          preferLocalBuild = true;\n        }\n        ''\n          mkdir $out\n\n          # dump tar of *current directory* at given revision\n          git -C ${srcStr} archive --format=tar ${gitHash} \\\n            | tar xf - -C $out\n        '';\n\n  in\n  nixPath","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitlocal/default.nix","line":8,"column":3},"path":["pkgs","fetchgitLocal"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchgitlocal/default.nix","line":8,"column":3},"path":["pkgs","fetchgitLocal"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchgx","path":["pkgs","fetchgx"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":731,"column":3},"attr_expr":"fetchgx = callPackage ../build-support/fetchgx { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"lambda_expr":"args: fetcher (normalize args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchgx"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchgx"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchhg","path":["pkgs","fetchhg"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":618,"column":3},"attr_expr":"fetchhg = callPackage ../build-support/fetchhg { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchhg"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchhg"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchipfs","path":["pkgs","fetchipfs"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":694,"column":3},"attr_expr":"fetchipfs = callPackage ../build-support/fetchipfs { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"lambda_expr":"args: fetcher (normalize args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchipfs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchipfs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchmtn","path":["pkgs","fetchmtn"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":528,"column":3},"attr_expr":"fetchmtn = callPackage ../build-support/fetchmtn (config.fetchmtn or { });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"lambda_expr":"args: fetcher (normalize args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchmtn"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchmtn"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchpatch","path":["pkgs","fetchpatch"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":582,"column":3},"attr_expr":"fetchpatch =\n    callPackage ../build-support/fetchpatch {\n      # 0.3.4 would change hashes: https://github.com/NixOS/nixpkgs/issues/25154\n      patchutils = __splicedPackages.patchutils_0_3_3;\n    }\n    // {\n      tests = pkgs.tests.fetchpatch;\n      version = 1;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpatch/default.nix","line":13,"column":1},"lambda_expr":"{\n  relative ? null,\n  stripLen ? 0,\n  decode ? \"cat\", # custom command to decode patch e.g. base64 -d\n  extraPrefix ? null,\n  excludes ? [ ],\n  includes ? [ ],\n  hunks ? [ ],\n  revert ? false,\n  postFetch ? \"\",\n  nativeBuildInputs ? [ ],\n  ...\n}@args:\nlet\n  args' =\n    if relative != null then\n      {\n        stripLen = 1 + lib.length (lib.splitString \"/\" relative) + stripLen;\n        extraPrefix = lib.optionalString (extraPrefix != null) extraPrefix;\n      }\n    else\n      {\n        inherit stripLen extraPrefix;\n      };\nin\nlet\n  inherit (args') stripLen extraPrefix;\nin\nlib.throwIfNot (excludes == [ ] || includes == [ ])\n  \"fetchpatch: cannot use excludes and includes simultaneously\"\n  fetchurl\n  (\n    {\n      nativeBuildInputs = [ patchutils ] ++ nativeBuildInputs;\n      postFetch = ''\n        tmpfile=\"$TMPDIR/patch\"\n\n        if [ ! -s \"$out\" ]; then\n          echo \"error: Fetched patch file '$out' is empty!\" 1>&2\n          exit 1\n        fi\n\n        set +e\n        ${decode} < \"$out\" > \"$tmpfile\"\n        if [ $? -ne 0 ] || [ ! -s \"$tmpfile\" ]; then\n            echo 'Failed to decode patch with command \"'${lib.escapeShellArg decode}'\"' >&2\n            echo 'Fetched file was (limited to 128 bytes):' >&2\n            od -A x -t x1z -v -N 128 \"$out\" >&2\n            exit 1\n        fi\n        set -e\n        mv \"$tmpfile\" \"$out\"\n\n        lsdiff \\\n          ${lib.optionalString (relative != null) \"-p1 -i ${lib.escapeShellArg relative}/'*'\"} \\\n          \"$out\" \\\n        | sort -u | sed -e 's/[*?]/\\\\&/g' \\\n        | xargs -I{} --delimiter='\\n' \\\n          filterdiff \\\n          --include={} \\\n          --strip=${toString stripLen} \\\n          ${\n            lib.optionalString (extraPrefix != null) ''\n              --addoldprefix=a/${lib.escapeShellArg extraPrefix} \\\n              --addnewprefix=b/${lib.escapeShellArg extraPrefix} \\\n            ''\n          } \\\n          --clean \"$out\" > \"$tmpfile\"\n\n        if [ ! -s \"$tmpfile\" ]; then\n          echo \"error: Normalized patch '$tmpfile' is empty (while the fetched file was not)!\" 1>&2\n          echo \"Did you maybe fetch a HTML representation of a patch instead of a raw patch?\" 1>&2\n          echo \"Fetched file was:\" 1>&2\n          cat \"$out\" 1>&2\n          exit 1\n        fi\n\n        filterdiff \\\n          -p1 \\\n          ${toString (map (x: \"-x ${lib.escapeShellArg x}\") excludes)} \\\n          ${toString (map (x: \"-i ${lib.escapeShellArg x}\") includes)} \\\n          ${\n            lib.optionalString (hunks != [ ])\n              \"-# ${lib.escapeShellArg (lib.concatMapStringsSep \",\" toString hunks)}\"\n          } \\\n          \"$tmpfile\" > \"$out\"\n\n        if [ ! -s \"$out\" ]; then\n          echo \"error: Filtered patch '$out' is empty (while the original patch file was not)!\" 1>&2\n          echo \"Check your includes and excludes.\" 1>&2\n          echo \"Normalized patch file was:\" 1>&2\n          cat \"$tmpfile\" 1>&2\n          exit 1\n        fi\n      ''\n      + lib.optionalString revert ''\n        interdiff \"$out\" /dev/null > \"$tmpfile\"\n        mv \"$tmpfile\" \"$out\"\n      ''\n      + postFetch;\n    }\n    // removeAttrs args [\n      \"relative\"\n      \"stripLen\"\n      \"decode\"\n      \"extraPrefix\"\n      \"excludes\"\n      \"includes\"\n      \"hunks\"\n      \"revert\"\n      \"postFetch\"\n      \"nativeBuildInputs\"\n    ]\n  )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpatch/default.nix","line":13,"column":1},"path":["pkgs","fetchpatch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpatch/default.nix","line":13,"column":1},"path":["pkgs","fetchpatch"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchpatch2","path":["pkgs","fetchpatch2"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":592,"column":3},"attr_expr":"fetchpatch2 =\n    callPackage ../build-support/fetchpatch {\n      patchutils = __splicedPackages.patchutils_0_4_2;\n    }\n    // {\n      tests = pkgs.tests.fetchpatch2;\n      version = 2;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpatch/default.nix","line":13,"column":1},"lambda_expr":"{\n  relative ? null,\n  stripLen ? 0,\n  decode ? \"cat\", # custom command to decode patch e.g. base64 -d\n  extraPrefix ? null,\n  excludes ? [ ],\n  includes ? [ ],\n  hunks ? [ ],\n  revert ? false,\n  postFetch ? \"\",\n  nativeBuildInputs ? [ ],\n  ...\n}@args:\nlet\n  args' =\n    if relative != null then\n      {\n        stripLen = 1 + lib.length (lib.splitString \"/\" relative) + stripLen;\n        extraPrefix = lib.optionalString (extraPrefix != null) extraPrefix;\n      }\n    else\n      {\n        inherit stripLen extraPrefix;\n      };\nin\nlet\n  inherit (args') stripLen extraPrefix;\nin\nlib.throwIfNot (excludes == [ ] || includes == [ ])\n  \"fetchpatch: cannot use excludes and includes simultaneously\"\n  fetchurl\n  (\n    {\n      nativeBuildInputs = [ patchutils ] ++ nativeBuildInputs;\n      postFetch = ''\n        tmpfile=\"$TMPDIR/patch\"\n\n        if [ ! -s \"$out\" ]; then\n          echo \"error: Fetched patch file '$out' is empty!\" 1>&2\n          exit 1\n        fi\n\n        set +e\n        ${decode} < \"$out\" > \"$tmpfile\"\n        if [ $? -ne 0 ] || [ ! -s \"$tmpfile\" ]; then\n            echo 'Failed to decode patch with command \"'${lib.escapeShellArg decode}'\"' >&2\n            echo 'Fetched file was (limited to 128 bytes):' >&2\n            od -A x -t x1z -v -N 128 \"$out\" >&2\n            exit 1\n        fi\n        set -e\n        mv \"$tmpfile\" \"$out\"\n\n        lsdiff \\\n          ${lib.optionalString (relative != null) \"-p1 -i ${lib.escapeShellArg relative}/'*'\"} \\\n          \"$out\" \\\n        | sort -u | sed -e 's/[*?]/\\\\&/g' \\\n        | xargs -I{} --delimiter='\\n' \\\n          filterdiff \\\n          --include={} \\\n          --strip=${toString stripLen} \\\n          ${\n            lib.optionalString (extraPrefix != null) ''\n              --addoldprefix=a/${lib.escapeShellArg extraPrefix} \\\n              --addnewprefix=b/${lib.escapeShellArg extraPrefix} \\\n            ''\n          } \\\n          --clean \"$out\" > \"$tmpfile\"\n\n        if [ ! -s \"$tmpfile\" ]; then\n          echo \"error: Normalized patch '$tmpfile' is empty (while the fetched file was not)!\" 1>&2\n          echo \"Did you maybe fetch a HTML representation of a patch instead of a raw patch?\" 1>&2\n          echo \"Fetched file was:\" 1>&2\n          cat \"$out\" 1>&2\n          exit 1\n        fi\n\n        filterdiff \\\n          -p1 \\\n          ${toString (map (x: \"-x ${lib.escapeShellArg x}\") excludes)} \\\n          ${toString (map (x: \"-i ${lib.escapeShellArg x}\") includes)} \\\n          ${\n            lib.optionalString (hunks != [ ])\n              \"-# ${lib.escapeShellArg (lib.concatMapStringsSep \",\" toString hunks)}\"\n          } \\\n          \"$tmpfile\" > \"$out\"\n\n        if [ ! -s \"$out\" ]; then\n          echo \"error: Filtered patch '$out' is empty (while the original patch file was not)!\" 1>&2\n          echo \"Check your includes and excludes.\" 1>&2\n          echo \"Normalized patch file was:\" 1>&2\n          cat \"$tmpfile\" 1>&2\n          exit 1\n        fi\n      ''\n      + lib.optionalString revert ''\n        interdiff \"$out\" /dev/null > \"$tmpfile\"\n        mv \"$tmpfile\" \"$out\"\n      ''\n      + postFetch;\n    }\n    // removeAttrs args [\n      \"relative\"\n      \"stripLen\"\n      \"decode\"\n      \"extraPrefix\"\n      \"excludes\"\n      \"includes\"\n      \"hunks\"\n      \"revert\"\n      \"postFetch\"\n      \"nativeBuildInputs\"\n    ]\n  )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpatch/default.nix","line":13,"column":1},"path":["pkgs","fetchpatch2"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpatch/default.nix","line":13,"column":1},"path":["pkgs","fetchpatch2"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchpijul","path":["pkgs","fetchpijul"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":532,"column":3},"attr_expr":"fetchpijul = callPackage ../build-support/fetchpijul { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpijul/default.nix","line":9,"column":3},"lambda_expr":"{\n    # Remote to fetch\n    url,\n    # Additional list of remotes specifying alternative download location to be\n    # tried in order, if the prior remote failed to fetch.\n    mirrors ? [ ],\n    hash ? \"\",\n    change ? null,\n    state ? null,\n    channel ? \"main\",\n    name ? \"fetchpijul\",\n    # TODO: Changes in pijul are unordered so there's many ways to end up with the same repository state.\n    # This makes leaveDotPijul unfeasible to implement until pijul CLI implements\n    # a way of reordering changes to sort them in a consistent and deterministic manner.\n    # leaveDotPijul ? false\n  }:\n  if change != null && state != null then\n    throw \"Only one of 'change' or 'state' can be set\"\n  else\n    stdenvNoCC.mkDerivation {\n      inherit name;\n      nativeBuildInputs = [\n        pijul\n        cacert\n      ];\n      strictDeps = true;\n\n      dontUnpack = true;\n      dontConfigure = true;\n      dontBuild = true;\n\n      installPhase = ''\n        runHook preInstall\n\n        success=\n        for remote in $remotes; do\n          if\n            pijul clone \\\n              ''${change:+--change \"$change\"} \\\n              ''${state:+--state \"$state\"} \\\n              --channel \"$channel\" \\\n              \"$remote\" \\\n              \"$out\"\n          then\n            success=1\n            break\n          fi\n        done\n\n        if [ -z \"$success\" ]; then\n          echo \"Error: couldn’t clone remote from any mirror\" 1>&2\n          exit 1\n        fi\n\n        runHook postInstall\n      '';\n\n      fixupPhase = ''\n        runHook preFixup\n\n        rm -rf \"$out/.pijul\"\n\n        runHook postFixup\n      '';\n\n      outputHashAlgo = null;\n      outputHashMode = \"recursive\";\n      outputHash = if hash != \"\" then hash else lib.fakeHash;\n\n      inherit\n        change\n        state\n        channel\n        ;\n\n      remotes = [ url ] ++ mirrors;\n\n      impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpijul/default.nix","line":9,"column":3},"path":["pkgs","fetchpijul"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchpijul/default.nix","line":9,"column":3},"path":["pkgs","fetchpijul"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchs3","path":["pkgs","fetchs3"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":601,"column":3},"attr_expr":"fetchs3 = callPackage ../build-support/fetchs3 { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"lambda_expr":"args: fetcher (normalize args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchs3"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fetchers.nix","line":227,"column":22},"path":["pkgs","fetchs3"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchsvn","path":["pkgs","fetchsvn"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":605,"column":3},"attr_expr":"fetchsvn =\n    if\n      stdenv.buildPlatform != stdenv.hostPlatform\n    # hack around splicing being crummy with things that (correctly) don't eval.\n    then\n      buildPackages.fetchsvn\n    else\n      callPackage ../build-support/fetchsvn { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsvn/default.nix","line":43,"column":1},"lambda_expr":"{\n  url,\n  rev ? \"HEAD\",\n  name ? repoToName url rev,\n  sha256 ? \"\",\n  hash ? \"\",\n  ignoreExternals ? false,\n  ignoreKeywords ? false,\n  preferLocalBuild ? true,\n}:\n\nassert sshSupport -> openssh != null;\n\nif hash != \"\" && sha256 != \"\" then\n  throw \"Only one of sha256 or hash can be set\"\nelse\n  stdenvNoCC.mkDerivation {\n    inherit name;\n    builder = ./builder.sh;\n    nativeBuildInputs = [\n      cacert\n      subversion\n      glibcLocales\n    ]\n    ++ lib.optional sshSupport openssh;\n\n    SVN_SSH = if sshSupport then \"${buildPackages.openssh}/bin/ssh\" else null;\n\n    outputHashAlgo = if hash != \"\" then null else \"sha256\";\n    outputHashMode = \"recursive\";\n    outputHash =\n      if hash != \"\" then\n        hash\n      else if sha256 != \"\" then\n        sha256\n      else\n        lib.fakeSha256;\n\n    inherit\n      url\n      rev\n      ignoreExternals\n      ignoreKeywords\n      ;\n\n    impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n    inherit preferLocalBuild;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsvn/default.nix","line":43,"column":1},"path":["pkgs","fetchsvn"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsvn/default.nix","line":43,"column":1},"path":["pkgs","fetchsvn"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchsvnrevision","path":["pkgs","fetchsvnrevision"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":614,"column":3},"attr_expr":"fetchsvnrevision = import ../build-support/fetchsvnrevision runCommand subversion;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsvnrevision/default.nix","line":1,"column":25},"lambda_expr":"repository:\nimport (\n  runCommand \"head-revision\"\n    {\n      buildInputs = [ subversion ];\n      dummy = builtins.currentTime;\n    }\n    ''\n      rev=$(echo p | svn ls -v --depth empty  ${repository} |awk '{ print $1 }')\n      echo \"[ \\\"$rev\\\" ]\" > $out\n      echo Latest revision is $rev\n    ''\n)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.fetchsvnssh","path":["pkgs","fetchsvnssh"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":616,"column":3},"attr_expr":"fetchsvnssh = callPackage ../build-support/fetchsvnssh { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsvnssh/default.nix","line":9,"column":1},"lambda_expr":"{\n  username,\n  password,\n  url,\n  rev ? \"HEAD\",\n  outputHash ? lib.fakeHash,\n  outputHashAlgo ? null,\n}:\n\nlib.fetchers.withNormalizedHash { } (\n  stdenvNoCC.mkDerivation {\n    name = \"svn-export-ssh\";\n    builder = ./builder.sh;\n    nativeBuildInputs = [\n      subversion\n      expect\n    ];\n\n    inherit outputHash outputHashAlgo;\n    outputHashMode = \"recursive\";\n\n    sshSubversion = ./sshsubversion.exp;\n\n    inherit\n      username\n      password\n      url\n      rev\n      sshSupport\n      openssh\n      ;\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsvnssh/default.nix","line":9,"column":1},"path":["pkgs","fetchsvnssh"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchsvnssh/default.nix","line":9,"column":1},"path":["pkgs","fetchsvnssh"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchtorrent","path":["pkgs","fetchtorrent"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":603,"column":3},"attr_expr":"fetchtorrent = callPackage ../build-support/fetchtorrent { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchtorrent/default.nix","line":14,"column":1},"lambda_expr":"{\n  url,\n  name ?\n    if (builtins.match urlRegexp url) == null then\n      \"bittorrent\"\n    else\n      \"bittorrent-\" + builtins.head (builtins.match urlRegexp url),\n  config ? { },\n  hash,\n  backend ? \"transmission\",\n  recursiveHash ? true,\n  flatten ? null,\n  postFetch ? \"\",\n  postUnpack ? \"\",\n  meta ? { },\n}:\nlet\n  # Default to flattening if no flatten argument was specified.\n  flatten' = if flatten == null then true else flatten;\n\n  transmissionFinishScript = writeShellScript \"fetch-bittorrent-done.sh\" ''\n    ${postUnpack}\n    # Flatten the directory, so that only the torrent contents are in $out, not\n    # the folder name\n    shopt -s dotglob\n    mv -v $downloadedDirectory/*/* $out\n    rm -v -rf $downloadedDirectory\n    unset downloadedDirectory\n    ${postFetch}\n    kill $PPID\n  '';\n  jsonConfig = (formats.json { }).generate \"jsonConfig\" config;\n\n  # https://github.com/NixOS/nixpkgs/issues/432001\n  #\n  # For a while, the transmission backend would put the downloaded torrent in\n  # the output directory, but whether the rqbit backend would put the output in\n  # the output directory or a subdirectory depended on the version of rqbit.\n  # We want to standardise on a single behaviour, but give users of\n  # fetchtorrent with the rqbit backend some warning that the behaviour might\n  # be unexpected, particularly since we can't know what behaviour users might\n  # be expecting at this point, and they probably wouldn't notice a change\n  # straight away because the results are fixed-output derivations.\n  #\n  # This warning was introduced for 25.11, so we can remove handling of the\n  # `flatten` argument once that release is no longer supported.\n  warnings =\n    if backend == \"rqbit\" && flatten == null then\n      [\n        ''\n          `fetchtorrent` with the rqbit backend may or may not have the\n          downloaded files stored in a subdirectory of the output directory.\n          Verify which behaviour you need, and set the `flatten` argument to\n          `fetchtorrent` accordingly.\n\n          The `flatten = false` behaviour will still produce a warning, as this\n          behaviour is deprecated.  It is only available with the \"rqbit\" backend\n          to provide temporary support for users who are relying on the\n          previous incorrect behaviour.  For a warning-free evaluation, use\n          `flatten = true`.\n        ''\n      ]\n    else if flatten == false then\n      [\n        ''\n          `fetchtorrent` with `flatten = false` is deprecated and will be\n          removed in a future release.\n        ''\n      ]\n    else\n      [ ];\nin\nassert lib.assertMsg (config != { } -> backend == \"transmission\") ''\n  json config for configuring fetchtorrent only works with the transmission backend\n'';\nassert lib.assertMsg (backend == \"transmission\" -> flatten') ''\n  `flatten = false` is only supported by the rqbit backend for fetchtorrent\n'';\nrunCommand name\n  {\n    inherit meta;\n    nativeBuildInputs = [\n      cacert\n    ]\n    ++ (\n      if (backend == \"transmission\") then\n        [ transmission_4 ]\n      else if (backend == \"rqbit\") then\n        [ rqbit ]\n      else\n        throw \"rqbit or transmission are the only available backends for fetchtorrent\"\n    );\n    outputHashAlgo = if hash != \"\" then null else \"sha256\";\n    outputHash = hash;\n    outputHashMode = if recursiveHash then \"recursive\" else \"flat\";\n\n    # url will be written to the derivation, meaning it can be parsed and utilized\n    # by external tools, such as tools that may want to seed fetchtorrent calls\n    # in nixpkgs\n    inherit url;\n  }\n  (\n    if (backend == \"transmission\") then\n      ''\n        export HOME=$TMP\n        export downloadedDirectory=$out/downloadedDirectory\n        mkdir -p $downloadedDirectory\n        mkdir -p $HOME/.config/transmission\n        cp ${jsonConfig} $HOME/.config/transmission/settings.json\n        port=\"$(shuf -n 1 -i 49152-65535)\"\n        function handleChild {\n          # This detects failures and logs the contents of the transmission fetch\n          find $out\n          exit 0\n        }\n        trap handleChild CHLD\n        transmission-cli \\\n            --port \"$port\" \\\n            --portmap \\\n            --finish ${transmissionFinishScript} \\\n            --download-dir \"$downloadedDirectory\" \\\n            \"$url\"\n      ''\n    else\n      ''\n        export HOME=$TMP\n      ''\n      + lib.optionalString flatten' ''\n        downloadedDirectory=$out/downloadedDirectory\n        mkdir -p $downloadedDirectory\n      ''\n      + lib.optionalString (!flatten') ''\n        downloadedDirectory=$out\n      ''\n      + ''\n        port=\"$(shuf -n 1 -i 49152-65535)\"\n\n        rqbit \\\n            --disable-dht-persistence \\\n            --http-api-listen-addr \"127.0.0.1:$port\" \\\n            download \\\n            -o \"$downloadedDirectory\" \\\n            --exit-on-finish \\\n            \"$url\"\n\n        ${postUnpack}\n      ''\n      + lib.optionalString flatten' ''\n        # Flatten the directory, so that only the torrent contents are in $out,\n        # not the folder name\n        shopt -s dotglob\n        mv -v $downloadedDirectory/*/* $out\n        rm -v -rf $downloadedDirectory\n        unset downloadedDirectory\n      ''\n      + ''\n        ${postFetch}\n      ''\n  )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchtorrent/default.nix","line":14,"column":1},"path":["pkgs","fetchtorrent"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchtorrent/default.nix","line":14,"column":1},"path":["pkgs","fetchtorrent"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchurl","path":["pkgs","fetchurl"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":627,"column":3},"attr_expr":"fetchurl =\n    if stdenv.buildPlatform != stdenv.hostPlatform then\n      buildPackages.fetchurl # No need to do special overrides twice,\n    else\n      makeOverridable (import ../build-support/fetchurl) {\n        inherit lib stdenvNoCC buildPackages;\n        inherit cacert;\n        inherit (config) hashedMirrors rewriteURL;\n        curl = buildPackages.curlMinimal.override (old: rec {\n          # break dependency cycles\n          fetchurl = stdenv.fetchurlBoot;\n          zlib = buildPackages.zlib.override { fetchurl = stdenv.fetchurlBoot; };\n          pkg-config = buildPackages.pkg-config.override (old: {\n            pkg-config = old.pkg-config.override {\n              fetchurl = stdenv.fetchurlBoot;\n            };\n          });\n          perl = buildPackages.perl.override {\n            inherit zlib;\n            fetchurl = stdenv.fetchurlBoot;\n          };\n          openssl = buildPackages.openssl.override {\n            fetchurl = stdenv.fetchurlBoot;\n            buildPackages = {\n              coreutils = buildPackages.coreutils.override {\n                fetchurl = stdenv.fetchurlBoot;\n                inherit perl;\n                xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; };\n                gmpSupport = false;\n                aclSupport = false;\n                attrSupport = false;\n              };\n              inherit perl;\n            };\n            inherit perl;\n          };\n          libssh2 = buildPackages.libssh2.override {\n            fetchurl = stdenv.fetchurlBoot;\n            inherit zlib openssl;\n          };\n          # On darwin, libkrb5 needs bootstrap_cmds which would require\n          # converting many packages to fetchurl_boot to avoid evaluation cycles.\n          # So turn gssSupport off there, and on Windows.\n          # On other platforms, keep the previous value.\n          gssSupport =\n            if stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWindows then\n              false\n            else\n              old.gssSupport or true; # `? true` is the default\n          libkrb5 = buildPackages.krb5.override {\n            fetchurl = stdenv.fetchurlBoot;\n            inherit pkg-config perl openssl;\n            withLibedit = false;\n            byacc = buildPackages.byacc.override { fetchurl = stdenv.fetchurlBoot; };\n            keyutils = buildPackages.keyutils.override { fetchurl = stdenv.fetchurlBoot; };\n          };\n          nghttp2 = buildPackages.nghttp2.override {\n            fetchurl = stdenv.fetchurlBoot;\n            inherit pkg-config;\n            enableApp = false; # curl just needs libnghttp2\n            enableTests = false; # avoids bringing `cunit` and `tzdata` into scope\n          };\n        });\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchurl"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchurl"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.fetchzip","path":["pkgs","fetchzip"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":696,"column":3},"attr_expr":"fetchzip = callPackage ../build-support/fetchzip { } // {\n    tests = pkgs.tests.fetchzip;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchzip"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","fetchzip"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.forceSystem","path":["pkgs","forceSystem"],"aliases":[["pkgs","dontRecurseIntoAttrs"],["pkgs","hiPrio"],["pkgs","lowPrio"],["pkgs","makeOverridable"],["pkgs","recurseIntoAttrs"],["pkgs","runCommandNoCC"],["pkgs","runCommandNoCCLocal"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","forceSystem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","forceSystem"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.gccFun","path":["pkgs","gccFun"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3645,"column":3},"attr_expr":"gccFun = callPackage ../development/compilers/gcc;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":19},"lambda_expr":"args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.generateSplicesForMkScope","path":["pkgs","generateSplicesForMkScope"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":136,"column":3},"attr_expr":"generateSplicesForMkScope =\n    attrs:\n    let\n      split =\n        X:\n        [ X ]\n        ++ (\n          if builtins.isList attrs then\n            attrs\n          else if builtins.isString attrs then\n            lib.splitString \".\" attrs\n          else\n            throw \"generateSplicesForMkScope must be passed a list of string or string\"\n        );\n      bad = throw \"attribute should be found\";\n    in\n    {\n      selfBuildBuild = lib.attrByPath (split \"pkgsBuildBuild\") bad pkgs;\n      selfBuildHost = lib.attrByPath (split \"pkgsBuildHost\") bad pkgs;\n      selfBuildTarget = lib.attrByPath (split \"pkgsBuildTarget\") bad pkgs;\n      selfHostHost = lib.attrByPath (split \"pkgsHostHost\") bad pkgs;\n      selfHostTarget = lib.attrByPath (split \"pkgsHostTarget\") bad pkgs;\n      selfTargetTarget = lib.attrByPath (split \"pkgsTargetTarget\") { } pkgs;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":137,"column":5},"lambda_expr":"generateSplicesForMkScope =\n    attrs:\n    let\n      split =\n        X:\n        [ X ]\n        ++ (\n          if builtins.isList attrs then\n            attrs\n          else if builtins.isString attrs then\n            lib.splitString \".\" attrs\n          else\n            throw \"generateSplicesForMkScope must be passed a list of string or string\"\n        );\n      bad = throw \"attribute should be found\";\n    in\n    {\n      selfBuildBuild = lib.attrByPath (split \"pkgsBuildBuild\") bad pkgs;\n      selfBuildHost = lib.attrByPath (split \"pkgsBuildHost\") bad pkgs;\n      selfBuildTarget = lib.attrByPath (split \"pkgsBuildTarget\") bad pkgs;\n      selfHostHost = lib.attrByPath (split \"pkgsHostHost\") bad pkgs;\n      selfHostTarget = lib.attrByPath (split \"pkgsHostTarget\") bad pkgs;\n      selfTargetTarget = lib.attrByPath (split \"pkgsTargetTarget\") { } pkgs;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":137,"column":5},"path":["pkgs","generateSplicesForMkScope"],"pos_type":"Lambda"}},"content":{"content":"generate 'otherSplices' for 'makeScopeWithSplicing'","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":137,"column":5},"path":["pkgs","generateSplicesForMkScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.genericUpdater","path":["pkgs","genericUpdater"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":184,"column":3},"attr_expr":"genericUpdater = callPackage ../common-updater/generic-updater.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/generic-updater.nix","line":12,"column":1},"lambda_expr":"{\n  name ? null,\n  pname ? null,\n  version ? null,\n  attrPath ? null,\n  versionLister,\n  allowedVersions ? \"\",\n  ignoredVersions ? \"\",\n  rev-prefix ? \"\",\n  rev-suffix ? \"\",\n  odd-unstable ? false,\n  patchlevel-unstable ? false,\n}:\n\nlet\n  # where to print git commands and debugging messages\n  fileForGitCommands = \"update-git-commits.txt\";\n\n  grep = lib.getExe gnugrep;\n  sed = lib.getExe gnused;\n\n  # shell script to update package\n  updateScript = writeScript \"generic-update-script.sh\" ''\n    #! ${stdenv.shell}\n    set -o errexit\n    set -x\n\n    name=\"$1\"\n    pname=\"$2\"\n    version=\"$3\"\n    attr_path=\"$4\"\n    version_lister=\"$5\"\n    allowed_versions=\"$6\"\n    ignored_versions=\"$7\"\n    rev_prefix=\"$8\"\n    rev_suffix=\"$9\"\n    odd_unstable=\"''${10}\"\n    patchlevel_unstable=\"''${11}\"\n\n    [[ -n \"$name\" ]] || name=\"$UPDATE_NIX_NAME\"\n    [[ -n \"$pname\" ]] || pname=\"$UPDATE_NIX_PNAME\"\n    [[ -n \"$version\" ]] || version=\"$UPDATE_NIX_OLD_VERSION\"\n    [[ -n \"$attr_path\" ]] || attr_path=\"$UPDATE_NIX_ATTR_PATH\"\n\n    # print header\n    echo \"# $name\" >> ${fileForGitCommands}\n\n    function version_is_ignored() {\n      local tag=\"$1\"\n      [ -n \"$ignored_versions\" ] && ${grep} -q -E -e \"$ignored_versions\" <<< \"$tag\"\n    }\n\n    function version_is_unstable() {\n      local tag=\"$1\"\n      local enforce=\"$2\"\n      if [ -n \"$odd_unstable\" -o -n \"$enforce\" ]; then\n        local minor=$(echo \"$tag\" | ${sed} -rne 's,^[0-9]+\\.([0-9]+).*,\\1,p')\n        if [ $((minor % 2)) -eq 1 ]; then\n          return 0\n        fi\n      fi\n      if [ -n \"$patchlevel_unstable\" -o -n \"$enforce\" ]; then\n        local patchlevel=$(echo \"$tag\" | ${sed} -rne 's,^[0-9]+\\.[0-9]+\\.([0-9]+).*$,\\1,p')\n        if ((patchlevel >= 90)); then\n          return 0\n        fi\n      fi\n      return 1\n    }\n\n    tags=$(sh -c \"$version_lister --pname=$pname --attr-path=$attr_path --file=\\\"${fileForGitCommands}\\\"\") || exit 1\n\n    # print available tags\n    for tag in $tags; do\n        echo \"#\tfound $pname version: $tag\" >> ${fileForGitCommands}\n    done\n\n    # cut any revision prefix not used in the NixOS package version\n    if [ -n \"$rev_prefix\" ]; then\n      tags=$(echo \"$tags\" | ${grep} \"^$rev_prefix\")\n      tags=$(echo \"$tags\" | ${sed} -e \"s,^$rev_prefix,,\")\n    fi\n    # cut any revision suffix not used in the NixOS package version\n    if [ -n \"$rev_suffix\" ]; then\n      tags=$(echo \"$tags\" | ${grep} -- \"$rev_suffix$\")\n      tags=$(echo \"$tags\" | ${sed} -e \"s,$rev_suffix\\$,,\")\n    fi\n    tags=$(echo \"$tags\" | ${grep} \"^[0-9]\")\n    if [ -n \"$allowed_versions\" ]; then\n      tags=$(echo \"$tags\" | ${grep} -E -e \"$allowed_versions\")\n    fi\n\n    # sort the tags in decreasing order\n    tags=$(echo \"$tags\" | ${coreutils}/bin/sort --reverse --version-sort)\n\n    # find the newest tag\n    # do not consider development versions\n    for latest_tag in $tags; do\n      if version_is_ignored \"$latest_tag\"; then\n        echo \"#   skip ignored version: $pname-$latest_tag\" >> ${fileForGitCommands}\n        latest_tag=\n      elif version_is_unstable \"$latest_tag\"; then\n        echo \"#   skip development version: $pname-$latest_tag\" >> ${fileForGitCommands}\n        latest_tag=\n      else\n        if version_is_unstable \"$latest_tag\" \"enforce\"; then\n          echo \"#   use potential development version: $pname-$latest_tag\" >> ${fileForGitCommands}\n        fi\n        break\n      fi\n    done\n\n    if [ -n \"$latest_tag\" ]; then\n      # print commands to commit the changes\n      if [ \"$version\" != \"$latest_tag\" ]; then\n        pfile=$(EDITOR=echo ${nix}/bin/nix edit --extra-experimental-features nix-command -f. \"$attr_path\")\n        echo \"   git add $pfile \" >> ${fileForGitCommands}\n        echo \"   git commit -m '$attr_path: $version -> $latest_tag'\" >> ${fileForGitCommands}\n      fi\n\n      # update the nix expression\n      ${common-updater-scripts}/bin/update-source-version --print-changes \"$attr_path\" \"$latest_tag\"\n    else\n      # No changes for commit protocol.\n      echo \"[]\"\n    fi\n\n    echo \"\" >> ${fileForGitCommands}\n  '';\n\nin\n{\n  name = \"generic-update-script\";\n  command = [\n    updateScript\n    name\n    pname\n    version\n    attrPath\n    versionLister\n    allowedVersions\n    ignoredVersions\n    rev-prefix\n    rev-suffix\n    odd-unstable\n    patchlevel-unstable\n  ];\n  supportedFeatures = [\n    # Stdout must contain output according to the updateScript commit protocol when the update script finishes with a non-zero exit code.\n    \"commit\"\n  ];\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/generic-updater.nix","line":12,"column":1},"path":["pkgs","genericUpdater"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/generic-updater.nix","line":12,"column":1},"path":["pkgs","genericUpdater"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.ghc-standalone-archive","path":["pkgs","ghc-standalone-archive"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11809,"column":3},"attr_expr":"ghc-standalone-archive =\n    {\n      haskellPackages,\n      src,\n      deps ? p: [ ],\n      name,\n    }:\n    let\n      inherit (haskellPackages) ghc ghcWithPackages;\n      with-env = ghcWithPackages deps;\n      ghcName = \"${ghc.targetPrefix}ghc\";\n    in\n    runCommand name\n      {\n        buildInputs = [\n          with-env\n          cctools\n        ];\n      }\n      ''\n        mkdir -p $out/lib\n        mkdir -p $out/include\n        ${ghcName} ${src} -staticlib -outputdir . -o $out/lib/${name}.a -stubdir $out/include\n        for file in ${ghc}/lib/${ghcName}-${ghc.version}/include/*; do\n          ln -sv $file $out/include\n        done\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11810,"column":5},"lambda_expr":"{\n      haskellPackages,\n      src,\n      deps ? p: [ ],\n      name,\n    }:\n    let\n      inherit (haskellPackages) ghc ghcWithPackages;\n      with-env = ghcWithPackages deps;\n      ghcName = \"${ghc.targetPrefix}ghc\";\n    in\n    runCommand name\n      {\n        buildInputs = [\n          with-env\n          cctools\n        ];\n      }\n      ''\n        mkdir -p $out/lib\n        mkdir -p $out/include\n        ${ghcName} ${src} -staticlib -outputdir . -o $out/lib/${name}.a -stubdir $out/include\n        for file in ${ghc}/lib/${ghcName}-${ghc.version}/include/*; do\n          ln -sv $file $out/include\n        done\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11810,"column":5},"path":["pkgs","ghc-standalone-archive"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11810,"column":5},"path":["pkgs","ghc-standalone-archive"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.gitUpdater","path":["pkgs","gitUpdater"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":190,"column":3},"attr_expr":"gitUpdater = callPackage ../common-updater/git-updater.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/git-updater.nix","line":7,"column":1},"lambda_expr":"{\n  pname ? null,\n  version ? null,\n  attrPath ? null,\n  allowedVersions ? \"\",\n  ignoredVersions ? \"\",\n  rev-prefix ? \"\",\n  rev-suffix ? \"\",\n  odd-unstable ? false,\n  patchlevel-unstable ? false,\n  # an explicit url is needed when src.meta.homepage or src.url don't\n  # point to a git repo (eg. when using fetchurl, fetchzip, ...)\n  url ? null,\n}:\n\ngenericUpdater {\n  inherit\n    pname\n    version\n    attrPath\n    allowedVersions\n    ignoredVersions\n    rev-prefix\n    rev-suffix\n    odd-unstable\n    patchlevel-unstable\n    ;\n  versionLister = \"${common-updater-scripts}/bin/list-git-tags ${\n    lib.optionalString (url != null) \"--url=${url}\"\n  }\";\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/git-updater.nix","line":7,"column":1},"path":["pkgs","gitUpdater"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/git-updater.nix","line":7,"column":1},"path":["pkgs","gitUpdater"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.hiPrio","path":["pkgs","hiPrio"],"aliases":[["pkgs","dontRecurseIntoAttrs"],["pkgs","forceSystem"],["pkgs","lowPrio"],["pkgs","makeOverridable"],["pkgs","recurseIntoAttrs"],["pkgs","runCommandNoCC"],["pkgs","runCommandNoCCLocal"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","hiPrio"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","hiPrio"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.httpTwoLevelsUpdater","path":["pkgs","httpTwoLevelsUpdater"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":192,"column":3},"attr_expr":"httpTwoLevelsUpdater = callPackage ../common-updater/http-two-levels-updater.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/http-two-levels-updater.nix","line":7,"column":1},"lambda_expr":"{\n  pname ? null,\n  version ? null,\n  attrPath ? null,\n  allowedVersions ? \"\",\n  ignoredVersions ? \"\",\n  rev-prefix ? \"\",\n  rev-suffix ? \"\",\n  odd-unstable ? false,\n  patchlevel-unstable ? false,\n  url ? null,\n}:\n\ngenericUpdater {\n  inherit\n    pname\n    version\n    attrPath\n    allowedVersions\n    ignoredVersions\n    rev-prefix\n    rev-suffix\n    odd-unstable\n    patchlevel-unstable\n    ;\n  versionLister = \"${common-updater-scripts}/bin/list-archive-two-levels-versions ${\n    lib.optionalString (url != null) \"--url=${lib.escapeShellArg url}\"\n  }\";\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/http-two-levels-updater.nix","line":7,"column":1},"path":["pkgs","httpTwoLevelsUpdater"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/http-two-levels-updater.nix","line":7,"column":1},"path":["pkgs","httpTwoLevelsUpdater"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.hunspellWithDicts","path":["pkgs","hunspellWithDicts"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6382,"column":3},"attr_expr":"hunspellWithDicts =\n    dicts:\n    lib.warn \"hunspellWithDicts is deprecated, please use hunspell.withDicts instead.\"\n      hunspell.withDicts\n      (_: dicts);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6383,"column":5},"lambda_expr":"dicts:\n    lib.warn \"hunspellWithDicts is deprecated, please use hunspell.withDicts instead.\"\n      hunspell.withDicts\n      (_: dicts)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6383,"column":5},"path":["pkgs","hunspellWithDicts"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6383,"column":5},"path":["pkgs","hunspellWithDicts"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.importDubLock","path":["pkgs","importDubLock"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2180,"column":5},"attr_expr":"importDubLock","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dlang/builddubpackage/import-dub-lock.nix","line":10,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  lock,\n}:\n\nlet\n  makeDubDep =\n    {\n      pname,\n      version,\n      sha256,\n    }:\n    {\n      inherit pname version;\n      src = fetchurl {\n        name = \"dub-${pname}-${version}.zip\";\n        url = \"mirror://dub/${pname}/${version}.zip\";\n        inherit sha256;\n      };\n    };\n\n  makeGitDep =\n    {\n      pname,\n      version,\n      repository,\n      sha256,\n    }:\n    {\n      inherit pname version;\n      src = fetchgit {\n        url = repository;\n        rev = version;\n        inherit sha256;\n      };\n    };\n\n  lockJson = if lib.isPath lock then lib.importJSON lock else lock;\n  depsRaw = lib.mapAttrsToList (pname: args: { inherit pname; } // args) lockJson.dependencies;\n\n  dubDeps = map makeDubDep (lib.filter (args: !(args ? repository)) depsRaw);\n  gitDeps = map makeGitDep (lib.filter (args: args ? repository) depsRaw);\n\n  # a directory with multiple single element registries\n  # one big directory with all .zip files leads to version parsing errors\n  # when the name of a package is a prefix of the name of another package\n  dubRegistryBase = linkFarm \"dub-registry-base\" (\n    map (dep: {\n      name = \"${dep.pname}/${dep.pname}-${dep.version}.zip\";\n      path = dep.src;\n    }) dubDeps\n  );\n\nin\nrunCommand \"${pname}-${version}-dub-deps\"\n  {\n    nativeBuildInputs = [ dub ];\n  }\n  ''\n    export DUB_HOME=\"$out/.dub\"\n    mkdir -p \"$DUB_HOME\"\n    # register dub dependencies\n    ${lib.concatMapStringsSep \"\\n\" (dep: ''\n      dub fetch ${dep.pname}@${dep.version} --cache=user --skip-registry=standard --registry=file://${dubRegistryBase}/${dep.pname}\n    '') dubDeps}\n    # register git dependencies\n    ${lib.concatMapStringsSep \"\\n\" (dep: ''\n      mkdir -p \"$DUB_HOME/packages/${dep.pname}/${dep.version}\"\n      cp -r --no-preserve=all ${dep.src} \"$DUB_HOME/packages/${dep.pname}/${dep.version}/${dep.pname}\"\n    '') gitDeps}\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dlang/builddubpackage/import-dub-lock.nix","line":10,"column":1},"path":["pkgs","importDubLock"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dlang/builddubpackage/import-dub-lock.nix","line":10,"column":1},"path":["pkgs","importDubLock"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.impureUseNativeOptimizations","path":["pkgs","impureUseNativeOptimizations"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":372,"column":3},"attr_expr":"impureUseNativeOptimizations = overrideMkDerivationArgs (args: {\n    env = (args.env or { }) // {\n      NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or \"\") + \" -march=native\";\n    };\n\n    NIX_ENFORCE_NO_NATIVE = false;\n\n    preferLocalBuild = true;\n    allowSubstitutes = false;\n  });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":16},"lambda_expr":"stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = extendMkDerivationArgs old extension;\n    })","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.keepDebugInfo","path":["pkgs","keepDebugInfo"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":260,"column":3},"attr_expr":"keepDebugInfo = overrideMkDerivationArgs (args: {\n    dontStrip = true;\n    env = (args.env or { }) // {\n      NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or \"\") + \" -ggdb -Og\";\n      NIX_RUSTFLAGS = toString (args.env.NIX_RUSTFLAGS or \"\") + \" -g -C opt-level=0 -C strip=none\";\n    };\n  });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":16},"lambda_expr":"stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = extendMkDerivationArgs old extension;\n    })","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.kiro-fhsWithPackages","path":["pkgs","kiro-fhsWithPackages"],"aliases":[["pkgs","antigravity-fhsWithPackages"],["pkgs","code-cursor-fhsWithPackages"],["pkgs","vscode-fhsWithPackages"],["pkgs","vscodium-fhsWithPackages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10345,"column":3},"attr_expr":"kiro-fhsWithPackages = kiro.fhsWithPackages;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"lambda_expr":"f: fhs { additionalPkgs = f; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","kiro-fhsWithPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","kiro-fhsWithPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.libcIconv","path":["pkgs","libcIconv"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6555,"column":3},"attr_expr":"libcIconv =\n    libc:\n    let\n      inherit (libc) pname version;\n      libcDev = lib.getDev libc;\n    in\n    runCommand \"${pname}-iconv-${version}\" { strictDeps = true; } ''\n      mkdir -p $out/include\n      ln -sv ${libcDev}/include/iconv.h $out/include\n    '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6556,"column":5},"lambda_expr":"libc:\n    let\n      inherit (libc) pname version;\n      libcDev = lib.getDev libc;\n    in\n    runCommand \"${pname}-iconv-${version}\" { strictDeps = true; } ''\n      mkdir -p $out/include\n      ln -sv ${libcDev}/include/iconv.h $out/include\n    ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6556,"column":5},"path":["pkgs","libcIconv"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6556,"column":5},"path":["pkgs","libcIconv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.libqtdbusmock","path":["pkgs","libqtdbusmock"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":222,"column":10},"lambda_expr":"v:\n    if lib.isDerivation v then\n      lib.warnOnInstantiate msg v\n    else if lib.isAttrs v then\n      lib.mapAttrs (_: lib.warn msg) v\n    else if lib.isFunction v then\n      arg: lib.warn msg (v arg)\n    else if lib.isList v then\n      map (lib.warn msg) v\n    else\n      # Can’t do better than this, and a `throw` would be more\n      # disruptive for users…\n      #\n      # `nix search` flags up warnings already, so hopefully this won’t\n      # make things much worse until we have proper CI for aliases,\n      # especially since aliases of paths and numbers are presumably\n      # not common.\n      lib.warn msg v","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.libqtdbustest","path":["pkgs","libqtdbustest"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":222,"column":10},"lambda_expr":"v:\n    if lib.isDerivation v then\n      lib.warnOnInstantiate msg v\n    else if lib.isAttrs v then\n      lib.mapAttrs (_: lib.warn msg) v\n    else if lib.isFunction v then\n      arg: lib.warn msg (v arg)\n    else if lib.isList v then\n      map (lib.warn msg) v\n    else\n      # Can’t do better than this, and a `throw` would be more\n      # disruptive for users…\n      #\n      # `nix search` flags up warnings already, so hopefully this won’t\n      # make things much worse until we have proper CI for aliases,\n      # especially since aliases of paths and numbers are presumably\n      # not common.\n      lib.warn msg v","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.linkFarm","path":["pkgs","linkFarm"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":625,"column":3},"attr_expr":"linkFarm =\n    name: entries:\n    let\n      entries' =\n        if (lib.isAttrs entries) then\n          entries\n        # We do this foldl to have last-wins semantics in case of repeated entries\n        else if (lib.isList entries) then\n          foldl' (a: b: a // { \"${b.name}\" = b.path; }) { } entries\n        else\n          throw \"linkFarm entries must be either attrs or a list!\";\n\n      linkCommands = lib.mapAttrsToList (name: path: ''\n        mkdir -p -- \"$(dirname -- ${lib.escapeShellArg \"${name}\"})\"\n        ln -s -- ${lib.escapeShellArg \"${path}\"} ${lib.escapeShellArg \"${name}\"}\n      '') entries';\n    in\n    runCommand name\n      {\n        # Get the position from the `entries` attrset if it exists.\n        # This is the best we can do since the other attrs are either defined here, or curried values that\n        # we cannot extract a position from\n        pos =\n          if (lib.isAttrs entries) && (entries != { }) then\n            builtins.unsafeGetAttrPos (builtins.head (builtins.attrNames entries)) entries\n          else\n            null;\n        preferLocalBuild = true;\n        allowSubstitutes = false;\n        passthru.entries = entries';\n      }\n      ''\n        mkdir -p $out\n        cd $out\n        ${lib.concatStrings linkCommands}\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":626,"column":5},"lambda_expr":"linkFarm =\n    name: entries:\n    let\n      entries' =\n        if (lib.isAttrs entries) then\n          entries\n        # We do this foldl to have last-wins semantics in case of repeated entries\n        else if (lib.isList entries) then\n          foldl' (a: b: a // { \"${b.name}\" = b.path; }) { } entries\n        else\n          throw \"linkFarm entries must be either attrs or a list!\";\n\n      linkCommands = lib.mapAttrsToList (name: path: ''\n        mkdir -p -- \"$(dirname -- ${lib.escapeShellArg \"${name}\"})\"\n        ln -s -- ${lib.escapeShellArg \"${path}\"} ${lib.escapeShellArg \"${name}\"}\n      '') entries';\n    in\n    runCommand name\n      {\n        # Get the position from the `entries` attrset if it exists.\n        # This is the best we can do since the other attrs are either defined here, or curried values that\n        # we cannot extract a position from\n        pos =\n          if (lib.isAttrs entries) && (entries != { }) then\n            builtins.unsafeGetAttrPos (builtins.head (builtins.attrNames entries)) entries\n          else\n            null;\n        preferLocalBuild = true;\n        allowSubstitutes = false;\n        passthru.entries = entries';\n      }\n      ''\n        mkdir -p $out\n        cd $out\n        ${lib.concatStrings linkCommands}\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":626,"column":5},"path":["pkgs","linkFarm"],"pos_type":"Lambda"}},"content":{"content":"\nQuickly create a set of symlinks to derivations.\n\nThis creates a simple derivation with symlinks to all inputs.\n\nentries can be a list of attribute sets like\n\n[ { name = \"name\" ; path = \"/nix/store/...\"; } ]\n\nor an attribute set name -> path like:\n\n{ name = \"/nix/store/...\"; other = \"/nix/store/...\"; }\n\nExample:\n\n# Symlinks hello and stack paths in store to current $out/hello-test and\n# $out/foobar.\nlinkFarm \"myexample\" [ { name = \"hello-test\"; path = pkgs.hello; } { name = \"foobar\"; path = pkgs.stack; } ]\n\nThis creates a derivation with a directory structure like the following:\n\n/nix/store/qc5728m4sa344mbks99r3q05mymwm4rw-myexample\n|-- foobar -> /nix/store/6lzdpxshx78281vy056lbk553ijsdr44-stack-2.1.3.1\n`-- hello-test -> /nix/store/qy93dp4a3rqyn2mz63fbxjg228hffwyw-hello-2.10\n\nSee the note on symlinkJoin for the difference between linkFarm and symlinkJoin.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":626,"column":5},"path":["pkgs","linkFarm"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.linkFarmFromDrvs","path":["pkgs","linkFarmFromDrvs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":682,"column":3},"attr_expr":"linkFarmFromDrvs =\n    name: drvs:\n    let\n      mkEntryFromDrv = drv: {\n        name = drv.name;\n        path = drv;\n      };\n    in\n    linkFarm name (map mkEntryFromDrv drvs);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":683,"column":5},"lambda_expr":"linkFarmFromDrvs =\n    name: drvs:\n    let\n      mkEntryFromDrv = drv: {\n        name = drv.name;\n        path = drv;\n      };\n    in\n    linkFarm name (map mkEntryFromDrv drvs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":683,"column":5},"path":["pkgs","linkFarmFromDrvs"],"pos_type":"Lambda"}},"content":{"content":"\nEasily create a linkFarm from a set of derivations.\n\nThis calls linkFarm with a list of entries created from the list of input\nderivations.  It turns each input derivation into an attribute set\nlike { name = drv.name ; path = drv }, and passes this to linkFarm.\n\nExample:\n\n# Symlinks the hello, gcc, and ghc derivations in $out\nlinkFarmFromDrvs \"myexample\" [ pkgs.hello pkgs.gcc pkgs.ghc ]\n\nThis creates a derivation with a directory structure like the following:\n\n/nix/store/m3s6wkjy9c3wy830201bqsb91nk2yj8c-myexample\n|-- gcc-wrapper-9.2.0 -> /nix/store/fqhjxf9ii4w4gqcsx59fyw2vvj91486a-gcc-wrapper-9.2.0\n|-- ghc-8.6.5 -> /nix/store/gnf3s07bglhbbk4y6m76sbh42siym0s6-ghc-8.6.5\n`-- hello-2.10 -> /nix/store/k0ll91c4npk4lg8lqhx00glg2m735g74-hello-2.10\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":683,"column":5},"path":["pkgs","linkFarmFromDrvs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.linuxConfig","path":["pkgs","linuxConfig"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8344,"column":36},"attr_expr":"linuxConfig","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":768,"column":5},"lambda_expr":"linuxConfig =\n    {\n      src,\n      kernelPatches ? [ ],\n      version ? (builtins.parseDrvName src.name).version,\n      makeTarget ? \"defconfig\",\n      name ? \"kernel.config\",\n    }:\n    stdenvNoCC.mkDerivation {\n      inherit name src;\n      depsBuildBuild = [\n        buildPackages.stdenv.cc\n      ]\n      ++ lib.optionals (lib.versionAtLeast version \"4.16\") [\n        buildPackages.bison\n        buildPackages.flex\n      ];\n      patches = map (p: p.patch) kernelPatches; # Patches may include new configs.\n      postPatch = ''\n        patchShebangs scripts/\n      '';\n      buildPhase = ''\n        set -x\n        make \\\n          ARCH=${stdenv.hostPlatform.linuxArch} \\\n          HOSTCC=${buildPackages.stdenv.cc.targetPrefix}gcc \\\n          ${makeTarget}\n      '';\n      installPhase = ''\n        cp .config $out\n      '';\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":768,"column":5},"path":["pkgs","linuxConfig"],"pos_type":"Lambda"}},"content":{"content":"Derive one of the default .config files","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":768,"column":5},"path":["pkgs","linuxConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.linuxManualConfig","path":["pkgs","linuxManualConfig"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8350,"column":3},"attr_expr":"linuxManualConfig = linuxKernel.manualConfig;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","linuxManualConfig"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","linuxManualConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.linuxPackagesFor","path":["pkgs","linuxPackagesFor"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8348,"column":3},"attr_expr":"linuxPackagesFor = linuxKernel.packagesFor;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":256,"column":5},"lambda_expr":"packagesFor =\n    kernel_:\n    (lib.makeExtensible (\n      self:\n      with self;\n      let\n        callPackage = newScope self;\n      in\n      {\n        inherit callPackage;\n        kernel = kernel_;\n        inherit (kernel) stdenv; # in particular, use the same compiler by default\n\n        # to help determine module compatibility\n        inherit (kernel)\n          isLTS\n          isZen\n          ;\n        inherit (kernel) kernelOlder kernelAtLeast;\n        kernelModuleMakeFlags = self.kernel.commonMakeFlags ++ [\n          \"KBUILD_OUTPUT=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build\"\n        ];\n        # Obsolete aliases (these packages do not depend on the kernel).\n        inherit (pkgs) odp-dpdk pktgen; # added 2018-05\n        inherit (pkgs) bcc bpftrace; # added 2021-12\n        inherit (pkgs) oci-seccomp-bpf-hook; # added 2022-11\n        inherit (pkgs) dpdk; # added 2024-03\n\n        acer-wmi-battery = callPackage ../os-specific/linux/acer-wmi-battery { };\n\n        acpi_call = callPackage ../os-specific/linux/acpi-call { };\n\n        ajantv2 = callPackage ../os-specific/linux/ajantv2 { };\n\n        akvcam = callPackage ../os-specific/linux/akvcam { };\n\n        amdgpu-i2c = callPackage ../os-specific/linux/amdgpu-i2c { };\n\n        amneziawg = callPackage ../os-specific/linux/amneziawg { };\n\n        apfs = callPackage ../os-specific/linux/apfs { };\n\n        ax99100 = callPackage ../os-specific/linux/ax99100 { };\n\n        batman_adv = callPackage ../os-specific/linux/batman-adv { };\n\n        bbswitch = callPackage ../os-specific/linux/bbswitch { };\n\n        # NOTE: The bcachefs module is called this way to facilitate\n        # easy overriding, as it is expected many users will want to\n        # pull from the upstream git repo, which may include\n        # unreleased changes to the module build process.\n        bcachefs = callPackage pkgs.bcachefs-tools.kernelModule { };\n\n        ch9344 = callPackage ../os-specific/linux/ch9344 { };\n\n        chipsec = callPackage ../by-name/ch/chipsec/package.nix {\n          inherit kernel;\n          withDriver = true;\n        };\n\n        cryptodev = callPackage ../os-specific/linux/cryptodev { };\n\n        cpupower = callPackage ../os-specific/linux/cpupower { };\n\n        ddcci-driver = callPackage ../os-specific/linux/ddcci { };\n\n        dddvb = callPackage ../os-specific/linux/dddvb { };\n\n        decklink = callPackage ../os-specific/linux/decklink { };\n\n        digimend = callPackage ../os-specific/linux/digimend { };\n\n        dpdk-kmods = callPackage ../os-specific/linux/dpdk-kmods { };\n\n        ecapture = callPackage ../by-name/ec/ecapture/package.nix {\n          withNonBTF = true;\n          inherit kernel;\n        };\n\n        evdi = callPackage ../os-specific/linux/evdi { };\n\n        fanout = callPackage ../os-specific/linux/fanout { };\n\n        framework-laptop-kmod = callPackage ../os-specific/linux/framework-laptop-kmod { };\n\n        fwts-efi-runtime = callPackage ../os-specific/linux/fwts/module.nix { };\n\n        gasket = callPackage ../os-specific/linux/gasket { };\n\n        gcadapter-oc-kmod = callPackage ../os-specific/linux/gcadapter-oc-kmod { };\n\n        hyperv-daemons = callPackage ../os-specific/linux/hyperv-daemons { };\n\n        e1000e =\n          if lib.versionOlder kernel.version \"4.10\" then\n            callPackage ../os-specific/linux/e1000e { }\n          else\n            null;\n\n        iio-utils =\n          if lib.versionAtLeast kernel.version \"4.1\" then\n            callPackage ../os-specific/linux/iio-utils { }\n          else\n            null;\n\n        intel-speed-select =\n          if lib.versionAtLeast kernel.version \"5.3\" then\n            callPackage ../os-specific/linux/intel-speed-select { }\n          else\n            null;\n\n        ipu6-drivers = callPackage ../os-specific/linux/ipu6-drivers { };\n\n        ivsc-driver = callPackage ../os-specific/linux/ivsc-driver { };\n\n        ixgbevf = callPackage ../os-specific/linux/ixgbevf { };\n\n        it87 = callPackage ../os-specific/linux/it87 { };\n\n        asus-ec-sensors = callPackage ../os-specific/linux/asus-ec-sensors { };\n\n        ena = callPackage ../os-specific/linux/ena { };\n\n        lenovo-legion-module = callPackage ../os-specific/linux/lenovo-legion { };\n\n        linux-gpib = callPackage ../applications/science/electronics/linux-gpib/kernel.nix { };\n\n        liquidtux = callPackage ../os-specific/linux/liquidtux { };\n\n        lkrg = callPackage ../os-specific/linux/lkrg { };\n\n        v4l2loopback = callPackage ../os-specific/linux/v4l2loopback { };\n\n        lttng-modules = callPackage ../os-specific/linux/lttng-modules { };\n\n        mstflint_access = callPackage ../os-specific/linux/mstflint_access { };\n\n        broadcom_sta = callPackage ../os-specific/linux/broadcom-sta { };\n\n        tbs = callPackage ../os-specific/linux/tbs { };\n\n        mbp2018-bridge-drv = callPackage ../os-specific/linux/mbp-modules/mbp2018-bridge-drv { };\n\n        nct6687d = callPackage ../os-specific/linux/nct6687d { };\n\n        hid-fanatecff = callPackage ../os-specific/linux/hid-fanatecff { };\n\n        new-lg4ff = callPackage ../os-specific/linux/new-lg4ff { };\n\n        zenergy = callPackage ../os-specific/linux/zenergy { };\n\n        nvidiabl = callPackage ../os-specific/linux/nvidiabl { };\n\n        nvidiaPackages = dontRecurseIntoAttrs (\n          lib.makeExtensible (_: callPackage ../os-specific/linux/nvidia-x11 { })\n        );\n\n        nvidia_x11 = nvidiaPackages.stable;\n        nvidia_x11_beta = nvidiaPackages.beta;\n        nvidia_x11_latest = nvidiaPackages.latest;\n        nvidia_x11_legacy340 = nvidiaPackages.legacy_340;\n        nvidia_x11_legacy390 = nvidiaPackages.legacy_390;\n        nvidia_x11_legacy470 = nvidiaPackages.legacy_470;\n        nvidia_x11_legacy535 = nvidiaPackages.legacy_535;\n        nvidia_x11_production = nvidiaPackages.production;\n        nvidia_x11_vulkan_beta = nvidiaPackages.vulkan_beta;\n        nvidia_dc = nvidiaPackages.dc;\n\n        # this is not a replacement for nvidia_x11*\n        # only the opensource kernel driver exposed for hydra to build\n        nvidia_x11_beta_open = nvidiaPackages.beta.open;\n        nvidia_x11_latest_open = nvidiaPackages.latest.open;\n        nvidia_x11_production_open = nvidiaPackages.production.open;\n        nvidia_x11_stable_open = nvidiaPackages.stable.open;\n        nvidia_x11_vulkan_beta_open = nvidiaPackages.vulkan_beta.open;\n\n        nxp-pn5xx = callPackage ../os-specific/linux/nxp-pn5xx { };\n\n        openrazer = callPackage ../os-specific/linux/openrazer/driver.nix { };\n\n        ply = callPackage ../os-specific/linux/ply { };\n\n        r8125 = callPackage ../os-specific/linux/r8125 { };\n\n        r8168 = callPackage ../os-specific/linux/r8168 { };\n\n        rtl8188eus-aircrack = callPackage ../os-specific/linux/rtl8188eus-aircrack { };\n\n        rtl8192eu = callPackage ../os-specific/linux/rtl8192eu { };\n\n        rtl8189es = callPackage ../os-specific/linux/rtl8189es { };\n\n        rtl8189fs = callPackage ../os-specific/linux/rtl8189fs { };\n\n        rtl8723ds = callPackage ../os-specific/linux/rtl8723ds { };\n\n        rtl8812au = callPackage ../os-specific/linux/rtl8812au { };\n\n        rtl8814au = callPackage ../os-specific/linux/rtl8814au { };\n\n        rtl8852au = callPackage ../os-specific/linux/rtl8852au { };\n\n        rtl8852bu = callPackage ../os-specific/linux/rtl8852bu { };\n\n        rtl88xxau-aircrack = callPackage ../os-specific/linux/rtl88xxau-aircrack { };\n\n        rtl8821au = callPackage ../os-specific/linux/rtl8821au { };\n\n        rtl8821ce = callPackage ../os-specific/linux/rtl8821ce { };\n\n        rtl88x2bu = callPackage ../os-specific/linux/rtl88x2bu { };\n\n        rtl8821cu = callPackage ../os-specific/linux/rtl8821cu { };\n\n        rtw88 = callPackage ../os-specific/linux/rtw88 { };\n\n        rtw89 =\n          if lib.versionOlder kernel.version \"5.16\" then callPackage ../os-specific/linux/rtw89 { } else null;\n\n        openafs_1_8 = callPackage ../by-name/op/openafs/module.nix { };\n        # Current stable release; don't backport release updates!\n        openafs = openafs_1_8;\n\n        opensnitch-ebpf =\n          if lib.versionAtLeast kernel.version \"5.10\" then\n            callPackage ../os-specific/linux/opensnitch-ebpf { }\n          else\n            null;\n\n        facetimehd = callPackage ../os-specific/linux/facetimehd { };\n\n        rust-out-of-tree-module =\n          if lib.versionAtLeast kernel.version \"6.7\" then\n            callPackage ../os-specific/linux/rust-out-of-tree-module { }\n          else\n            null;\n\n        tuxedo-drivers =\n          if lib.versionAtLeast kernel.version \"4.14\" then\n            callPackage ../os-specific/linux/tuxedo-drivers { }\n          else\n            null;\n\n        jool = callPackage ../os-specific/linux/jool { };\n\n        kvmfr = callPackage ../os-specific/linux/kvmfr { };\n\n        mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { };\n\n        mdio-netlink = callPackage ../os-specific/linux/mdio-netlink { };\n\n        mwprocapture = callPackage ../os-specific/linux/mwprocapture { };\n\n        mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { };\n\n        morse-driver = callPackage ../os-specific/linux/morse-driver { };\n\n        # compiles but has to be integrated into the kernel somehow\n        # Let's have it uncommented and finish it..\n        ndiswrapper = callPackage ../os-specific/linux/ndiswrapper { };\n\n        netatop = callPackage ../os-specific/linux/netatop { };\n\n        isgx = callPackage ../os-specific/linux/isgx { };\n\n        rr-zen_workaround = callPackage ../development/tools/analysis/rr/zen_workaround.nix { };\n\n        sheep-net = callPackage ../os-specific/linux/sheep-net { };\n\n        shufflecake = callPackage ../os-specific/linux/shufflecake { };\n\n        sysdig = callPackage ../os-specific/linux/sysdig { };\n\n        systemtap = callPackage ../development/tools/profiling/systemtap { };\n\n        system76 = callPackage ../os-specific/linux/system76 { };\n\n        system76-acpi = callPackage ../os-specific/linux/system76-acpi { };\n\n        system76-io = callPackage ../os-specific/linux/system76-io { };\n\n        tmon = callPackage ../os-specific/linux/tmon { };\n\n        tp_smapi = callPackage ../os-specific/linux/tp_smapi { };\n\n        tt-kmd = callPackage ../os-specific/linux/tt-kmd { };\n\n        turbostat = callPackage ../os-specific/linux/turbostat { };\n\n        corefreq = callPackage ../os-specific/linux/corefreq { };\n\n        trelay = callPackage ../os-specific/linux/trelay { };\n\n        universal-pidff = callPackage ../os-specific/linux/universal-pidff { };\n\n        usbip = callPackage ../os-specific/linux/usbip { };\n\n        v86d = callPackage ../os-specific/linux/v86d { };\n\n        veikk-linux-driver = callPackage ../os-specific/linux/veikk-linux-driver { };\n        vendor-reset = callPackage ../os-specific/linux/vendor-reset { };\n\n        vhba = callPackage ../applications/emulators/cdemu/vhba.nix { };\n\n        virtio_vmmci = callPackage ../os-specific/linux/virtio_vmmci { };\n\n        virtualbox = callPackage ../os-specific/linux/virtualbox {\n          virtualbox = pkgs.virtualboxHardened;\n        };\n\n        virtualboxGuestAdditions =\n          callPackage ../applications/virtualization/virtualbox/guest-additions\n            { };\n\n        mm-tools = callPackage ../os-specific/linux/mm-tools { };\n\n        vmm_clock = callPackage ../os-specific/linux/vmm_clock { };\n\n        vmware = callPackage ../os-specific/linux/vmware { };\n\n        wireguard =\n          if lib.versionOlder kernel.version \"5.6\" then\n            callPackage ../os-specific/linux/wireguard { }\n          else\n            null;\n\n        x86_energy_perf_policy = callPackage ../os-specific/linux/x86_energy_perf_policy { };\n\n        xone =\n          if lib.versionAtLeast kernel.version \"5.4\" then callPackage ../os-specific/linux/xone { } else null;\n\n        xpadneo = callPackage ../os-specific/linux/xpadneo { };\n\n        yt6801 = callPackage ../os-specific/linux/yt6801 { };\n\n        ithc = callPackage ../os-specific/linux/ithc { };\n\n        ryzen-smu = callPackage ../os-specific/linux/ryzen-smu { };\n\n        zenpower = callPackage ../os-specific/linux/zenpower { };\n\n        zfs_2_3 = callPackage ../os-specific/linux/zfs/2_3.nix {\n          configFile = \"kernel\";\n          inherit pkgs kernel;\n        };\n        zfs_2_4 = callPackage ../os-specific/linux/zfs/2_4.nix {\n          configFile = \"kernel\";\n          inherit pkgs kernel;\n        };\n        zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix {\n          configFile = \"kernel\";\n          inherit pkgs kernel;\n        };\n\n        can-isotp = callPackage ../os-specific/linux/can-isotp { };\n\n        qc71_laptop = callPackage ../os-specific/linux/qc71_laptop { };\n\n        hid-ite8291r3 = callPackage ../os-specific/linux/hid-ite8291r3 { };\n\n        hid-t150 = callPackage ../os-specific/linux/hid-t150 { };\n\n        hid-tmff2 = callPackage ../os-specific/linux/hid-tmff2 { };\n\n        hpuefi-mod = callPackage ../os-specific/linux/hpuefi-mod { };\n\n        drbd = callPackage ../by-name/dr/drbd/driver.nix { };\n\n        nullfsvfs = callPackage ../os-specific/linux/nullfsvfs { };\n\n        msi-ec = callPackage ../os-specific/linux/msi-ec { };\n\n        tsme-test = callPackage ../os-specific/linux/tsme-test { };\n\n        xpad-noone = callPackage ../os-specific/linux/xpad-noone { };\n\n      }\n      // lib.optionalAttrs config.allowAliases {\n        zfs = throw \"linuxPackages.zfs has been removed, use zfs_* instead, or linuxPackages.\\${pkgs.zfs.kernelModuleAttribute}\"; # added 2025-01-23\n        zfs_2_1 = throw \"zfs_2_1 has been removed\"; # added 2024-12-25;\n        ati_drivers_x11 = throw \"ati drivers are no longer supported by any kernel >=4.1\"; # added 2021-05-18;\n        deepin-anything-module = throw \"the Deepin desktop environment and associated tools have been removed from nixpkgs due to lack of maintenance\";\n        exfat-nofuse = throw \"exfat-nofuse has been removed, all kernels > 5.8 come with built-in exfat support\"; # added 2025-10-07\n        hid-nintendo = throw \"hid-nintendo was added in mainline kernel version 5.16\"; # Added 2023-07-30\n        sch_cake = throw \"sch_cake was added in mainline kernel version 4.19\"; # Added 2023-06-14\n        rtl8723bs = throw \"rtl8723bs was added in mainline kernel version 4.12\"; # Added 2023-06-14\n        vm-tools = self.mm-tools;\n        xmm7360-pci = throw \"Support for the XMM7360 WWAN card was added to the iosm kmod in mainline kernel version 5.18\";\n        amdgpu-pro = throw \"amdgpu-pro was removed due to lack of maintenance\"; # Added 2024-06-16\n        kvdo = throw \"kvdo was removed, because it was added to mainline in kernel version 6.9\"; # Added 2024-07-08\n        perf = lib.warnOnInstantiate \"linuxPackages.perf is now perf\" pkgs.perf; # Added 2025-08-28\n        system76-power = lib.warnOnInstantiate \"kernelPackages.system76-power is now pkgs.system76-power\" pkgs.system76-power; # Added 2024-10-16\n        system76-scheduler = lib.warnOnInstantiate \"kernelPackages.system76-scheduler is now pkgs.system76-scheduler\" pkgs.system76-scheduler; # Added 2024-10-16\n        tuxedo-keyboard = self.tuxedo-drivers; # Added 2024-09-28\n        nullfs = self.nullfsvfs; # Added 2026-05-16\n        phc-intel = throw \"phc-intel drivers are no longer supported by any kernel >=4.17\"; # added 2025-07-18\n        prl-tools = throw \"Parallel Tools no longer provide any kernel module, please use pkgs.prl-tools instead.\"; # added 2025-10-04\n        nvidia_dc_565 = throw \"nvidiaPackages.dc_565 has reached end of life, see https://endoflife.date/nvidia\"; # added 2026-02-10\n        nvidia_dc_535 = throw \"nvidiaPackages.dc_535 removed, soon reaches end of life, see https://endoflife.date/nvidia\"; # added 2026-03-08\n      }\n    )).extend\n      (lib.fixedPoints.composeManyExtensions kernelPackagesExtensions);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":256,"column":5},"path":["pkgs","linuxPackagesFor"],"pos_type":"Lambda"}},"content":{"content":"\nLinux kernel modules are inherently tied to a specific kernel.  So\nrather than provide specific instances of those packages for a\nspecific kernel, we have a function that builds those packages\nfor a specific kernel.  This function can then be called for\nwhatever kernel you're using.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":256,"column":5},"path":["pkgs","linuxPackagesFor"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.linuxPackages_custom","path":["pkgs","linuxPackages_custom"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8352,"column":3},"attr_expr":"linuxPackages_custom = linuxKernel.customPackage;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":747,"column":5},"lambda_expr":"{\n      version,\n      src,\n      modDirVersion ? lib.versions.pad 3 version,\n      configfile,\n      allowImportFromDerivation ? false,\n    }:\n    recurseIntoAttrs (\n      packagesFor (manualConfig {\n        inherit\n          version\n          src\n          modDirVersion\n          configfile\n          allowImportFromDerivation\n          ;\n      })\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":747,"column":5},"path":["pkgs","linuxPackages_custom"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/linux-kernels.nix","line":747,"column":5},"path":["pkgs","linuxPackages_custom"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.lowPrio","path":["pkgs","lowPrio"],"aliases":[["pkgs","dontRecurseIntoAttrs"],["pkgs","forceSystem"],["pkgs","hiPrio"],["pkgs","makeOverridable"],["pkgs","recurseIntoAttrs"],["pkgs","runCommandNoCC"],["pkgs","runCommandNoCCLocal"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","lowPrio"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","lowPrio"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeAutostartItem","path":["pkgs","makeAutostartItem"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":780,"column":3},"attr_expr":"makeAutostartItem = callPackage ../build-support/make-startupitem { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-startupitem/default.nix","line":5,"column":1},"lambda_expr":"{\n  name, # name of the desktop file (without .desktop)\n  package, # package where the desktop file resides in\n  srcPrefix ? \"\", # additional prefix that the desktop file may have in the 'package'\n  after ? null,\n  condition ? null,\n  phase ? \"2\",\n  prependExtraArgs ? [ ],\n  appendExtraArgs ? [ ],\n}:\n\n# the builder requires that\n#   $package/share/applications/$name.desktop\n# exists as file.\n\nstdenv.mkDerivation {\n  name = \"autostart-${name}\";\n  priority = 5;\n\n  buildCommand =\n    let\n      escapeArgs = args: lib.escapeRegex (lib.escapeShellArgs args);\n      prependArgs = lib.optionalString (prependExtraArgs != [ ]) \"${escapeArgs prependExtraArgs} \";\n      appendArgs = lib.optionalString (appendExtraArgs != [ ]) \" ${escapeArgs appendExtraArgs}\";\n    in\n    ''\n      mkdir -p $out/etc/xdg/autostart\n      target=${name}.desktop\n      cp ${package}/share/applications/${srcPrefix}${name}.desktop $target\n      ${lib.optionalString (prependExtraArgs != [ ] || appendExtraArgs != [ ]) ''\n        sed -i -r \"s/(Exec=)([^ \\n]*) *(.*)/\\1\\2 ${prependArgs}\\3${appendArgs}/\" $target\n      ''}\n      chmod +rw $target\n      echo \"X-KDE-autostart-phase=${phase}\" >> $target\n      ${lib.optionalString (after != null) ''echo \"${after}\" >> $target''}\n      ${lib.optionalString (condition != null) ''echo \"${condition}\" >> $target''}\n      cp $target $out/etc/xdg/autostart\n    '';\n\n  # this will automatically put 'package' in the environment when you\n  # put its startup item in there.\n  propagatedBuildInputs = [ package ];\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-startupitem/default.nix","line":5,"column":1},"path":["pkgs","makeAutostartItem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-startupitem/default.nix","line":5,"column":1},"path":["pkgs","makeAutostartItem"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeDarwinBundle","path":["pkgs","makeDarwinBundle"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":778,"column":3},"attr_expr":"makeDarwinBundle = callPackage ../build-support/make-darwin-bundle { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-darwin-bundle/default.nix","line":12,"column":1},"lambda_expr":"{\n  name, # The name of the Application file.\n  exec, # Executable file.\n  icon ? \"\", # Optional icon file.\n}:\n\nwriteShellScript \"make-darwin-bundle-${name}\" ''\n  function makeDarwinBundlePhase() {\n    mkdir -p \"''${!outputBin}/Applications/${name}.app/Contents/MacOS\"\n    mkdir -p \"''${!outputBin}/Applications/${name}.app/Contents/Resources\"\n\n    if [ -n \"${icon}\" ]; then\n      ln -s \"${icon}\" \"''${!outputBin}/Applications/${name}.app/Contents/Resources\"\n    fi\n\n    ${writeDarwinBundle}/bin/write-darwin-bundle \"''${!outputBin}\" \"${name}\" \"${exec}\"\n  }\n\n  appendToVar preDistPhases makeDarwinBundlePhase\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-darwin-bundle/default.nix","line":12,"column":1},"path":["pkgs","makeDarwinBundle"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-darwin-bundle/default.nix","line":12,"column":1},"path":["pkgs","makeDarwinBundle"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeDesktopItem","path":["pkgs","makeDesktopItem"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":756,"column":3},"attr_expr":"makeDesktopItem = callPackage ../build-support/make-desktopitem { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-desktopitem/default.nix","line":76,"column":3},"lambda_expr":"{\n    name, # The name of the desktop file\n    destination ? \"/share/applications\",\n    type ? \"Application\",\n    # version is hardcoded\n    desktopName, # The name of the application\n    genericName ? null,\n    noDisplay ? null,\n    comment ? null,\n    icon ? null,\n    # we don't support the Hidden key - if you don't need something, just don't install it\n    onlyShowIn ? [ ],\n    notShowIn ? [ ],\n    dbusActivatable ? null,\n    tryExec ? null,\n    exec ? null,\n    path ? null,\n    terminal ? null,\n    actions ? { }, # An attrset of [internal name] -> { name, exec?, icon? }\n    mimeTypes ? [ ], # The spec uses \"MimeType\" as singular, use plural here to signify list-ness\n    categories ? [ ],\n    implements ? [ ],\n    keywords ? [ ],\n    startupNotify ? null,\n    startupWMClass ? null,\n    url ? null,\n    prefersNonDefaultGPU ? null,\n    singleMainWindow ? null,\n    extraConfig ? { }, # Additional values to be added literally to the final item, e.g. vendor extensions\n  }:\n  let\n    # There are multiple places in the FDO spec that make \"boolean\" values actually tristate,\n    # e.g. StartupNotify, where \"unset\" is literally defined as \"do something reasonable\".\n    # So, handle null values separately.\n    boolOrNullToString =\n      value:\n      if value == null then\n        null\n      else if builtins.isBool value then\n        lib.boolToString value\n      else\n        throw \"makeDesktopItem: value must be a boolean or null!\";\n\n    # Multiple values are represented as one string, joined by semicolons.\n    # Technically, it's possible to escape semicolons in values with \\;, but this is currently not implemented.\n    renderList =\n      key: value:\n      if !builtins.isList value then\n        throw \"makeDesktopItem: value for ${key} must be a list!\"\n      else if builtins.any (item: lib.hasInfix \";\" item) value then\n        throw \"makeDesktopItem: values in ${key} list must not contain semicolons!\"\n      else if value == [ ] then\n        null\n      else\n        builtins.concatStringsSep \";\" value;\n\n    # The [Desktop Entry] section of the desktop file, as an attribute set.\n    # Please keep in spec order.\n    mainSection = {\n      \"Type\" = type;\n      \"Version\" = \"1.5\";\n      \"Name\" = desktopName;\n      \"GenericName\" = genericName;\n      \"NoDisplay\" = boolOrNullToString noDisplay;\n      \"Comment\" = comment;\n      \"Icon\" = icon;\n      \"OnlyShowIn\" = renderList \"onlyShowIn\" onlyShowIn;\n      \"NotShowIn\" = renderList \"notShowIn\" notShowIn;\n      \"DBusActivatable\" = boolOrNullToString dbusActivatable;\n      \"TryExec\" = tryExec;\n      \"Exec\" = exec;\n      \"Path\" = path;\n      \"Terminal\" = boolOrNullToString terminal;\n      \"Actions\" = renderList \"actions\" (builtins.attrNames actions);\n      \"MimeType\" = renderList \"mimeTypes\" mimeTypes;\n      \"Categories\" = renderList \"categories\" categories;\n      \"Implements\" = renderList \"implements\" implements;\n      \"Keywords\" = renderList \"keywords\" keywords;\n      \"StartupNotify\" = boolOrNullToString startupNotify;\n      \"StartupWMClass\" = startupWMClass;\n      \"URL\" = url;\n      \"PrefersNonDefaultGPU\" = boolOrNullToString prefersNonDefaultGPU;\n      \"SingleMainWindow\" = boolOrNullToString singleMainWindow;\n    }\n    // extraConfig;\n\n    # Render a single attribute pair to a Key=Value line.\n    # FIXME: this isn't entirely correct for arbitrary strings, as some characters\n    # need to be escaped. There are currently none in nixpkgs though, so this is OK.\n    renderLine = name: value: if value != null then \"${name}=${value}\" else null;\n\n    # Render a full section of the file from an attrset.\n    # Null values are intentionally left out.\n    renderSection =\n      sectionName: attrs:\n      lib.pipe attrs [\n        (lib.mapAttrsToList renderLine)\n        (builtins.filter (v: v != null))\n        (builtins.concatStringsSep \"\\n\")\n        (section: ''\n          [${sectionName}]\n          ${section}\n        '')\n      ];\n\n    mainSectionRendered = renderSection \"Desktop Entry\" mainSection;\n\n    # Convert from javaCase names as used in Nix to PascalCase as used in the spec.\n    preprocessAction =\n      {\n        name,\n        icon ? null,\n        exec ? null,\n      }:\n      {\n        \"Name\" = name;\n        \"Icon\" = icon;\n        \"Exec\" = exec;\n      };\n    renderAction = name: attrs: renderSection \"Desktop Action ${name}\" (preprocessAction attrs);\n    actionsRendered = lib.mapAttrsToList renderAction actions;\n\n    extension = if type == \"Directory\" then \"directory\" else \"desktop\";\n    content = [ mainSectionRendered ] ++ actionsRendered;\n  in\n  writeTextFile {\n    name = \"${name}.${extension}\";\n    destination = \"${destination}/${name}.${extension}\";\n    text = builtins.concatStringsSep \"\\n\" content;\n    checkPhase = ''${buildPackages.desktop-file-utils}/bin/desktop-file-validate \"$target\"'';\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-desktopitem/default.nix","line":76,"column":3},"path":["pkgs","makeDesktopItem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-desktopitem/default.nix","line":76,"column":3},"path":["pkgs","makeDesktopItem"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeFontsCache","path":["pkgs","makeFontsCache"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6139,"column":3},"attr_expr":"makeFontsCache = callPackage ../development/libraries/fontconfig/make-fonts-cache.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/fontconfig/make-fonts-cache.nix","line":12,"column":1},"lambda_expr":"{\n  fontconfig ? fontconfig',\n  fontDirectories,\n}:\n\nlet\n  fontDirsPath = writeText \"font-dirs\" ''\n    <!-- Font directories -->\n    ${lib.concatStringsSep \"\\n\" (map (font: \"<dir>${font}</dir>\") fontDirectories)}\n  '';\nin\nrunCommand \"fc-cache\"\n  {\n    preferLocalBuild = true;\n    allowSubstitutes = false;\n  }\n  ''\n    export FONTCONFIG_FILE=$(pwd)/fonts.conf\n\n    cat > fonts.conf << EOF\n    <?xml version='1.0'?>\n    <!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>\n    <fontconfig>\n      <include>${fontconfig.out}/etc/fonts/fonts.conf</include>\n      <cachedir>$out</cachedir>\n    EOF\n    cat \"${fontDirsPath}\" >> fonts.conf\n    echo \"</fontconfig>\" >> fonts.conf\n\n    # N.B.: fc-cache keys its cache entries by architecture.\n    # We must invoke the host `fc-cache` (not the build fontconfig) if we want\n    # the cache to be usable by the host.\n    mkdir -p $out\n    ${stdenv.hostPlatform.emulator buildPackages} ${lib.getExe' fontconfig \"fc-cache\"} -sv\n\n    # This is not a cache dir in the normal sense -- it won't be automatically\n    # recreated.\n    rm -f \"$out/CACHEDIR.TAG\"\n  ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/fontconfig/make-fonts-cache.nix","line":12,"column":1},"path":["pkgs","makeFontsCache"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/fontconfig/make-fonts-cache.nix","line":12,"column":1},"path":["pkgs","makeFontsCache"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeFontsConf","path":["pkgs","makeFontsConf"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6137,"column":3},"attr_expr":"makeFontsConf = callPackage ../development/libraries/fontconfig/make-fonts-conf.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/fontconfig/make-fonts-conf.nix","line":13,"column":1},"lambda_expr":"{\n  fontconfig ? fontconfig_,\n  # an array of fonts, e.g. `[ pkgs.dejavu_fonts.minimal ]`\n  fontDirectories,\n  impureFontDirectories ? [\n    # nix user profile\n    \"~/.nix-profile/lib/X11/fonts\"\n    \"~/.nix-profile/share/fonts\"\n  ]\n  ++ lib.optional stdenv.hostPlatform.isDarwin \"~/Library/Fonts\"\n  ++ [\n    # FHS paths for non-NixOS platforms\n    \"/usr/share/fonts\"\n    \"/usr/local/share/fonts\"\n  ]\n  # darwin paths\n  ++ lib.optionals stdenv.hostPlatform.isDarwin [\n    \"/Library/Fonts\"\n    \"/System/Library/Fonts\"\n  ]\n  # nix default profile\n  ++ [\n    \"/nix/var/nix/profiles/default/lib/X11/fonts\"\n    \"/nix/var/nix/profiles/default/share/fonts\"\n  ],\n\n  # to include custom config\n  includes ? [ \"/etc/fonts/conf.d\" ],\n}:\n\nrunCommand \"fonts.conf\"\n  {\n    nativeBuildInputs = [ libxslt ];\n    buildInputs = [ fontconfig ];\n    inherit fontDirectories includes;\n    # Add a default font for non-nixos systems, <1MB and in nixos defaults.\n    impureFontDirectories = impureFontDirectories ++ [ dejavu_fonts.minimal ];\n  }\n  ''\n    xsltproc --stringparam fontDirectories \"$fontDirectories\" \\\n      --stringparam impureFontDirectories \"$impureFontDirectories\" \\\n      --stringparam includes \"$includes\" \\\n      --path ${fontconfig.out}/share/xml/fontconfig \\\n      ${./make-fonts-conf.xsl} ${fontconfig.out}/etc/fonts/fonts.conf \\\n      > $out\n  ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/fontconfig/make-fonts-conf.nix","line":13,"column":1},"path":["pkgs","makeFontsConf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/fontconfig/make-fonts-conf.nix","line":13,"column":1},"path":["pkgs","makeFontsConf"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeHardcodeGsettingsPatch","path":["pkgs","makeHardcodeGsettingsPatch"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":978,"column":3},"attr_expr":"makeHardcodeGsettingsPatch = callPackage ../build-support/make-hardcode-gsettings-patch { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-hardcode-gsettings-patch/default.nix","line":57,"column":1},"lambda_expr":"{\n  src,\n  patches ? [ ],\n  schemaIdToVariableMapping,\n  schemaExistsFunction ? null,\n}:\n\nrunCommand \"hardcode-gsettings.patch\"\n  {\n    inherit src patches;\n    nativeBuildInputs = [\n      gitMinimal\n      coccinelle\n      python3 # For patch script\n    ];\n  }\n  ''\n    unpackPhase\n    cd \"''${sourceRoot:-.}\"\n    patchPhase\n    set -x\n    cp ${builtins.toFile \"glib-schema-to-var.json\" (builtins.toJSON schemaIdToVariableMapping)} ./glib-schema-to-var.json\n    cp ${builtins.toFile \"glib-schema-exists-function.json\" (builtins.toJSON schemaExistsFunction)} ./glib-schema-exists-function.json\n    git init\n    git add -A\n    spatch --sp-file \"${./hardcode-gsettings.cocci}\" --dir . --in-place\n    git diff > \"$out\"\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-hardcode-gsettings-patch/default.nix","line":57,"column":1},"path":["pkgs","makeHardcodeGsettingsPatch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-hardcode-gsettings-patch/default.nix","line":57,"column":1},"path":["pkgs","makeHardcodeGsettingsPatch"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeImpureTest","path":["pkgs","makeImpureTest"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":782,"column":3},"attr_expr":"makeImpureTest = callPackage ../build-support/make-impure-test.nix;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":19},"lambda_expr":"args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.makeInitrd","path":["pkgs","makeInitrd"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":784,"column":3},"attr_expr":"makeInitrd = callPackage ../build-support/kernel/make-initrd.nix;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":19},"lambda_expr":"args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.makeInitrdNG","path":["pkgs","makeInitrdNG"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":786,"column":3},"attr_expr":"makeInitrdNG = callPackage ../build-support/kernel/make-initrd-ng.nix;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":19},"lambda_expr":"args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.makeLinuxHeaders","path":["pkgs","makeLinuxHeaders"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8335,"column":5},"attr_expr":"makeLinuxHeaders","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/os-specific/linux/kernel-headers/default.nix","line":43,"column":5},"lambda_expr":"{\n      src,\n      version,\n      patches ? [ ],\n      passthru ? { },\n    }:\n    stdenvNoCC.mkDerivation {\n      inherit src;\n\n      pname = \"linux-headers\";\n      inherit version;\n\n      env.ARCH = stdenvNoCC.hostPlatform.linuxArch;\n\n      strictDeps = true;\n      enableParallelBuilding = true;\n\n      # It may look odd that we use `stdenvNoCC`, and yet explicit depend on a cc.\n      # We do this so we have a build->build, not build->host, C compiler.\n      depsBuildBuild = [ buildPackages.stdenv.cc ];\n      # `elf-header` is null when libc provides `elf.h`.\n      nativeBuildInputs = [\n        perl\n        elf-header\n      ]\n      ++ lib.optionals stdenvNoCC.hostPlatform.isAndroid [\n        bison\n        flex\n        rsync\n      ]\n      ++ lib.optionals (stdenvNoCC.buildPlatform.isDarwin && stdenvNoCC.hostPlatform.isMips) [\n        darwin-endian-h\n        darwin-byteswap-h\n      ];\n\n      extraIncludeDirs = lib.optionals (with stdenvNoCC.hostPlatform; isPower && is32bit && isBigEndian) [\n        \"ppc\"\n      ];\n\n      inherit patches;\n\n      hardeningDisable = lib.optional stdenvNoCC.buildPlatform.isDarwin \"format\";\n\n      makeFlags = [\n        \"SHELL=bash\"\n        # Avoid use of runtime build->host compilers for checks. These\n        # checks only cared to work around bugs in very old compilers, so\n        # these changes should be safe.\n        \"cc-version:=9999\"\n        \"cc-fullversion:=999999\"\n        # `$(..)` expanded by make alone\n        \"HOSTCC:=$(CC_FOR_BUILD)\"\n        \"HOSTCXX:=$(CXX_FOR_BUILD)\"\n        # To properly detect LFS flags 32-bit build environments like\n        # pkgsi686Linux.linuxHeaders Kbuild uses this Makefile bit:\n        #     HOST_LFS_CFLAGS := $(shell getconf LFS_CFLAGS 2>/dev/null)\n        #\n        # `getconf` is not available in early bootstrap and thus the\n        # build fails on filesystems with 64-bit inodes as:\n        #     linux-headers> fixdep: error fstat'ing file: scripts/basic/.fixdep.d: Value too large for defined data type\n        #\n        # Let's hardcode subset of the output of `getconf` for this case.\n        \"HOST_LFS_CFLAGS=-D_FILE_OFFSET_BITS=64\"\n      ];\n\n      # Skip clean on darwin, case-sensitivity issues.\n      buildPhase =\n        lib.optionalString (!stdenvNoCC.buildPlatform.isDarwin) ''\n          make mrproper $makeFlags\n        ''\n        + (\n          if stdenvNoCC.hostPlatform.isAndroid then\n            ''\n              make defconfig\n              make headers_install\n            ''\n          else\n            ''\n              make headers $makeFlags\n            ''\n        );\n\n      checkPhase = ''\n        make headers_check $makeFlags\n      '';\n\n      # The following command requires rsync:\n      #   make headers_install INSTALL_HDR_PATH=$out $makeFlags\n      # but rsync depends on popt which does not compile on aarch64 without\n      # updateAutotoolsGnuConfigScriptsHook which is not enabled in stage2,\n      # so we replicate it with cp. This also reduces bootstrap closure size.\n      installPhase = ''\n        mkdir -p $out\n        cp -r usr/include $out\n        find $out -type f ! -name '*.h' -delete\n      ''\n      # Some builds (e.g. KVM) want a kernel.release.\n      + ''\n        mkdir -p $out/include/config\n        echo \"${version}-default\" > $out/include/config/kernel.release\n      '';\n\n      inherit passthru;\n\n      meta = {\n        description = \"Header files and scripts for Linux kernel\";\n        license = lib.licenses.gpl2Only;\n        platforms = lib.platforms.linux;\n        teams = [ lib.teams.linux-kernel ];\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/os-specific/linux/kernel-headers/default.nix","line":43,"column":5},"path":["pkgs","makeLinuxHeaders"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/os-specific/linux/kernel-headers/default.nix","line":43,"column":5},"path":["pkgs","makeLinuxHeaders"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeModulesClosure","path":["pkgs","makeModulesClosure"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":812,"column":3},"attr_expr":"makeModulesClosure =\n    {\n      kernel,\n      firmware,\n      rootModules,\n      allowMissing ? false,\n      extraFirmwarePaths ? [ ],\n    }:\n    callPackage ../build-support/kernel/modules-closure.nix {\n      inherit\n        kernel\n        firmware\n        rootModules\n        allowMissing\n        extraFirmwarePaths\n        ;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":813,"column":5},"lambda_expr":"{\n      kernel,\n      firmware,\n      rootModules,\n      allowMissing ? false,\n      extraFirmwarePaths ? [ ],\n    }:\n    callPackage ../build-support/kernel/modules-closure.nix {\n      inherit\n        kernel\n        firmware\n        rootModules\n        allowMissing\n        extraFirmwarePaths\n        ;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":813,"column":5},"path":["pkgs","makeModulesClosure"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":813,"column":5},"path":["pkgs","makeModulesClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeOverridable","path":["pkgs","makeOverridable"],"aliases":[["pkgs","dontRecurseIntoAttrs"],["pkgs","forceSystem"],["pkgs","hiPrio"],["pkgs","lowPrio"],["pkgs","recurseIntoAttrs"],["pkgs","runCommandNoCC"],["pkgs","runCommandNoCCLocal"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","makeOverridable"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","makeOverridable"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makePkgconfigItem","path":["pkgs","makePkgconfigItem"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":776,"column":3},"attr_expr":"makePkgconfigItem = callPackage ../build-support/make-pkgconfigitem { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-pkgconfigitem/default.nix","line":8,"column":1},"lambda_expr":"{\n  name, # The name of the pc file\n  # keywords\n  # provide a default description for convenience. it's not important but still required by pkg-config.\n  description ? \"Pkg-config file for ${name}\",\n  url ? \"\",\n  version ? \"\",\n  requires ? [ ],\n  requiresPrivate ? [ ],\n  conflicts ? [ ],\n  cflags ? [ ],\n  libs ? [ ],\n  libsPrivate ? [ ],\n  variables ? { },\n}:\n\nlet\n  # only 'out' has to be changed, otherwise it would be replaced by the out of the writeTextFile\n  placeholderToSubstVar = builtins.replaceStrings [ \"${placeholder \"out\"}\" ] [ \"@out@\" ];\n\n  replacePlaceholderAndListToString =\n    x:\n    if builtins.isList x then\n      placeholderToSubstVar (builtins.concatStringsSep \" \" x)\n    else\n      placeholderToSubstVar x;\n\n  keywordsSection =\n    let\n      mustBeAList = attr: attrName: lib.throwIfNot (lib.isList attr) \"'${attrName}' must be a list\" attr;\n    in\n    {\n      \"Name\" = name;\n      \"Description\" = description;\n      \"URL\" = url;\n      \"Version\" = version;\n      \"Requires\" = mustBeAList requires \"requires\";\n      \"Requires.private\" = mustBeAList requiresPrivate \"requiresPrivate\";\n      \"Conflicts\" = mustBeAList conflicts \"conflicts\";\n      \"Cflags\" = mustBeAList cflags \"cflags\";\n      \"Libs\" = mustBeAList libs \"libs\";\n      \"Libs.private\" = mustBeAList libsPrivate \"libsPrivate\";\n    };\n\n  renderVariable =\n    name: value:\n    lib.optionalString (\n      value != \"\" && value != [ ]\n    ) \"${name}=${replacePlaceholderAndListToString value}\";\n  renderKeyword =\n    name: value:\n    lib.optionalString (\n      value != \"\" && value != [ ]\n    ) \"${name}: ${replacePlaceholderAndListToString value}\";\n\n  renderSomething =\n    renderFunc: attrs:\n    lib.pipe attrs [\n      (lib.mapAttrsToList renderFunc)\n      (builtins.filter (v: v != \"\"))\n      (lib.concatLines)\n    ];\n\n  variablesSectionRendered = renderSomething renderVariable variables;\n  keywordsSectionRendered = renderSomething renderKeyword keywordsSection;\n\n  content = [\n    variablesSectionRendered\n    keywordsSectionRendered\n  ];\nin\nwriteTextFile {\n  name = \"${name}.pc\";\n  destination = \"/lib/pkgconfig/${name}.pc\";\n  text = builtins.concatStringsSep \"\\n\" content;\n  checkPhase = ''${buildPackages.pkg-config}/bin/${buildPackages.pkg-config.targetPrefix}pkg-config --validate \"$target\"'';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-pkgconfigitem/default.nix","line":8,"column":1},"path":["pkgs","makePkgconfigItem"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/make-pkgconfigitem/default.nix","line":8,"column":1},"path":["pkgs","makePkgconfigItem"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeRustPlatform","path":["pkgs","makeRustPlatform"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4497,"column":3},"attr_expr":"makeRustPlatform = callPackage ../development/compilers/rust/make-rust-platform.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":13,"column":1},"lambda_expr":"{\n  rustc,\n  cargo,\n  cargo-auditable ? prev.cargo-auditable,\n  stdenv ? prev.stdenv,\n  ...\n}:\n\n(makeScopeWithSplicing' {\n  otherSplices = generateSplicesForMkScope \"rustPlatform\";\n  f =\n    self:\n    let\n      inherit (self) callPackage;\n    in\n    {\n      fetchCargoVendor = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-vendor.nix {\n        inherit cargo;\n      };\n\n      buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {\n        inherit\n          stdenv\n          rustc\n          cargo\n          cargo-auditable\n          ;\n      };\n\n      importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {\n        inherit cargo;\n      };\n\n      rustcSrc = callPackage ./rust-src.nix {\n        inherit runCommand rustc;\n      };\n\n      rustLibSrc = callPackage ./rust-lib-src.nix {\n        inherit runCommand rustc;\n      };\n\n      # Useful when rebuilding std\n      # e.g. when building wasm with wasm-pack\n      rustVendorSrc = callPackage ./rust-vendor-src.nix {\n        inherit runCommand rustc;\n      };\n\n      # Hooks\n      inherit\n        (callPackages ../../../build-support/rust/hooks {\n          inherit\n            stdenv\n            ;\n        })\n        cargoBuildHook\n        cargoCheckHook\n        cargoInstallHook\n        cargoNextestHook\n        cargoSetupHook\n        maturinBuildHook\n        bindgenHook\n        ;\n    };\n})\n// lib.optionalAttrs config.allowAliases {\n  rust = {\n    rustc = lib.warn \"rustPlatform.rust.rustc is deprecated. Use rustc instead.\" rustc;\n    cargo = lib.warn \"rustPlatform.rust.cargo is deprecated. Use cargo instead.\" cargo;\n  };\n\n  # Added in 25.05.\n  fetchCargoTarball = throw \"`rustPlatform.fetchCargoTarball` has been removed in 25.05, use `rustPlatform.fetchCargoVendor` instead\";\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":13,"column":1},"path":["pkgs","makeRustPlatform"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":13,"column":1},"path":["pkgs","makeRustPlatform"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeScopeWithSplicing","path":["pkgs","makeScopeWithSplicing"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":129,"column":3},"attr_expr":"makeScopeWithSplicing = lib.makeScopeWithSplicing splicePackages pkgs.newScope;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":668,"column":31},"lambda_expr":"otherSplices: keep: extra: f:\n    makeScopeWithSplicing' { inherit splicePackages newScope; } {\n      inherit\n        otherSplices\n        keep\n        extra\n        f\n        ;\n    }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.makeScopeWithSplicing' (Prime)","path":["pkgs","makeScopeWithSplicing'"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":130,"column":3},"attr_expr":"makeScopeWithSplicing' = lib.makeScopeWithSplicing' {\n    inherit splicePackages;\n    inherit (pkgs) newScope;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":707,"column":5},"lambda_expr":"{\n      otherSplices,\n      # Attrs from `self` which won't be spliced.\n      # Avoid using keep, it's only used for a python hook workaround, added in PR #104201.\n      # ex: `keep = (self: { inherit (self) aAttr; })`\n      keep ? (_self: { }),\n      # Additional attrs to add to the sets `callPackage`.\n      # When the package is from a subset (but not a subset within a package IS #211340)\n      # within `spliced0` it will be spliced.\n      # When using an package outside the set but it's available from `pkgs`, use the package from `pkgs.__splicedPackages`.\n      # If the package is not available within the set or in `pkgs`, such as a package in a let binding, it will not be spliced\n      # ex:\n      # ```\n      # nix-repl> darwin.apple_sdk.frameworks.CoreFoundation\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # nix-repl> darwin.CoreFoundation\n      #   error: attribute 'CoreFoundation' missing\n      # nix-repl> darwin.callPackage ({ CoreFoundation }: CoreFoundation) { }\n      #   «derivation ...CoreFoundation-11.0.0.drv»\n      # ```\n      extra ? (_spliced0: { }),\n      f,\n    }:\n    let\n      spliced0 = splicePackages {\n        pkgsBuildBuild = otherSplices.selfBuildBuild;\n        pkgsBuildHost = otherSplices.selfBuildHost;\n        pkgsBuildTarget = otherSplices.selfBuildTarget;\n        pkgsHostHost = otherSplices.selfHostHost;\n        pkgsHostTarget = self; # Not `otherSplices.selfHostTarget`;\n        pkgsTargetTarget = otherSplices.selfTargetTarget;\n      };\n      spliced = extra spliced0 // spliced0 // keep self;\n      self = f self // {\n        newScope = scope: newScope (spliced // scope);\n        callPackage = newScope spliced; # == self.newScope {};\n        # N.B. the other stages of the package set spliced in are *not*\n        # overridden.\n        overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });\n        packages = f;\n      };\n    in\n    self","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.makeSetupHook","path":["pkgs","makeSetupHook"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":710,"column":3},"attr_expr":"makeSetupHook =\n    {\n      name ? lib.warn \"calling makeSetupHook without passing a name is deprecated.\" \"hook\",\n      # hooks go in nativeBuildInputs so these will be nativeBuildInputs\n      propagatedBuildInputs ? [ ],\n      propagatedNativeBuildInputs ? [ ],\n      # these will be buildInputs\n      depsTargetTargetPropagated ? [ ],\n      meta ? { },\n      passthru ? { },\n      substitutions ? { },\n    }@args:\n    script:\n    runCommand name\n      (\n        substitutions\n        // {\n          # Make the position of the derivation accurate.\n          # Since not having `name` is deprecated, this should be fairly accurate.\n          pos = lib.unsafeGetAttrPos \"name\" args;\n          # TODO(@Artturin:) substitutions should be inside the env attrset\n          # but users are likely passing non-substitution arguments through substitutions\n          # turn off __structuredAttrs to unbreak substituteAll\n          __structuredAttrs = false;\n          pname = name;\n          version = \"26.05pre-git\";\n          inherit meta;\n          inherit depsTargetTargetPropagated;\n          inherit propagatedBuildInputs;\n          inherit propagatedNativeBuildInputs;\n          strictDeps = true;\n          # TODO 2023-01, no backport: simplify to inherit passthru;\n          passthru =\n            passthru\n            // optionalAttrs (substitutions ? passthru) (\n              warn \"makeSetupHook (name = ${lib.strings.escapeNixString name}): `substitutions.passthru` is deprecated. Please set `passthru` directly.\" substitutions.passthru\n            );\n        }\n      )\n      (\n        ''\n          mkdir -p $out/nix-support\n          cp ${script} $out/nix-support/setup-hook\n          recordPropagatedDependencies\n        ''\n        + lib.optionalString (substitutions != { }) ''\n          substituteAll ${script} $out/nix-support/setup-hook\n        ''\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":711,"column":5},"lambda_expr":"makeSetupHook =\n    {\n      name ? lib.warn \"calling makeSetupHook without passing a name is deprecated.\" \"hook\",\n      # hooks go in nativeBuildInputs so these will be nativeBuildInputs\n      propagatedBuildInputs ? [ ],\n      propagatedNativeBuildInputs ? [ ],\n      # these will be buildInputs\n      depsTargetTargetPropagated ? [ ],\n      meta ? { },\n      passthru ? { },\n      substitutions ? { },\n    }@args:\n    script:\n    runCommand name\n      (\n        substitutions\n        // {\n          # Make the position of the derivation accurate.\n          # Since not having `name` is deprecated, this should be fairly accurate.\n          pos = lib.unsafeGetAttrPos \"name\" args;\n          # TODO(@Artturin:) substitutions should be inside the env attrset\n          # but users are likely passing non-substitution arguments through substitutions\n          # turn off __structuredAttrs to unbreak substituteAll\n          __structuredAttrs = false;\n          pname = name;\n          version = \"26.05pre-git\";\n          inherit meta;\n          inherit depsTargetTargetPropagated;\n          inherit propagatedBuildInputs;\n          inherit propagatedNativeBuildInputs;\n          strictDeps = true;\n          # TODO 2023-01, no backport: simplify to inherit passthru;\n          passthru =\n            passthru\n            // optionalAttrs (substitutions ? passthru) (\n              warn \"makeSetupHook (name = ${lib.strings.escapeNixString name}): `substitutions.passthru` is deprecated. Please set `passthru` directly.\" substitutions.passthru\n            );\n        }\n      )\n      (\n        ''\n          mkdir -p $out/nix-support\n          cp ${script} $out/nix-support/setup-hook\n          recordPropagatedDependencies\n        ''\n        + lib.optionalString (substitutions != { }) ''\n          substituteAll ${script} $out/nix-support/setup-hook\n        ''\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":711,"column":5},"path":["pkgs","makeSetupHook"],"pos_type":"Lambda"}},"content":{"content":"See https://nixos.org/manual/nixpkgs/unstable/#sec-pkgs.makeSetupHook","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":711,"column":5},"path":["pkgs","makeSetupHook"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeStatic","path":["pkgs","makeStatic"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":176,"column":3},"attr_expr":"makeStatic =\n    stdenv:\n    lib.foldl' (lib.flip lib.id) stdenv (\n      lib.optional stdenv.hostPlatform.isDarwin makeStaticDarwin\n\n      ++ [\n        makeStaticLibraries\n        propagateBuildInputs\n      ]\n\n      # Apple does not provide a static version of libSystem or crt0.o\n      # So we can’t build static binaries without extensive hacks.\n      ++ lib.optional (!stdenv.hostPlatform.isDarwin) makeStaticBinaries\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":177,"column":5},"lambda_expr":"makeStatic =\n    stdenv:\n    lib.foldl' (lib.flip lib.id) stdenv (\n      lib.optional stdenv.hostPlatform.isDarwin makeStaticDarwin\n\n      ++ [\n        makeStaticLibraries\n        propagateBuildInputs\n      ]\n\n      # Apple does not provide a static version of libSystem or crt0.o\n      # So we can’t build static binaries without extensive hacks.\n      ++ lib.optional (!stdenv.hostPlatform.isDarwin) makeStaticBinaries\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":177,"column":5},"path":["pkgs","makeStatic"],"pos_type":"Lambda"}},"content":{"content":"Puts all the other ones together","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":177,"column":5},"path":["pkgs","makeStatic"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeStaticBinaries","path":["pkgs","makeStaticBinaries"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":82,"column":3},"attr_expr":"makeStaticBinaries =\n    stdenv0:\n    stdenv0.override (\n      old:\n      {\n        mkDerivationFromStdenv = withOldMkDerivation old (\n          stdenv: mkDerivationSuper: args:\n          if stdenv.hostPlatform.isDarwin then\n            throw \"Cannot build fully static binaries on Darwin/macOS\"\n          else\n            (mkDerivationSuper args).overrideAttrs (\n              args:\n              (\n                if (args ? NIX_CFLAGS_LINK) then\n                  lib.warn\n                    (\n                      \"NIX_CFLAGS_LINK is an environment variable and should be defined inside `env`\"\n                      + lib.optionalString (args ? pname) \" for package ${args.pname}\"\n                      + lib.optionalString (args ? version) \"-${args.version}\"\n                    )\n                    {\n                      NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or \"\") + \" -static\";\n                    }\n                else\n                  {\n                    env = (args.env or { }) // {\n                      NIX_CFLAGS_LINK = toString (args.env.NIX_CFLAGS_LINK or \"\") + \" -static\";\n                    };\n                  }\n              )\n              // lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {\n                configureFlags = (args.configureFlags or [ ]) ++ [\n                  \"--disable-shared\" # brrr...\n                ];\n                cmakeFlags = (args.cmakeFlags or [ ]) ++ [ \"-DCMAKE_SKIP_INSTALL_RPATH=On\" ];\n              }\n            )\n        );\n      }\n      // lib.optionalAttrs (stdenv0.hostPlatform.libc == \"glibc\") {\n        extraBuildInputs = (old.extraBuildInputs or [ ]) ++ [\n          pkgs.glibc.static\n        ];\n      }\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":83,"column":5},"lambda_expr":"makeStaticBinaries =\n    stdenv0:\n    stdenv0.override (\n      old:\n      {\n        mkDerivationFromStdenv = withOldMkDerivation old (\n          stdenv: mkDerivationSuper: args:\n          if stdenv.hostPlatform.isDarwin then\n            throw \"Cannot build fully static binaries on Darwin/macOS\"\n          else\n            (mkDerivationSuper args).overrideAttrs (\n              args:\n              (\n                if (args ? NIX_CFLAGS_LINK) then\n                  lib.warn\n                    (\n                      \"NIX_CFLAGS_LINK is an environment variable and should be defined inside `env`\"\n                      + lib.optionalString (args ? pname) \" for package ${args.pname}\"\n                      + lib.optionalString (args ? version) \"-${args.version}\"\n                    )\n                    {\n                      NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or \"\") + \" -static\";\n                    }\n                else\n                  {\n                    env = (args.env or { }) // {\n                      NIX_CFLAGS_LINK = toString (args.env.NIX_CFLAGS_LINK or \"\") + \" -static\";\n                    };\n                  }\n              )\n              // lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {\n                configureFlags = (args.configureFlags or [ ]) ++ [\n                  \"--disable-shared\" # brrr...\n                ];\n                cmakeFlags = (args.cmakeFlags or [ ]) ++ [ \"-DCMAKE_SKIP_INSTALL_RPATH=On\" ];\n              }\n            )\n        );\n      }\n      // lib.optionalAttrs (stdenv0.hostPlatform.libc == \"glibc\") {\n        extraBuildInputs = (old.extraBuildInputs or [ ]) ++ [\n          pkgs.glibc.static\n        ];\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":83,"column":5},"path":["pkgs","makeStaticBinaries"],"pos_type":"Lambda"}},"content":{"content":"binaries.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":83,"column":5},"path":["pkgs","makeStaticBinaries"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeStaticDarwin","path":["pkgs","makeStaticDarwin"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":150,"column":3},"attr_expr":"makeStaticDarwin =\n    stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = withOldMkDerivation old (\n        stdenv: mkDerivationSuper: args:\n        (mkDerivationSuper args).overrideAttrs (\n          prevAttrs:\n          if prevAttrs ? env.NIX_CFLAGS_LINK then\n            {\n              env = prevAttrs.env // {\n                NIX_CFLAGS_LINK =\n                  toString (args.env.NIX_CFLAGS_LINK or \"\")\n                  + lib.optionalString (stdenv.cc.isGNU or false) \" -static-libgcc\";\n              };\n            }\n          else\n            {\n              NIX_CFLAGS_LINK =\n                toString (prevAttrs.NIX_CFLAGS_LINK or \"\")\n                + lib.optionalString (stdenv.cc.isGNU or false) \" -static-libgcc\";\n            }\n        )\n      );\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":151,"column":5},"lambda_expr":"makeStaticDarwin =\n    stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = withOldMkDerivation old (\n        stdenv: mkDerivationSuper: args:\n        (mkDerivationSuper args).overrideAttrs (\n          prevAttrs:\n          if prevAttrs ? env.NIX_CFLAGS_LINK then\n            {\n              env = prevAttrs.env // {\n                NIX_CFLAGS_LINK =\n                  toString (args.env.NIX_CFLAGS_LINK or \"\")\n                  + lib.optionalString (stdenv.cc.isGNU or false) \" -static-libgcc\";\n              };\n            }\n          else\n            {\n              NIX_CFLAGS_LINK =\n                toString (prevAttrs.NIX_CFLAGS_LINK or \"\")\n                + lib.optionalString (stdenv.cc.isGNU or false) \" -static-libgcc\";\n            }\n        )\n      );\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":151,"column":5},"path":["pkgs","makeStaticDarwin"],"pos_type":"Lambda"}},"content":{"content":"but more portable than Nix store binaries.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":151,"column":5},"path":["pkgs","makeStaticDarwin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.makeStaticLibraries","path":["pkgs","makeStaticLibraries"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":130,"column":3},"attr_expr":"makeStaticLibraries = overrideMkDerivationArgs (\n    args:\n    {\n      dontDisableStatic = true;\n    }\n    // lib.optionalAttrs (!(args.dontAddStaticConfigureFlags or false)) {\n      configureFlags = (args.configureFlags or [ ]) ++ [\n        \"--enable-static\"\n        \"--disable-shared\"\n      ];\n      cmakeFlags = (args.cmakeFlags or [ ]) ++ [ \"-DBUILD_SHARED_LIBS:BOOL=OFF\" ];\n      mesonFlags = (args.mesonFlags or [ ]) ++ [\n        \"-Ddefault_library=static\"\n        \"-Ddefault_both_libraries=static\"\n      ];\n    }\n  );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":16},"lambda_expr":"stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = extendMkDerivationArgs old extension;\n    })","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.mkBinaryCache","path":["pkgs","mkBinaryCache"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":830,"column":3},"attr_expr":"mkBinaryCache = callPackage ../build-support/binary-cache { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/binary-cache/default.nix","line":18,"column":1},"lambda_expr":"{\n  name ? \"binary-cache\",\n  compression ? \"zstd\", # one of [\"none\" \"xz\" \"zstd\"]\n  rootPaths,\n}:\n\nassert lib.elem compression [\n  \"none\"\n  \"xz\"\n  \"zstd\"\n];\n\nstdenv.mkDerivation {\n  inherit name;\n\n  __structuredAttrs = true;\n\n  exportReferencesGraph.closure = rootPaths;\n\n  preferLocalBuild = true;\n\n  nativeBuildInputs = [\n    coreutils\n    jq\n    python3\n    nix\n  ]\n  ++ lib.optional (compression == \"xz\") xz\n  ++ lib.optional (compression == \"zstd\") zstd;\n\n  buildCommand = ''\n    mkdir -p $out/nar\n\n    python ${./make-binary-cache.py} --compression \"${compression}\"\n\n    # These directories must exist, or Nix might try to create them in LocalBinaryCacheStore::init(),\n    # which fails if mounted read-only\n    mkdir $out/realisations\n    mkdir $out/debuginfo\n    mkdir $out/log\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/binary-cache/default.nix","line":18,"column":1},"path":["pkgs","mkBinaryCache"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/binary-cache/default.nix","line":18,"column":1},"path":["pkgs","mkBinaryCache"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkCoqPackages","path":["pkgs","mkCoqPackages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11188,"column":5},"attr_expr":"mkCoqPackages","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/coq-packages.nix","line":321,"column":5},"lambda_expr":"mkCoqPackages =\n    coq:\n    let\n      self = lib.makeScope newScope (lib.flip mkCoqPackages' coq);\n    in\n    self.filterPackages (!coq.dontFilter or false);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/coq-packages.nix","line":321,"column":5},"path":["pkgs","mkCoqPackages"],"pos_type":"Lambda"}},"content":{"content":"\nThe function `mkCoqPackages` takes as input a derivation for Coq and produces\na set of libraries built with that specific Coq. More libraries are known to\nthis function than what is compatible with that version of Coq. Therefore,\nlibraries that are not known to be compatible are removed (filtered out) from\nthe resulting set. For meta-programming purposes (inspecting the derivations\nrather than building the libraries) this filtering can be disabled by setting\na `dontFilter` attribute into the Coq derivation.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/coq-packages.nix","line":321,"column":5},"path":["pkgs","mkCoqPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkGCCNGPackages","path":["pkgs","mkGCCNGPackages"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3656,"column":5},"attr_expr":"mkGCCNGPackages","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/gcc/ng/default.nix","line":22,"column":5},"lambda_expr":"{\n      name ? null,\n      officialRelease ? null,\n      gitRelease ? null,\n      monorepoSrc ? null,\n      version ? null,\n    }@args:\n    let\n      inherit\n        (import ./common/common-let.nix {\n          inherit\n            lib\n            gitRelease\n            officialRelease\n            version\n            ;\n        })\n        releaseInfo\n        ;\n      inherit (releaseInfo) release_version;\n      attrName =\n        args.name or (if (gitRelease != null) then \"git\" else lib.versions.major release_version);\n    in\n    lib.nameValuePair attrName (\n      lib.recurseIntoAttrs (\n        callPackage ./common (\n          {\n            inherit (stdenvAdapters) overrideCC;\n            inherit\n              officialRelease\n              gitRelease\n              monorepoSrc\n              version\n              patchesFn\n              ;\n\n            buildGccPackages = buildPackages.\"gccNGPackages_${attrName}\";\n            targetGccPackages = targetPackages.\"gccNGPackages_${attrName}\" or gccPackages.\"${attrName}\";\n            otherSplices = generateSplicesForMkScope \"gccNGPackages_${attrName}\";\n          }\n          // packageSetArgs # Allow overrides.\n        )\n      )\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/gcc/ng/default.nix","line":22,"column":5},"path":["pkgs","mkGCCNGPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/gcc/ng/default.nix","line":22,"column":5},"path":["pkgs","mkGCCNGPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkKops","path":["pkgs","mkKops"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11442,"column":5},"attr_expr":"mkKops","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","mkKops"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","mkKops"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkLLVMPackages","path":["pkgs","mkLLVMPackages"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4369,"column":5},"attr_expr":"mkLLVMPackages","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/llvm/default.nix","line":39,"column":5},"lambda_expr":"{\n      name ? null,\n      officialRelease ? null,\n      gitRelease ? null,\n      monorepoSrc ? null,\n      version ? null,\n    }@args:\n    let\n      inherit\n        (import ./common/common-let.nix {\n          inherit lib;\n          inherit gitRelease officialRelease version;\n        })\n        releaseInfo\n        ;\n      inherit (releaseInfo) release_version;\n      attrName =\n        args.name or (if (gitRelease != null) then \"git\" else lib.versions.major release_version);\n    in\n    lib.nameValuePair attrName (\n      lib.recurseIntoAttrs (\n        callPackage ./common (\n          {\n            inherit (stdenvAdapters) overrideCC;\n            inherit\n              officialRelease\n              gitRelease\n              monorepoSrc\n              version\n              patchesFn\n              bootBintools\n              bootBintoolsNoLibc\n              ;\n\n            otherSplices = generateSplicesForMkScope \"llvmPackages_${attrName}\";\n          }\n          // packageSetArgs # Allow overrides.\n        )\n      )\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/llvm/default.nix","line":39,"column":5},"path":["pkgs","mkLLVMPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/llvm/default.nix","line":39,"column":5},"path":["pkgs","mkLLVMPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkNugetDeps","path":["pkgs","mkNugetDeps"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":487,"column":5},"attr_expr":"mkNugetDeps","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","mkNugetDeps"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","mkNugetDeps"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkNugetSource","path":["pkgs","mkNugetSource"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":486,"column":5},"attr_expr":"mkNugetSource","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-source/default.nix","line":7,"column":1},"lambda_expr":"{\n  name,\n  description ? \"\",\n  deps ? [ ],\n  ...\n}@args:\n\nstdenvNoCC.mkDerivation (\n  lib.recursiveUpdate\n    {\n      inherit name;\n\n      nativeBuildInputs = [ python3 ];\n\n      buildCommand = ''\n        mkdir -p $out/{lib,share}\n\n        # use -L to follow symbolic links. When `projectReferences` is used in\n        # buildDotnetModule, one of the deps will be a symlink farm.\n        find -L ${lib.concatStringsSep \" \" deps} -type f -name '*.nupkg' -exec \\\n          ln -s '{}' -t $out/lib ';'\n\n        # Generates a list of all licenses' spdx ids, if available.\n        # Note that this currently ignores any license provided in plain text (e.g. \"LICENSE.txt\")\n        python ${./extract-licenses-from-nupkgs.py} $out/lib > $out/share/licenses\n      '';\n\n      meta.description = description;\n    }\n    (\n      removeAttrs args [\n        \"name\"\n        \"description\"\n        \"deps\"\n      ]\n    )\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-source/default.nix","line":7,"column":1},"path":["pkgs","mkNugetSource"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/dotnet/make-nuget-source/default.nix","line":7,"column":1},"path":["pkgs","mkNugetSource"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkRocqPackages","path":["pkgs","mkRocqPackages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11161,"column":5},"attr_expr":"mkRocqPackages","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/rocq-packages.nix","line":108,"column":5},"lambda_expr":"mkRocqPackages =\n    rocq-core:\n    let\n      self = lib.makeScope newScope (lib.flip mkRocqPackages' rocq-core);\n    in\n    self.filterPackages (!rocq-core.dontFilter or false);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/rocq-packages.nix","line":108,"column":5},"path":["pkgs","mkRocqPackages"],"pos_type":"Lambda"}},"content":{"content":"\nThe function `mkRocqPackages` takes as input a derivation for Rocq and produces\na set of libraries built with that specific Rocq. More libraries are known to\nthis function than what is compatible with that version of Rocq. Therefore,\nlibraries that are not known to be compatible are removed (filtered out) from\nthe resulting set. For meta-programming purposes (inspecting the derivations\nrather than building the libraries) this filtering can be disabled by setting\na `dontFilter` attribute into the Rocq derivation.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/rocq-packages.nix","line":108,"column":5},"path":["pkgs","mkRocqPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkRuby","path":["pkgs","mkRuby"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5084,"column":5},"attr_expr":"mkRuby","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/ruby/default.nix","line":52,"column":5},"lambda_expr":"{\n      version,\n      hash,\n      cargoHash ? null,\n    }:\n    let\n      ver = version;\n      # https://github.com/ruby/ruby/blob/v3_2_2/yjit.h#L21\n      yjitSupported =\n        stdenv.hostPlatform.isx86_64 || (!stdenv.hostPlatform.isWindows && stdenv.hostPlatform.isAarch64);\n      rubyDrv = lib.makeOverridable (\n        {\n          stdenv,\n          buildPackages,\n          lib,\n          fetchurl,\n          fetchpatch,\n          rubygemsSupport ? true,\n          zlib,\n          zlibSupport ? true,\n          openssl,\n          opensslSupport ? true,\n          gdbm,\n          gdbmSupport ? true,\n          ncurses,\n          readline,\n          cursesSupport ? true,\n          groff,\n          docSupport ? true,\n          libyaml,\n          yamlSupport ? true,\n          libffi,\n          fiddleSupport ? true,\n          jemalloc,\n          jemallocSupport ? false,\n          linuxPackages,\n          systemtap ? linuxPackages.systemtap,\n          libsystemtap,\n          dtraceSupport ? false,\n          # By default, ruby has 3 observed references to stdenv.cc:\n          #\n          # - If you run:\n          #     ruby -e \"puts RbConfig::CONFIG['configure_args']\"\n          # - In:\n          #     $out/${passthru.libPath}/${stdenv.hostPlatform.system}/rbconfig.rb\n          #   Or (usually):\n          #     $(nix-build -A ruby)/lib/ruby/2.6.0/x86_64-linux/rbconfig.rb\n          # - In $out/lib/libruby.so and/or $out/lib/libruby.dylib\n          removeReferencesTo,\n          jitSupport ? yjitSupport,\n          rustPlatform,\n          rustc,\n          yjitSupport ? yjitSupported,\n          autoreconfHook,\n          bison,\n          autoconf,\n          buildEnv,\n          bundler,\n          bundix,\n          libiconv,\n          libunwind,\n          makeBinaryWrapper,\n          buildRubyGem,\n          defaultGemConfig,\n          baseRuby ? buildPackages.ruby.override {\n            docSupport = false;\n            rubygemsSupport = false;\n          },\n          useBaseRuby ? stdenv.hostPlatform != stdenv.buildPlatform,\n          gitUpdater,\n        }:\n        stdenv.mkDerivation (finalAttrs: {\n          pname = \"ruby\";\n          inherit version;\n\n          src = fetchurl {\n            url = \"https://cache.ruby-lang.org/pub/ruby/${ver.majMin}/ruby-${ver}.tar.gz\";\n            inherit hash;\n          };\n\n          outputs = [ \"out\" ] ++ lib.optional docSupport \"devdoc\";\n\n          strictDeps = true;\n\n          nativeBuildInputs = [\n            autoreconfHook\n            bison\n            removeReferencesTo\n          ]\n          ++ (op docSupport groff)\n          ++ (ops (dtraceSupport && stdenv.hostPlatform.isLinux) [\n            systemtap\n            libsystemtap\n          ])\n          ++ ops yjitSupport [\n            rustPlatform.cargoSetupHook\n            rustc\n          ]\n          ++ op useBaseRuby baseRuby;\n          buildInputs = [\n            autoconf\n          ]\n          ++ (op fiddleSupport libffi)\n          ++ (ops cursesSupport [\n            ncurses\n            readline\n          ])\n          ++ (op zlibSupport zlib)\n          ++ (op opensslSupport openssl)\n          ++ (op gdbmSupport gdbm)\n          ++ (op yamlSupport libyaml)\n          # Looks like ruby fails to build on darwin without readline even if curses\n          # support is not enabled, so add readline to the build inputs if curses\n          # support is disabled (if it's enabled, we already have it) and we're\n          # running on darwin\n          ++ op (!cursesSupport && stdenv.hostPlatform.isDarwin) readline\n          ++ ops stdenv.hostPlatform.isDarwin [\n            libiconv\n            libunwind\n          ];\n          propagatedBuildInputs = op jemallocSupport jemalloc;\n\n          env =\n            lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform && yjitSupport) {\n              # The ruby build system will use a bare `rust` command by default for its rust.\n              # We can use the Nixpkgs rust wrapper to work around the fact that our Rust builds\n              # for cross-compilation output for the build target by default.\n              NIX_RUSTFLAGS = \"--target ${stdenv.hostPlatform.rust.rustcTargetSpec}\";\n            }\n            // lib.optionalAttrs docSupport {\n              # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.\n              NROFF = \"${groff}/bin/nroff\";\n            };\n\n          enableParallelBuilding = true;\n          # /build/ruby-2.7.7/lib/fileutils.rb:882:in `chmod':\n          #   No such file or directory @ apply2files - ...-ruby-2.7.7-devdoc/share/ri/2.7.0/system/ARGF/inspect-i.ri (Errno::ENOENT)\n          # make: *** [uncommon.mk:373: do-install-all] Error 1\n          enableParallelInstalling = false;\n\n          patches = op useBaseRuby ./do-not-update-gems-baseruby-3.2.patch ++ [\n            # When using a baseruby, ruby always sets \"libdir\" to the build\n            # directory, which nix rejects due to a reference in to /build/ in\n            # the final product. Removing this reference doesn't seem to break\n            # anything and fixes cross compilation.\n            ./dont-refer-to-build-dir.patch\n          ];\n\n          cargoRoot = opString yjitSupport \"yjit\";\n\n          cargoDeps =\n            if yjitSupport then\n              rustPlatform.fetchCargoVendor {\n                inherit (finalAttrs) src cargoRoot;\n                hash =\n                  assert cargoHash != null;\n                  cargoHash;\n              }\n            else\n              null;\n\n          postUnpack = opString rubygemsSupport ''\n            rm -rf $sourceRoot/{lib,test}/rubygems*\n            cp -r ${rubygems}/lib/rubygems* $sourceRoot/lib\n          '';\n\n          # Ruby >= 2.1.0 tries to download config.{guess,sub}; copy it from autoconf instead.\n          postPatch = ''\n            sed -i configure.ac -e '/config.guess/d'\n            cp --remove-destination ${autoconf}/share/autoconf/build-aux/config.{guess,sub} tool/\n          '';\n\n          configureFlags = [\n            (lib.enableFeature (!stdenv.hostPlatform.isStatic) \"shared\")\n            (lib.enableFeature true \"pthread\")\n            (lib.withFeatureAs true \"soname\" \"ruby-${version}\")\n            (lib.withFeatureAs useBaseRuby \"baseruby\" \"${baseRuby}/bin/ruby\")\n            (lib.enableFeature dtraceSupport \"dtrace\")\n            (lib.enableFeature jitSupport \"jit-support\")\n            (lib.enableFeature yjitSupport \"yjit\")\n            (lib.enableFeature docSupport \"install-doc\")\n            (lib.withFeature jemallocSupport \"jemalloc\")\n            (lib.withFeatureAs docSupport \"ridir\" \"${placeholder \"devdoc\"}/share/ri\")\n            # ruby enables -O3 for gcc, however our compiler hardening wrapper\n            # overrides that by enabling `-O2` which is the minimum optimization\n            # needed for `_FORTIFY_SOURCE`.\n          ]\n          ++ lib.optional stdenv.cc.isGNU \"CFLAGS=-O3\"\n          ++ [\n          ]\n          # on darwin, we have /usr/include/tk.h -- so the configure script detects\n          # that tk is installed\n          ++ lib.optional stdenv.hostPlatform.isDarwin \"--with-out-ext=tk\"\n          ++ ops stdenv.hostPlatform.isFreeBSD [\n            \"rb_cv_gnu_qsort_r=no\"\n            \"rb_cv_bsd_qsort_r=yes\"\n          ];\n\n          preConfigure = opString docSupport ''\n            # rdoc creates XDG_DATA_DIR (defaulting to $HOME/.local/share) even if\n            # it's not going to be used.\n            export HOME=$TMPDIR\n          '';\n\n          # fails with \"16993 tests, 2229489 assertions, 105 failures, 14 errors, 89 skips\"\n          # mostly TZ- and patch-related tests\n          # TZ- failures are caused by nix sandboxing, I didn't investigate others\n          doCheck = false;\n\n          preInstall = ''\n            # Ruby installs gems here itself now.\n            mkdir -pv \"$out/${finalAttrs.passthru.gemPath}\"\n            export GEM_HOME=\"$out/${finalAttrs.passthru.gemPath}\"\n          '';\n\n          installFlags = lib.optional docSupport \"install-doc\";\n          # Bundler tries to create this directory\n          postInstall = ''\n            rbConfig=$(find $out/lib/ruby -name rbconfig.rb)\n            # Remove references to the build environment from the closure\n            sed -i '/^  CONFIG\\[\"\\(BASERUBY\\|SHELL\\|GREP\\|EGREP\\|MKDIR_P\\|MAKEDIRS\\|INSTALL\\)\"\\]/d' $rbConfig\n            # Remove unnecessary groff reference from runtime closure, since it's big\n            sed -i '/NROFF/d' $rbConfig\n            ${lib.optionalString (!jitSupport) ''\n              # Get rid of the CC runtime dependency\n              remove-references-to \\\n                -t ${stdenv.cc} \\\n                $out/lib/libruby*\n              remove-references-to \\\n                -t ${stdenv.cc} \\\n                $rbConfig\n              sed -i '/CC_VERSION_MESSAGE/d' $rbConfig\n            ''}\n\n            # Allow to override compiler. This is important for cross compiling as\n            # we need to set a compiler that is different from the build one.\n            sed -i \"$rbConfig\" \\\n              -e 's/CONFIG\\[\"CC\"\\] = \"\\(.*\\)\"/CONFIG[\"CC\"] = if ENV[\"CC\"].nil? || ENV[\"CC\"].empty? then \"\\1\" else ENV[\"CC\"] end/' \\\n              -e 's/CONFIG\\[\"CXX\"\\] = \"\\(.*\\)\"/CONFIG[\"CXX\"] = if ENV[\"CXX\"].nil? || ENV[\"CXX\"].empty? then \"\\1\" else ENV[\"CXX\"] end/'\n\n            # Remove unnecessary external intermediate files created by gems\n            extMakefiles=$(find $out/${finalAttrs.passthru.gemPath} -name Makefile)\n            for makefile in $extMakefiles; do\n              make -C \"$(dirname \"$makefile\")\" distclean\n            done\n            find \"$out/${finalAttrs.passthru.gemPath}\" \\( -name gem_make.out -o -name mkmf.log -o -name exts.mk \\) -delete\n            # Bundler tries to create this directory\n            mkdir -p $out/nix-support\n            cat > $out/nix-support/setup-hook <<EOF\n            addGemPath() {\n              addToSearchPath GEM_PATH \\$1/${finalAttrs.passthru.gemPath}\n            }\n            addRubyLibPath() {\n              addToSearchPath RUBYLIB \\$1/lib/ruby/site_ruby\n              addToSearchPath RUBYLIB \\$1/lib/ruby/site_ruby/${ver.libDir}\n              addToSearchPath RUBYLIB \\$1/lib/ruby/site_ruby/${ver.libDir}/${stdenv.hostPlatform.system}\n            }\n\n            addEnvHooks \"$hostOffset\" addGemPath\n            addEnvHooks \"$hostOffset\" addRubyLibPath\n            EOF\n          ''\n          + opString docSupport ''\n            # Prevent the docs from being included in the closure\n            sed -i \"s|\\$(DESTDIR)$devdoc|\\$(datarootdir)/\\$(RI_BASE_NAME)|\" $rbConfig\n            sed -i \"s|'--with-ridir=$devdoc/share/ri'||\" $rbConfig\n\n            # Add rbconfig shim so ri can find docs\n            mkdir -p $devdoc/lib/ruby/site_ruby\n            cp ${./rbconfig.rb} $devdoc/lib/ruby/site_ruby/rbconfig.rb\n          ''\n          + opString useBaseRuby ''\n            # Prevent the baseruby from being included in the closure.\n            remove-references-to \\\n              -t ${baseRuby} \\\n              $rbConfig $out/lib/libruby*\n          '';\n\n          # TODO: this check got relaxed on darwin;\n          # see https://github.com/NixOS/nixpkgs/pull/499156#issuecomment-4221517043\n          installCheckPhase = ''\n            overriden_cc=$(CC=foo $out/bin/ruby -rrbconfig -e 'puts RbConfig::CONFIG[\"CC\"]')\n            if [[ \"$overriden_cc\" != \"foo\" ]]; then\n               echo \"CC cannot be overwritten: $overriden_cc != foo\" >&2\n               false\n            fi\n\n            fallback_cc=$(unset CC; $out/bin/ruby -rrbconfig -e 'puts RbConfig::CONFIG[\"CC\"]')\n            if [[ ${\n              if stdenv.hostPlatform.isDarwin then ''! \"$fallback_cc\" =~ \"$CC\"'' else ''\"$fallback_cc\" != \"$CC\"''\n            } ]]; then\n               echo \"CC='$fallback_cc' should be '$CC' by default\" >&2\n               false\n            fi\n          '';\n          doInstallCheck = true;\n\n          disallowedRequisites = op (!jitSupport) stdenv.cc ++ op useBaseRuby baseRuby;\n\n          meta = {\n            description = \"Object-oriented language for quick and easy programming\";\n            homepage = \"https://www.ruby-lang.org/\";\n            license = lib.licenses.ruby;\n            platforms = lib.platforms.all;\n            mainProgram = \"ruby\";\n            knownVulnerabilities = op (lib.versionOlder ver.majMin \"3.0\") \"This Ruby release has reached its end of life. See https://www.ruby-lang.org/en/downloads/branches/.\";\n          };\n\n          passthru = rec {\n            version = ver;\n            rubyEngine = \"ruby\";\n            libPath = \"lib/${rubyEngine}/${ver.libDir}\";\n            gemPath = \"lib/${rubyEngine}/gems/${ver.libDir}\";\n            devEnv = import ./dev.nix {\n              inherit buildEnv bundler bundix;\n              ruby = finalAttrs.finalPackage;\n            };\n\n            inherit rubygems;\n            inherit\n              (import ../../ruby-modules/with-packages {\n                inherit\n                  lib\n                  stdenv\n                  makeBinaryWrapper\n                  buildRubyGem\n                  buildEnv\n                  ;\n                gemConfig = defaultGemConfig;\n                ruby = finalAttrs.finalPackage;\n              })\n              withPackages\n              buildGems\n              gems\n              ;\n          }\n          // lib.optionalAttrs useBaseRuby {\n            inherit baseRuby;\n          };\n        })\n      ) args;\n    in\n    rubyDrv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/ruby/default.nix","line":52,"column":5},"path":["pkgs","mkRuby"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/ruby/default.nix","line":52,"column":5},"path":["pkgs","mkRuby"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkRubyVersion","path":["pkgs","mkRubyVersion"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5083,"column":5},"attr_expr":"mkRubyVersion","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/ruby/ruby-version.nix","line":6,"column":17},"lambda_expr":"rubyVersion = major: minor: tiny: tail: rec {\n    inherit\n      major\n      minor\n      tiny\n      tail\n      ;\n\n    # Contains the patch number \"223\" if tail is \"p223\" or null\n    patchLevel =\n      let\n        p = lib.removePrefix \"p\" tail;\n        isPosInt =\n          num:\n          0 == lib.stringLength (\n            lib.replaceStrings\n              [\n                \"0\"\n                \"1\"\n                \"2\"\n                \"3\"\n                \"4\"\n                \"5\"\n                \"6\"\n                \"7\"\n                \"8\"\n                \"9\"\n              ]\n              [\n                \"\"\n                \"\"\n                \"\"\n                \"\"\n                \"\"\n                \"\"\n                \"\"\n                \"\"\n                \"\"\n                \"\"\n              ]\n              num\n          );\n      in\n      if lib.hasPrefix \"p\" tail && isPosInt p then p else null;\n\n    # Shortcuts\n    majMin = \"${major}.${minor}\";\n    majMinTiny = \"${major}.${minor}.${tiny}\";\n\n    # Ruby separates lib and gem folders by ABI version which isn't very\n    # consistent.\n    libDir =\n      if lib.versionAtLeast majMinTiny \"2.1.0\" then\n        \"${majMin}.0\"\n      else if lib.versionAtLeast majMinTiny \"2.0.0\" then\n        \"2.0.0\"\n      else if lib.versionAtLeast majMinTiny \"1.9.1\" then\n        \"1.9.1\"\n      else\n        throw \"version ${majMinTiny} is not supported\";\n\n    # How ruby releases are tagged on github.com/ruby/ruby\n    gitTag =\n      let\n        base = \"v${major}_${minor}_${tiny}\";\n      in\n      if patchLevel != null then\n        \"${base}_${patchLevel}\"\n      else if tail != \"\" then\n        \"${base}_${tail}\"\n      else\n        base;\n\n    # Implements the builtins.toString interface.\n    __toString =\n      self:\n      self.majMinTiny\n      + (\n        if self.patchLevel != null then\n          \"-p${self.patchLevel}\"\n        else\n          lib.optionalString (self.tail != \"\") \"-${self.tail}\"\n      );\n  };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/ruby/ruby-version.nix","line":6,"column":17},"path":["pkgs","mkRubyVersion"],"pos_type":"Lambda"}},"content":{"content":"The returned set should be immutable","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/ruby/ruby-version.nix","line":6,"column":17},"path":["pkgs","mkRubyVersion"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkSaneConfig","path":["pkgs","mkSaneConfig"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11681,"column":3},"attr_expr":"mkSaneConfig = callPackage ../applications/graphics/sane/config.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/graphics/sane/config.nix","line":3,"column":1},"lambda_expr":"{\n  paths,\n  disabledDefaultBackends ? [ ],\n}:\n\nlet\n  installSanePath = path: ''\n    if [ -e \"${path}/lib/sane\" ]; then\n      find \"${path}/lib/sane\" -maxdepth 1 -not -type d | while read backend; do\n        symlink \"$backend\" \"$out/lib/sane/$(basename \"$backend\")\"\n      done\n    fi\n\n    if [ -e \"${path}/etc/sane.d\" ]; then\n      find \"${path}/etc/sane.d\" -maxdepth 1 -not -type d | while read conf; do\n        name=\"$(basename $conf)\"\n        if [ \"$name\" = \"dll.conf\" ] || [ \"$name\" = \"saned.conf\" ] || [ \"$name\" = \"net.conf\" ]; then\n          cat \"$conf\" >> \"$out/etc/sane.d/$name\"\n        else\n          symlink \"$conf\" \"$out/etc/sane.d/$name\"\n        fi\n      done\n    fi\n\n    if [ -e \"${path}/etc/sane.d/dll.d\" ]; then\n      find \"${path}/etc/sane.d/dll.d\" -maxdepth 1 -not -type d | while read conf; do\n        symlink \"$conf\" \"$out/etc/sane.d/dll.d/$(basename $conf)\"\n      done\n    fi\n  '';\n  disableBackend = backend: ''\n    grep -w -q '${backend}' $out/etc/sane.d/dll.conf || { echo '${backend} is not a default plugin in $SANE_CONFIG_DIR/dll.conf'; exit 1; }\n    sed -i 's/\\b${backend}\\b/# ${backend} disabled by nixos config/' $out/etc/sane.d/dll.conf\n  '';\nin\nstdenv.mkDerivation {\n  name = \"sane-config\";\n  dontUnpack = true;\n\n  installPhase = ''\n    function symlink () {\n      local target=$1 linkname=$2\n      if [ -e \"$linkname\" ]; then\n        echo \"warning: conflict for $linkname. Overriding $(readlink $linkname) with $target.\"\n      fi\n      ln -sfn \"$target\" \"$linkname\"\n    }\n\n    mkdir -p $out/etc/sane.d $out/etc/sane.d/dll.d $out/lib/sane\n  ''\n  + (lib.concatMapStrings installSanePath paths)\n  + (lib.concatMapStrings disableBackend disabledDefaultBackends);\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/graphics/sane/config.nix","line":3,"column":1},"path":["pkgs","mkSaneConfig"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/graphics/sane/config.nix","line":3,"column":1},"path":["pkgs","mkSaneConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkShell","path":["pkgs","mkShell"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":832,"column":3},"attr_expr":"mkShell = callPackage ../build-support/mkshell { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","mkShell"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","mkShell"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkShellNoCC","path":["pkgs","mkShellNoCC"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":833,"column":3},"attr_expr":"mkShellNoCC = mkShell.override { stdenv = stdenvNoCC; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","mkShellNoCC"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","mkShellNoCC"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkStdenvNoLibs","path":["pkgs","mkStdenvNoLibs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":57,"column":3},"attr_expr":"mkStdenvNoLibs =\n    stdenv:\n    let\n      bintools = stdenv.cc.bintools.override {\n        libc = null;\n        noLibc = true;\n      };\n    in\n    stdenv.override {\n      cc = stdenv.cc.override {\n        libc = null;\n        noLibc = true;\n        extraPackages = [ ];\n        inherit bintools;\n      };\n      allowedRequisites = lib.mapNullable (rs: rs ++ [ bintools ]) (stdenv.allowedRequisites or null);\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":58,"column":5},"lambda_expr":"stdenv:\n    let\n      bintools = stdenv.cc.bintools.override {\n        libc = null;\n        noLibc = true;\n      };\n    in\n    stdenv.override {\n      cc = stdenv.cc.override {\n        libc = null;\n        noLibc = true;\n        extraPackages = [ ];\n        inherit bintools;\n      };\n      allowedRequisites = lib.mapNullable (rs: rs ++ [ bintools ]) (stdenv.allowedRequisites or null);\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":58,"column":5},"path":["pkgs","mkStdenvNoLibs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":58,"column":5},"path":["pkgs","mkStdenvNoLibs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mkTerraform","path":["pkgs","mkTerraform"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11696,"column":5},"attr_expr":"mkTerraform","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/cluster/terraform/default.nix","line":200,"column":17},"lambda_expr":"mkTerraform = attrs: pluggable (generic attrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/cluster/terraform/default.nix","line":200,"column":17},"path":["pkgs","mkTerraform"],"pos_type":"Lambda"}},"content":{"content":"Constructor for other terraform versions","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/cluster/terraform/default.nix","line":200,"column":17},"path":["pkgs","mkTerraform"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.mpdWithFeatures","path":["pkgs","mpdWithFeatures"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":171,"column":13},"lambda_expr":"newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":171,"column":13},"path":["pkgs","mpdWithFeatures"],"pos_type":"Lambda"}},"content":{"content":"\n      Change the arguments with which a certain function is called.\n\nIn some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\nThis function was provided by `lib.makeOverridable`.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":171,"column":13},"path":["pkgs","mpdWithFeatures"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.myEnvFun","path":["pkgs","myEnvFun"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11766,"column":3},"attr_expr":"myEnvFun = callPackage ../misc/my-env {\n    inherit (stdenv) mkDerivation;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/misc/my-env/default.nix","line":64,"column":1},"lambda_expr":"{\n  stdenv ? pkgs.stdenv,\n  name,\n  buildInputs ? [ ],\n  propagatedBuildInputs ? [ ],\n  extraCmds ? \"\",\n  cleanupCmds ? \"\",\n  shell ? \"${pkgs.bashInteractive}/bin/bash --norc\",\n}:\n\nmkDerivation {\n  inherit buildInputs propagatedBuildInputs;\n\n  name = \"env-${name}\";\n  phases = [\n    \"buildPhase\"\n    \"fixupPhase\"\n  ];\n  setupNew = ../../stdenv/generic/setup.sh;\n\n  buildPhase =\n    let\n      initialPath = import ../../stdenv/generic/common-path.nix { inherit pkgs; };\n    in\n    ''\n      set -x\n      mkdir -p \"$out/dev-envs\" \"$out/nix-support\" \"$out/bin\"\n      s=\"$out/nix-support/setup-new-modified\"\n      # shut some warning up.., do not use set -e\n      sed -e 's@set -eu@@' \\\n          -e 's@assertEnvExists\\s\\+NIX_STORE@:@' \\\n          -e 's@trap.*@@' \\\n          -e '1i initialPath=\"${toString initialPath}\"' \\\n          \"$setupNew\" > \"$s\"\n      cat >> \"$out/dev-envs/''${name/env-/}\" << EOF\n        defaultNativeBuildInputs=\"$defaultNativeBuildInputs\"\n        buildInputs=\"$buildInputs\"\n        propagatedBuildInputs=\"$propagatedBuildInputs\"\n        # the setup-new script wants to write some data to a temp file.. so just let it do that and tidy up afterwards\n        tmp=\"\\$(\"${pkgs.coreutils}/bin/mktemp\" -d)\"\n        NIX_BUILD_TOP=\"\\$tmp\"\n        phases=\n        # only do all the setup stuff in nix-support/*\n        set +e\n        # This prevents having -rpath /lib in NIX_LDFLAGS\n        export NIX_NO_SELF_RPATH=1\n        if [[ -z \"\\$ZSH_VERSION\" ]]; then\n          source \"$s\"\n        else\n          setopt interactivecomments\n          # fix bash indirection\n          # let's hope the bash arrays aren't used\n          # substitute is using bash array, so skip it\n          echo '\n              setopt NO_BAD_PATTERN\n              setopt NO_BANG_HIST\n              setopt NO_BG_NICE\n              setopt NO_EQUALS\n              setopt NO_FUNCTION_ARGZERO\n              setopt GLOB_SUBST\n              setopt NO_HUP\n              setopt INTERACTIVE_COMMENTS\n              setopt KSH_ARRAYS\n              setopt NO_MULTIOS\n              setopt NO_NOMATCH\n              setopt RM_STAR_SILENT\n              setopt POSIX_BUILTINS\n              setopt SH_FILE_EXPANSION\n              setopt SH_GLOB\n              setopt SH_OPTION_LETTERS\n              setopt SH_WORD_SPLIT\n            ' >> \"\\$tmp/script\"\n          sed -e 's/\\''${!\\([^}]*\\)}/\\''${(P)\\1}/g' \\\n              -e 's/[[]\\*\\]//' \\\n              -e 's/substitute() {/ substitute() { return; /' \\\n              -e 's@PATH=\\$@PATH=${pkgs.coreutils}/bin@' \\\n              \"$s\" >> \"\\$tmp/script\"\n          echo \"\\$tmp/script\";\n          source \"\\$tmp/script\";\n        fi\n        ${pkgs.coreutils}/bin/rm -fr \"\\$tmp\"\n        ${extraCmds}\n\n        nix_cleanup() {\n          :\n          ${cleanupCmds}\n        }\n\n        export PATH\n        echo $name loaded >&2\n\n        trap nix_cleanup EXIT\n      EOF\n\n      mkdir -p $out/bin\n      sed -e 's,@shell@,${shell},' -e s,@myenvpath@,$out/dev-envs/${name}, \\\n        -e 's,@name@,${name},' ${./loadenv.sh} > $out/bin/load-env-${name}\n      chmod +x $out/bin/load-env-${name}\n    '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/misc/my-env/default.nix","line":64,"column":1},"path":["pkgs","myEnvFun"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/misc/my-env/default.nix","line":64,"column":1},"path":["pkgs","myEnvFun"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.newScope","path":["pkgs","newScope"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":124,"column":3},"attr_expr":"newScope = extra: lib.callPackageWith (pkgsForCall // extra);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":124,"column":14},"lambda_expr":"extra: lib.callPackageWith (pkgsForCall // extra)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":124,"column":14},"path":["pkgs","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":124,"column":14},"path":["pkgs","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.nix-update-script","path":["pkgs","nix-update-script"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":196,"column":24},"attr_expr":"nix-update-script","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/ni/nix-update/nix-update-script.nix","line":6,"column":1},"lambda_expr":"{\n  attrPath ? null,\n  extraArgs ? [ ],\n}:\n\n[ \"${lib.getExe nix-update}\" ] ++ extraArgs ++ lib.optionals (attrPath != null) [ attrPath ]","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/ni/nix-update/nix-update-script.nix","line":6,"column":1},"path":["pkgs","nix-update-script"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/ni/nix-update/nix-update-script.nix","line":6,"column":1},"path":["pkgs","nix-update-script"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.nixos","path":["pkgs","nixos"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11544,"column":3},"attr_expr":"nixos =\n    configuration:\n    let\n      c = import (path + \"/nixos/lib/eval-config.nix\") {\n        inherit lib;\n        modules = [\n          (\n            { lib, ... }:\n            {\n              config.nixpkgs.pkgs = lib.mkDefault pkgs;\n              config.nixpkgs.localSystem = lib.mkDefault stdenv.hostPlatform;\n            }\n          )\n        ]\n        ++ (if builtins.isList configuration then configuration else [ configuration ]);\n\n        # The system is inherited from the current pkgs above.\n        # Set it to null, to remove the \"legacy\" entrypoint's non-hermetic default.\n        system = null;\n      };\n    in\n    c.config.system.build // c;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11545,"column":5},"lambda_expr":"nixos =\n    configuration:\n    let\n      c = import (path + \"/nixos/lib/eval-config.nix\") {\n        inherit lib;\n        modules = [\n          (\n            { lib, ... }:\n            {\n              config.nixpkgs.pkgs = lib.mkDefault pkgs;\n              config.nixpkgs.localSystem = lib.mkDefault stdenv.hostPlatform;\n            }\n          )\n        ]\n        ++ (if builtins.isList configuration then configuration else [ configuration ]);\n\n        # The system is inherited from the current pkgs above.\n        # Set it to null, to remove the \"legacy\" entrypoint's non-hermetic default.\n        system = null;\n      };\n    in\n    c.config.system.build // c;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11545,"column":5},"path":["pkgs","nixos"],"pos_type":"Lambda"}},"content":{"content":"\nEvaluate a NixOS configuration using this evaluation of Nixpkgs.\n\nWith this function you can write, for example, a package that\ndepends on a custom virtual machine image.\n\nParameter:  A module, path or list of those that represent the\n            configuration of the NixOS system to be constructed.\n\nResult: An attribute set containing packages produced by this\n        evaluation of NixOS, such as toplevel, kernel and\n        initialRamdisk.\n        The result can be extended in the modules by defining\n        extra attributes in system.build.\n        Alternatively, you may use the result's config and\n        options attributes to query any option.\n\nExample:\n\n    let\n      myOS = pkgs.nixos ({ lib, pkgs, config, ... }: {\n\n        config.services.nginx = {\n          enable = true;\n          # ...\n        };\n\n        # Use config.system.build to exports relevant parts of a\n        # configuration. The runner attribute should not be\n        # considered a fully general replacement for systemd\n        # functionality.\n        config.system.build.run-nginx = config.systemd.services.nginx.runner;\n      });\n    in\n      myOS.run-nginx\n\nUnlike in plain NixOS, the nixpkgs.config and\nnixpkgs.system options will be ignored by default. Instead,\nnixpkgs.pkgs will have the default value of pkgs as it was\nconstructed right after invoking the nixpkgs function (e.g. the\nvalue of import <nixpkgs> { overlays = [./my-overlay.nix]; }\nbut not the value of (import <nixpkgs> {} // { extra = ...; }).\n\nIf you do want to use the config.nixpkgs options, you are\nprobably better off by calling nixos/lib/eval-config.nix\ndirectly, even though it is possible to set config.nixpkgs.pkgs.\n\nFor more information about writing NixOS modules, see\nhttps://nixos.org/nixos/manual/index.html#sec-writing-modules\n\nNote that you will need to have called Nixpkgs with the system\nparameter set to the right value for your deployment target.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11545,"column":5},"path":["pkgs","nixos"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.nixosOptionsDoc","path":["pkgs","nixosOptionsDoc"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11584,"column":3},"attr_expr":"nixosOptionsDoc =\n    attrs:\n    (import ../../nixos/lib/make-options-doc) (\n      {\n        pkgs = pkgs.__splicedPackages;\n        inherit lib;\n      }\n      // attrs\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11585,"column":5},"lambda_expr":"attrs:\n    (import ../../nixos/lib/make-options-doc) (\n      {\n        pkgs = pkgs.__splicedPackages;\n        inherit lib;\n      }\n      // attrs\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11585,"column":5},"path":["pkgs","nixosOptionsDoc"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11585,"column":5},"path":["pkgs","nixosOptionsDoc"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.nuspellWithDicts","path":["pkgs","nuspellWithDicts"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6860,"column":3},"attr_expr":"nuspellWithDicts =\n    dicts:\n    lib.warn \"nuspellWithDicts is deprecated, please use nuspell.withDicts instead.\" nuspell.withDicts (\n      _: dicts\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6861,"column":5},"lambda_expr":"dicts:\n    lib.warn \"nuspellWithDicts is deprecated, please use nuspell.withDicts instead.\" nuspell.withDicts (\n      _: dicts\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6861,"column":5},"path":["pkgs","nuspellWithDicts"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":6861,"column":5},"path":["pkgs","nuspellWithDicts"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.onlyBin","path":["pkgs","onlyBin"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":701,"column":3},"attr_expr":"onlyBin =\n    drv:\n    runCommand \"${drv.name}-only-bin\" { } ''\n      mkdir -p $out\n      ln -s ${lib.getBin drv}/bin $out/bin\n    '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":702,"column":5},"lambda_expr":"onlyBin =\n    drv:\n    runCommand \"${drv.name}-only-bin\" { } ''\n      mkdir -p $out\n      ln -s ${lib.getBin drv}/bin $out/bin\n    '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":702,"column":5},"path":["pkgs","onlyBin"],"pos_type":"Lambda"}},"content":{"content":"\nProduce a derivation that links to the target derivation's `/bin`,\nand *only* `/bin`.\n\nThis is useful when your favourite package doesn't have a separate\nbin output and other contents of the package's output (e.g. setup\nhooks) cause trouble when used in your environment.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":702,"column":5},"path":["pkgs","onlyBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.overrideCC","path":["pkgs","overrideCC"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":52,"column":3},"attr_expr":"overrideCC =\n    stdenv: cc:\n    stdenv.override {\n      allowedRequisites = null;\n      cc = cc;\n      hasCC = cc != null;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":53,"column":5},"lambda_expr":"overrideCC =\n    stdenv: cc:\n    stdenv.override {\n      allowedRequisites = null;\n      cc = cc;\n      hasCC = cc != null;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":53,"column":5},"path":["pkgs","overrideCC"],"pos_type":"Lambda"}},"content":{"content":"Override the compiler in stdenv for specific packages.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":53,"column":5},"path":["pkgs","overrideCC"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.overrideInStdenv","path":["pkgs","overrideInStdenv"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":63,"column":3},"attr_expr":"overrideInStdenv =\n    stdenv: pkgs:\n    stdenv.override (prev: {\n      allowedRequisites = null;\n      extraBuildInputs = (prev.extraBuildInputs or [ ]) ++ pkgs;\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":64,"column":5},"lambda_expr":"overrideInStdenv =\n    stdenv: pkgs:\n    stdenv.override (prev: {\n      allowedRequisites = null;\n      extraBuildInputs = (prev.extraBuildInputs or [ ]) ++ pkgs;\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":64,"column":5},"path":["pkgs","overrideInStdenv"],"pos_type":"Lambda"}},"content":{"content":"for other dependencies.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":64,"column":5},"path":["pkgs","overrideInStdenv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.overrideMkDerivationArgs","path":["pkgs","overrideMkDerivationArgs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":223,"column":3},"attr_expr":"overrideMkDerivationArgs =\n    extension: stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = extendMkDerivationArgs old extension;\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":5},"lambda_expr":"overrideMkDerivationArgs =\n    extension: stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = extendMkDerivationArgs old extension;\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":5},"path":["pkgs","overrideMkDerivationArgs"],"pos_type":"Lambda"}},"content":{"content":"\nModify a stdenv so as to extend `mkDerivation`'s arguments.\nA stronger version of `addAttrsToDerivation`.\n\nExample:\n  requireCcache =\n    overrideMkDerivationArgs\n       (oldAttrs: {\n         requiredSystemFeatures = oldAttrs.requiredSystemFeatures or [ ] ++ [ \"ccache\" ];\n       });\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":5},"path":["pkgs","overrideMkDerivationArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.overrideSetup","path":["pkgs","overrideSetup"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":78,"column":3},"attr_expr":"overrideSetup = stdenv: setupScript: stdenv.override { inherit setupScript; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":78,"column":19},"lambda_expr":"overrideSetup = stdenv: setupScript: stdenv.override { inherit setupScript; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":78,"column":19},"path":["pkgs","overrideSetup"],"pos_type":"Lambda"}},"content":{"content":"};","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":78,"column":19},"path":["pkgs","overrideSetup"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.pkgsModule","path":["pkgs","pkgsModule"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11568,"column":3},"attr_expr":"pkgsModule =\n    { options, ... }:\n    {\n      config =\n        if options ? nixpkgs.pkgs then\n          {\n            # legacy / nixpkgs.nix style\n            nixpkgs.pkgs = pkgs;\n          }\n        else\n          {\n            # minimal\n            _module.args.pkgs = pkgs;\n          };\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11569,"column":5},"lambda_expr":"pkgsModule =\n    { options, ... }:\n    {\n      config =\n        if options ? nixpkgs.pkgs then\n          {\n            # legacy / nixpkgs.nix style\n            nixpkgs.pkgs = pkgs;\n          }\n        else\n          {\n            # minimal\n            _module.args.pkgs = pkgs;\n          };\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11569,"column":5},"path":["pkgs","pkgsModule"],"pos_type":"Lambda"}},"content":{"content":"A NixOS/home-manager/arion/... module that sets the `pkgs` module argument.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11569,"column":5},"path":["pkgs","pkgsModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.portableService","path":["pkgs","portableService"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5768,"column":3},"attr_expr":"portableService = callPackage ../build-support/portable-service { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/portable-service/default.nix","line":17,"column":1},"lambda_expr":"{\n  # The name and version of the portable service. The resulting image will be\n  # created in result/$pname_$version.raw\n  pname,\n  version,\n\n  # Units is a list of derivations for systemd unit files. Those files will be\n  # copied to /etc/systemd/system in the resulting image. Note that the unit\n  # names must be prefixed with the name of the portable service.\n  units,\n\n  # Basic info about the portable service image, used for the generated\n  # /etc/os-release\n  description ? null,\n  homepage ? null,\n\n  # A list of attribute sets {object, symlink}. Symlinks will be created\n  # in the root filesystem of the image to objects in the nix store.\n  symlinks ? [ ],\n\n  # A list of additional derivations to be included in the image as-is.\n  contents ? [ ],\n\n  # mksquashfs options\n  squashfsTools ? pkgs.squashfsTools,\n  squash-compression ? \"xz -Xdict-size 100%\",\n  squash-block-size ? \"1M\",\n}:\n\nlet\n  filterNull = lib.filterAttrs (_: v: v != null);\n  envFileGenerator = lib.generators.toKeyValue { };\n\n  rootFsScaffold =\n    let\n      os-release-params = {\n        PORTABLE_ID = pname;\n        PORTABLE_PRETTY_NAME = description;\n        HOME_URL = homepage;\n        ID = \"nixos\";\n        PRETTY_NAME = \"NixOS\";\n        BUILD_ID = \"rolling\";\n      };\n      os-release = pkgs.writeText \"os-release\" (envFileGenerator (filterNull os-release-params));\n\n    in\n    stdenv.mkDerivation {\n      pname = \"root-fs-scaffold\";\n      inherit version;\n\n      buildCommand = ''\n        # scaffold a file system layout\n        mkdir -p $out/etc/systemd/system $out/proc $out/sys $out/dev $out/run \\\n                 $out/tmp $out/var/tmp $out/var/lib $out/var/cache $out/var/log\n\n        # empty files to mount over with host's version\n        touch $out/etc/resolv.conf $out/etc/machine-id\n\n        # required for portable services\n        cp ${os-release} $out/etc/os-release\n      ''\n      # units **must** be copied to /etc/systemd/system/\n      + (lib.concatMapStringsSep \"\\n\" (u: \"cp ${u} $out/etc/systemd/system/${u.name};\") units)\n      + (lib.concatMapStringsSep \"\\n\" (\n        { object, symlink }:\n        ''\n          mkdir -p $(dirname $out/${symlink});\n          ln -s ${object} $out/${symlink};\n        ''\n      ) symlinks);\n    };\nin\n\nassert lib.assertMsg (lib.all (\n  u: lib.hasPrefix pname u.name\n) units) \"Unit names must be prefixed with the service name\";\n\nstdenv.mkDerivation {\n  pname = \"${pname}-img\";\n  inherit version;\n\n  nativeBuildInputs = [ squashfsTools ];\n  closureInfo = pkgs.closureInfo { rootPaths = [ rootFsScaffold ] ++ contents; };\n\n  buildCommand = ''\n    mkdir -p nix/store\n    for i in $(< $closureInfo/store-paths); do\n      cp -a \"$i\" \"''${i:1}\"\n    done\n\n    mkdir -p $out\n    # the '.raw' suffix is mandatory by the portable service spec\n    # We have to set SOURCE_DATE_EPOCH to 0 here for reproducibility (https://github.com/NixOS/nixpkgs/issues/390696)\n    SOURCE_DATE_EPOCH=0 mksquashfs nix ${rootFsScaffold}/* $out/\"${pname}_${version}.raw\" \\\n      -quiet -noappend \\\n      -exit-on-error \\\n      -keep-as-directory \\\n      -all-root -root-mode 755 \\\n      -b ${squash-block-size} -comp ${squash-compression}\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/portable-service/default.nix","line":17,"column":1},"path":["pkgs","portableService"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/portable-service/default.nix","line":17,"column":1},"path":["pkgs","portableService"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.prefer-remote-fetch","path":["pkgs","prefer-remote-fetch"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":543,"column":3},"attr_expr":"prefer-remote-fetch = import ../build-support/prefer-remote-fetch;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/prefer-remote-fetch/default.nix","line":13,"column":1},"lambda_expr":"self: super:\nlet\n  preferLocal =\n    orig:\n    self.lib.extendMkDerivation {\n      constructDrv = orig;\n      extendDrvArgs =\n        finalAttrs:\n        {\n          preferLocalBuild ? false,\n          ...\n        }:\n        {\n          inherit preferLocalBuild;\n        };\n    };\n\nin\n{\n  binary-cache = preferLocal super.binary-cache;\n  buildenv = preferLocal super.buildenv;\n  fetchfossil = preferLocal super.fetchfossil;\n  fetchdocker = preferLocal super.fetchdocker;\n  fetchgit = (preferLocal super.fetchgit) // {\n    inherit (super.fetchgit) getRevWithTag;\n  };\n  fetchgx = preferLocal super.fetchgx;\n  fetchhg = preferLocal super.fetchhg;\n  fetchipfs = preferLocal super.fetchipfs;\n  fetchrepoproject = preferLocal super.fetchrepoproject;\n  fetchs3 = preferLocal super.fetchs3;\n  fetchsvn = preferLocal super.fetchsvn;\n  fetchurl = preferLocal super.fetchurl;\n  mkNugetSource = preferLocal super.mkNugetSource;\n}","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/prefer-remote-fetch/default.nix","line":13,"column":1},"path":["pkgs","prefer-remote-fetch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/prefer-remote-fetch/default.nix","line":13,"column":1},"path":["pkgs","prefer-remote-fetch"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.propagateBuildInputs","path":["pkgs","propagateBuildInputs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":195,"column":3},"attr_expr":"propagateBuildInputs = overrideMkDerivationArgs (args: {\n    propagatedBuildInputs = (args.propagatedBuildInputs or [ ]) ++ (args.buildInputs or [ ]);\n    buildInputs = [ ];\n  });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":16},"lambda_expr":"stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = extendMkDerivationArgs old extension;\n    })","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.puredata-with-plugins","path":["pkgs","puredata-with-plugins"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9860,"column":3},"attr_expr":"puredata-with-plugins =\n    plugins: callPackage ../by-name/pu/puredata/wrapper.nix { inherit plugins; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9861,"column":5},"lambda_expr":"plugins: callPackage ../by-name/pu/puredata/wrapper.nix { inherit plugins; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9861,"column":5},"path":["pkgs","puredata-with-plugins"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9861,"column":5},"path":["pkgs","puredata-with-plugins"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.pyotherside","path":["pkgs","pyotherside"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":222,"column":10},"lambda_expr":"v:\n    if lib.isDerivation v then\n      lib.warnOnInstantiate msg v\n    else if lib.isAttrs v then\n      lib.mapAttrs (_: lib.warn msg) v\n    else if lib.isFunction v then\n      arg: lib.warn msg (v arg)\n    else if lib.isList v then\n      map (lib.warn msg) v\n    else\n      # Can’t do better than this, and a `throw` would be more\n      # disruptive for users…\n      #\n      # `nix search` flags up warnings already, so hopefully this won’t\n      # make things much worse until we have proper CI for aliases,\n      # especially since aliases of paths and numbers are presumably\n      # not common.\n      lib.warn msg v","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.python-setup-hook","path":["pkgs","python-setup-hook"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5046,"column":3},"attr_expr":"python-setup-hook = buildPackages.callPackage ../development/interpreters/python/setup-hook.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/setup-hook.nix","line":6,"column":1},"lambda_expr":"sitePackages:\n\nlet\n  hook = replaceVars ./setup-hook.sh {\n    inherit sitePackages;\n  };\nin\nrunCommand \"python-setup-hook.sh\"\n  {\n    strictDeps = true;\n  }\n  ''\n    cp ${hook} $out\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/setup-hook.nix","line":6,"column":1},"path":["pkgs","python-setup-hook"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/setup-hook.nix","line":6,"column":1},"path":["pkgs","python-setup-hook"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.qmenumodel","path":["pkgs","qmenumodel"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":222,"column":10},"lambda_expr":"v:\n    if lib.isDerivation v then\n      lib.warnOnInstantiate msg v\n    else if lib.isAttrs v then\n      lib.mapAttrs (_: lib.warn msg) v\n    else if lib.isFunction v then\n      arg: lib.warn msg (v arg)\n    else if lib.isList v then\n      map (lib.warn msg) v\n    else\n      # Can’t do better than this, and a `throw` would be more\n      # disruptive for users…\n      #\n      # `nix search` flags up warnings already, so hopefully this won’t\n      # make things much worse until we have proper CI for aliases,\n      # especially since aliases of paths and numbers are presumably\n      # not common.\n      lib.warn msg v","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.qtEnv","path":["pkgs","qtEnv"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7075,"column":3},"attr_expr":"qtEnv = qt5.env;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/qt-5/qt-env.nix","line":2,"column":1},"lambda_expr":"name: paths:\n\nbuildEnv {\n  inherit name;\n  paths = [ qtbase ] ++ paths;\n\n  pathsToLink = [\n    \"/bin\"\n    \"/mkspecs\"\n    \"/include\"\n    \"/lib\"\n    \"/share\"\n  ];\n  extraOutputsToInstall = [\n    \"out\"\n    \"dev\"\n  ];\n\n  postBuild = ''\n    rm \"$out/bin/qmake\"\n    cp \"${qtbase.dev}/bin/qmake\" \"$out/bin\"\n    cat >\"$out/bin/qt.conf\" <<EOF\n    [Paths]\n    Prefix = $out\n    Plugins = ${qtbase.qtPluginPrefix}\n    Qml2Imports = ${qtbase.qtQmlPrefix}\n    Documentation = ${qtbase.qtDocPrefix}\n    EOF\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/qt-5/qt-env.nix","line":2,"column":1},"path":["pkgs","qtEnv"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/libraries/qt-5/qt-env.nix","line":2,"column":1},"path":["pkgs","qtEnv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.quake3wrapper","path":["pkgs","quake3wrapper"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10785,"column":5},"attr_expr":"quake3wrapper","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/games/quake3/wrapper/default.nix","line":10,"column":1},"lambda_expr":"{\n  paks,\n  pname ? (lib.head paks).pname,\n  version ? (lib.head paks).version,\n  description ? \"\",\n}:\n\nlet\n  libPath = lib.makeLibraryPath [\n    libGL\n    stdenv.cc.cc\n  ];\n  env = buildEnv {\n    name = \"quake3-env\";\n    paths = [ ioquake3 ] ++ paks;\n  };\n\nin\nstdenv.mkDerivation {\n  pname = \"${pname}-${ioquake3.name}\";\n  inherit version;\n\n  nativeBuildInputs = [ makeWrapper ];\n\n  buildCommand =\n    let\n      setBasepath = \"+set fs_basepath ${env}\";\n    in\n    lib.optionalString stdenv.hostPlatform.isLinux ''\n      mkdir -p $out/bin\n\n      # We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback\n      # software rendering. GCC is needed so that libgcc_s.so can be found\n      # when Mesa is used.\n      makeWrapper ${env}/bin/ioquake3 $out/bin/${pname} \\\n        --suffix-each LD_LIBRARY_PATH ':' \"${libPath}\" \\\n        --add-flags \"${setBasepath} +set r_allowSoftwareGL 1\"\n\n      makeWrapper ${env}/bin/ioq3ded $out/bin/${pname}-server \\\n        --add-flags \"${setBasepath}\"\n    ''\n    + lib.optionalString stdenv.hostPlatform.isDarwin ''\n      mkdir -p $out/Applications $out/bin\n      makeWrapper ${env}/bin/ioquake3 $out/bin/${pname} \\\n        --add-flags \"${setBasepath}\"\n      makeWrapper ${env}/bin/ioq3ded $out/bin/${pname}-server \\\n        --add-flags \"${setBasepath}\"\n\n      cp -RL ${env}/Applications/ioquake3.app/ $out/Applications/${pname}.app\n      chmod -R +w $out/Applications/\n\n      wrapProgram $out/Applications/${pname}.app/Contents/MacOS/ioquake3 \\\n        --add-flags \"${setBasepath}\"\n      wrapProgram $out/Applications/${pname}.app/Contents/MacOS/ioq3ded \\\n        --add-flags \"${setBasepath}\"\n    '';\n\n  meta = {\n    mainProgram = \"${pname}\";\n    inherit ((lib.head paks).meta)\n      description\n      longDescription\n      homepage\n      license\n      ;\n    inherit (ioquake3.meta) platforms;\n  };\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/games/quake3/wrapper/default.nix","line":10,"column":1},"path":["pkgs","quake3wrapper"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/games/quake3/wrapper/default.nix","line":10,"column":1},"path":["pkgs","quake3wrapper"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rebar3WithPlugins","path":["pkgs","rebar3WithPlugins"],"aliases":[["pkgs","beamPackages","rebar3WithPlugins"],["pkgs","beamPackages","beamPackages","rebar3WithPlugins"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4824,"column":5},"attr_expr":"rebar3WithPlugins","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"lambda_expr":"{\n      plugins ? [ ],\n      globalPlugins ? [ ],\n      rebar3 ? _rebar3,\n    }:\n    let\n      pluginLibDirs = map (p: \"${p}/lib/erlang/lib\") (lib.unique (plugins ++ globalPlugins));\n      globalPluginNames = lib.unique (map (p: p.pname) globalPlugins);\n      rebar3Patched = (\n        rebar3.overrideAttrs (old: {\n\n          # skip-plugins.patch is necessary because otherwise rebar3 will always\n          # try to fetch plugins if they are not already present in _build.\n          #\n          # global-deps.patch makes it possible to use REBAR_GLOBAL_PLUGINS to\n          # instruct rebar3 to always load a certain plugin. It is necessary since\n          # REBAR_GLOBAL_CONFIG_DIR doesn't seem to work for this.\n          patches = [\n            ./skip-plugins.patch\n            ./global-plugins.patch\n          ];\n\n          # our patches cause the tests to fail\n          doCheck = false;\n        })\n      );\n    in\n    stdenv.mkDerivation {\n      pname = \"rebar3-with-plugins\";\n      inherit (rebar3) version;\n      nativeBuildInputs = [\n        erlang\n        makeWrapper\n      ];\n      unpackPhase = \"true\";\n\n      # Here we extract the rebar3 escript (like `rebar3_prv_local_install.erl`) and\n      # add plugins to the code path.\n\n      installPhase = ''\n        erl -noshell -eval '\n          {ok, Escript} = escript:extract(\"${rebar3Patched}/bin/rebar3\", []),\n          {archive, Archive} = lists:keyfind(archive, 1, Escript),\n          {ok, _} = zip:extract(Archive, [{cwd, \"'$out/lib'\"}]),\n          init:stop(0)\n        '\n        cp ${./rebar_ignore_deps.erl} rebar_ignore_deps.erl\n        erlc -o $out/lib/rebar/ebin rebar_ignore_deps.erl\n        mkdir -p $out/bin\n        makeWrapper ${erlang}/bin/erl $out/bin/rebar3 \\\n          --set REBAR_GLOBAL_PLUGINS \"${toString globalPluginNames} rebar_ignore_deps\" \\\n          --suffix-each ERL_LIBS \":\" \"$out/lib ${toString pluginLibDirs}\" \\\n          --add-flags \"+sbtu +A1 -noshell -boot start_clean -s rebar3 main -extra\"\n      '';\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"path":["pkgs","rebar3WithPlugins"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/tools/build-managers/rebar3/default.nix","line":119,"column":5},"path":["pkgs","rebar3WithPlugins"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.recurseIntoAttrs","path":["pkgs","recurseIntoAttrs"],"aliases":[["pkgs","dontRecurseIntoAttrs"],["pkgs","forceSystem"],["pkgs","hiPrio"],["pkgs","lowPrio"],["pkgs","makeOverridable"],["pkgs","runCommandNoCC"],["pkgs","runCommandNoCCLocal"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","recurseIntoAttrs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","recurseIntoAttrs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.recurseIntoAttrsWith","path":["pkgs","recurseIntoAttrsWith"],"aliases":[],"signature":"recurseIntoAttrsWith :: AttrSet -> AttrSet -> AttrSet\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":141,"column":3},"attr_expr":"recurseIntoAttrsWith =\n    {\n      hydra ? true,\n      eval ? true,\n      search ? true,\n    }:\n    attrs:\n    attrs\n    // {\n      recurseForDerivations =\n        let\n          modes = {\n            inherit hydra eval search;\n          };\n        in\n        modes.${config.recursionMode};\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":142,"column":5},"lambda_expr":"recurseIntoAttrsWith =\n    {\n      hydra ? true,\n      eval ? true,\n      search ? true,\n    }:\n    attrs:\n    attrs\n    // {\n      recurseForDerivations =\n        let\n          modes = {\n            inherit hydra eval search;\n          };\n        in\n        modes.${config.recursionMode};\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":141,"column":3},"path":["pkgs","recurseIntoAttrsWith"],"pos_type":"Attribute"}},"content":{"content":"\nRecurse into an attribute set depending on which `config.recursionMode` is set.\n\nThis function only affects a single attribute set;\nit does not apply itself recursively for nested attribute sets.\n\n# Inputs\n`modes`\n: An attribute set containg keys from `config.recursionMode` defaulting to true.\n`attrs`\n: An attribute set to scan for derivations.\n\n# Type\n```\nrecurseIntoAttrsWith :: AttrSet -> AttrSet -> AttrSet\n```\n\n# Examples\n:::{.example}\n## `pkgs.recurseIntoAttrsWith` usage example\n```nix\n{ pkgs ? import <nixpkgs> {} }:\n{\n  myTools = pkgs.recurseIntoAttrsWith { } {\n    inherit (pkgs) hello figlet;\n  };\n}\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":141,"column":3},"path":["pkgs","recurseIntoAttrsWith"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.referencesByPopularity","path":["pkgs","referencesByPopularity"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":902,"column":3},"attr_expr":"referencesByPopularity = callPackage ../build-support/references-by-popularity { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/references-by-popularity/default.nix","line":8,"column":1},"lambda_expr":"path:\nrunCommand \"closure-paths\"\n  {\n    exportReferencesGraph.graph = path;\n    __structuredAttrs = true;\n    preferLocalBuild = true;\n    nativeBuildInputs = [\n      coreutils\n      python3\n    ];\n  }\n  ''\n    python3 ${./closure-graph.py} \"$NIX_ATTRS_JSON_FILE\" graph > ''${outputs[out]}\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/references-by-popularity/default.nix","line":8,"column":1},"path":["pkgs","referencesByPopularity"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/references-by-popularity/default.nix","line":8,"column":1},"path":["pkgs","referencesByPopularity"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.replaceDependencies","path":["pkgs","replaceDependencies"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":872,"column":3},"attr_expr":"replaceDependencies = callPackage ../build-support/replace-dependencies.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-dependencies.nix","line":35,"column":1},"lambda_expr":"{\n  drv,\n  replacements,\n  cutoffPackages ? [ ],\n  verbose ? true,\n}:\n\nlet\n  inherit (builtins) unsafeDiscardStringContext appendContext;\n  inherit (lib)\n    listToAttrs\n    isStringLike\n    readFile\n    attrValues\n    mapAttrs\n    filter\n    hasAttr\n    mapAttrsToList\n    ;\n  inherit (lib.attrsets) mergeAttrsList;\n\n  isNonCaStorePath =\n    x:\n    if isStringLike x then\n      let\n        str = toString x;\n      in\n      builtins.substring 0 1 str == \"/\" && (dirOf str == builtins.storeDir)\n    else\n      false;\n\n  toContextlessString = x: unsafeDiscardStringContext (toString x);\n  warn = if verbose then lib.warn else (x: y: y);\n\n  referencesOf =\n    drv:\n    import\n      (runCommandLocal \"references.nix\"\n        {\n          exportReferencesGraph = [\n            \"graph\"\n            drv\n          ];\n        }\n        ''\n          (echo {\n          while read path\n          do\n              echo \"  \\\"$path\\\" = [\"\n              read count\n              read count\n              while [ \"0\" != \"$count\" ]\n              do\n                  read ref_path\n                  if [ \"$ref_path\" != \"$path\" ]\n                  then\n                      echo \"    \\\"$ref_path\\\"\"\n                  fi\n                  count=$(($count - 1))\n              done\n              echo \"  ];\"\n          done < graph\n          echo }) > $out\n        ''\n      ).outPath;\n\n  realisation =\n    drv:\n    if isNonCaStorePath drv then\n      # Input-addressed and fixed-output derivations have their realisation as outPath.\n      toContextlessString drv\n    else\n      # Floating and deferred derivations have a placeholder outPath.\n      # The realisation can only be obtained by performing an actual build.\n      unsafeDiscardStringContext (\n        readFile (\n          runCommandLocal \"realisation\"\n            {\n              env = {\n                inherit drv;\n              };\n            }\n            ''\n              echo -n \"$drv\" > $out\n            ''\n        )\n      );\n  rootReferences = referencesOf drv;\n  relevantReplacements = filter (\n    { oldDependency, newDependency }:\n    if toString oldDependency == toString newDependency then\n      warn \"replaceDependencies: attempting to replace dependency ${oldDependency} of ${drv} with itself\"\n        # Attempting to replace a dependency by itself is completely useless, and would only lead to infinite recursion.\n        # Hence it must not be attempted to apply this replacement in any case.\n        false\n    else if !hasAttr (realisation oldDependency) rootReferences then\n      warn \"replaceDependencies: ${drv} does not depend on ${oldDependency}, so it will not be replaced\"\n        # Strictly speaking, another replacement could introduce the dependency.\n        # However, handling this corner case would add significant complexity.\n        # So we just leave it to the user to apply the replacement at the correct place, but show a warning to let them know.\n        false\n    else\n      true\n  ) replacements;\n  targetDerivations = [ drv ] ++ map ({ newDependency, ... }: newDependency) relevantReplacements;\n  referencesMemo = listToAttrs (\n    map (drv: {\n      name = realisation drv;\n      value = referencesOf drv;\n    }) targetDerivations\n  );\n  relevantReferences = mergeAttrsList (attrValues referencesMemo);\n  # Make sure a derivation is returned even when no replacements are actually applied.\n  # Yes, even in the stupid edge case where the root derivation itself is replaced.\n  storePathOrKnownTargetDerivationMemo =\n    mapAttrs (\n      drv: _references:\n      # builtins.storePath does not work in pure evaluation mode, even though it is not impure.\n      # This reimplementation in Nix works as long as the path is already allowed in the evaluation state.\n      # This is always the case here, because all paths come from the closure of the original derivation.\n      appendContext drv { ${drv}.path = true; }\n    ) relevantReferences\n    // listToAttrs (\n      map (drv: {\n        name = realisation drv;\n        value = drv;\n      }) targetDerivations\n    );\n\n  rewriteMemo =\n    # Mind the order of how the three attrsets are merged here.\n    # The order of precedence needs to be \"explicitly specified replacements\" > \"rewrite exclusion (cutoffPackages)\" > \"rewrite\".\n    # So the attrset merge order is the opposite.\n    mapAttrs (\n      drv: references:\n      let\n        rewrittenReferences = filter (dep: dep != drv && toString rewriteMemo.${dep} != dep) references;\n        rewrites = listToAttrs (\n          map (reference: {\n            name = reference;\n            value = rewriteMemo.${reference};\n          }) rewrittenReferences\n        );\n      in\n      replaceDirectDependencies {\n        drv = storePathOrKnownTargetDerivationMemo.${drv};\n        replacements = mapAttrsToList (name: value: {\n          oldDependency = name;\n          newDependency = value;\n        }) rewrites;\n      }\n    ) relevantReferences\n    // listToAttrs (\n      map (drv: {\n        name = realisation drv;\n        value = storePathOrKnownTargetDerivationMemo.${realisation drv};\n      }) cutoffPackages\n    )\n    // listToAttrs (\n      map (\n        { oldDependency, newDependency }:\n        {\n          name = realisation oldDependency;\n          value = rewriteMemo.${realisation newDependency};\n        }\n      ) relevantReplacements\n    );\nin\nrewriteMemo.${realisation drv}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-dependencies.nix","line":35,"column":1},"path":["pkgs","replaceDependencies"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-dependencies.nix","line":35,"column":1},"path":["pkgs","replaceDependencies"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.replaceDependency","path":["pkgs","replaceDependency"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":874,"column":3},"attr_expr":"replaceDependency =\n    {\n      drv,\n      oldDependency,\n      newDependency,\n      verbose ? true,\n    }:\n    replaceDependencies {\n      inherit drv verbose;\n      replacements = [\n        {\n          inherit oldDependency newDependency;\n        }\n      ];\n      # When newDependency depends on drv, instead of causing infinite recursion, keep it as is.\n      cutoffPackages = [ newDependency ];\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":875,"column":5},"lambda_expr":"{\n      drv,\n      oldDependency,\n      newDependency,\n      verbose ? true,\n    }:\n    replaceDependencies {\n      inherit drv verbose;\n      replacements = [\n        {\n          inherit oldDependency newDependency;\n        }\n      ];\n      # When newDependency depends on drv, instead of causing infinite recursion, keep it as is.\n      cutoffPackages = [ newDependency ];\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":875,"column":5},"path":["pkgs","replaceDependency"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":875,"column":5},"path":["pkgs","replaceDependency"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.replaceDirectDependencies","path":["pkgs","replaceDirectDependencies"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":896,"column":3},"attr_expr":"replaceDirectDependencies = callPackage ../build-support/replace-direct-dependencies.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-direct-dependencies.nix","line":9,"column":1},"lambda_expr":"{\n  drv,\n  replacements ? [ ],\n}:\nlet\n  inherit (lib)\n    isStringLike\n    substring\n    stringLength\n    optionalString\n    escapeShellArgs\n    concatMap\n    ;\n\n  isNonCaStorePath =\n    x:\n    if isStringLike x then\n      let\n        str = toString x;\n      in\n      builtins.substring 0 1 str == \"/\" && (dirOf str == builtins.storeDir)\n    else\n      false;\nin\nif replacements == [ ] then\n  drv\nelse\n  let\n    drvName =\n      if isNonCaStorePath drv then\n        # Reconstruct the name from the actual store path if available.\n        substring 33 (stringLength (baseNameOf drv)) (baseNameOf drv)\n      else if drv ? drvAttrs.name then\n        # Try to get the name from the derivation arguments otherwise (for floating or deferred derivations).\n        drv.drvAttrs.name\n        + (\n          let\n            outputName = drv.outputName or \"out\";\n          in\n          optionalString (outputName != \"out\") \"-${outputName}\"\n        )\n      else\n        throw \"cannot reconstruct the derivation name from ${drv}\";\n  in\n  runCommandLocal drvName { nativeBuildInputs = [ nix.out ]; } ''\n    createRewriteScript() {\n        while [ $# -ne 0 ]; do\n            oldBasename=\"$(basename \"$1\")\"\n            newBasename=\"$(basename \"$2\")\"\n            shift 2\n            if [ ''${#oldBasename} -ne ''${#newBasename} ]; then\n                echo \"cannot rewrite $oldBasename to $newBasename: length does not match\" >&2\n                exit 1\n            fi\n            echo \"s|$oldBasename|$newBasename|g\" >> rewrite.sed\n        done\n    }\n    createRewriteScript ${\n      escapeShellArgs (\n        [\n          drv\n          (placeholder \"out\")\n        ]\n        ++ concatMap (\n          { oldDependency, newDependency }:\n          [\n            oldDependency\n            newDependency\n          ]\n        ) replacements\n      )\n    }\n    nix-store --dump ${drv} | sed -f rewrite.sed | nix-store --restore $out\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-direct-dependencies.nix","line":9,"column":1},"path":["pkgs","replaceDirectDependencies"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-direct-dependencies.nix","line":9,"column":1},"path":["pkgs","replaceDirectDependencies"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.replaceVars","path":["pkgs","replaceVars"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":894,"column":3},"attr_expr":"replaceVars = callPackage ../build-support/replace-vars/replace-vars.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-vars/replace-vars.nix","line":36,"column":1},"lambda_expr":"src: replacements: replaceVarsWith { inherit src replacements; }","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-vars/replace-vars.nix","line":36,"column":1},"path":["pkgs","replaceVars"],"pos_type":"Lambda"}},"content":{"content":"\n`replaceVars` is a wrapper around the [bash function `substitute`](https://nixos.org/manual/nixpkgs/stable/#fun-substitute)\nin the stdenv. It allows for terse replacement of names in the specified path, while checking\nfor common mistakes such as naming a replacement that does nothing or forgetting a variable which\nneeds to be replaced.\n\nAs with the [`--subst-var-by`](https://nixos.org/manual/nixpkgs/stable/#fun-substitute-subst-var-by)\nflag, names are encoded as `@name@` in the provided file at the provided path.\n\nAny unmatched variable names in the file at the provided path will cause a build failure.\n\nBy default, any remaining text that matches `@[A-Za-z_][0-9A-Za-z_'-]@` in the output after replacement\nhas occurred will cause a build failure. Variables can be excluded from this check by passing \"null\" for them.\n\n# Inputs\n\n`src` ([Store Path](https://nixos.org/manual/nix/latest/store/store-path.html#store-path) String)\n: The file in which to replace variables.\n\n`replacements` (AttrsOf String)\n: Each entry in this set corresponds to a `--subst-var-by` entry in [`substitute`](https://nixos.org/manual/nixpkgs/stable/#fun-substitute) or\n  null to keep it unchanged.\n\n# Example\n\n```nix\n{ replaceVars }:\n\nreplaceVars ./greeting.txt { world = \"hello\"; }\n```\n\nSee `../../test/replace-vars/default.nix` for tests of this function.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-vars/replace-vars.nix","line":36,"column":1},"path":["pkgs","replaceVars"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.replaceVarsWith","path":["pkgs","replaceVarsWith"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":892,"column":3},"attr_expr":"replaceVarsWith = callPackage ../build-support/replace-vars/replace-vars-with.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-vars/replace-vars-with.nix","line":51,"column":1},"lambda_expr":"{\n  src,\n  replacements,\n  dir ? null,\n  isExecutable ? false,\n  ...\n}@attrs:\n\nlet\n  # We use `--replace-fail` instead of `--subst-var-by` so that if the thing isn't there, we fail.\n  subst-var-by = name: value: [\n    \"--replace-fail\"\n    (lib.escapeShellArg \"@${name}@\")\n    (lib.escapeShellArg (lib.defaultTo \"@${name}@\" value))\n  ];\n\n  substitutions = lib.concatLists (lib.mapAttrsToList subst-var-by replacements);\n\n  left-overs = map ({ name, ... }: name) (\n    builtins.filter ({ value, ... }: value == null) (lib.attrsToList replacements)\n  );\n\n  optionalAttrs =\n    if (builtins.intersectAttrs attrs forcedAttrs == { }) then\n      removeAttrs attrs [ \"replacements\" ]\n    else\n      throw \"Passing any of ${builtins.concatStringsSep \", \" (builtins.attrNames forcedAttrs)} to replaceVarsWith is not supported.\";\n\n  forcedAttrs = {\n    doCheck = true;\n    dontUnpack = true;\n    preferLocalBuild = true;\n    allowSubstitutes = false;\n\n    buildPhase = ''\n      runHook preBuild\n\n      target=$out\n      if test -n \"$dir\"; then\n          target=$out/$dir/$name\n          mkdir -p $out/$dir\n      fi\n\n      substitute \"$src\" \"$target\" ${lib.concatStringsSep \" \" substitutions}\n\n      if test -n \"$isExecutable\"; then\n          chmod +x $target\n      fi\n\n      runHook postBuild\n    '';\n\n    # Look for Nix identifiers surrounded by `@` that aren't substituted.\n    checkPhase =\n      let\n        lookahead =\n          if builtins.length left-overs == 0 then \"\" else \"(?!${builtins.concatStringsSep \"|\" left-overs}@)\";\n        regex = lib.escapeShellArg \"@${lookahead}[a-zA-Z_][0-9A-Za-z_'-]*@\";\n      in\n      ''\n        runHook preCheck\n        if grep -Pqe ${regex} \"$target\"; then\n          echo The following look like unsubstituted Nix identifiers that remain in \"$target\":\n          grep -Poe ${regex} \"$target\"\n          echo Use the more precise '`substitute`' function if this check is in error.\n          exit 1\n        fi\n        runHook postCheck\n      '';\n  };\nin\n\nstdenvNoCC.mkDerivation (\n  {\n    name = baseNameOf (toString src);\n  }\n  // optionalAttrs\n  // forcedAttrs\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-vars/replace-vars-with.nix","line":51,"column":1},"path":["pkgs","replaceVarsWith"],"pos_type":"Lambda"}},"content":{"content":"\n`replaceVarsWith` is a wrapper around the [bash function `substitute`](https://nixos.org/manual/nixpkgs/stable/#fun-substitute)\nin the stdenv. It allows for terse replacement of names in the specified path, while checking\nfor common mistakes such as naming a replacement that does nothing or forgetting a variable which\nneeds to be replaced.\n\nAs with the [`--subst-var-by`](https://nixos.org/manual/nixpkgs/stable/#fun-substitute-subst-var-by)\nflag, names are encoded as `@name@` in the provided file at the provided path.\n\nAny unmatched variable names in the file at the provided path will cause a build failure.\n\nBy default, any remaining text that matches `@[A-Za-z_][0-9A-Za-z_'-]@` in the output after replacement\nhas occurred will cause a build failure. Variables can be excluded from this check by passing \"null\" for them.\n\n# Inputs\n\n`src` ([Store Path](https://nixos.org/manual/nix/latest/store/store-path.html#store-path) String)\n: The file in which to replace variables.\n\n`replacements` (AttrsOf String)\n: Each entry in this set corresponds to a `--subst-var-by` entry in [`substitute`](https://nixos.org/manual/nixpkgs/stable/#fun-substitute) or\n  null to keep it unchanged.\n\n`dir` (String)\n: Sub directory in $out to store the result in. Commonly set to \"bin\".\n\n`isExecutable` (Boolean)\n: Whether to mark the output file as executable.\n\nMost arguments supported by mkDerivation are also supported, with some exceptions for which\nan error will be thrown.\n\n# Example\n\n```nix\n{ replaceVarsWith }:\n\nreplaceVarsWith {\n  src = ./my-setup-hook.sh;\n  replacements = { world = \"hello\"; };\n  dir = \"bin\";\n  isExecutable = true;\n}\n```\n\nSee `../../test/replace-vars/default.nix` for tests of this function. Also see `replaceVars` for a short\nversion with src and replacements only.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/replace-vars/replace-vars-with.nix","line":51,"column":1},"path":["pkgs","replaceVarsWith"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.repoRevToNameMaybe","path":["pkgs","repoRevToNameMaybe"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":580,"column":3},"attr_expr":"repoRevToNameMaybe = lib.repoRevToName config.fetchedSourceNameDefault;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":510,"column":9},"lambda_expr":"repo: rev: suffix:\n        \"source\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":510,"column":9},"path":["pkgs","repoRevToNameMaybe"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/sources.nix","line":510,"column":9},"path":["pkgs","repoRevToNameMaybe"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.requireFile","path":["pkgs","requireFile"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":889,"column":3},"attr_expr":"requireFile = lib.extendMkDerivation {\n    constructDrv = stdenv.mkDerivation;\n\n    excludeDrvArgNames = [\n      \"hash\"\n      \"hashMode\"\n      \"message\"\n      \"sha1\"\n      \"sha256\"\n      \"url\"\n    ];\n\n    extendDrvArgs =\n      finalAttrs:\n      {\n        name ? null,\n        sha256 ? null,\n        sha1 ? null,\n        hash ? null,\n        url ? null,\n        message ? null,\n        hashMode ? \"flat\",\n        meta ? { },\n      }@args:\n      assert (message != null) || (url != null);\n      assert (sha256 != null) || (sha1 != null) || (hash != null);\n      assert (name != null) || (url != null);\n      let\n        msg =\n          if message != null then\n            message\n          else\n            ''\n              Unfortunately, we cannot download file ${name_} automatically.\n              Please go to ${url} to download it yourself, and add it to the Nix store\n              using either\n                nix-store --add-fixed ${hashAlgo} ${name_}\n              or\n                nix-prefetch-url --type ${hashAlgo} file:///path/to/${name_}\n            '';\n        hashAlgo =\n          if hash != null then\n            (builtins.head (lib.strings.splitString \"-\" hash))\n          else if sha256 != null then\n            \"sha256\"\n          else\n            \"sha1\";\n        hashAlgo_ = if hash != null then \"\" else hashAlgo;\n        hash_ =\n          if hash != null then\n            hash\n          else if sha256 != null then\n            sha256\n          else\n            sha1;\n        name_ = if name == null then baseNameOf (toString url) else name;\n      in\n      {\n        outputHashMode = hashMode;\n        outputHashAlgo = hashAlgo_;\n        outputHash = hash_;\n        preferLocalBuild = true;\n        builder = writeScript \"restrict-message\" ''\n          printf '%s' ${lib.escapeShellArg msg}\n          exit 1\n        '';\n        meta = {\n          license = lib.licenses.unfree;\n        }\n        // meta;\n      }\n      // (lib.optionalAttrs (name == null) {\n        # The case of providing `url`, but not `name`. This has\n        # weird interactions with the positioning system\n\n        # When we set `name` explicitly here, we override where the\n        # position is read from. So we must fix it here.\n        pos = lib.unsafeGetAttrPos \"url\" args;\n\n        # If a name is not provided, use the basename of the url\n        name = builtins.warn \"providing a URL without a name is deprecated\" baseNameOf (toString url);\n      });\n\n    inheritFunctionArgs = false;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":862,"column":5},"lambda_expr":"{\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.resolveMirrorURLs","path":["pkgs","resolveMirrorURLs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":739,"column":3},"attr_expr":"resolveMirrorURLs =\n    { url }:\n    fetchurl {\n      showURLs = true;\n      inherit url;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":740,"column":5},"lambda_expr":"{ url }:\n    fetchurl {\n      showURLs = true;\n      inherit url;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":740,"column":5},"path":["pkgs","resolveMirrorURLs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":740,"column":5},"path":["pkgs","resolveMirrorURLs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.runCommand","path":["pkgs","runCommand"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":28,"column":3},"attr_expr":"runCommand =\n    name: env:\n    runCommandWith {\n      stdenv = stdenvNoCC;\n      runLocal = false;\n      inherit name;\n      derivationArgs = env;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":29,"column":5},"lambda_expr":"runCommand =\n    name: env:\n    runCommandWith {\n      stdenv = stdenvNoCC;\n      runLocal = false;\n      inherit name;\n      derivationArgs = env;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":29,"column":5},"path":["pkgs","runCommand"],"pos_type":"Lambda"}},"content":{"content":"See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-runCommand","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":29,"column":5},"path":["pkgs","runCommand"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.runCommandCC","path":["pkgs","runCommandCC"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":48,"column":3},"attr_expr":"runCommandCC =\n    name: env:\n    runCommandWith {\n      stdenv = stdenv;\n      runLocal = false;\n      inherit name;\n      derivationArgs = env;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":49,"column":5},"lambda_expr":"runCommandCC =\n    name: env:\n    runCommandWith {\n      stdenv = stdenv;\n      runLocal = false;\n      inherit name;\n      derivationArgs = env;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":49,"column":5},"path":["pkgs","runCommandCC"],"pos_type":"Lambda"}},"content":{"content":"See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-runCommandCC","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":49,"column":5},"path":["pkgs","runCommandCC"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.runCommandLocal","path":["pkgs","runCommandLocal"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":38,"column":3},"attr_expr":"runCommandLocal =\n    name: env:\n    runCommandWith {\n      stdenv = stdenvNoCC;\n      runLocal = true;\n      inherit name;\n      derivationArgs = env;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":39,"column":5},"lambda_expr":"runCommandLocal =\n    name: env:\n    runCommandWith {\n      stdenv = stdenvNoCC;\n      runLocal = true;\n      inherit name;\n      derivationArgs = env;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":39,"column":5},"path":["pkgs","runCommandLocal"],"pos_type":"Lambda"}},"content":{"content":"See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-runCommandLocal","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":39,"column":5},"path":["pkgs","runCommandLocal"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.runCommandNoCC","path":["pkgs","runCommandNoCC"],"aliases":[["pkgs","dontRecurseIntoAttrs"],["pkgs","forceSystem"],["pkgs","hiPrio"],["pkgs","lowPrio"],["pkgs","makeOverridable"],["pkgs","recurseIntoAttrs"],["pkgs","runCommandNoCCLocal"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","runCommandNoCC"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","runCommandNoCC"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.runCommandNoCCLocal","path":["pkgs","runCommandNoCCLocal"],"aliases":[["pkgs","dontRecurseIntoAttrs"],["pkgs","forceSystem"],["pkgs","hiPrio"],["pkgs","lowPrio"],["pkgs","makeOverridable"],["pkgs","recurseIntoAttrs"],["pkgs","runCommandNoCC"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"lambda_expr":"arg: lib.warn msg (v arg)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","runCommandNoCCLocal"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":228,"column":7},"path":["pkgs","runCommandNoCCLocal"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.runCommandWith","path":["pkgs","runCommandWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":61,"column":3},"attr_expr":"runCommandWith =\n    let\n      # prevent infinite recursion for the default stdenv value\n      defaultStdenv = stdenv;\n    in\n    {\n      # which stdenv to use, defaults to a stdenv with a C compiler, pkgs.stdenv\n      stdenv ? defaultStdenv,\n      # whether to build this derivation locally instead of substituting\n      runLocal ? false,\n      # extra arguments to pass to stdenv.mkDerivation\n      derivationArgs ? { },\n      # name of the resulting derivation\n      name,\n      # TODO(@Artturin): enable strictDeps always\n    }:\n    buildCommand:\n    stdenv.mkDerivation (\n      {\n        enableParallelBuilding = true;\n        inherit buildCommand name;\n        passAsFile = [ \"buildCommand\" ] ++ (derivationArgs.passAsFile or [ ]);\n      }\n      // {\n        ${if !derivationArgs ? meta then \"pos\" else null} =\n          let\n            args = builtins.attrNames derivationArgs;\n          in\n          if builtins.length args > 0 then\n            builtins.unsafeGetAttrPos (builtins.head args) derivationArgs\n          else\n            null;\n        ${if runLocal then \"preferLocalBuild\" else null} = true;\n        ${if runLocal then \"allowSubstitutes\" else null} = false;\n      }\n      // removeAttrs derivationArgs [ \"passAsFile\" ]\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":66,"column":5},"lambda_expr":"{\n      # which stdenv to use, defaults to a stdenv with a C compiler, pkgs.stdenv\n      stdenv ? defaultStdenv,\n      # whether to build this derivation locally instead of substituting\n      runLocal ? false,\n      # extra arguments to pass to stdenv.mkDerivation\n      derivationArgs ? { },\n      # name of the resulting derivation\n      name,\n      # TODO(@Artturin): enable strictDeps always\n    }:\n    buildCommand:\n    stdenv.mkDerivation (\n      {\n        enableParallelBuilding = true;\n        inherit buildCommand name;\n        passAsFile = [ \"buildCommand\" ] ++ (derivationArgs.passAsFile or [ ]);\n      }\n      // {\n        ${if !derivationArgs ? meta then \"pos\" else null} =\n          let\n            args = builtins.attrNames derivationArgs;\n          in\n          if builtins.length args > 0 then\n            builtins.unsafeGetAttrPos (builtins.head args) derivationArgs\n          else\n            null;\n        ${if runLocal then \"preferLocalBuild\" else null} = true;\n        ${if runLocal then \"allowSubstitutes\" else null} = false;\n      }\n      // removeAttrs derivationArgs [ \"passAsFile\" ]\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":66,"column":5},"path":["pkgs","runCommandWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":66,"column":5},"path":["pkgs","runCommandWith"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.setupSystemdUnits","path":["pkgs","setupSystemdUnits"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":858,"column":3},"attr_expr":"setupSystemdUnits = callPackage ../build-support/setup-systemd-units.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/setup-systemd-units.nix","line":14,"column":1},"lambda_expr":"{\n  units,\n  # : { [String] :: Path | { path :: Path; wanted-by :: [String]; } }\n  # ^ A set whose names are unit names and values are\n  # either paths to the corresponding unit files or a set\n  # containing the path and the list of units this unit\n  # should be wanted-by (none by default).\n  #\n  # The names should include the unit suffix\n  # (e.g. \".service\")\n  namespace,\n  # : String\n  # The namespace for the unit files, to allow for\n  # multiple independent unit sets managed by\n  # `setupSystemdUnits`.\n}:\nlet\n  static = runCommand \"systemd-static\" { } ''\n    mkdir -p $out\n    ${lib.concatStringsSep \"\\n\" (\n      lib.mapAttrsToList (nm: file: \"ln -sv ${file.path or file} $out/${nm}\") units\n    )}\n  '';\n  add-unit-snippet = name: file: ''\n    oldUnit=$(readlink -f \"$unitDir/${name}\" || echo \"$unitDir/${name}\")\n    if [ -f \"$oldUnit\" -a \"$oldUnit\" != \"${file.path or file}\" ]; then\n      unitsToStop+=(\"${name}\")\n    fi\n    ln -sf \"/etc/systemd-static/${namespace}/${name}\" \\\n      \"$unitDir/.${name}.tmp\"\n    mv -T \"$unitDir/.${name}.tmp\" \"$unitDir/${name}\"\n    ${lib.concatStringsSep \"\\n\" (\n      map (unit: ''\n        mkdir -p \"$unitDir/${unit}.wants\"\n        ln -sf \"../${name}\" \\\n          \"$unitDir/${unit}.wants/.${name}.tmp\"\n        mv -T \"$unitDir/${unit}.wants/.${name}.tmp\" \\\n          \"$unitDir/${unit}.wants/${name}\"\n      '') file.wanted-by or [ ]\n    )}\n    unitsToStart+=(\"${name}\")\n  '';\nin\nwriteScriptBin \"setup-systemd-units\" ''\n  #!${bash}/bin/bash -e\n  export PATH=${coreutils}/bin:${systemd}/bin\n\n  unitDir=/etc/systemd/system\n  if [ ! -w \"$unitDir\" ]; then\n    unitDir=/nix/var/nix/profiles/default/lib/systemd/system\n    mkdir -p \"$unitDir\"\n  fi\n  declare -a unitsToStop unitsToStart\n\n  oldStatic=$(readlink -f /etc/systemd-static/${namespace} || true)\n  if [ \"$oldStatic\" != \"${static}\" ]; then\n    ${lib.concatStringsSep \"\\n\" (lib.mapAttrsToList add-unit-snippet units)}\n    if [ ''${#unitsToStop[@]} -ne 0 ]; then\n      echo \"Stopping unit(s) ''${unitsToStop[@]}\" >&2\n      systemctl stop \"''${unitsToStop[@]}\"\n    fi\n    mkdir -p /etc/systemd-static\n    ln -sfT ${static} /etc/systemd-static/.${namespace}.tmp\n    mv -T /etc/systemd-static/.${namespace}.tmp /etc/systemd-static/${namespace}\n    systemctl daemon-reload\n    echo \"Starting unit(s) ''${unitsToStart[@]}\" >&2\n    systemctl start \"''${unitsToStart[@]}\"\n  else\n    echo \"Units unchanged, doing nothing\" >&2\n  fi\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/setup-systemd-units.nix","line":14,"column":1},"path":["pkgs","setupSystemdUnits"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/setup-systemd-units.nix","line":14,"column":1},"path":["pkgs","setupSystemdUnits"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.sourceFromHead","path":["pkgs","sourceFromHead"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":5168,"column":3},"attr_expr":"sourceFromHead = callPackage ../build-support/source-from-head-fun.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/source-from-head-fun.nix","line":12,"column":1},"lambda_expr":"localTarName: publishedSrcSnapshot:\nif config.sourceFromHead.useLocalRepos or false then\n  \"${\n    config.sourceFromHead.managedRepoDir or \"/set/sourceFromHead.managedRepoDir/please\"\n  }/dist/${localTarName}\"\nelse\n  publishedSrcSnapshot","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/source-from-head-fun.nix","line":12,"column":1},"path":["pkgs","sourceFromHead"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/source-from-head-fun.nix","line":12,"column":1},"path":["pkgs","sourceFromHead"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.splicePackages","path":["pkgs","splicePackages"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":115,"column":11},"attr_expr":"splicePackages","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":74,"column":5},"lambda_expr":"{\n      pkgsBuildBuild,\n      pkgsBuildHost,\n      pkgsBuildTarget,\n      pkgsHostHost,\n      pkgsHostTarget,\n      pkgsTargetTarget,\n    }@args:\n    if actuallySplice then spliceReal (renameCrossIndexFrom \"pkgs\" args) else pkgsHostTarget","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":74,"column":5},"path":["pkgs","splicePackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/splice.nix","line":74,"column":5},"path":["pkgs","splicePackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.srcOnly","path":["pkgs","srcOnly"],"aliases":null,"signature":"srcOnly :: (Derivation | AttrSet) -> Derivation\n","is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":868,"column":3},"attr_expr":"srcOnly = callPackage ../build-support/src-only { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/src-only/default.nix","line":38,"column":1},"lambda_expr":"attrs:\nlet\n  argsToOverride = args: {\n    name = \"${args.name or \"${args.pname}-${args.version}\"}-source\";\n\n    outputs = [ \"out\" ];\n\n    phases = [\n      \"unpackPhase\"\n      \"patchPhase\"\n      \"installPhase\"\n    ];\n    separateDebugInfo = false;\n\n    dontUnpack = lib.warnIf (args.dontUnpack or false\n    ) \"srcOnly: derivation has dontUnpack set, overriding\" false;\n\n    dontInstall = false;\n    installPhase = \"cp -pr --reflink=auto -- . $out\";\n\n    # the original derivation might've set something like outputDev = \"lib\", but \"lib\" isn't an output anymore\n    # some things get confused and error if one of these is set to an output that doesn't exist\n    # ex: pkgs/build-support/setup-hooks/multiple-outputs.sh\n    outputDev = \"out\";\n    outputBin = \"out\";\n    outputInclude = \"out\";\n    outputLib = \"out\";\n    outputDoc = \"out\";\n    outputDevdoc = \"out\";\n    outputMan = \"out\";\n    outputDevman = \"out\";\n    outputInfo = \"out\";\n  };\nin\n\n# If we are passed a derivation (based on stdenv*), we can use overrideAttrs to\n# update the arguments to mkDerivation. This gives us the proper awareness of\n# what arguments were effectively passed *to* mkDerivation as opposed to\n# builtins.derivation (by mkDerivation). For example, stdenv.mkDerivation\n# accepts an `env` attribute set which is postprocessed before being passed to\n# builtins.derivation. This can lead to evaluation failures, if we assume\n# that drvAttrs is equivalent to the arguments passed to mkDerivation.\n# See https://github.com/NixOS/nixpkgs/issues/269539.\nif lib.isDerivation attrs && attrs ? overrideAttrs then\n  attrs.overrideAttrs (_finalAttrs: prevAttrs: argsToOverride prevAttrs)\nelse\n  let\n    # If we don't have overrideAttrs, it is extremely unlikely that we are seeing\n    # a derivation constructed by stdenv.mkDerivation. Since srcOnly assumes\n    # that we are using stdenv's setup.sh, it therefore doesn't make sense to\n    # have derivation specific logic in this branch.\n    # TODO(@sternenseemann): remove drvAttrs special casing in NixOS 26.05\n    args =\n      lib.warnIf (lib.isDerivation attrs)\n        \"srcOnly: derivations not created by a variant of stdenv.mkDerivation are not supported. Code relying on behaviour of srcOnly with non-stdenv derivations may break in the future.\"\n        attrs.drvAttrs or attrs;\n    stdenv = args.stdenv or (lib.warn \"srcOnly: stdenv not provided, using stdenvNoCC\" stdenvNoCC);\n    drv = stdenv.mkDerivation (args // argsToOverride args);\n  in\n  drv","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/src-only/default.nix","line":38,"column":1},"path":["pkgs","srcOnly"],"pos_type":"Lambda"}},"content":{"content":"\nA utility builder to get the source code of the input derivation, with any patches applied.\n\n# Examples\n\n```nix\nsrcOnly pkgs.hello\n=> «derivation /nix/store/gyfk2jg9079ga5g5gfms5i4h0k9jhf0f-hello-2.12.1-source.drv»\n\nsrcOnly {\n  inherit (pkgs.hello) name version src stdenv;\n}\n=> «derivation /nix/store/vf9hdhz38z7rfhzhrk0vi70h755fnsw7-hello-2.12.1-source.drv»\n```\n\n# Type\n\n```\nsrcOnly :: (Derivation | AttrSet) -> Derivation\n```\n\n# Input\n\n`attrs`\n\n: One of the following:\n\n  - A derivation with (at minimum) an unpackPhase and a patchPhase.\n  - A set of attributes that would be passed to a `stdenv.mkDerivation` or `stdenvNoCC.mkDerivation` call.\n\n# Output\n\nA derivation that runs a derivation's `unpackPhase` and `patchPhase`, and then copies the result to the output path.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/src-only/default.nix","line":38,"column":1},"path":["pkgs","srcOnly"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.substitute","path":["pkgs","substitute"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":870,"column":3},"attr_expr":"substitute = callPackage ../build-support/substitute/substitute.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/substitute/substitute.nix","line":29,"column":1},"lambda_expr":"args:\n\nlet\n  name = if args ? name then args.name else baseNameOf (toString args.src);\n  deprecationReplacement = lib.pipe args.replacements [\n    lib.toList\n    (map (lib.splitString \" \"))\n    lib.concatLists\n    (lib.concatMapStringsSep \" \" lib.strings.escapeNixString)\n  ];\n  optionalDeprecationWarning =\n    # substitutions is only available starting 24.05.\n    # TODO: Remove support for replacements sometime after the next release\n    lib.warnIf (args ? replacements && lib.oldestSupportedReleaseIsAtLeast 2405) ''\n      pkgs.substitute: For \"${name}\", `replacements` is used, which is deprecated since it doesn't support arguments with spaces. Use `substitutions` instead:\n        substitutions = [ ${deprecationReplacement} ];'';\nin\noptionalDeprecationWarning stdenvNoCC.mkDerivation (\n  {\n    inherit name;\n    builder = ./substitute.sh;\n    inherit (args) src;\n    preferLocalBuild = true;\n    allowSubstitutes = false;\n  }\n  // args\n  // lib.optionalAttrs (args ? substitutions) {\n    substitutions =\n      assert lib.assertMsg (lib.isList args.substitutions)\n        ''pkgs.substitute: For \"${name}\", `substitutions` is passed, which is expected to be a list, but it's a ${builtins.typeOf args.substitutions} instead.'';\n      lib.escapeShellArgs args.substitutions;\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/substitute/substitute.nix","line":29,"column":1},"path":["pkgs","substitute"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/substitute/substitute.nix","line":29,"column":1},"path":["pkgs","substitute"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.symlinkJoin","path":["pkgs","symlinkJoin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":523,"column":3},"attr_expr":"symlinkJoin = lib.extendMkDerivation {\n    constructDrv = stdenvNoCC.mkDerivation;\n\n    excludeDrvArgNames = [\n      \"postBuild\"\n      \"stripPrefix\"\n      \"paths\"\n      \"failOnMissing\"\n    ];\n\n    extendDrvArgs =\n      finalAttrs:\n      args@{\n        name ?\n          assert lib.assertMsg (\n            finalAttrs ? pname && finalAttrs ? version\n          ) \"symlinkJoin requires either a `name` OR `pname` and `version`\";\n          \"${finalAttrs.pname}-${finalAttrs.version}\",\n        paths,\n        stripPrefix ? \"\",\n        preferLocalBuild ? true,\n        allowSubstitutes ? false,\n        postBuild ? \"\",\n        failOnMissing ? stripPrefix == \"\",\n        ...\n      }:\n      assert lib.assertMsg (stripPrefix != \"\" -> (hasPrefix \"/\" stripPrefix && stripPrefix != \"/\")) ''\n        stripPrefix must be either an empty string (disable stripping behavior), or relative path prefixed with /.\n\n        Ensure that the path starts with / and specifies path to the subdirectory.\n      '';\n      let\n        mapPaths =\n          f:\n          map (\n            path:\n            if path == null then\n              null\n            else if isList path then\n              mapPaths f path\n            else\n              f path\n          );\n      in\n      {\n        enableParallelBuilding = true;\n        inherit name allowSubstitutes preferLocalBuild;\n        passAsFile = [\n          \"buildCommand\"\n          \"paths\"\n        ];\n        paths = mapPaths (path: \"${path}${stripPrefix}\") paths;\n        buildCommand = ''\n          mkdir -p $out\n          if [ -n \"''${pathsPath:-}\" ] && [ -f \"$pathsPath\" ]; then\n            mapfile -d \" \" -t paths < \"$pathsPath\"\n          fi\n          for i in \"''${paths[@]}\"; do\n            ${optionalString (!failOnMissing) \"if test -d $i; then \"}${lndir}/bin/lndir -silent $i $out${\n              optionalString (!failOnMissing) \"; fi\"\n            }\n          done\n          ${postBuild}\n        '';\n      }\n      // {\n        ${if !args ? meta then \"pos\" else null} =\n          if args ? pname then\n            builtins.unsafeGetAttrPos \"pname\" args\n          else\n            builtins.unsafeGetAttrPos \"name\" args;\n      };\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":862,"column":5},"lambda_expr":"{\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.themes","path":["pkgs","themes"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8876,"column":3},"attr_expr":"themes = name: callPackage (../data/misc/themes + (\"/\" + name + \".nix\")) { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8876,"column":12},"lambda_expr":"name: callPackage (../data/misc/themes + (\"/\" + name + \".nix\")) { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8876,"column":12},"path":["pkgs","themes"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8876,"column":12},"path":["pkgs","themes"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.traceDrvLicenses","path":["pkgs","traceDrvLicenses"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":233,"column":3},"attr_expr":"traceDrvLicenses =\n    stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = overrideMkDerivationResult (\n        pkg:\n        let\n          printDrvPath =\n            val:\n            let\n              drvPath = builtins.unsafeDiscardStringContext pkg.drvPath;\n              license = pkg.meta.license or null;\n            in\n            builtins.trace \"@:drv:${toString drvPath}:${toString license}:@\" val;\n        in\n        pkg\n        // {\n          outPath = printDrvPath pkg.outPath;\n          drvPath = printDrvPath pkg.drvPath;\n        }\n      );\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":234,"column":5},"lambda_expr":"traceDrvLicenses =\n    stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = overrideMkDerivationResult (\n        pkg:\n        let\n          printDrvPath =\n            val:\n            let\n              drvPath = builtins.unsafeDiscardStringContext pkg.drvPath;\n              license = pkg.meta.license or null;\n            in\n            builtins.trace \"@:drv:${toString drvPath}:${toString license}:@\" val;\n        in\n        pkg\n        // {\n          outPath = printDrvPath pkg.outPath;\n          drvPath = printDrvPath pkg.drvPath;\n        }\n      );\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":234,"column":5},"path":["pkgs","traceDrvLicenses"],"pos_type":"Lambda"}},"content":{"content":"\nUse the trace output to report all processed derivations with their\nlicense name.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":234,"column":5},"path":["pkgs","traceDrvLicenses"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.twitterBootstrap","path":["pkgs","twitterBootstrap"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/aliases.nix","line":222,"column":10},"lambda_expr":"v:\n    if lib.isDerivation v then\n      lib.warnOnInstantiate msg v\n    else if lib.isAttrs v then\n      lib.mapAttrs (_: lib.warn msg) v\n    else if lib.isFunction v then\n      arg: lib.warn msg (v arg)\n    else if lib.isList v then\n      map (lib.warn msg) v\n    else\n      # Can’t do better than this, and a `throw` would be more\n      # disruptive for users…\n      #\n      # `nix search` flags up warnings already, so hopefully this won’t\n      # make things much worse until we have proper CI for aliases,\n      # especially since aliases of paths and numbers are presumably\n      # not common.\n      lib.warn msg v","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.unstableGitUpdater","path":["pkgs","unstableGitUpdater"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":194,"column":3},"attr_expr":"unstableGitUpdater = callPackage ../common-updater/unstable-updater.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/unstable-updater.nix","line":16,"column":1},"lambda_expr":"{\n  url ? null, # The git url, if empty it will be set to src.gitRepoUrl\n  branch ? null,\n  hardcodeZeroVersion ? false, # Use a made-up version \"0\" instead of latest tag. Use when the project's tagging system is incompatible with what we expect from versions\n  tagFormat ? \"*\", # A `git describe --tags --match '<format>'` pattern that tags must match to be considered\n  tagPrefix ? null, # strip this prefix from a tag name\n  tagConverter ? null, # A command to convert more complex tag formats. It receives the git tag via stdin and should convert it into x.y.z format to stdout\n  shallowClone ? true,\n}:\n\nassert lib.asserts.assertMsg (\n  tagPrefix == null || tagConverter == null\n) \"Can only use either tagPrefix or tagConverter!\";\n\nlet\n  updateScript = writeShellApplication {\n    name = \"unstable-update-script\";\n    runtimeInputs = [\n      common-updater-scripts\n      coreutils\n      git\n      nix\n    ];\n    text = ''\n      set -ex\n\n      url=\"\"\n      branch=\"\"\n      hardcode_zero_version=\"\"\n      tag_format=\"\"\n      tag_prefix=\"\"\n      tag_converter=\"\"\n      shallow_clone=\"\"\n      : \"''${systemArg:=}\"\n\n      while (( $# > 0 )); do\n          flag=\"$1\"\n          shift 1\n          case \"$flag\" in\n            --url=*)\n              url=\"''${flag#*=}\"\n              ;;\n            --branch=*)\n              branch=\"''${flag#*=}\"\n              ;;\n            --hardcode-zero-version)\n              hardcode_zero_version=1\n              ;;\n            --tag-format=*)\n              tag_format=\"''${flag#*=}\"\n              ;;\n            --tag-prefix=*)\n              tag_prefix=\"''${flag#*=}\"\n              ;;\n            --tag-converter=*)\n              tag_converter=\"''${flag#*=}\"\n              ;;\n            --shallow-clone)\n              shallow_clone=1\n              ;;\n            *)\n              echo \"$0: unknown option ‘''${flag}’\"\n              exit 1\n              ;;\n          esac\n      done\n\n      # By default we set url to src.gitRepoUrl\n      if [[ -z \"$url\" ]]; then\n          # system argument cannot be passed as 1 argument\n          # shellcheck disable=SC2086\n          url=\"$(nix-instantiate $systemArg --eval -E \\\n                     \"with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.gitRepoUrl\" \\\n              | tr -d '\"')\"\n      fi\n\n      # Get info about HEAD from a shallow git clone\n      tmpdir=\"$(mktemp -d)\"\n\n      cloneArgs=()\n\n      if [[ \"$shallow_clone\" == \"1\" ]]; then\n          cloneArgs+=(--depth=1)\n      fi\n\n      if [[ -n \"$branch\" ]]; then\n          cloneArgs+=(--branch=\"$branch\")\n      fi\n\n      git clone \"''${cloneArgs[@]}\" \"$url\" \"$tmpdir\"\n      getLatestVersion() {\n          git describe --tags --abbrev=0 --match \"''${tag_format}\" 2> /dev/null || true\n      }\n\n      pushd \"$tmpdir\" >&2\n      commit_date=\"$(git show -s --pretty='format:%cs')\"\n      commit_sha=\"$(git show -s --pretty='format:%H')\"\n      last_tag=\"\"\n      if [[ -z \"$hardcode_zero_version\" ]]; then\n          if [[ \"$shallow_clone\" == \"1\" ]]; then\n              depth=100\n              while (( depth < 10000 )); do\n                  last_tag=\"$(getLatestVersion)\"\n                  if [[ -n \"$last_tag\" ]]; then\n                      break\n                  fi\n                  git fetch --depth=\"$depth\" --tags\n                  depth=$(( depth * 2 ))\n              done\n\n              if [[ -z \"$last_tag\" ]]; then\n                  # To be extra sure, check if full history helps with finding a tag\n                  git fetch --tags\n                  last_tag=\"$(getLatestVersion)\"\n              fi\n          else\n              last_tag=\"$(getLatestVersion)\"\n          fi\n          if [[ -z \"$last_tag\" ]]; then\n              last_tag=\"0\"\n          fi\n          if [[ -n \"$tag_prefix\" ]]; then\n              echo \"Stripping prefix '$tag_prefix' from tag '$last_tag'\" >&2\n              last_tag=\"''${last_tag#\"''${tag_prefix}\"}\"\n          fi\n          if [[ -n \"$tag_converter\" ]]; then\n              echo \"Running '$last_tag' through: $tag_converter\" >&2\n              last_tag=\"$(echo \"''${last_tag}\" | ''${tag_converter})\"\n          fi\n      else\n          last_tag=\"0\"\n      fi\n      if [[ ! \"$last_tag\" =~ ^[[:digit:]] ]]; then\n          echo \"Last tag '$last_tag' does not start with a digit\" > /dev/stderr\n          exit 1\n      fi\n      new_version=\"$last_tag-unstable-$commit_date\"\n      popd >&2\n      # rm -rf \"$tmpdir\"\n\n      # update the nix expression\n      update-source-version \\\n          \"$UPDATE_NIX_ATTR_PATH\" \\\n          \"$new_version\" \\\n          --rev=\"$commit_sha\" \\\n          --print-changes\n    '';\n  };\n\nin\n[\n  (lib.getExe updateScript)\n  \"--url=${toString url}\"\n  \"--tag-format=${tagFormat}\"\n]\n++ lib.optionals (branch != null) [\n  \"--branch=${branch}\"\n]\n++ lib.optionals (tagPrefix != null) [\n  \"--tag-prefix=${tagPrefix}\"\n]\n++ lib.optionals (tagConverter != null) [\n  \"--tag-converter=${tagConverter}\"\n]\n++ lib.optionals hardcodeZeroVersion [\n  \"--hardcode-zero-version\"\n]\n++ lib.optionals shallowClone [\n  \"--shallow-clone\"\n]","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/unstable-updater.nix","line":16,"column":1},"path":["pkgs","unstableGitUpdater"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/common-updater/unstable-updater.nix","line":16,"column":1},"path":["pkgs","unstableGitUpdater"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.useGoldLinker","path":["pkgs","useGoldLinker"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":269,"column":3},"attr_expr":"useGoldLinker = overrideMkDerivationArgs (args: {\n    env = (args.env or { }) // {\n      NIX_CFLAGS_LINK = toString (args.env.NIX_CFLAGS_LINK or \"\") + \" -fuse-ld=gold\";\n    };\n  });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":224,"column":16},"lambda_expr":"stdenv:\n    stdenv.override (old: {\n      mkDerivationFromStdenv = extendMkDerivationArgs old extension;\n    })","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.useLibsFrom","path":["pkgs","useLibsFrom"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":283,"column":3},"attr_expr":"useLibsFrom =\n    modelStdenv: targetStdenv:\n    let\n      ccForLibs = modelStdenv.cc.cc;\n      /*\n        NOTE(@connorbaker):\n        This assumes targetStdenv.cc is a cc-wrapper.\n      */\n      cc = targetStdenv.cc.override {\n        /*\n          NOTE(originally by rrbutani):\n          Normally the `useCcForLibs`/`gccForLibs` mechanism is used to get a\n          clang based `cc` to use `libstdc++` (from gcc).\n\n          Here we (ab)use it to use a `libstdc++` from a different `gcc` than our\n          `cc`.\n\n          Note that this does not inhibit our `cc`'s lib dir from being added to\n          cflags/ldflags (see `cc_solib` in `cc-wrapper`) but this is okay: our\n          `gccForLibs`'s paths should take precedence.\n        */\n        useCcForLibs = true;\n        gccForLibs = ccForLibs;\n      };\n    in\n    overrideCC targetStdenv cc;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":284,"column":5},"lambda_expr":"useLibsFrom =\n    modelStdenv: targetStdenv:\n    let\n      ccForLibs = modelStdenv.cc.cc;\n      /*\n        NOTE(@connorbaker):\n        This assumes targetStdenv.cc is a cc-wrapper.\n      */\n      cc = targetStdenv.cc.override {\n        /*\n          NOTE(originally by rrbutani):\n          Normally the `useCcForLibs`/`gccForLibs` mechanism is used to get a\n          clang based `cc` to use `libstdc++` (from gcc).\n\n          Here we (ab)use it to use a `libstdc++` from a different `gcc` than our\n          `cc`.\n\n          Note that this does not inhibit our `cc`'s lib dir from being added to\n          cflags/ldflags (see `cc_solib` in `cc-wrapper`) but this is okay: our\n          `gccForLibs`'s paths should take precedence.\n        */\n        useCcForLibs = true;\n        gccForLibs = ccForLibs;\n      };\n    in\n    overrideCC targetStdenv cc;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":284,"column":5},"path":["pkgs","useLibsFrom"],"pos_type":"Lambda"}},"content":{"content":"\nCopy the libstdc++ from the model stdenv to the target stdenv.\n\nTODO(@connorbaker):\nThis interface provides behavior which should be revisited prior to the\nrelease of 24.05. For a more detailed explanation and discussion, see\nhttps://github.com/NixOS/nixpkgs/issues/283517.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":284,"column":5},"path":["pkgs","useLibsFrom"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.useMoldLinker","path":["pkgs","useMoldLinker"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":310,"column":3},"attr_expr":"useMoldLinker =\n    stdenv:\n    if stdenv.targetPlatform.isDarwin then\n      throw \"Mold can't be used to emit Mach-O (Darwin) binaries\"\n    else\n      let\n        bintools = stdenv.cc.bintools.override {\n          extraBuildCommands = ''\n            pushd $out/bin\n            ln -s ${pkgs.buildPackages.mold}/bin/${stdenv.cc.bintools.targetPrefix}ld.mold ${stdenv.cc.bintools.targetPrefix}ld.mold\n          '' # Pre-generated configure scripts call the linker binary without the target prefix when cross compiling.\n          + lib.optionalString (stdenv.cc.bintools.targetPrefix != \"\") ''\n            ln -s ${stdenv.cc.bintools.targetPrefix}ld.mold ld.mold\n          ''\n          + ''\n            popd\n          '';\n        };\n      in\n      stdenv.override (\n        old:\n        {\n          allowedRequisites = null;\n          cc = stdenv.cc.override { inherit bintools; };\n          # gcc >12.1.0 supports '-fuse-ld=mold'\n          # the wrap ld above in bintools supports gcc <12.1.0 and shouldn't harm >12.1.0\n          # https://github.com/rui314/mold#how-to-use\n        }\n        //\n          lib.optionalAttrs\n            (stdenv.cc.isClang || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version \"12\"))\n            {\n              mkDerivationFromStdenv = extendMkDerivationArgs old (args: {\n                env = (args.env or { }) // {\n                  NIX_CFLAGS_LINK = toString (args.env.NIX_CFLAGS_LINK or \"\") + \" -fuse-ld=mold\";\n                };\n              });\n            }\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":311,"column":5},"lambda_expr":"stdenv:\n    if stdenv.targetPlatform.isDarwin then\n      throw \"Mold can't be used to emit Mach-O (Darwin) binaries\"\n    else\n      let\n        bintools = stdenv.cc.bintools.override {\n          extraBuildCommands = ''\n            pushd $out/bin\n            ln -s ${pkgs.buildPackages.mold}/bin/${stdenv.cc.bintools.targetPrefix}ld.mold ${stdenv.cc.bintools.targetPrefix}ld.mold\n          '' # Pre-generated configure scripts call the linker binary without the target prefix when cross compiling.\n          + lib.optionalString (stdenv.cc.bintools.targetPrefix != \"\") ''\n            ln -s ${stdenv.cc.bintools.targetPrefix}ld.mold ld.mold\n          ''\n          + ''\n            popd\n          '';\n        };\n      in\n      stdenv.override (\n        old:\n        {\n          allowedRequisites = null;\n          cc = stdenv.cc.override { inherit bintools; };\n          # gcc >12.1.0 supports '-fuse-ld=mold'\n          # the wrap ld above in bintools supports gcc <12.1.0 and shouldn't harm >12.1.0\n          # https://github.com/rui314/mold#how-to-use\n        }\n        //\n          lib.optionalAttrs\n            (stdenv.cc.isClang || (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version \"12\"))\n            {\n              mkDerivationFromStdenv = extendMkDerivationArgs old (args: {\n                env = (args.env or { }) // {\n                  NIX_CFLAGS_LINK = toString (args.env.NIX_CFLAGS_LINK or \"\") + \" -fuse-ld=mold\";\n                };\n              });\n            }\n      )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":311,"column":5},"path":["pkgs","useMoldLinker"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":311,"column":5},"path":["pkgs","useMoldLinker"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.useWildLinker","path":["pkgs","useWildLinker"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":350,"column":3},"attr_expr":"useWildLinker =\n    stdenv:\n    if !stdenv.targetPlatform.isLinux then\n      throw \"Wild only supports building Linux ELF files from Linux hosts.\"\n    else\n      stdenv.override (prev: {\n        allowedRequisites = null;\n        cc = prev.cc.override {\n          bintools = prev.cc.bintools.override {\n            extraBuildCommands = ''\n              ln -fs ${pkgs.buildPackages.wild}/bin/* \"$out/bin\"\n            '';\n          };\n        };\n      });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":351,"column":5},"lambda_expr":"stdenv:\n    if !stdenv.targetPlatform.isLinux then\n      throw \"Wild only supports building Linux ELF files from Linux hosts.\"\n    else\n      stdenv.override (prev: {\n        allowedRequisites = null;\n        cc = prev.cc.override {\n          bintools = prev.cc.bintools.override {\n            extraBuildCommands = ''\n              ln -fs ${pkgs.buildPackages.wild}/bin/* \"$out/bin\"\n            '';\n          };\n        };\n      })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":351,"column":5},"path":["pkgs","useWildLinker"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":351,"column":5},"path":["pkgs","useWildLinker"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vscode-extension-update-script","path":["pkgs","vscode-extension-update-script"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10331,"column":3},"attr_expr":"vscode-extension-update-script =\n    callPackage ../by-name/vs/vscode-extension-update/vscode-extension-update-script.nix\n      { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/vs/vscode-extension-update/vscode-extension-update-script.nix","line":6,"column":1},"lambda_expr":"{\n  attrPath ? null,\n  extraArgs ? [ ],\n}:\n\n[ \"${lib.getExe vscode-extension-update}\" ]\n++ lib.optionals (attrPath != null) [ attrPath ]\n++ extraArgs","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/vs/vscode-extension-update/vscode-extension-update-script.nix","line":6,"column":1},"path":["pkgs","vscode-extension-update-script"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/vs/vscode-extension-update/vscode-extension-update-script.nix","line":6,"column":1},"path":["pkgs","vscode-extension-update-script"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vscode-fhsWithPackages","path":["pkgs","vscode-fhsWithPackages"],"aliases":[["pkgs","antigravity-fhsWithPackages"],["pkgs","code-cursor-fhsWithPackages"],["pkgs","kiro-fhsWithPackages"],["pkgs","vscodium-fhsWithPackages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10321,"column":3},"attr_expr":"vscode-fhsWithPackages = vscode.fhsWithPackages;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"lambda_expr":"f: fhs { additionalPkgs = f; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","vscode-fhsWithPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","vscode-fhsWithPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vscodium-fhsWithPackages","path":["pkgs","vscodium-fhsWithPackages"],"aliases":[["pkgs","antigravity-fhsWithPackages"],["pkgs","code-cursor-fhsWithPackages"],["pkgs","kiro-fhsWithPackages"],["pkgs","vscode-fhsWithPackages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10337,"column":3},"attr_expr":"vscodium-fhsWithPackages = vscodium.fhsWithPackages;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"lambda_expr":"f: fhs { additionalPkgs = f; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","vscodium-fhsWithPackages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/vscode/generic.nix","line":197,"column":25},"path":["pkgs","vscodium-fhsWithPackages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.winePackagesFor","path":["pkgs","winePackagesFor"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11734,"column":3},"attr_expr":"winePackagesFor = wineBuild: callPackage ./wine-packages.nix { inherit wineBuild; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11734,"column":21},"lambda_expr":"wineBuild: callPackage ./wine-packages.nix { inherit wineBuild; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11734,"column":21},"path":["pkgs","winePackagesFor"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":11734,"column":21},"path":["pkgs","winePackagesFor"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.withCFlags","path":["pkgs","withCFlags"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":397,"column":3},"attr_expr":"withCFlags =\n    compilerFlags:\n    overrideMkDerivationArgs (args: {\n      env = (args.env or { }) // {\n        NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or \"\") + \" ${toString compilerFlags}\";\n      };\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":398,"column":5},"lambda_expr":"withCFlags =\n    compilerFlags:\n    overrideMkDerivationArgs (args: {\n      env = (args.env or { }) // {\n        NIX_CFLAGS_COMPILE = toString (args.env.NIX_CFLAGS_COMPILE or \"\") + \" ${toString compilerFlags}\";\n      };\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":398,"column":5},"path":["pkgs","withCFlags"],"pos_type":"Lambda"}},"content":{"content":"\nModify a stdenv so that it builds binaries with the specified list of\ncompilerFlags appended and passed to the compiler.\n\nThis example would recompile every derivation on the system with\n-funroll-loops and -O3 passed to each gcc invocation.\n\nExample:\n  nixpkgs.overlays = [\n    (self: super: {\n      stdenv = super.withCFlags [ \"-funroll-loops\" \"-O3\" ] super.stdenv;\n    })\n  ];\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":398,"column":5},"path":["pkgs","withCFlags"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.withDefaultHardeningFlags","path":["pkgs","withDefaultHardeningFlags"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":405,"column":3},"attr_expr":"withDefaultHardeningFlags =\n    defaultHardeningFlags: stdenv:\n    let\n      bintools =\n        let\n          bintools' = stdenv.cc.bintools;\n        in\n        if bintools' ? override then\n          (bintools'.override {\n            inherit defaultHardeningFlags;\n          })\n        else\n          bintools';\n    in\n    stdenv.override (old: {\n      cc =\n        if stdenv.cc == null then\n          null\n        else\n          stdenv.cc.override {\n            inherit bintools;\n          };\n      allowedRequisites = lib.mapNullable (rs: rs ++ [ bintools ]) (stdenv.allowedRequisites or null);\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":406,"column":5},"lambda_expr":"defaultHardeningFlags: stdenv:\n    let\n      bintools =\n        let\n          bintools' = stdenv.cc.bintools;\n        in\n        if bintools' ? override then\n          (bintools'.override {\n            inherit defaultHardeningFlags;\n          })\n        else\n          bintools';\n    in\n    stdenv.override (old: {\n      cc =\n        if stdenv.cc == null then\n          null\n        else\n          stdenv.cc.override {\n            inherit bintools;\n          };\n      allowedRequisites = lib.mapNullable (rs: rs ++ [ bintools ]) (stdenv.allowedRequisites or null);\n    })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":406,"column":5},"path":["pkgs","withDefaultHardeningFlags"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/adapters.nix","line":406,"column":5},"path":["pkgs","withDefaultHardeningFlags"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapBintoolsWith","path":["pkgs","wrapBintoolsWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4649,"column":3},"attr_expr":"wrapBintoolsWith =\n    {\n      bintools,\n      libc ? targetPackages.libc or pkgs.libc,\n      ...\n    }@extraArgs:\n    callPackage ../build-support/bintools-wrapper (\n      let\n        self = {\n          nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false;\n          nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false;\n          nativePrefix = stdenv.cc.nativePrefix or \"\";\n\n          noLibc = (self.libc == null);\n\n          inherit bintools libc;\n        }\n        // extraArgs;\n      in\n      self\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4650,"column":5},"lambda_expr":"{\n      bintools,\n      libc ? targetPackages.libc or pkgs.libc,\n      ...\n    }@extraArgs:\n    callPackage ../build-support/bintools-wrapper (\n      let\n        self = {\n          nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false;\n          nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false;\n          nativePrefix = stdenv.cc.nativePrefix or \"\";\n\n          noLibc = (self.libc == null);\n\n          inherit bintools libc;\n        }\n        // extraArgs;\n      in\n      self\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4650,"column":5},"path":["pkgs","wrapBintoolsWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4650,"column":5},"path":["pkgs","wrapBintoolsWith"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapCC","path":["pkgs","wrapCC"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4643,"column":3},"attr_expr":"wrapCC =\n    cc:\n    wrapCCWith {\n      inherit cc;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4644,"column":5},"lambda_expr":"cc:\n    wrapCCWith {\n      inherit cc;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4644,"column":5},"path":["pkgs","wrapCC"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4644,"column":5},"path":["pkgs","wrapCC"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapCCMulti","path":["pkgs","wrapCCMulti"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3703,"column":3},"attr_expr":"wrapCCMulti =\n    cc:\n    let\n      # Binutils with glibc multi\n      bintools = cc.bintools.override {\n        libc = glibc_multi;\n      };\n    in\n    lowPrio (wrapCCWith {\n      cc = cc.cc.override {\n        stdenv = overrideCC stdenv (wrapCCWith {\n          cc = cc.cc;\n          inherit bintools;\n          libc = glibc_multi;\n        });\n        profiledCompiler = false;\n        enableMultilib = true;\n      };\n      libc = glibc_multi;\n      inherit bintools;\n      extraBuildCommands = ''\n        echo \"dontMoveLib64=1\" >> $out/nix-support/setup-hook\n      '';\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3704,"column":5},"lambda_expr":"cc:\n    let\n      # Binutils with glibc multi\n      bintools = cc.bintools.override {\n        libc = glibc_multi;\n      };\n    in\n    lowPrio (wrapCCWith {\n      cc = cc.cc.override {\n        stdenv = overrideCC stdenv (wrapCCWith {\n          cc = cc.cc;\n          inherit bintools;\n          libc = glibc_multi;\n        });\n        profiledCompiler = false;\n        enableMultilib = true;\n      };\n      libc = glibc_multi;\n      inherit bintools;\n      extraBuildCommands = ''\n        echo \"dontMoveLib64=1\" >> $out/nix-support/setup-hook\n      '';\n    })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3704,"column":5},"path":["pkgs","wrapCCMulti"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3704,"column":5},"path":["pkgs","wrapCCMulti"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapCCWith","path":["pkgs","wrapCCWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4593,"column":3},"attr_expr":"wrapCCWith =\n    {\n      cc,\n      # This should be the only bintools runtime dep with this sort of logic. The\n      # Others should instead delegate to the next stage's choice with\n      # `targetPackages.stdenv.cc.bintools`. This one is different just to\n      # provide the default choice, avoiding infinite recursion.\n      # See the bintools attribute for the logic and reasoning. We need to provide\n      # a default here, since eval will hit this function when bootstrapping\n      # stdenv where the bintools attribute doesn't exist, but will never actually\n      # be evaluated -- callPackage ends up being too eager.\n      bintools ? pkgs.bintools,\n      libc ? bintools.libc,\n      # libc++ from the default LLVM version is bound at the top level, but we\n      # want the C++ library to be explicitly chosen by the caller, and null by\n      # default.\n      libcxx ? null,\n      extraPackages ? lib.optional (\n        cc.isGNU or false && stdenv.targetPlatform.isMinGW\n      ) targetPackages.threads.package,\n      nixSupport ? { },\n      ...\n    }@extraArgs:\n    callPackage ../build-support/cc-wrapper (\n      let\n        self = {\n          nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false;\n          nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false;\n          nativePrefix = stdenv.cc.nativePrefix or \"\";\n          noLibc = !self.nativeLibc && (self.libc == null);\n\n          isGNU = cc.isGNU or false;\n          isClang = cc.isClang or false;\n          isArocc = cc.isArocc or false;\n          isZig = cc.isZig or false;\n\n          inherit\n            cc\n            bintools\n            libc\n            libcxx\n            extraPackages\n            nixSupport\n            ;\n        }\n        // extraArgs;\n      in\n      self\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4594,"column":5},"lambda_expr":"{\n      cc,\n      # This should be the only bintools runtime dep with this sort of logic. The\n      # Others should instead delegate to the next stage's choice with\n      # `targetPackages.stdenv.cc.bintools`. This one is different just to\n      # provide the default choice, avoiding infinite recursion.\n      # See the bintools attribute for the logic and reasoning. We need to provide\n      # a default here, since eval will hit this function when bootstrapping\n      # stdenv where the bintools attribute doesn't exist, but will never actually\n      # be evaluated -- callPackage ends up being too eager.\n      bintools ? pkgs.bintools,\n      libc ? bintools.libc,\n      # libc++ from the default LLVM version is bound at the top level, but we\n      # want the C++ library to be explicitly chosen by the caller, and null by\n      # default.\n      libcxx ? null,\n      extraPackages ? lib.optional (\n        cc.isGNU or false && stdenv.targetPlatform.isMinGW\n      ) targetPackages.threads.package,\n      nixSupport ? { },\n      ...\n    }@extraArgs:\n    callPackage ../build-support/cc-wrapper (\n      let\n        self = {\n          nativeTools = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeTools or false;\n          nativeLibc = stdenv.targetPlatform == stdenv.hostPlatform && stdenv.cc.nativeLibc or false;\n          nativePrefix = stdenv.cc.nativePrefix or \"\";\n          noLibc = !self.nativeLibc && (self.libc == null);\n\n          isGNU = cc.isGNU or false;\n          isClang = cc.isClang or false;\n          isArocc = cc.isArocc or false;\n          isZig = cc.isZig or false;\n\n          inherit\n            cc\n            bintools\n            libc\n            libcxx\n            extraPackages\n            nixSupport\n            ;\n        }\n        // extraArgs;\n      in\n      self\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4594,"column":5},"path":["pkgs","wrapCCWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4594,"column":5},"path":["pkgs","wrapCCWith"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapClangMulti","path":["pkgs","wrapClangMulti"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3728,"column":3},"attr_expr":"wrapClangMulti =\n    clang:\n    callPackage ../development/compilers/llvm/multi.nix {\n      inherit clang;\n      gcc32 = pkgsi686Linux.gcc;\n      gcc64 = pkgs.gcc;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3729,"column":5},"lambda_expr":"clang:\n    callPackage ../development/compilers/llvm/multi.nix {\n      inherit clang;\n      gcc32 = pkgsi686Linux.gcc;\n      gcc64 = pkgs.gcc;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3729,"column":5},"path":["pkgs","wrapClangMulti"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3729,"column":5},"path":["pkgs","wrapClangMulti"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapFirefox","path":["pkgs","wrapFirefox"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10418,"column":3},"attr_expr":"wrapFirefox = callPackage ../applications/networking/browsers/firefox/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/browsers/firefox/wrapper.nix","line":44,"column":1},"lambda_expr":"browser_:\n\nlet\n  isDarwin = stdenv.hostPlatform.isDarwin;\n  browser =\n    # Wrapper breaks codesigning on macOS; though plugins that may require\n    # original mozilla signature (like 1Password) won't work with signatures\n    # stripped, at least the wrapped browser will launch.\n    if isDarwin then\n      browser_.overrideAttrs (\n        oldAttrs:\n        lib.optionalAttrs (oldAttrs.dontFixup or false) {\n          dontFixup = false;\n        }\n      )\n    else\n      browser_;\n  wrapper =\n    {\n      applicationName ? browser.binaryName or (lib.getName browser), # Note: this is actually *binary* name and is different from browser.applicationName, which is *app* name!\n      pname ? applicationName,\n      version ? lib.getVersion browser,\n      nameSuffix ? \"\",\n      icon ? applicationName,\n      wmClass ? applicationName,\n      nativeMessagingHosts ? [ ],\n      pkcs11Modules ? [ ],\n      useGlvnd ? (!isDarwin),\n      cfg ? config.${applicationName} or { },\n\n      ## Following options are needed for extra prefs & policies\n      # For more information about anti tracking (german website)\n      # visit https://wiki.kairaven.de/open/app/firefox\n      extraPrefs ? \"\",\n      extraPrefsFiles ? [ ],\n      # For more information about policies visit\n      # https://mozilla.github.io/policy-templates/\n      extraPolicies ? { },\n      extraPoliciesFiles ? [ ],\n      extraAutoConfig ? \"\",\n      libName ? browser.libName or applicationName, # Important for tor package or the like\n      nixExtensions ? null,\n      hasMozSystemDirPatch ? (lib.hasPrefix \"firefox\" pname && !lib.hasSuffix \"-bin\" pname),\n    }:\n\n    let\n      ffmpegSupport = browser.ffmpegSupport or false;\n      gssSupport = browser.gssSupport or false;\n      alsaSupport = browser.alsaSupport or false;\n      pipewireSupport = browser.pipewireSupport or false;\n      sndioSupport = browser.sndioSupport or false;\n      jackSupport = browser.jackSupport or false;\n      # PCSC-Lite daemon (services.pcscd) also must be enabled for firefox to access smartcards\n      smartcardSupport = cfg.smartcardSupport or false;\n\n      allNativeMessagingHosts = map lib.getBin (lib.unique nativeMessagingHosts);\n\n      libs =\n        lib.optionals stdenv.hostPlatform.isLinux (\n          [\n            udev\n            libva\n            libgbm\n            libnotify\n            libxscrnsaver\n            cups\n            pciutils\n            vulkan-loader\n          ]\n          ++ lib.optional (cfg.speechSynthesisSupport or true) speechd-minimal\n        )\n        ++ lib.optional pipewireSupport pipewire\n        ++ lib.optional ffmpegSupport ffmpeg_7\n        ++ lib.optional gssSupport libkrb5\n        ++ lib.optional useGlvnd libglvnd\n        ++ lib.optionals (cfg.enableQuakeLive or false) [\n          stdenv.cc\n          libx11\n          libxxf86dga\n          libxxf86vm\n          libxext\n          libxt\n          alsa-lib\n          zlib\n        ]\n        ++ lib.optional (config.pulseaudio or (!isDarwin)) libpulseaudio\n        ++ lib.optional alsaSupport alsa-lib\n        ++ lib.optional sndioSupport sndio\n        ++ lib.optional jackSupport libjack2\n        ++ lib.optional smartcardSupport opensc\n        ++ pkcs11Modules\n        ++ lib.optionals (!isDarwin) gtk_modules;\n      gtk_modules = lib.optionals (!isDarwin) [ libcanberra-gtk3 ];\n\n      # Darwin does not rename bundled binaries\n      launcherName = \"${applicationName}${lib.optionalString (!isDarwin) nameSuffix}\";\n\n      #########################\n      #                       #\n      #   EXTRA PREF CHANGES  #\n      #                       #\n      #########################\n      policiesJson = writeText \"policies.json\" (builtins.toJSON enterprisePolicies);\n\n      usesNixExtensions = nixExtensions != null;\n\n      nameArray = map (a: a.name) (lib.optionals usesNixExtensions nixExtensions);\n\n      # Check that every extension has a unique .name attribute\n      # and an extid attribute\n      extensions =\n        if nameArray != (lib.unique nameArray) then\n          throw \"Firefox addon name needs to be unique\"\n        else if browser.requireSigning || !browser.allowAddonSideload then\n          throw \"Nix addons are only supported with signature enforcement disabled and addon sideloading enabled (eg. LibreWolf)\"\n        else\n          map (\n            a:\n            if !(builtins.hasAttr \"extid\" a) then\n              throw \"nixExtensions has an invalid entry. Missing extid attribute. Please use fetchFirefoxAddon\"\n            else\n              a\n          ) (lib.optionals usesNixExtensions nixExtensions);\n\n      enterprisePolicies = {\n        policies =\n          lib.optionalAttrs usesNixExtensions {\n            ExtensionSettings = {\n              \"*\" = {\n                blocked_install_message = \"You can't have manual extension mixed with nix extensions\";\n                installation_mode = \"blocked\";\n              };\n            }\n            // lib.foldr (\n              e: ret:\n              ret\n              // {\n                \"${e.extid}\" = {\n                  installation_mode = \"allowed\";\n                };\n              }\n            ) { } extensions;\n\n            Extensions = {\n              Install = lib.foldr (e: ret: ret ++ [ \"${e.outPath}/${e.extid}.xpi\" ]) [ ] extensions;\n            };\n          }\n          // lib.optionalAttrs smartcardSupport {\n            SecurityDevices = {\n              \"OpenSC PKCS#11 Module\" = \"opensc-pkcs11.so\";\n            };\n          }\n          // extraPolicies;\n      };\n\n      mozillaCfg = ''\n        // First line must be a comment\n\n        // Disables addon signature checking\n        // to be able to install addons that do not have an extid\n        // Security is maintained because only user whitelisted addons\n        // with a checksum can be installed\n        ${lib.optionalString usesNixExtensions ''lockPref(\"xpinstall.signatures.required\", false);''}\n      '';\n\n      #############################\n      #                           #\n      #   END EXTRA PREF CHANGES  #\n      #                           #\n      #############################\n\n    in\n    stdenv.mkDerivation (finalAttrs: {\n      __structuredAttrs = true;\n      inherit pname version;\n\n      desktopItem = makeDesktopItem (\n        {\n          name = launcherName;\n          exec = \"${launcherName} --name ${wmClass} %U\";\n          inherit icon;\n          desktopName = browser.applicationName;\n          startupNotify = true;\n          startupWMClass = wmClass;\n          terminal = false;\n        }\n        // (\n          if libName == \"thunderbird\" then\n            {\n              genericName = \"Email Client\";\n              comment = \"Read and write e-mails or RSS feeds, or manage tasks on calendars.\";\n              categories = [\n                \"Network\"\n                \"Chat\"\n                \"Email\"\n                \"Feed\"\n                \"GTK\"\n                \"News\"\n              ];\n              keywords = [\n                \"mail\"\n                \"email\"\n                \"e-mail\"\n                \"messages\"\n                \"rss\"\n                \"calendar\"\n                \"address book\"\n                \"addressbook\"\n                \"chat\"\n              ];\n              mimeTypes = [\n                \"message/rfc822\"\n                \"x-scheme-handler/mailto\"\n                \"text/calendar\"\n                \"text/x-vcard\"\n              ];\n              actions = {\n                profile-manager-window = {\n                  name = \"Profile Manager\";\n                  exec = \"${launcherName} --ProfileManager\";\n                };\n              };\n            }\n          else\n            {\n              genericName = \"Web Browser\";\n              categories = [\n                \"Network\"\n                \"WebBrowser\"\n              ];\n              mimeTypes = [\n                \"text/html\"\n                \"text/xml\"\n                \"application/xhtml+xml\"\n                \"application/vnd.mozilla.xul+xml\"\n                \"x-scheme-handler/http\"\n                \"x-scheme-handler/https\"\n              ];\n              actions = {\n                new-window = {\n                  name = \"New Window\";\n                  exec = \"${launcherName} --new-window %U\";\n                };\n                new-private-window = {\n                  name = \"New Private Window\";\n                  exec = \"${launcherName} --private-window %U\";\n                };\n                profile-manager-window = {\n                  name = \"Profile Manager\";\n                  exec = \"${launcherName} --ProfileManager\";\n                };\n              };\n            }\n        )\n      );\n\n      nativeBuildInputs = [\n        makeWrapper\n        lndir\n        jq\n      ];\n      buildInputs = lib.optionals (!isDarwin) [ browser.gtk3 ];\n\n      makeWrapperArgs = [\n        \"--prefix\"\n        \"LD_LIBRARY_PATH\"\n        \":\"\n        \"${finalAttrs.libs}\"\n\n        \"--suffix\"\n        \"PATH\"\n        \":\"\n        \"${placeholder \"out\"}/bin\"\n\n        \"--set\"\n        \"MOZ_APP_LAUNCHER\"\n        launcherName\n\n        \"--set\"\n        \"MOZ_LEGACY_PROFILES\"\n        \"1\"\n\n        \"--set\"\n        \"MOZ_ALLOW_DOWNGRADE\"\n        \"1\"\n      ]\n      ++ lib.optionals (!isDarwin) [\n        \"--suffix\"\n        \"GTK_PATH\"\n        \":\"\n        \"${lib.concatStringsSep \":\" finalAttrs.gtk_modules}\"\n\n        \"--suffix\"\n        \"XDG_DATA_DIRS\"\n        \":\"\n        \"${adwaita-icon-theme}/share\"\n\n        \"--set-default\"\n        \"MOZ_ENABLE_WAYLAND\"\n        \"1\"\n\n      ]\n      ++ lib.optionals (!xdg-utils.meta.broken && !isDarwin) [\n        # make xdg-open overridable at runtime\n        \"--suffix\"\n        \"PATH\"\n        \":\"\n        \"${lib.makeBinPath [ xdg-utils ]}\"\n\n      ]\n      ++ lib.optionals hasMozSystemDirPatch [\n        \"--set\"\n        \"MOZ_SYSTEM_DIR\"\n        \"${placeholder \"out\"}/lib/mozilla\"\n\n      ]\n      ++ lib.optionals (!hasMozSystemDirPatch && allNativeMessagingHosts != [ ]) [\n        \"--run\"\n        \"mkdir -p \\${MOZ_HOME:-~/.mozilla}/native-messaging-hosts\"\n\n      ]\n      ++ lib.optionals (!hasMozSystemDirPatch) (\n        lib.concatMap (ext: [\n          \"--run\"\n          \"ln -sfLt \\${MOZ_HOME:-~/.mozilla}/native-messaging-hosts ${ext}/lib/mozilla/native-messaging-hosts/*\"\n        ]) allNativeMessagingHosts\n      );\n\n      buildCommand =\n        let\n          appPath = \"Applications/${browser.applicationName}.app\";\n          executablePrefix = if isDarwin then \"${appPath}/Contents/MacOS\" else \"bin\";\n          executablePath = \"${executablePrefix}/${applicationName}\";\n          finalBinaryPath = \"${executablePath}\" + lib.optionalString (!isDarwin) \"${nameSuffix}\";\n          sourceBinary = \"${browser}/${executablePath}\";\n          libDir = if isDarwin then \"${appPath}/Contents/Resources\" else \"lib/${libName}\";\n          prefsDir = if isDarwin then \"${libDir}/browser/defaults/preferences\" else \"${libDir}/defaults/pref\";\n        in\n        ''\n          if [ ! -x \"${sourceBinary}\" ]\n          then\n              echo \"cannot find executable file \\`${sourceBinary}'\"\n              exit 1\n          fi\n\n          #########################\n          #                       #\n          #   EXTRA PREF CHANGES  #\n          #                       #\n          #########################\n          # Link the runtime. The executable itself has to be copied,\n          # because it will resolve paths relative to its true location.\n          # Any symbolic links have to be replicated as well.\n          cd \"${browser}\"\n          find . -type d -exec mkdir -p \"$out\"/{} \\;\n\n          find . -type f \\( -not -name \"${applicationName}\" \\) -exec ln -sT \"${browser}\"/{} \"$out\"/{} \\;\n\n          find . -type f \\( -name \"${applicationName}\" -o -name \"${applicationName}-bin\" \\) -print0 | while read -d $'\\0' f; do\n            cp -P --no-preserve=mode,ownership --remove-destination \"${browser}/$f\" \"$out/$f\"\n            chmod a+rwx \"$out/$f\"\n          done\n\n          # fix links and absolute references\n\n          find . -type l -print0 | while read -d $'\\0' l; do\n            target=\"$(readlink \"$l\")\"\n            target=''${target/#\"${browser}\"/\"$out\"}\n            ln -sfT \"$target\" \"$out/$l\"\n          done\n\n          # Disable update checks\n          touch $out/${libDir}/is-packaged-app\n\n          cd \"$out\"\n\n        ''\n        + lib.optionalString isDarwin ''\n          cd \"${appPath}\"\n\n          # The omni.ja files have to be copied and not symlinked, otherwise tabs crash.\n          # Maybe related to how omni.ja file is mmapped into memory. See:\n          # https://github.com/mozilla/gecko-dev/blob/b1662b447f306e6554647914090d4b73ac8e1664/modules/libjar/nsZipArchive.cpp#L204\n          #\n          # Mach-O shared libraries must be copied, not symlinked, otherwise some\n          # functionality like the Crypto API and audio decoding is broken.\n          find . -type l -print0 |\n          while IFS= read -r -d \"\" file; do\n            case \"$(basename \"$file\")\" in\n              omni.ja)\n                ;;\n              *)\n                # Copy if the symlink resolves to a Mach-O dylib\n                otool -l \"$file\" 2>/dev/null | grep -q 'LC_ID_DYLIB' || continue\n                ;;\n            esac\n\n            rm \"$file\"\n            cp \"${browser}/${appPath}/''${file#./}\" \"$file\"\n          done\n\n          # Copy any embedded .app directories; plugin-container fails to start otherwise.\n          for dir in $(find . -type d -name '*.app'); do\n            rm -r \"$dir\"\n            cp -r \"${browser}/${appPath}/$dir\" \"$dir\"\n          done\n\n          cd ..\n\n        ''\n        + ''\n\n          # create the wrapper\n\n          executablePrefix=\"$out/${executablePrefix}\"\n          executablePath=\"$out/${executablePath}\"\n          oldWrapperArgs=()\n\n          if [[ -L $executablePath ]]; then\n            # Symbolic link: wrap the link's target.\n            oldExe=\"$(readlink -v --canonicalize-existing \"$executablePath\")\"\n            rm \"$executablePath\"\n          elif wrapperCmd=$(${buildPackages.makeBinaryWrapper.extractCmd} \"$executablePath\"); [[ $wrapperCmd ]]; then\n            # If the executable is a binary wrapper, we need to update its target to\n            # point to $out, but we can't just edit the binary in-place because of length\n            # issues. So we extract the command used to create the wrapper and add the\n            # arguments to our wrapper.\n            parseMakeCWrapperCall() {\n              shift # makeCWrapper\n              oldExe=$1; shift\n              oldWrapperArgs=(\"$@\")\n            }\n            eval \"parseMakeCWrapperCall ''${wrapperCmd//\"${browser}\"/\"$out\"}\"\n            rm \"$executablePath\"\n          else\n            if read -rn2 shebang < \"$executablePath\" && [[ $shebang == '#!' ]]; then\n              # Shell wrapper: patch in place to point to $out.\n              sed -i \"s@${browser}@$out@g\" \"$executablePath\"\n            fi\n            # Suffix the executable with -old, because -wrapped might already be used by the old wrapper.\n            oldExe=\"$executablePrefix/.${applicationName}\"-old\n            mv \"$executablePath\" \"$oldExe\"\n          fi\n        ''\n        + lib.optionalString (!isDarwin) ''\n          appendToVar makeWrapperArgs --prefix XDG_DATA_DIRS : \"$GSETTINGS_SCHEMAS_PATH\"\n        ''\n        + ''\n          concatTo makeWrapperArgs oldWrapperArgs\n\n          makeWrapper \"$oldExe\" \"$out/${finalBinaryPath}\" \"''${makeWrapperArgs[@]}\"\n\n          #############################\n          #                           #\n          #   END EXTRA PREF CHANGES  #\n          #                           #\n          #############################\n        ''\n        + lib.optionalString (!isDarwin) ''\n          if [ -e \"${browser}/share/icons\" ]; then\n              mkdir -p \"$out/share\"\n              ln -s \"${browser}/share/icons\" \"$out/share/icons\"\n          else\n              for res in 16 32 48 64 128; do\n              mkdir -p \"$out/share/icons/hicolor/''${res}x''${res}/apps\"\n              icon=$( find \"${browser}/lib/\" -name \"default''${res}.png\" )\n                if [ -e \"$icon\" ]; then ln -s \"$icon\" \\\n                  \"$out/share/icons/hicolor/''${res}x''${res}/apps/${icon}.png\"\n                fi\n              done\n          fi\n\n          install -m 644 -D -t $out/share/applications $desktopItem/share/applications/*\n\n        ''\n        + lib.optionalString hasMozSystemDirPatch ''\n          mkdir -p $out/lib/mozilla/native-messaging-hosts\n          for ext in ${toString allNativeMessagingHosts}; do\n              ln -sLt $out/lib/mozilla/native-messaging-hosts $ext/lib/mozilla/native-messaging-hosts/*\n          done\n        ''\n        + ''\n\n          mkdir -p $out/lib/mozilla/pkcs11-modules\n          for ext in ${toString pkcs11Modules}; do\n              ln -sLt $out/lib/mozilla/pkcs11-modules $ext/lib/mozilla/pkcs11-modules/*\n          done\n\n\n          #########################\n          #                       #\n          #   EXTRA PREF CHANGES  #\n          #                       #\n          #########################\n          # user customization\n          libDir=\"$out/${libDir}\"\n\n          # creating policies.json\n          mkdir -p \"$libDir/distribution\"\n\n          POL_PATH=\"$libDir/distribution/policies.json\"\n          rm -f \"$POL_PATH\"\n          cat ${policiesJson} >> \"$POL_PATH\"\n\n          extraPoliciesFiles=(${toString extraPoliciesFiles})\n          for extraPoliciesFile in \"''${extraPoliciesFiles[@]}\"; do\n            jq -s '.[0] * .[1]' $extraPoliciesFile \"$POL_PATH\" > .tmp.json\n            mv .tmp.json \"$POL_PATH\"\n          done\n\n          # preparing for autoconfig\n          prefsDir=\"$out/${prefsDir}\"\n          mkdir -p \"$prefsDir\"\n\n          cat > \"$prefsDir/autoconfig.js\" << EOF\n          pref(\"general.config.filename\", \"mozilla.cfg\");\n          pref(\"general.config.obscure_value\", 0);\n          ${extraAutoConfig}\n          EOF\n\n          cat > \"$libDir/mozilla.cfg\" << EOF\n          ${mozillaCfg}\n          EOF\n\n          extraPrefsFiles=(${toString extraPrefsFiles})\n          for extraPrefsFile in \"''${extraPrefsFiles[@]}\"; do\n            cat \"$extraPrefsFile\" >> \"$libDir/mozilla.cfg\"\n          done\n\n          cat >> \"$libDir/mozilla.cfg\" << EOF\n          ${extraPrefs}\n          EOF\n\n          mkdir -p \"$libDir/distribution/extensions\"\n\n          #############################\n          #                           #\n          #   END EXTRA PREF CHANGES  #\n          #                           #\n          #############################\n        '';\n\n      preferLocalBuild = true;\n\n      libs = lib.makeLibraryPath libs + \":\" + lib.makeSearchPathOutput \"lib\" \"lib64\" libs;\n      gtk_modules = map (x: x + x.gtkModule) gtk_modules;\n\n      passthru = {\n        unwrapped = browser;\n      };\n\n      disallowedRequisites = [ stdenv.cc ];\n      meta = browser.meta // {\n        inherit (browser.meta) description;\n        mainProgram = launcherName;\n        hydraPlatforms = [ ];\n        priority = (browser.meta.priority or lib.meta.defaultPriority) - 1; # prefer wrapper over the package\n      };\n    });\nin\nlib.makeOverridable wrapper","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/browsers/firefox/wrapper.nix","line":44,"column":1},"path":["pkgs","wrapFirefox"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/browsers/firefox/wrapper.nix","line":44,"column":1},"path":["pkgs","wrapFirefox"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapFish","path":["pkgs","wrapFish"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3494,"column":3},"attr_expr":"wrapFish = callPackage ../shells/fish/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/shells/fish/wrapper.nix","line":98,"column":3},"lambda_expr":"{\n    completionDirs ? [ ],\n    functionDirs ? [ ],\n    confDirs ? [ ],\n    pluginPkgs ? [ ],\n    localConfig ? \"\",\n    shellAliases ? { },\n    runtimeInputs ? [ ],\n  }:\n\n  let\n    aliasesStr = builtins.concatStringsSep \"\\n\" (\n      lib.mapAttrsToList (k: v: \"alias ${k} ${lib.escapeShellArg v}\") shellAliases\n    );\n\n    shellAliasesFishConfig = writeTextFile {\n      name = \"wrapfish.aliases.fish\";\n      destination = \"/share/fish/vendor_conf.d/aliases.fish\";\n      text = ''\n        status is-interactive; and begin\n          # Aliases\n          ${aliasesStr}\n        end\n      '';\n    };\n\n    localFishConfig = writeTextFile {\n      name = \"wrapfish.local.fish\";\n      destination = \"/share/fish/vendor_conf.d/config.local.fish\";\n      text = localConfig;\n    };\n\n    vendorDir = kind: plugin: \"${plugin}/share/fish/vendor_${kind}.d\";\n    complPath = completionDirs ++ map (vendorDir \"completions\") pluginPkgs;\n    funcPath = functionDirs ++ map (vendorDir \"functions\") pluginPkgs;\n    confPath =\n      confDirs\n      ++ (map (vendorDir \"conf\") pluginPkgs)\n      ++ (map (vendorDir \"conf\") [\n        localFishConfig\n        shellAliasesFishConfig\n      ]);\n\n  in\n  writeShellApplication {\n    inherit runtimeInputs;\n    name = \"fish\";\n    text = ''\n      ${fish}/bin/fish --init-command \"\n        set --prepend fish_complete_path ${lib.escapeShellArgs complPath}\n        set --prepend fish_function_path ${lib.escapeShellArgs funcPath}\n        set --local fish_conf_source_path ${lib.escapeShellArgs confPath}\n        for c in \\$fish_conf_source_path/*; source \\$c; end\n      \" \"$@\"\n    '';\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/shells/fish/wrapper.nix","line":98,"column":3},"path":["pkgs","wrapFish"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/shells/fish/wrapper.nix","line":98,"column":3},"path":["pkgs","wrapFish"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapHelm","path":["pkgs","wrapHelm"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9535,"column":3},"attr_expr":"wrapHelm = callPackage ../applications/networking/cluster/helm/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/cluster/helm/wrapper.nix","line":8,"column":1},"lambda_expr":"helm:\n\nlet\n  wrapper =\n    {\n      plugins ? [ ],\n      extraMakeWrapperArgs ? \"\",\n    }:\n    let\n\n      initialMakeWrapperArgs = [\n      ];\n\n      pluginsDir = symlinkJoin {\n        name = \"helm-plugins\";\n        paths = plugins;\n      };\n    in\n    symlinkJoin {\n      name = \"helm-${lib.getVersion helm}\";\n\n      # Remove the symlinks created by symlinkJoin which we need to perform\n      # extra actions upon\n      postBuild = ''\n        wrapProgram \"$out/bin/helm\" \\\n          \"--set\" \"HELM_PLUGINS\" \"${pluginsDir}\" ${extraMakeWrapperArgs}\n      '';\n      paths = [\n        helm\n        pluginsDir\n      ];\n\n      preferLocalBuild = true;\n\n      nativeBuildInputs = [ makeWrapper ];\n      passthru = {\n        inherit pluginsDir;\n        unwrapped = helm;\n      };\n\n      meta = helm.meta // {\n        # To prevent builds on hydra\n        hydraPlatforms = [ ];\n        # prefer wrapper over the package\n        priority = (helm.meta.priority or lib.meta.defaultPriority) - 1;\n      };\n    };\nin\nlib.makeOverridable wrapper","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/cluster/helm/wrapper.nix","line":8,"column":1},"path":["pkgs","wrapHelm"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/cluster/helm/wrapper.nix","line":8,"column":1},"path":["pkgs","wrapHelm"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapKakoune","path":["pkgs","wrapKakoune"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2589,"column":3},"attr_expr":"wrapKakoune =\n    kakoune: attrs:\n    callPackage ../applications/editors/kakoune/wrapper.nix (attrs // { inherit kakoune; });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2590,"column":5},"lambda_expr":"kakoune: attrs:\n    callPackage ../applications/editors/kakoune/wrapper.nix (attrs // { inherit kakoune; })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2590,"column":5},"path":["pkgs","wrapKakoune"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":2590,"column":5},"path":["pkgs","wrapKakoune"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapLisp","path":["pkgs","wrapLisp"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7513,"column":3},"attr_expr":"wrapLisp = callPackage ../development/lisp-modules/nix-cl.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/lisp-modules/nix-cl.nix","line":384,"column":5},"lambda_expr":"{\n      pkg,\n      faslExt,\n      program ? pkg.meta.mainProgram or pkg.pname,\n      flags ? [ ],\n      asdf ? pkgs.asdf_3_3,\n      packageOverrides ? (self: super: { }),\n    }:\n    let\n      spec = {\n        inherit\n          pkg\n          faslExt\n          program\n          flags\n          asdf\n          ;\n      };\n      pkgs = (commonLispPackagesFor spec).overrideScope packageOverrides;\n      withPackages = lispWithPackages pkgs;\n      withOverrides =\n        packageOverrides:\n        wrapLisp {\n          inherit\n            pkg\n            faslExt\n            program\n            flags\n            asdf\n            ;\n          inherit packageOverrides;\n        };\n      buildASDFSystem = args: build-asdf-system (args // spec);\n    in\n    pkg\n    // {\n      inherit\n        pkgs\n        withPackages\n        withOverrides\n        buildASDFSystem\n        ;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/lisp-modules/nix-cl.nix","line":384,"column":5},"path":["pkgs","wrapLisp"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/lisp-modules/nix-cl.nix","line":384,"column":5},"path":["pkgs","wrapLisp"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapLispi686Linux","path":["pkgs","wrapLispi686Linux"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":7545,"column":3},"attr_expr":"wrapLispi686Linux = pkgsi686Linux.callPackage ../development/lisp-modules/nix-cl.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/lisp-modules/nix-cl.nix","line":384,"column":5},"lambda_expr":"{\n      pkg,\n      faslExt,\n      program ? pkg.meta.mainProgram or pkg.pname,\n      flags ? [ ],\n      asdf ? pkgs.asdf_3_3,\n      packageOverrides ? (self: super: { }),\n    }:\n    let\n      spec = {\n        inherit\n          pkg\n          faslExt\n          program\n          flags\n          asdf\n          ;\n      };\n      pkgs = (commonLispPackagesFor spec).overrideScope packageOverrides;\n      withPackages = lispWithPackages pkgs;\n      withOverrides =\n        packageOverrides:\n        wrapLisp {\n          inherit\n            pkg\n            faslExt\n            program\n            flags\n            asdf\n            ;\n          inherit packageOverrides;\n        };\n      buildASDFSystem = args: build-asdf-system (args // spec);\n    in\n    pkg\n    // {\n      inherit\n        pkgs\n        withPackages\n        withOverrides\n        buildASDFSystem\n        ;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/lisp-modules/nix-cl.nix","line":384,"column":5},"path":["pkgs","wrapLispi686Linux"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/lisp-modules/nix-cl.nix","line":384,"column":5},"path":["pkgs","wrapLispi686Linux"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapNeovim","path":["pkgs","wrapNeovim"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10258,"column":3},"attr_expr":"wrapNeovim = neovim-unwrapped: lib.makeOverridable (neovimUtils.legacyWrapper neovim-unwrapped);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10258,"column":16},"lambda_expr":"neovim-unwrapped: lib.makeOverridable (neovimUtils.legacyWrapper neovim-unwrapped)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10258,"column":16},"path":["pkgs","wrapNeovim"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10258,"column":16},"path":["pkgs","wrapNeovim"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapNeovimUnstable","path":["pkgs","wrapNeovimUnstable"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10257,"column":3},"attr_expr":"wrapNeovimUnstable = callPackage ../applications/editors/neovim/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/neovim/wrapper.nix","line":20,"column":1},"lambda_expr":"neovim-unwrapped:\n\nlet\n  # inherit interpreter from neovim\n  lua = neovim-unwrapped.lua;\n\n  wrapper =\n    {\n      extraName ? \"\",\n      # certain plugins need a custom configuration (available in passthru.initLua)\n      # to work with nix.\n      # if true, the wrapper automatically appends those snippets when necessary\n      autoconfigure ? true,\n\n      # append to PATH runtime deps of plugins\n      autowrapRuntimeDeps ? true,\n\n      # should contain all args but the binary. Can be either a string or list\n      wrapperArgs ? [ ],\n      withPython2 ? false,\n      withPython3 ? false,\n      # the function you would have passed to python3.withPackages\n      extraPython3Packages ? (_: [ ]),\n\n      waylandSupport ? lib.meta.availableOn stdenv.hostPlatform wayland,\n      withNodeJs ? false,\n      withPerl ? false,\n      withRuby ? false,\n\n      # wether to create symlinks in $out/bin/vi(m) -> $out/bin/nvim\n      vimAlias ? false,\n      viAlias ? false,\n\n      # it sets the VIMINIT environment variable to \"lua dofile('${customRc}')\"\n      # set to false if you want to control where to save the generated config\n      # (e.g., in ~/.config/init.vim or project/.nvimrc)\n      wrapRc ? true,\n      # vimL code that should be sourced as part of the generated init.lua file\n      neovimRcContent ? null,\n      # lua code to put into the generated init.lua file\n      luaRcContent ? \"\",\n      # DEPRECATED: entry to load in packpath\n      # use 'plugins' instead\n      packpathDirs ? null, # not used anymore\n\n      # a list of neovim plugin derivations, for instance\n      #  plugins = [\n      # { plugin=far-vim; config = \"let g:far#source='rg'\"; optional = false; }\n      # ]\n      plugins ? [ ],\n      # the function you would have passed to lua.withPackages\n      extraLuaPackages ? (_: [ ]),\n      ...\n    }@attrs:\n    assert\n      withPython2\n      -> throw \"Python2 support has been removed from the neovim wrapper, please remove withPython2 and python2Env.\";\n\n    assert\n      packpathDirs != null\n      -> throw \"packpathdirs is not used anymore: pass a list of neovim plugin derivations in 'plugins' instead.\";\n\n    stdenv.mkDerivation (\n      finalAttrs:\n      let\n\n        rubyEnv = bundlerEnv {\n          name = \"neovim-ruby-env\";\n          gemdir = ./ruby_provider;\n          postBuild = ''\n            ln -sf ${ruby}/bin/* $out/bin\n          '';\n        };\n\n        # a limited RC script used only to generate the manifest for remote plugins\n        manifestRc = \"\";\n\n        # plugin-related information\n        vimPackageInfo = neovimUtils.makeVimPackageInfo finalAttrs.plugins;\n\n        # we call vimrcContent without 'packages' to avoid the init.vim generation\n        neovimRcContent' = lib.concatStringsSep \"\\n\" (\n          lib.optional (vimPackageInfo.userPluginConfigs.viml or \"\" != \"\") (\n            vimPackageInfo.userPluginConfigs.viml\n          )\n          ++ (lib.optional (neovimRcContent != null) neovimRcContent)\n        );\n\n        packpathDirs.myNeovimPackages = vimPackageInfo.vimPackage;\n        finalPackdir = neovimUtils.packDir packpathDirs;\n\n        luaDeps = extraLuaPackages lua.pkgs ++ vimPackageInfo.luaDependencies;\n\n        luaPathLuaRc =\n          let\n            luaEnv = lua.withPackages (_: luaDeps);\n\n            # getLuaPath / getLuaCPath are not interpreter dependant at the moment and might thus cause\n            # errors between luajit/Puc lua\n            generatedLuaPath = lua.pkgs.getLuaPath luaEnv;\n            generatedLuaCPath = lua.pkgs.getLuaCPath luaEnv;\n          in\n          ''\n            package.path = \"${generatedLuaPath}\".. \";\" .. package.path\n            package.cpath = \"${generatedLuaCPath}\".. \";\" .. package.cpath\n          '';\n\n        rcContent = lib.concatStringsSep \"\\n\" (\n          lib.optional (luaDeps != [ ]) luaPathLuaRc\n          ++ [ providerLuaRc ]\n          ++ lib.optional (luaRcContent != \"\") luaRcContent\n          ++ lib.optional (\n            vimPackageInfo.userPluginConfigs.lua or \"\" != \"\"\n          ) vimPackageInfo.userPluginConfigs.lua\n          ++ lib.optional (neovimRcContent' != \"\") ''\n            vim.cmd.source \"${writeText \"init.vim\" neovimRcContent'}\"\n          ''\n          ++ lib.optionals autoconfigure vimPackageInfo.pluginAdvisedLua\n        );\n\n        python3Env =\n          lib.warnIf (attrs ? python3Env)\n            \"Pass your python packages via the `extraPython3Packages`, e.g., `extraPython3Packages = ps: [ ps.pandas ]`\"\n            python3.pkgs.python.withPackages\n            (\n              ps:\n              [ ps.pynvim ]\n              ++ (extraPython3Packages ps)\n              ++ (lib.concatMap (f: f ps) vimPackageInfo.pluginPython3Packages)\n            );\n\n        wrapperArgsStr = if lib.isString wrapperArgs then wrapperArgs else lib.escapeShellArgs wrapperArgs;\n\n        generatedWrapperArgs =\n\n          # neovimUtils.legacyWrapper adds a `legacyWrapper` attribute to let us know we run in \"legacy\" mode\n          lib.optionals (attrs ? legacyWrapper) [\n            # vim accepts a limited number of commands so we join all the provider ones\n            \"--add-flags\"\n            ''--cmd \"lua ${providerLuaRc}\"''\n          ]\n          ++\n            lib.optionals\n              (\n                finalAttrs.packpathDirs.myNeovimPackages.start != [ ]\n                || finalAttrs.packpathDirs.myNeovimPackages.opt != [ ]\n              )\n              [\n                \"--add-flags\"\n                ''--cmd \"set packpath^=${finalPackdir}\"''\n                \"--add-flags\"\n                ''--cmd \"set rtp^=${finalPackdir}\"''\n              ]\n          ++ lib.optionals finalAttrs.withRuby [\n            \"--set\"\n            \"GEM_HOME\"\n            \"${rubyEnv}/${rubyEnv.ruby.gemPath}\"\n          ]\n          ++ lib.optionals (finalAttrs.runtimeDeps != [ ]) [\n            \"--suffix\"\n            \"PATH\"\n            \":\"\n            (lib.makeBinPath finalAttrs.runtimeDeps)\n          ];\n\n        providerLuaRc =\n          let\n            hostPython3 =\n              runCommand \"nvim-host-${python3Env.name}\"\n                {\n                  nativeBuildInputs = [\n                    makeWrapper\n                  ];\n                }\n                ''\n                  makeWrapper ${python3Env.interpreter} $out/bin/nvim-python3 --unset PYTHONPATH --unset PYTHONSAFEPATH\n                '';\n\n            genProviderCommand =\n              prog: withProg: exec:\n              if withProg then\n                \"vim.g.${prog}_host_prog='${exec}'\"\n              else\n                # speeds up neovim by bypassing provider discovery\n                \"vim.g.loaded_${prog}_provider=0\";\n          in\n          lib.concatStringsSep \";\" [\n            (genProviderCommand \"node\" finalAttrs.withNodeJs \"${neovim-node-client}/bin/neovim-node-host\")\n            (genProviderCommand \"perl\" finalAttrs.withPerl \"${perlEnv}/bin/perl\")\n            (genProviderCommand \"ruby\" finalAttrs.withRuby \"${finalAttrs.rubyEnv}/bin/neovim-ruby-host\")\n            (genProviderCommand \"python3\" finalAttrs.withPython3 \"${hostPython3}/bin/nvim-python3\")\n          ];\n\n        # If `configure` != {}, we can't generate the rplugin.vim file with e.g\n        # NVIM_SYSTEM_RPLUGIN_MANIFEST *and* NVIM_RPLUGIN_MANIFEST env vars set in\n        # the wrapper. That's why only when `configure` != {} (tested both here and\n        # when `postBuild` is evaluated), we call makeWrapper once to generate a\n        # wrapper with most arguments we need, excluding those that cause problems to\n        # generate rplugin.vim, but still required for the final wrapper.\n        finalMakeWrapperArgs = [\n          \"${neovim-unwrapped}/bin/nvim\"\n          \"${placeholder \"out\"}/bin/nvim\"\n        ]\n        ++ [\n          \"--set\"\n          \"NVIM_SYSTEM_RPLUGIN_MANIFEST\"\n          \"${placeholder \"out\"}/rplugin.vim\"\n        ]\n        ++ lib.optionals finalAttrs.wrapRc [\n          \"--set-default\"\n          \"VIMINIT\"\n          \"lua dofile('${writeText \"init.lua\" finalAttrs.luaRcContent}')\"\n        ]\n        ++ finalAttrs.generatedWrapperArgs;\n\n        perlEnv = perl.withPackages (p: [\n          p.NeovimExt\n          p.Appcpanminus\n        ]);\n\n        pname = \"neovim\";\n        version = lib.getVersion neovim-unwrapped;\n      in\n      {\n        name = \"${pname}-${version}${extraName}\";\n        inherit pname version;\n        inherit plugins;\n\n        strictDeps = true;\n\n        __structuredAttrs = true;\n        dontUnpack = true;\n        inherit\n          viAlias\n          vimAlias\n          waylandSupport\n          withNodeJs\n          withPython3\n          withPerl\n          withRuby\n          ;\n        inherit\n          autoconfigure\n          autowrapRuntimeDeps\n          wrapRc\n          providerLuaRc\n          packpathDirs\n          ;\n        inherit python3Env rubyEnv;\n        inherit wrapperArgs generatedWrapperArgs;\n\n        runtimeDeps =\n          lib.optionals finalAttrs.waylandSupport [ wl-clipboard ]\n          ++ lib.optional finalAttrs.withRuby rubyEnv\n          ++ lib.optional finalAttrs.withNodeJs nodejs\n          ++ lib.optionals finalAttrs.autowrapRuntimeDeps vimPackageInfo.runtimeDeps;\n\n        luaRcContent = rcContent;\n        # Remove the symlinks created by symlinkJoin which we need to perform\n        # extra actions upon\n        postBuild =\n          lib.optionalString stdenv.hostPlatform.isLinux ''\n            rm $out/share/applications/nvim.desktop\n            substitute ${neovim-unwrapped}/share/applications/nvim.desktop $out/share/applications/nvim.desktop \\\n              --replace-warn 'Name=Neovim' 'Name=Neovim wrapper'\n          ''\n          + lib.optionalString finalAttrs.vimAlias ''\n            ln -s $out/bin/nvim $out/bin/vim\n          ''\n          + lib.optionalString finalAttrs.viAlias ''\n            ln -s $out/bin/nvim $out/bin/vi\n          ''\n          + lib.optionalString (manifestRc != null) (\n            let\n              manifestWrapperArgs = [\n                \"${neovim-unwrapped}/bin/nvim\"\n                \"${placeholder \"out\"}/bin/nvim-wrapper\"\n              ]\n              ++ finalAttrs.generatedWrapperArgs;\n            in\n            ''\n              echo \"Generating remote plugin manifest\"\n              export NVIM_RPLUGIN_MANIFEST=$out/rplugin.vim\n              makeWrapper ${lib.escapeShellArgs manifestWrapperArgs} ${wrapperArgsStr}\n\n              # Some plugins assume that the home directory is accessible for\n              # initializing caches, temporary files, etc. Even if the plugin isn't\n              # actively used, it may throw an error as soon as Neovim is launched\n              # (e.g., inside an autoload script), causing manifest generation to\n              # fail. Therefore, let's create a fake home directory before generating\n              # the manifest, just to satisfy the needs of these plugins.\n              #\n              # See https://github.com/Yggdroot/LeaderF/blob/v1.21/autoload/lfMru.vim#L10\n              # for an example of this behavior.\n              export HOME=\"$(mktemp -d)\"\n              # Launch neovim with a vimrc file containing only the generated plugin\n              # code. Pass various flags to disable temp file generation\n              # (swap/viminfo) and redirect errors to stderr.\n              # Only display the log on error since it will contain a few normally\n              # irrelevant messages.\n              if ! $out/bin/nvim-wrapper \\\n                -u ${writeText \"manifest.vim\" manifestRc} \\\n                -i NONE -n \\\n                -V1rplugins.log \\\n                +UpdateRemotePlugins +quit! > outfile 2>&1; then\n                cat outfile\n                echo -e \"\\nGenerating rplugin.vim failed!\"\n                exit 1\n              fi\n              rm \"${placeholder \"out\"}/bin/nvim-wrapper\"\n            ''\n          )\n          + ''\n            rm $out/bin/nvim\n            touch $out/rplugin.vim\n\n            makeWrapper ${lib.escapeShellArgs finalMakeWrapperArgs} ${wrapperArgsStr}\n          '';\n\n        buildPhase = ''\n          runHook preBuild\n          mkdir -p $out\n          for i in ${neovim-unwrapped}; do\n            lndir -silent $i $out\n          done\n          runHook postBuild\n        '';\n\n        preferLocalBuild = true;\n\n        nativeBuildInputs = [\n          makeWrapper\n          lndir\n        ];\n\n        vimPackage = vimPackageInfo.vimPackage;\n\n        checkPhase = ''\n          runHook preCheck\n\n          $out/bin/nvim -i NONE -e +quitall!\n          runHook postCheck\n        '';\n\n        passthru = {\n          inherit providerLuaRc packpathDirs;\n          unwrapped = neovim-unwrapped;\n          initRc = neovimRcContent';\n\n          tests = callPackage ./tests { };\n        };\n\n        meta = {\n          inherit (neovim-unwrapped.meta)\n            description\n            longDescription\n            homepage\n            mainProgram\n            license\n            teams\n            platforms\n            ;\n\n          # To prevent builds on hydra\n          hydraPlatforms = [ ];\n          # prefer wrapper over the package\n          priority = (neovim-unwrapped.meta.priority or lib.meta.defaultPriority) - 1;\n        };\n      }\n    );\nin\nlib.makeOverridable wrapper","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/neovim/wrapper.nix","line":20,"column":1},"path":["pkgs","wrapNeovimUnstable"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/editors/neovim/wrapper.nix","line":20,"column":1},"path":["pkgs","wrapNeovimUnstable"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapNonDeterministicGcc","path":["pkgs","wrapNonDeterministicGcc"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3659,"column":3},"attr_expr":"wrapNonDeterministicGcc =\n    stdenv: ccWrapper:\n    if ccWrapper.isGNU then\n      ccWrapper.override (prev: {\n        cc = prev.cc.override {\n          reproducibleBuild = false;\n          profiledCompiler = with stdenv; (!isDarwin && hostPlatform.isx86);\n        };\n      })\n    else\n      ccWrapper;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3660,"column":5},"lambda_expr":"stdenv: ccWrapper:\n    if ccWrapper.isGNU then\n      ccWrapper.override (prev: {\n        cc = prev.cc.override {\n          reproducibleBuild = false;\n          profiledCompiler = with stdenv; (!isDarwin && hostPlatform.isx86);\n        };\n      })\n    else\n      ccWrapper","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3660,"column":5},"path":["pkgs","wrapNonDeterministicGcc"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":3660,"column":5},"path":["pkgs","wrapNonDeterministicGcc"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapOBS","path":["pkgs","wrapOBS"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9790,"column":3},"attr_expr":"wrapOBS = callPackage ../applications/video/obs-studio/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/video/obs-studio/wrapper.nix","line":8,"column":1},"lambda_expr":"{\n  plugins ? [ ],\n}:\n\nsymlinkJoin {\n  name = \"wrapped-${obs-studio.name}\";\n\n  nativeBuildInputs = [ makeWrapper ];\n  paths = [ obs-studio ] ++ plugins;\n\n  postBuild =\n    let\n      # Some plugins needs extra environment, see obs-gstreamer for an example.\n      pluginArguments = lib.lists.concatMap (plugin: plugin.obsWrapperArguments or [ ]) plugins;\n\n      pluginsJoined = symlinkJoin {\n        name = \"obs-studio-plugins\";\n        paths = plugins;\n      };\n\n      wrapCommandLine = [\n        \"wrapProgram\"\n        \"$out/bin/obs\"\n        ''--set OBS_PLUGINS_PATH \"${pluginsJoined}/lib/obs-plugins\"''\n        ''--set OBS_PLUGINS_DATA_PATH \"${pluginsJoined}/share/obs/obs-plugins\"''\n      ]\n      ++ lib.lists.unique pluginArguments;\n    in\n    ''\n      ${lib.concatStringsSep \" \" wrapCommandLine}\n\n      # Remove unused obs-plugins dir to not cause confusion\n      rm -r $out/share/obs/obs-plugins\n      # Leave some breadcrumbs\n      echo 'Plugins are at ${pluginsJoined}/share/obs/obs-plugins' > $out/share/obs/obs-plugins-README\n    '';\n\n  inherit (obs-studio) meta;\n  passthru = obs-studio.passthru // {\n    passthru.unwrapped = obs-studio;\n  };\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/video/obs-studio/wrapper.nix","line":8,"column":1},"path":["pkgs","wrapOBS"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/video/obs-studio/wrapper.nix","line":8,"column":1},"path":["pkgs","wrapOBS"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapQemuBinfmtP","path":["pkgs","wrapQemuBinfmtP"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":9883,"column":3},"attr_expr":"wrapQemuBinfmtP = callPackage ../by-name/qe/qemu/binfmt-p-wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/qe/qemu/binfmt-p-wrapper.nix","line":14,"column":1},"lambda_expr":"name: emulator:\n\nstdenv.mkDerivation {\n  inherit name;\n\n  src = ./binfmt-p-wrapper.c;\n\n  dontUnpack = true;\n  dontInstall = true;\n\n  buildInputs = [ stdenv.cc.libc.static or null ];\n\n  buildPhase = ''\n    runHook preBuild\n\n    mkdir -p $out/bin\n    $CC -o $out/bin/${name} -static -std=c99 -O2 \\\n        -DTARGET_QEMU=\\\"${emulator}\\\" \\\n        ${lib.optionalString enableDebug \"-DDEBUG\"} \\\n        $src\n\n    runHook postBuild\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/qe/qemu/binfmt-p-wrapper.nix","line":14,"column":1},"path":["pkgs","wrapQemuBinfmtP"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/qe/qemu/binfmt-p-wrapper.nix","line":14,"column":1},"path":["pkgs","wrapQemuBinfmtP"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapRetroArch","path":["pkgs","wrapRetroArch"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":1346,"column":3},"attr_expr":"wrapRetroArch = retroarch-bare.wrapper;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/re/retroarch-bare/package.nix","line":158,"column":7},"lambda_expr":"{\n        cores ? [ ],\n        settings ? { },\n      }:\n      import ./wrapper.nix {\n        inherit\n          lib\n          libretro\n          makeBinaryWrapper\n          retroarch-bare\n          writeText\n          symlinkJoin\n          cores\n          ;\n        settings = {\n          assets_directory = \"${retroarch-assets}/share/retroarch/assets\";\n          joypad_autoconfig_dir = \"${retroarch-joypad-autoconfig}/share/libretro/autoconfig\";\n          libretro_info_path = \"${libretro-core-info}/share/retroarch/cores\";\n        }\n        // settings;\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/re/retroarch-bare/package.nix","line":158,"column":7},"path":["pkgs","wrapRetroArch"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/re/retroarch-bare/package.nix","line":158,"column":7},"path":["pkgs","wrapRetroArch"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapRustc","path":["pkgs","wrapRustc"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4476,"column":3},"attr_expr":"wrapRustc = rustc-unwrapped: wrapRustcWith { inherit rustc-unwrapped; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4476,"column":15},"lambda_expr":"rustc-unwrapped: wrapRustcWith { inherit rustc-unwrapped; }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4476,"column":15},"path":["pkgs","wrapRustc"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4476,"column":15},"path":["pkgs","wrapRustc"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapRustcWith","path":["pkgs","wrapRustcWith"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4475,"column":3},"attr_expr":"wrapRustcWith = { rustc-unwrapped, ... }@args: callPackage ../build-support/rust/rustc-wrapper args;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4475,"column":19},"lambda_expr":"{ rustc-unwrapped, ... }@args: callPackage ../build-support/rust/rustc-wrapper args","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4475,"column":19},"path":["pkgs","wrapRustcWith"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4475,"column":19},"path":["pkgs","wrapRustcWith"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapThunderbird","path":["pkgs","wrapThunderbird"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10420,"column":3},"attr_expr":"wrapThunderbird = callPackage ../applications/networking/mailreaders/thunderbird/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix","line":8,"column":1},"lambda_expr":"browser: args:\n\n(wrapFirefox browser (\n  {\n    libName = \"thunderbird\";\n  }\n  // args\n))\n\n.overrideAttrs\n  (old: {\n    # Thunderbird's native GPG support does not yet support smartcards.\n    # The official upstream recommendation is to configure fall back to gnupg\n    # using the Thunderbird config `mail.openpgp.allow_external_gnupg`\n    # and GPG keys set up; instructions with pictures at:\n    # https://anweshadas.in/how-to-use-yubikey-or-any-gpg-smartcard-in-thunderbird-78/\n    # For that to work out of the box, it requires `gnupg` on PATH and\n    # `gpgme` in `LD_LIBRARY_PATH`; we do this below.\n    buildCommand = old.buildCommand + ''\n      wrapProgram \"$executablePath\" \\\n        --prefix LD_LIBRARY_PATH ':' \"${lib.makeLibraryPath [ gpgme ]}\" \\\n        --prefix PATH ':' \"${lib.makeBinPath [ gnupg ]}\"\n    '';\n  })","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix","line":8,"column":1},"path":["pkgs","wrapThunderbird"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/mailreaders/thunderbird/wrapper.nix","line":8,"column":1},"path":["pkgs","wrapThunderbird"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapWatcom","path":["pkgs","wrapWatcom"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":4458,"column":3},"attr_expr":"wrapWatcom = callPackage ../development/compilers/open-watcom/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/open-watcom/wrapper.nix","line":11,"column":1},"lambda_expr":"open-watcom:\n\nlet\n  wrapper =\n    { }:\n    let\n      archToBindir =\n        with stdenv.hostPlatform;\n        if isx86 then\n          \"bin\"\n        else if isAarch then\n          \"arm\"\n        # we don't support running on AXP\n        # don't know what MIPS, PPC bindirs are called\n        else\n          throw \"Don't know where ${system} binaries are located!\";\n\n      binDirs =\n        with stdenv.hostPlatform;\n        if isWindows then\n          [\n            (lib.optionalString is64bit \"${archToBindir}nt64\")\n            \"${archToBindir}nt\"\n            (lib.optionalString is32bit \"${archToBindir}w\")\n          ]\n        else if isDarwin then\n          [\n            (lib.optionalString is64bit \"${archToBindir}o64\")\n            # modern Darwin cannot execute 32-bit code anymore\n            (lib.optionalString is32bit \"${archToBindir}o\")\n          ]\n        else\n          [\n            (lib.optionalString is64bit \"${archToBindir}l64\")\n            \"${archToBindir}l\"\n          ];\n      # TODO\n      # This works good enough as-is, but should really only be targetPlatform-specific\n      # but we don't support targeting DOS, OS/2, 16-bit Windows etc Nixpkgs-wide so this needs extra logic\n      includeDirs =\n        with stdenv.hostPlatform;\n        [\n          \"h\"\n        ]\n        ++ lib.optional isWindows \"h/nt\"\n        ++ lib.optional isLinux \"lh\";\n      listToDirs = list: lib.strings.concatMapStringsSep \":\" (dir: \"${placeholder \"out\"}/${dir}\") list;\n      name = \"${open-watcom.passthru.prettyName}-${open-watcom.version}\";\n    in\n    symlinkJoin {\n      inherit (open-watcom) version;\n      pname = open-watcom.passthru.prettyName;\n\n      paths = [ open-watcom ];\n\n      nativeBuildInputs = [ makeWrapper ];\n\n      postBuild = ''\n        mkdir $out/bin\n\n        for binDir in ${lib.strings.concatStringsSep \" \" binDirs}; do\n          for exe in $(find ${open-watcom}/$binDir \\\n          -type f -executable \\\n          ${lib.optionalString stdenv.hostPlatform.isLinux \"-not -iname '*.so' -not -iname '*.exe'\"} \\\n          ); do\n            if [ ! -f $out/bin/$(basename $exe) ]; then\n              makeWrapper $exe $out/bin/$(basename $exe) \\\n                --set WATCOM ${open-watcom} \\\n                --prefix PATH : ${listToDirs binDirs} \\\n                --set EDPATH ${open-watcom}/eddat \\\n                --set INCLUDE ${listToDirs includeDirs}\n            fi\n          done\n        done\n      '';\n\n      passthru = {\n        unwrapped = open-watcom;\n        tests =\n          let\n            wrapped = wrapper { };\n          in\n          {\n            simple = runCommand \"${name}-test-simple\" { nativeBuildInputs = [ wrapped ]; } ''\n              cat <<EOF >test.c\n              #include <stdio.h>\n              int main() {\n                printf (\"Testing OpenWatcom C89 compiler.\\n\");\n                return 0;\n              }\n              EOF\n              cat test.c\n              wcl386 -fe=test_c test.c\n              # Only test execution if hostPlatform is targetable\n              ${lib.optionalString (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch) \"./test_c\"}\n\n              cat <<EOF >test.cpp\n              #include <string>\n              #include <iostream>\n              int main() {\n                std::cout << \"Testing OpenWatcom C++ library implementation.\" << std::endl;\n                watcom::istring HELLO (\"HELLO\");\n                if (HELLO != \"hello\") {\n                  return 1;\n                }\n                if (HELLO.find (\"ello\") != 1) {\n                  return 2;\n                }\n                return 0;\n              }\n              EOF\n              cat test.cpp\n              wcl386 -fe=test_cpp test.cpp\n              # Only test execution if hostPlatform is targetable\n              ${lib.optionalString (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isAarch) \"./test_cpp\"}\n              touch $out\n            '';\n            cross =\n              runCommand \"${name}-test-cross\"\n                {\n                  nativeBuildInputs = [\n                    wrapped\n                    file\n                  ];\n                }\n                ''\n                  cat <<EOF >test.c\n                  #include <stdio.h>\n                  int main() {\n                    printf (\"Testing OpenWatcom cross-compilation.\\n\");\n                    return 0;\n                  }\n                  EOF\n                  cat test.c\n\n                  echo \"Test compiling\"\n                  wcl386 -bcl=linux -fe=linux test.c\n                  wcl386 -bcl=nt -fe=nt test.c\n                  wcl386 -bcl=dos4g -fe=dos4g test.c\n                  wcl -bcl=windows -fe=windows test.c\n                  wcl -bcl=dos -fe=dos test.c\n\n                  echo \"Test file format\"\n                  file ./linux\n                  file ./linux | grep \"ELF 32-bit\" | grep -q \"Linux\"\n                  file ./nt.exe\n                  file ./nt.exe | grep \"PE32 executable\" | grep -q \"Windows\"\n                  file ./dos4g.exe\n                  file ./dos4g.exe | grep \"MS-DOS executable\" | grep -q \"LE executable\"\n                  file ./windows.exe\n                  file ./windows.exe | grep \"MS-DOS executable\" | grep -q \"NE for MS Windows 3.\"\n                  file ./dos.exe\n                  file ./dos.exe | grep \"MS-DOS executable\" | grep -q \"MZ for MS-DOS\"\n                  touch $out\n                '';\n          };\n      };\n\n      inherit (open-watcom) meta;\n    };\nin\nlib.makeOverridable wrapper","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/open-watcom/wrapper.nix","line":11,"column":1},"path":["pkgs","wrapWatcom"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/open-watcom/wrapper.nix","line":11,"column":1},"path":["pkgs","wrapWatcom"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.wrapWeechat","path":["pkgs","wrapWeechat"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":10387,"column":3},"attr_expr":"wrapWeechat = callPackage ../applications/networking/irc/weechat/wrapper.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/irc/weechat/wrapper.nix","line":11,"column":1},"lambda_expr":"weechat:\n\nlet\n  wrapper =\n    {\n      installManPages ? true,\n      configure ?\n        { availablePlugins, ... }:\n        {\n          # Do not include PHP by default, because it bloats the closure, doesn't\n          # build on Darwin, and there are no official PHP scripts.\n          plugins = builtins.attrValues (removeAttrs availablePlugins [ \"php\" ]);\n        },\n    }:\n\n    let\n      perlInterpreter = perlPackages.perl;\n      availablePlugins =\n        let\n          simplePlugin = name: { pluginFile = \"${weechat.${name}}/lib/weechat/plugins/${name}.so\"; };\n        in\n        rec {\n          python = (simplePlugin \"python\") // {\n            extraEnv = ''\n              export PATH=\"${python3Packages.python}/bin:$PATH\"\n            '';\n            withPackages =\n              pkgsFun:\n              (\n                python\n                // {\n                  extraEnv = ''\n                    ${python.extraEnv}\n                    export PYTHONHOME=\"${python3Packages.python.withPackages pkgsFun}\"\n                  '';\n                }\n              );\n          };\n          perl = (simplePlugin \"perl\") // {\n            extraEnv = ''\n              export PATH=\"${perlInterpreter}/bin:$PATH\"\n            '';\n            withPackages =\n              pkgsFun:\n              (\n                perl\n                // {\n                  extraEnv = ''\n                    ${perl.extraEnv}\n                    export PERL5LIB=${perlPackages.makeFullPerlPath (pkgsFun perlPackages)}\n                  '';\n                }\n              );\n          };\n          tcl = simplePlugin \"tcl\";\n          ruby = simplePlugin \"ruby\";\n          guile = simplePlugin \"guile\";\n          lua = simplePlugin \"lua\";\n          php = simplePlugin \"php\";\n        };\n\n      config = configure { inherit availablePlugins; };\n\n      plugins = config.plugins or (builtins.attrValues availablePlugins);\n\n      pluginsDir = runCommand \"weechat-plugins\" { } ''\n        mkdir -p $out/plugins\n        for plugin in ${lib.concatMapStringsSep \" \" (p: p.pluginFile) plugins} ; do\n          ln -s $plugin $out/plugins\n        done\n      '';\n\n      init =\n        let\n          init = builtins.replaceStrings [ \"\\n\" ] [ \";\" ] (config.init or \"\");\n\n          mkScript = drv: lib.forEach drv.scripts (script: \"/script load ${drv}/share/${script}\");\n\n          scripts = builtins.concatStringsSep \";\" (\n            lib.foldl (scripts: drv: scripts ++ mkScript drv) [ ] (config.scripts or [ ])\n          );\n        in\n        \"${scripts};${init}\";\n\n      mkWeechat =\n        bin:\n        (writeScriptBin bin ''\n          #!${runtimeShell}\n          export WEECHAT_EXTRA_LIBDIR=${pluginsDir}\n          ${lib.concatMapStringsSep \"\\n\" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}\n          exec ${weechat}/bin/${bin} \"$@\" --run-command ${lib.escapeShellArg init}\n        '')\n        // {\n          inherit (weechat) name man;\n          unwrapped = weechat;\n          outputs = [\n            \"out\"\n            \"man\"\n          ];\n        };\n    in\n    buildEnv {\n      pname = \"weechat-bin-env\";\n      inherit (weechat) version;\n      extraOutputsToInstall = lib.optionals installManPages [ \"man\" ];\n      paths = [\n        (mkWeechat \"weechat\")\n        (mkWeechat \"weechat-headless\")\n        (runCommand \"weechat-out-except-bin\" { } ''\n          mkdir $out\n          ln -sf ${weechat}/include $out/include\n          ln -sf ${weechat}/lib $out/lib\n          ln -sf ${weechat}/share $out/share\n        '')\n      ];\n      meta = removeAttrs weechat.meta [ \"outputsToInstall\" ];\n    };\n\nin\nlib.makeOverridable wrapper","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/irc/weechat/wrapper.nix","line":11,"column":1},"path":["pkgs","wrapWeechat"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/applications/networking/irc/weechat/wrapper.nix","line":11,"column":1},"path":["pkgs","wrapWeechat"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeCBin","path":["pkgs","writeCBin"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":345,"column":3},"attr_expr":"writeCBin =\n    pname: code:\n    runCommandCC pname\n      {\n        inherit pname code;\n        executable = true;\n        # Pointless to do this on a remote machine.\n        preferLocalBuild = true;\n        allowSubstitutes = false;\n        __structuredAttrs = true;\n        meta = {\n          mainProgram = pname;\n        };\n      }\n      ''\n        n=$out/bin/${pname}\n        mkdir -p \"$(dirname \"$n\")\"\n        printf \"%s\" \"$code\" > code.c\n        $CC -x c code.c -o \"$n\"\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":346,"column":5},"lambda_expr":"writeCBin =\n    pname: code:\n    runCommandCC pname\n      {\n        inherit pname code;\n        executable = true;\n        # Pointless to do this on a remote machine.\n        preferLocalBuild = true;\n        allowSubstitutes = false;\n        __structuredAttrs = true;\n        meta = {\n          mainProgram = pname;\n        };\n      }\n      ''\n        n=$out/bin/${pname}\n        mkdir -p \"$(dirname \"$n\")\"\n        printf \"%s\" \"$code\" > code.c\n        $CC -x c code.c -o \"$n\"\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":346,"column":5},"path":["pkgs","writeCBin"],"pos_type":"Lambda"}},"content":{"content":"TODO: add to writers? pkgs/build-support/writers","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":346,"column":5},"path":["pkgs","writeCBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeClosure","path":["pkgs","writeClosure"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":762,"column":3},"attr_expr":"writeClosure =\n    paths:\n    runCommand \"runtime-deps\"\n      {\n        # Get the cleaner exportReferencesGraph interface\n        __structuredAttrs = true;\n        exportReferencesGraph.graph = paths;\n        nativeBuildInputs = [ jq ];\n      }\n      ''\n        jq -r \".graph | map(.path) | sort | .[]\" \"$NIX_ATTRS_JSON_FILE\" > \"$out\"\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":763,"column":5},"lambda_expr":"writeClosure =\n    paths:\n    runCommand \"runtime-deps\"\n      {\n        # Get the cleaner exportReferencesGraph interface\n        __structuredAttrs = true;\n        exportReferencesGraph.graph = paths;\n        nativeBuildInputs = [ jq ];\n      }\n      ''\n        jq -r \".graph | map(.path) | sort | .[]\" \"$NIX_ATTRS_JSON_FILE\" > \"$out\"\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":763,"column":5},"path":["pkgs","writeClosure"],"pos_type":"Lambda"}},"content":{"content":"See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeClosure","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":763,"column":5},"path":["pkgs","writeClosure"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeCueValidator","path":["pkgs","writeCueValidator"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":1507,"column":17},"attr_expr":"writeCueValidator","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/cu/cue/validator.nix","line":11,"column":1},"lambda_expr":"cueSchemaFile:\n{\n  document ? null,\n}:\nwriteShellScript \"validate-using-cue\" ''\n  ${cue}/bin/cue \\\n    --all-errors \\\n    vet \\\n    --concrete \\\n    \"$1\" \\\n    ${cueSchemaFile} \\\n    ${lib.optionalString (document != null) \"-d \\\"${document}\\\"\"}\n''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/cu/cue/validator.nix","line":11,"column":1},"path":["pkgs","writeCueValidator"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/cu/cue/validator.nix","line":11,"column":1},"path":["pkgs","writeCueValidator"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeDirectReferencesToFile","path":["pkgs","writeDirectReferencesToFile"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":777,"column":3},"attr_expr":"writeDirectReferencesToFile =\n    path:\n    runCommand \"runtime-references\"\n      {\n        exportReferencesGraph = [\n          \"graph\"\n          path\n        ];\n        inherit path;\n      }\n      ''\n        touch ./references\n        while read p; do\n          read dummy\n          read nrRefs\n          if [[ $p == $path ]]; then\n            for ((i = 0; i < nrRefs; i++)); do\n              read ref;\n              echo $ref >>./references\n            done\n          else\n            for ((i = 0; i < nrRefs; i++)); do\n              read ref;\n            done\n          fi\n        done < graph\n        sort ./references >$out\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":778,"column":5},"lambda_expr":"writeDirectReferencesToFile =\n    path:\n    runCommand \"runtime-references\"\n      {\n        exportReferencesGraph = [\n          \"graph\"\n          path\n        ];\n        inherit path;\n      }\n      ''\n        touch ./references\n        while read p; do\n          read dummy\n          read nrRefs\n          if [[ $p == $path ]]; then\n            for ((i = 0; i < nrRefs; i++)); do\n              read ref;\n              echo $ref >>./references\n            done\n          else\n            for ((i = 0; i < nrRefs; i++)); do\n              read ref;\n            done\n          fi\n        done < graph\n        sort ./references >$out\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":778,"column":5},"path":["pkgs","writeDirectReferencesToFile"],"pos_type":"Lambda"}},"content":{"content":"See https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeDirectReferencesToFile","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":778,"column":5},"path":["pkgs","writeDirectReferencesToFile"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeScript","path":["pkgs","writeScript"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":206,"column":3},"attr_expr":"writeScript =\n    name: text:\n    writeTextFile {\n      inherit name text;\n      executable = true;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":207,"column":5},"lambda_expr":"writeScript =\n    name: text:\n    writeTextFile {\n      inherit name text;\n      executable = true;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":207,"column":5},"path":["pkgs","writeScript"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":207,"column":5},"path":["pkgs","writeScript"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeScriptBin","path":["pkgs","writeScriptBin"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":215,"column":3},"attr_expr":"writeScriptBin =\n    name: text:\n    writeTextFile {\n      inherit name text;\n      executable = true;\n      destination = \"/bin/${name}\";\n      meta.mainProgram = name;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":216,"column":5},"lambda_expr":"writeScriptBin =\n    name: text:\n    writeTextFile {\n      inherit name text;\n      executable = true;\n      destination = \"/bin/${name}\";\n      meta.mainProgram = name;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":216,"column":5},"path":["pkgs","writeScriptBin"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":216,"column":5},"path":["pkgs","writeScriptBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeShellApplication","path":["pkgs","writeShellApplication"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":260,"column":3},"attr_expr":"writeShellApplication =\n    {\n      name,\n      text,\n      runtimeInputs ? [ ],\n      runtimeEnv ? null,\n      meta ? { },\n      passthru ? { },\n      checkPhase ? null,\n      excludeShellChecks ? [ ],\n      extraShellCheckFlags ? [ ],\n      bashOptions ? [\n        \"errexit\"\n        \"nounset\"\n        \"pipefail\"\n      ],\n      derivationArgs ? { },\n      inheritPath ? true,\n    }@args:\n    writeTextFile {\n      pos = builtins.unsafeGetAttrPos \"name\" args;\n      inherit\n        name\n        meta\n        passthru\n        derivationArgs\n        ;\n      executable = true;\n      destination = \"/bin/${name}\";\n      allowSubstitutes = true;\n      preferLocalBuild = false;\n      text = ''\n        #!${runtimeShell}\n        ${lib.concatMapStringsSep \"\\n\" (option: \"set -o ${option}\") bashOptions}\n      ''\n      + lib.optionalString (runtimeEnv != null) (\n        lib.concatMapAttrsStringSep \"\" (name: value: ''\n          ${lib.toShellVar name value}\n          export ${name}\n        '') runtimeEnv\n      )\n      + ''\n\n        export PATH=\"${\n          lib.concatStringsSep \":\" (\n            (lib.optionals (runtimeInputs != [ ]) [ (lib.makeBinPath runtimeInputs) ])\n            ++ (lib.optionals inheritPath [ \"$PATH\" ])\n          )\n        }\"\n      ''\n\n      + ''\n\n        ${text}\n      '';\n\n      checkPhase =\n        let\n          excludeFlags = lib.optionals (excludeShellChecks != [ ]) [\n            \"--exclude\"\n            (lib.concatStringsSep \",\" excludeShellChecks)\n          ];\n          # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v)\n          # but we still want to use writeShellApplication on those platforms\n          shellcheckCommand = lib.optionalString shellcheck-minimal.compiler.bootstrapAvailable ''\n            # use shellcheck which does not include docs\n            # pandoc takes long to build and documentation isn't needed for just running the cli\n            ${lib.getExe shellcheck-minimal} ${\n              lib.escapeShellArgs (excludeFlags ++ extraShellCheckFlags)\n            } \"$target\"\n          '';\n        in\n        if checkPhase == null then\n          ''\n            runHook preCheck\n            ${stdenv.shellDryRun} \"$target\"\n            ${shellcheckCommand}\n            runHook postCheck\n          ''\n        else\n          checkPhase;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":261,"column":5},"lambda_expr":"writeShellApplication =\n    {\n      name,\n      text,\n      runtimeInputs ? [ ],\n      runtimeEnv ? null,\n      meta ? { },\n      passthru ? { },\n      checkPhase ? null,\n      excludeShellChecks ? [ ],\n      extraShellCheckFlags ? [ ],\n      bashOptions ? [\n        \"errexit\"\n        \"nounset\"\n        \"pipefail\"\n      ],\n      derivationArgs ? { },\n      inheritPath ? true,\n    }@args:\n    writeTextFile {\n      pos = builtins.unsafeGetAttrPos \"name\" args;\n      inherit\n        name\n        meta\n        passthru\n        derivationArgs\n        ;\n      executable = true;\n      destination = \"/bin/${name}\";\n      allowSubstitutes = true;\n      preferLocalBuild = false;\n      text = ''\n        #!${runtimeShell}\n        ${lib.concatMapStringsSep \"\\n\" (option: \"set -o ${option}\") bashOptions}\n      ''\n      + lib.optionalString (runtimeEnv != null) (\n        lib.concatMapAttrsStringSep \"\" (name: value: ''\n          ${lib.toShellVar name value}\n          export ${name}\n        '') runtimeEnv\n      )\n      + ''\n\n        export PATH=\"${\n          lib.concatStringsSep \":\" (\n            (lib.optionals (runtimeInputs != [ ]) [ (lib.makeBinPath runtimeInputs) ])\n            ++ (lib.optionals inheritPath [ \"$PATH\" ])\n          )\n        }\"\n      ''\n\n      + ''\n\n        ${text}\n      '';\n\n      checkPhase =\n        let\n          excludeFlags = lib.optionals (excludeShellChecks != [ ]) [\n            \"--exclude\"\n            (lib.concatStringsSep \",\" excludeShellChecks)\n          ];\n          # GHC (=> shellcheck) isn't supported on some platforms (such as risc-v)\n          # but we still want to use writeShellApplication on those platforms\n          shellcheckCommand = lib.optionalString shellcheck-minimal.compiler.bootstrapAvailable ''\n            # use shellcheck which does not include docs\n            # pandoc takes long to build and documentation isn't needed for just running the cli\n            ${lib.getExe shellcheck-minimal} ${\n              lib.escapeShellArgs (excludeFlags ++ extraShellCheckFlags)\n            } \"$target\"\n          '';\n        in\n        if checkPhase == null then\n          ''\n            runHook preCheck\n            ${stdenv.shellDryRun} \"$target\"\n            ${shellcheckCommand}\n            runHook postCheck\n          ''\n        else\n          checkPhase;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":261,"column":5},"path":["pkgs","writeShellApplication"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":261,"column":5},"path":["pkgs","writeShellApplication"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeShellScript","path":["pkgs","writeShellScript"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":226,"column":3},"attr_expr":"writeShellScript =\n    name: text:\n    writeTextFile {\n      inherit name;\n      executable = true;\n      text = ''\n        #!${runtimeShell}\n        ${text}\n      '';\n      checkPhase = ''\n        ${stdenv.shellDryRun} \"$target\"\n      '';\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":227,"column":5},"lambda_expr":"writeShellScript =\n    name: text:\n    writeTextFile {\n      inherit name;\n      executable = true;\n      text = ''\n        #!${runtimeShell}\n        ${text}\n      '';\n      checkPhase = ''\n        ${stdenv.shellDryRun} \"$target\"\n      '';\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":227,"column":5},"path":["pkgs","writeShellScript"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":227,"column":5},"path":["pkgs","writeShellScript"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeShellScriptBin","path":["pkgs","writeShellScriptBin"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":242,"column":3},"attr_expr":"writeShellScriptBin =\n    name: text:\n    writeTextFile {\n      inherit name;\n      executable = true;\n      destination = \"/bin/${name}\";\n      text = ''\n        #!${runtimeShell}\n        ${text}\n      '';\n      checkPhase = ''\n        ${stdenv.shellDryRun} \"$target\"\n      '';\n      meta.mainProgram = name;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":243,"column":5},"lambda_expr":"writeShellScriptBin =\n    name: text:\n    writeTextFile {\n      inherit name;\n      executable = true;\n      destination = \"/bin/${name}\";\n      text = ''\n        #!${runtimeShell}\n        ${text}\n      '';\n      checkPhase = ''\n        ${stdenv.shellDryRun} \"$target\"\n      '';\n      meta.mainProgram = name;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":243,"column":5},"path":["pkgs","writeShellScriptBin"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":243,"column":5},"path":["pkgs","writeShellScriptBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeStringReferencesToFile","path":["pkgs","writeStringReferencesToFile"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":816,"column":3},"attr_expr":"writeStringReferencesToFile =\n    string:\n    /*\n       The basic operation this performs is to copy the string context\n       from `string` to a second string and wrap that string in a\n       derivation. However, that alone is not enough, since nothing in the\n       string refers to the output paths of the derivations/paths in its\n       context, meaning they'll be considered build-time dependencies and\n       removed from the wrapper derivation's closure. Putting the\n       necessary output paths in the new string is however not very\n       straightforward - the attrset returned by `getContext` contains\n       only references to derivations' .drv-paths, not their output\n       paths. In order to \"convert\" them, we try to extract the\n       corresponding paths from the original string using regex.\n    */\n    let\n      # Taken from https://github.com/NixOS/nix/blob/130284b8508dad3c70e8160b15f3d62042fc730a/src/libutil/hash.cc#L84\n      nixHashChars = \"0123456789abcdfghijklmnpqrsvwxyz\";\n      context = builtins.getContext string;\n      derivations = lib.filterAttrs (n: v: v ? outputs) context;\n      # Objects copied from outside of the store, such as paths and\n      # `builtins.fetch*`ed ones\n      sources = lib.attrNames (lib.filterAttrs (n: v: v ? path) context);\n      packages = lib.mapAttrs' (name: value: {\n        inherit value;\n        name = lib.head (builtins.match \"${builtins.storeDir}/[${nixHashChars}]+-(.*)\\\\.drv\" name);\n      }) derivations;\n      # The syntax of output paths differs between outputs named `out`\n      # and other, explicitly named ones. For explicitly named ones,\n      # the output name is suffixed as `-name`, but `out` outputs\n      # aren't suffixed at all, and thus aren't easily distinguished\n      # from named output paths. Therefore, we find all the named ones\n      # first so we can use them to remove false matches when looking\n      # for `out` outputs (see the definition of `outputPaths`).\n      namedOutputPaths = lib.flatten (\n        lib.mapAttrsToList (\n          name: value:\n          (map (\n            output:\n            lib.filter lib.isList (\n              builtins.split \"(${builtins.storeDir}/[${nixHashChars}]+-${name}-${output})\" string\n            )\n          ) (lib.remove \"out\" value.outputs))\n        ) packages\n      );\n      # Only `out` outputs\n      outputPaths = lib.flatten (\n        lib.mapAttrsToList (\n          name: value:\n          if lib.elem \"out\" value.outputs then\n            lib.filter (\n              x:\n              lib.isList x\n              &&\n                # If the matched path is in `namedOutputPaths`,\n                # it's a partial match of an output path where\n                # the output name isn't `out`\n                lib.all (o: !lib.hasPrefix (lib.head x) o) namedOutputPaths\n            ) (builtins.split \"(${builtins.storeDir}/[${nixHashChars}]+-${name})\" string)\n          else\n            [ ]\n        ) packages\n      );\n      allPaths = lib.concatStringsSep \"\\n\" (lib.unique (sources ++ namedOutputPaths ++ outputPaths));\n      allPathsWithContext = builtins.appendContext allPaths context;\n    in\n    if builtins ? getContext then\n      writeText \"string-references\" allPathsWithContext\n    else\n      writeDirectReferencesToFile (writeText \"string-file\" string);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":817,"column":5},"lambda_expr":"writeStringReferencesToFile =\n    string:\n    /*\n       The basic operation this performs is to copy the string context\n       from `string` to a second string and wrap that string in a\n       derivation. However, that alone is not enough, since nothing in the\n       string refers to the output paths of the derivations/paths in its\n       context, meaning they'll be considered build-time dependencies and\n       removed from the wrapper derivation's closure. Putting the\n       necessary output paths in the new string is however not very\n       straightforward - the attrset returned by `getContext` contains\n       only references to derivations' .drv-paths, not their output\n       paths. In order to \"convert\" them, we try to extract the\n       corresponding paths from the original string using regex.\n    */\n    let\n      # Taken from https://github.com/NixOS/nix/blob/130284b8508dad3c70e8160b15f3d62042fc730a/src/libutil/hash.cc#L84\n      nixHashChars = \"0123456789abcdfghijklmnpqrsvwxyz\";\n      context = builtins.getContext string;\n      derivations = lib.filterAttrs (n: v: v ? outputs) context;\n      # Objects copied from outside of the store, such as paths and\n      # `builtins.fetch*`ed ones\n      sources = lib.attrNames (lib.filterAttrs (n: v: v ? path) context);\n      packages = lib.mapAttrs' (name: value: {\n        inherit value;\n        name = lib.head (builtins.match \"${builtins.storeDir}/[${nixHashChars}]+-(.*)\\\\.drv\" name);\n      }) derivations;\n      # The syntax of output paths differs between outputs named `out`\n      # and other, explicitly named ones. For explicitly named ones,\n      # the output name is suffixed as `-name`, but `out` outputs\n      # aren't suffixed at all, and thus aren't easily distinguished\n      # from named output paths. Therefore, we find all the named ones\n      # first so we can use them to remove false matches when looking\n      # for `out` outputs (see the definition of `outputPaths`).\n      namedOutputPaths = lib.flatten (\n        lib.mapAttrsToList (\n          name: value:\n          (map (\n            output:\n            lib.filter lib.isList (\n              builtins.split \"(${builtins.storeDir}/[${nixHashChars}]+-${name}-${output})\" string\n            )\n          ) (lib.remove \"out\" value.outputs))\n        ) packages\n      );\n      # Only `out` outputs\n      outputPaths = lib.flatten (\n        lib.mapAttrsToList (\n          name: value:\n          if lib.elem \"out\" value.outputs then\n            lib.filter (\n              x:\n              lib.isList x\n              &&\n                # If the matched path is in `namedOutputPaths`,\n                # it's a partial match of an output path where\n                # the output name isn't `out`\n                lib.all (o: !lib.hasPrefix (lib.head x) o) namedOutputPaths\n            ) (builtins.split \"(${builtins.storeDir}/[${nixHashChars}]+-${name})\" string)\n          else\n            [ ]\n        ) packages\n      );\n      allPaths = lib.concatStringsSep \"\\n\" (lib.unique (sources ++ namedOutputPaths ++ outputPaths));\n      allPathsWithContext = builtins.appendContext allPaths context;\n    in\n    if builtins ? getContext then\n      writeText \"string-references\" allPathsWithContext\n    else\n      writeDirectReferencesToFile (writeText \"string-file\" string);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":817,"column":5},"path":["pkgs","writeStringReferencesToFile"],"pos_type":"Lambda"}},"content":{"content":"\nExtract a string's references to derivations and paths (its\ncontext) and write them to a text file, removing the input string\nitself from the dependency graph. This is useful when you want to\nmake a derivation depend on the string's references, but not its\ncontents (to avoid unnecessary rebuilds, for example).\n\nNote that this only works as intended on Nix >= 2.3.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":817,"column":5},"path":["pkgs","writeStringReferencesToFile"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeText","path":["pkgs","writeText"],"aliases":[["pkgs","writers","writeText"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":184,"column":3},"attr_expr":"writeText =\n    name: text:\n    # TODO: To fully deprecate, replace the assertion with `lib.isString` and remove the warning\n    assert lib.assertMsg (lib.strings.isConvertibleWithToString text)\n      \"pkgs.writeText ${lib.strings.escapeNixString name}: The second argument should be a string, but it's a ${builtins.typeOf text} instead.\";\n    lib.warnIf (!lib.isString text)\n      \"pkgs.writeText ${lib.strings.escapeNixString name}: The second argument should be a string, but it's a ${builtins.typeOf text} instead, which is deprecated. Use `toString` to convert the value to a string first.\"\n      writeTextFile\n      { inherit name text; };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":185,"column":5},"lambda_expr":"writeText =\n    name: text:\n    # TODO: To fully deprecate, replace the assertion with `lib.isString` and remove the warning\n    assert lib.assertMsg (lib.strings.isConvertibleWithToString text)\n      \"pkgs.writeText ${lib.strings.escapeNixString name}: The second argument should be a string, but it's a ${builtins.typeOf text} instead.\";\n    lib.warnIf (!lib.isString text)\n      \"pkgs.writeText ${lib.strings.escapeNixString name}: The second argument should be a string, but it's a ${builtins.typeOf text} instead, which is deprecated. Use `toString` to convert the value to a string first.\"\n      writeTextFile\n      { inherit name text; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":185,"column":5},"path":["pkgs","writeText"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":185,"column":5},"path":["pkgs","writeText"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeTextDir","path":["pkgs","writeTextDir"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":196,"column":3},"attr_expr":"writeTextDir =\n    path: text:\n    writeTextFile {\n      inherit text;\n      name = baseNameOf path;\n      destination = \"/${path}\";\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":197,"column":5},"lambda_expr":"writeTextDir =\n    path: text:\n    writeTextFile {\n      inherit text;\n      name = baseNameOf path;\n      destination = \"/${path}\";\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":197,"column":5},"path":["pkgs","writeTextDir"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":197,"column":5},"path":["pkgs","writeTextDir"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writeTextFile","path":["pkgs","writeTextFile"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":101,"column":3},"attr_expr":"writeTextFile = lib.extendMkDerivation {\n    constructDrv = stdenvNoCC.mkDerivation;\n\n    excludeDrvArgNames = [\n      \"derivationArgs\"\n    ];\n\n    extendDrvArgs =\n      finalAttrs:\n      {\n        name,\n        text,\n        executable ? false,\n        destination ? \"\",\n        checkPhase ? \"\",\n        meta ? { },\n        passthru ? { },\n        allowSubstitutes ? false,\n        preferLocalBuild ? true,\n        derivationArgs ? { },\n        pos ? builtins.unsafeGetAttrPos \"name\" args,\n      }@args:\n      {\n        inherit\n          pos\n          name\n          text\n          executable\n          checkPhase\n          allowSubstitutes\n          preferLocalBuild\n          ;\n        destination =\n          assert lib.assertMsg (destination != \"\" -> (lib.hasPrefix \"/\" destination && destination != \"/\")) ''\n            destination must be an absolute path, relative to the derivation's out path,\n            got '${destination}' instead.\n\n            Ensure that the path starts with a / and specifies at least the filename.\n          '';\n          destination;\n        passAsFile = [ \"text\" ] ++ derivationArgs.passAsFile or [ ];\n\n        buildCommand = ''\n          target=$out$destination\n          mkdir -p \"$(dirname \"$target\")\"\n\n          if [ -e \"$textPath\" ]; then\n            mv \"$textPath\" \"$target\"\n          else\n            printf \"%s\" \"$text\" > \"$target\"\n          fi\n\n          if [ -n \"$executable\" ]; then\n            chmod +x \"$target\"\n          fi\n\n          eval \"$checkPhase\"\n        '';\n\n        meta =\n          let\n            matches = builtins.match \"/bin/([^/]+)\" finalAttrs.destination;\n            isProgram = finalAttrs.executable && matches != null;\n          in\n          {\n            ${if isProgram then \"mainProgram\" else null} = lib.head matches;\n          }\n          // meta\n          // derivationArgs.meta or { };\n        passthru = passthru // derivationArgs.passthru or { };\n      }\n      // removeAttrs derivationArgs [\n        \"passAsFile\"\n        \"meta\"\n        \"passthru\"\n      ];\n\n    # `writeTextFile`'s set pattern doesn't have ellipses.\n    inheritFunctionArgs = false;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":862,"column":5},"lambda_expr":"{\n      # Adds the fixed-point style support\n      __functor =\n        self: fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        );\n\n      __functionArgs = removeAttrs (\n        # Inherit the __functionArgs from the base build helper\n        optionalAttrs inheritFunctionArgs (removeAttrs (functionArgs constructDrv) excludeDrvArgNames)\n        # Recover the __functionArgs from the derived build helper\n        // functionArgs (extendDrvArgs { })\n      ) excludeFunctionArgNames;\n\n      inherit\n        # Expose to the result build helper.\n        constructDrv\n        excludeDrvArgNames\n        extendDrvArgs\n        transformDrv\n        ;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.xkeyboard-config_custom","path":["pkgs","xkeyboard-config_custom"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8883,"column":3},"attr_expr":"xkeyboard-config_custom = callPackage ../by-name/xk/xkeyboard-config/custom.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/xk/xkeyboard-config/custom.nix","line":9,"column":1},"lambda_expr":"{\n  layouts ? { },\n}:\nlet\n  patchIn = name: layout: ''\n    # install layout files\n    ${lib.optionalString (layout.compatFile != null) \"cp '${layout.compatFile}' 'compat/${name}'\"}\n    ${lib.optionalString (layout.geometryFile != null) \"cp '${layout.geometryFile}' 'geometry/${name}'\"}\n    ${lib.optionalString (layout.keycodesFile != null) \"cp '${layout.keycodesFile}' 'keycodes/${name}'\"}\n    ${lib.optionalString (layout.symbolsFile != null) \"cp '${layout.symbolsFile}' 'symbols/${name}'\"}\n    ${lib.optionalString (layout.typesFile != null) \"cp '${layout.typesFile}' 'types/${name}'\"}\n\n    # add model description\n    ${ed}/bin/ed -v rules/base.xml <<EOF\n    /<\\/modelList>\n    -\n    a\n    <model>\n      <configItem>\n        <name>${name}</name>\n        <description>${layout.description}</description>\n        <vendor>${layout.description}</vendor>\n      </configItem>\n    </model>\n    .\n    w\n    EOF\n\n    # add layout description\n    ed -v rules/base.xml <<EOF\n    /<\\/layoutList>\n    -\n    a\n    <layout>\n      <configItem>\n        <name>${name}</name>\n        <shortDescription>${name}</shortDescription>\n        <description>${layout.description}</description>\n        <languageList>\n          ${lib.concatMapStrings (lang: \"<iso639Id>${lang}</iso639Id>\\n\") layout.languages}\n        </languageList>\n      </configItem>\n      <variantList/>\n    </layout>\n    .\n    w\n    EOF\n  '';\nin\nxkeyboard-config.overrideAttrs (old: {\n  nativeBuildInputs = old.nativeBuildInputs ++ [\n    automake\n    ed\n  ];\n  postPatch = lib.concatStrings (lib.mapAttrsToList patchIn layouts);\n})","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/xk/xkeyboard-config/custom.nix","line":9,"column":1},"path":["pkgs","xkeyboard-config_custom"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/xk/xkeyboard-config/custom.nix","line":9,"column":1},"path":["pkgs","xkeyboard-config_custom"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.xkeyboardconfig_custom","path":["pkgs","xkeyboardconfig_custom"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/xk/xkeyboard-config/custom.nix","line":9,"column":1},"lambda_expr":"{\n  layouts ? { },\n}:\nlet\n  patchIn = name: layout: ''\n    # install layout files\n    ${lib.optionalString (layout.compatFile != null) \"cp '${layout.compatFile}' 'compat/${name}'\"}\n    ${lib.optionalString (layout.geometryFile != null) \"cp '${layout.geometryFile}' 'geometry/${name}'\"}\n    ${lib.optionalString (layout.keycodesFile != null) \"cp '${layout.keycodesFile}' 'keycodes/${name}'\"}\n    ${lib.optionalString (layout.symbolsFile != null) \"cp '${layout.symbolsFile}' 'symbols/${name}'\"}\n    ${lib.optionalString (layout.typesFile != null) \"cp '${layout.typesFile}' 'types/${name}'\"}\n\n    # add model description\n    ${ed}/bin/ed -v rules/base.xml <<EOF\n    /<\\/modelList>\n    -\n    a\n    <model>\n      <configItem>\n        <name>${name}</name>\n        <description>${layout.description}</description>\n        <vendor>${layout.description}</vendor>\n      </configItem>\n    </model>\n    .\n    w\n    EOF\n\n    # add layout description\n    ed -v rules/base.xml <<EOF\n    /<\\/layoutList>\n    -\n    a\n    <layout>\n      <configItem>\n        <name>${name}</name>\n        <shortDescription>${name}</shortDescription>\n        <description>${layout.description}</description>\n        <languageList>\n          ${lib.concatMapStrings (lang: \"<iso639Id>${lang}</iso639Id>\\n\") layout.languages}\n        </languageList>\n      </configItem>\n      <variantList/>\n    </layout>\n    .\n    w\n    EOF\n  '';\nin\nxkeyboard-config.overrideAttrs (old: {\n  nativeBuildInputs = old.nativeBuildInputs ++ [\n    automake\n    ed\n  ];\n  postPatch = lib.concatStrings (lib.mapAttrsToList patchIn layouts);\n})","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/xk/xkeyboard-config/custom.nix","line":9,"column":1},"path":["pkgs","xkeyboardconfig_custom"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/by-name/xk/xkeyboard-config/custom.nix","line":9,"column":1},"path":["pkgs","xkeyboardconfig_custom"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.zabbixFor","path":["pkgs","zabbixFor"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8178,"column":3},"attr_expr":"zabbixFor = version: rec {\n    agent = (callPackages ../servers/monitoring/zabbix/agent.nix { }).${version};\n    proxy-mysql =\n      (callPackages ../servers/monitoring/zabbix/proxy.nix { mysqlSupport = true; }).${version};\n    proxy-pgsql =\n      (callPackages ../servers/monitoring/zabbix/proxy.nix { postgresqlSupport = true; }).${version};\n    proxy-sqlite =\n      (callPackages ../servers/monitoring/zabbix/proxy.nix { sqliteSupport = true; }).${version};\n    server-mysql =\n      (callPackages ../servers/monitoring/zabbix/server.nix { mysqlSupport = true; }).${version};\n    server-pgsql =\n      (callPackages ../servers/monitoring/zabbix/server.nix { postgresqlSupport = true; }).${version};\n    web = (callPackages ../servers/monitoring/zabbix/web.nix { }).${version};\n    agent2 = (callPackages ../servers/monitoring/zabbix/agent2.nix { }).${version};\n\n    # backwards compatibility\n    server = server-pgsql;\n  };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8178,"column":15},"lambda_expr":"version: rec {\n    agent = (callPackages ../servers/monitoring/zabbix/agent.nix { }).${version};\n    proxy-mysql =\n      (callPackages ../servers/monitoring/zabbix/proxy.nix { mysqlSupport = true; }).${version};\n    proxy-pgsql =\n      (callPackages ../servers/monitoring/zabbix/proxy.nix { postgresqlSupport = true; }).${version};\n    proxy-sqlite =\n      (callPackages ../servers/monitoring/zabbix/proxy.nix { sqliteSupport = true; }).${version};\n    server-mysql =\n      (callPackages ../servers/monitoring/zabbix/server.nix { mysqlSupport = true; }).${version};\n    server-pgsql =\n      (callPackages ../servers/monitoring/zabbix/server.nix { postgresqlSupport = true; }).${version};\n    web = (callPackages ../servers/monitoring/zabbix/web.nix { }).${version};\n    agent2 = (callPackages ../servers/monitoring/zabbix/agent2.nix { }).${version};\n\n    # backwards compatibility\n    server = server-pgsql;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8178,"column":15},"path":["pkgs","zabbixFor"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/top-level/all-packages.nix","line":8178,"column":15},"path":["pkgs","zabbixFor"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.buildPythonApplication","path":["pkgs","python3Packages","buildPythonApplication"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":23,"column":7},"lambda_expr":"origArgs:\n      let\n        result = f origArgs;\n        overrideWith =\n          # Preserve the plain arguments whenever possible,\n          # as `overrideStdenvCompat` works more reliably with `args.stdenv`\n          # than `result.__stdenvPythonCompat`.\n          # TODO(@ShamrockLee): After `overrideStdenvCompat` is fully deprecated,\n          # simplify as\n          # ```nix\n          # newArgs: lib.extends (lib.toExtension newArgs) origArgs\n          # ```\n          if lib.isFunction origArgs then\n            newArgs: lib.extends (lib.toExtension newArgs) origArgs\n          else\n            newArgs:\n            if !(lib.isFunction newArgs) then\n              origArgs // newArgs\n            else if !(lib.isFunction (newArgs origArgs)) then\n              origArgs // newArgs origArgs\n            else\n              finalAttrs: origArgs // newArgs finalAttrs origArgs;\n      in\n      if lib.isAttrs result then\n        result\n        // {\n          overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);\n          overrideAttrs =\n            newArgs: makeOverridablePythonPackage (args: (f args).overrideAttrs newArgs) origArgs;\n        }\n      else\n        result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":23,"column":7},"path":["pkgs","python3Packages","buildPythonApplication"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":23,"column":7},"path":["pkgs","python3Packages","buildPythonApplication"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.buildPythonPackage","path":["pkgs","python3Packages","buildPythonPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":23,"column":7},"lambda_expr":"origArgs:\n      let\n        result = f origArgs;\n        overrideWith =\n          # Preserve the plain arguments whenever possible,\n          # as `overrideStdenvCompat` works more reliably with `args.stdenv`\n          # than `result.__stdenvPythonCompat`.\n          # TODO(@ShamrockLee): After `overrideStdenvCompat` is fully deprecated,\n          # simplify as\n          # ```nix\n          # newArgs: lib.extends (lib.toExtension newArgs) origArgs\n          # ```\n          if lib.isFunction origArgs then\n            newArgs: lib.extends (lib.toExtension newArgs) origArgs\n          else\n            newArgs:\n            if !(lib.isFunction newArgs) then\n              origArgs // newArgs\n            else if !(lib.isFunction (newArgs origArgs)) then\n              origArgs // newArgs origArgs\n            else\n              finalAttrs: origArgs // newArgs finalAttrs origArgs;\n      in\n      if lib.isAttrs result then\n        result\n        // {\n          overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);\n          overrideAttrs =\n            newArgs: makeOverridablePythonPackage (args: (f args).overrideAttrs newArgs) origArgs;\n        }\n      else\n        result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":23,"column":7},"path":["pkgs","python3Packages","buildPythonPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":23,"column":7},"path":["pkgs","python3Packages","buildPythonPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.callPackage","path":["pkgs","python3Packages","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.python3Packages.disabled","path":["pkgs","python3Packages","disabled"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":178,"column":5},"lambda_expr":"drv:\n    throw \"${\n      removePythonPrefix (drv.pname or drv.name)\n    } not supported for interpreter ${python.executable}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":178,"column":5},"path":["pkgs","python3Packages","disabled"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":178,"column":5},"path":["pkgs","python3Packages","disabled"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.disabledIf","path":["pkgs","python3Packages","disabledIf"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":183,"column":16},"lambda_expr":"x: drv: if x then disabled drv else drv","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":183,"column":16},"path":["pkgs","python3Packages","disabledIf"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":183,"column":16},"path":["pkgs","python3Packages","disabledIf"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.fetchPypi","path":["pkgs","python3Packages","fetchPypi"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"lambda_expr":"origArgs:\n        let\n          result = f origArgs;\n\n          # Re-call the function but with different arguments\n          overrideArgs = mirrorArgs (\n            /**\n                    Change the arguments with which a certain function is called.\n\n              In some cases, you may find a list of possible attributes to pass in this function's `__functionArgs` attribute, but it will not be complete for an original function like `args@{foo, ...}: ...`, which accepts arbitrary attributes.\n\n              This function was provided by `lib.makeOverridable`.\n            */\n            newArgs: makeOverridable f (origArgs // (if isFunction newArgs then newArgs origArgs else newArgs))\n          );\n        in\n        if isAttrs result then\n          result\n          // {\n            override = overrideArgs;\n            overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;\n            ${if result ? overrideAttrs then \"overrideAttrs\" else null} =\n              /**\n                Override the attributes that were passed to `mkDerivation` in order to generate this derivation.\n\n                This function is provided by `lib.makeOverridable`, and indirectly by `callPackage` among others, in order to make the combination of `override` and `overrideAttrs` work.\n                Specifically, it re-adds the `override` attribute to the result of `overrideAttrs`.\n\n                The real implementation of `overrideAttrs` is provided by `stdenv.mkDerivation`.\n              */\n              # NOTE: part of the above documentation had to be duplicated in `mkDerivation`'s `overrideAttrs`.\n              #       design/tech debt issue: https://github.com/NixOS/nixpkgs/issues/273815\n              fdrv: makeOverridable (mirrorArgs (args: (f args).overrideAttrs fdrv)) origArgs;\n          }\n        else if isFunction result then\n          # Transform the result into a functor while propagating its arguments\n          setFunctionArgs result (functionArgs result)\n          // {\n            override = overrideArgs;\n          }\n        else\n          result","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","python3Packages","fetchPypi"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":158,"column":9},"path":["pkgs","python3Packages","fetchPypi"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.hasPythonModule","path":["pkgs","python3Packages","hasPythonModule"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":128,"column":21},"lambda_expr":"hasPythonModule = drv: drv ? pythonModule && drv.pythonModule == python;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":128,"column":21},"path":["pkgs","python3Packages","hasPythonModule"],"pos_type":"Lambda"}},"content":{"content":"Check whether a derivation provides a Python module.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":128,"column":21},"path":["pkgs","python3Packages","hasPythonModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.makePythonHook","path":["pkgs","python3Packages","makePythonHook"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/hooks/default.nix","line":19,"column":5},"lambda_expr":"args: pkgs.makeSetupHook (lib.recursiveUpdate defaultArgs args)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/hooks/default.nix","line":19,"column":5},"path":["pkgs","python3Packages","makePythonHook"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/hooks/default.nix","line":19,"column":5},"path":["pkgs","python3Packages","makePythonHook"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.makePythonPath","path":["pkgs","python3Packages","makePythonPath"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":142,"column":20},"lambda_expr":"makePythonPath = drvs: lib.makeSearchPath python.sitePackages (requiredPythonModules drvs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":142,"column":20},"path":["pkgs","python3Packages","makePythonPath"],"pos_type":"Lambda"}},"content":{"content":"providing Python modules.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":142,"column":20},"path":["pkgs","python3Packages","makePythonPath"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.mkPythonEditablePackage","path":["pkgs","python3Packages","mkPythonEditablePackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/editable.nix","line":7,"column":1},"lambda_expr":"{\n  pname,\n  version,\n\n  # Editable root as string.\n  # Environment variables will be expanded at runtime using os.path.expandvars.\n  root,\n\n  # Arguments passed on verbatim to buildPythonPackage\n  derivationArgs ? { },\n\n  # Python dependencies\n  dependencies ? [ ],\n  optional-dependencies ? { },\n\n  # PEP-518 build-system https://peps.python.org/pep-518\n  build-system ? [ ],\n\n  # PEP-621 entry points https://peps.python.org/pep-0621/#entry-points\n  scripts ? { },\n  gui-scripts ? { },\n  entry-points ? { },\n\n  passthru ? { },\n  meta ? { },\n}:\n\n# Create a PEP-660 (https://peps.python.org/pep-0660/) editable package pointing to an impure location outside the Nix store.\n# The primary use case of this function is to enable local development workflows where the local package is installed into a virtualenv-like environment using withPackages.\n\nassert lib.isString root;\nlet\n  # In editable mode build-system's are considered to be runtime dependencies.\n  dependencies' = dependencies ++ build-system;\n\n  pyprojectContents = {\n    # PEP-621 project table\n    project = {\n      name = pname;\n      inherit\n        version\n        scripts\n        gui-scripts\n        entry-points\n        ;\n      dependencies = map lib.getName dependencies';\n      optional-dependencies = lib.mapAttrs (_: map lib.getName) optional-dependencies;\n    };\n\n    # Allow empty package\n    tool.hatch.build.targets.wheel.bypass-selection = true;\n\n    # Include our editable pointer file in build\n    tool.hatch.build.targets.wheel.force-include.\"_${pname}.pth\" = \"_${pname}.pth\";\n\n    # Build editable package using hatchling\n    build-system = {\n      requires = [ \"hatchling\" ];\n      build-backend = \"hatchling.build\";\n    };\n  };\n\nin\nbuildPythonPackage (\n  {\n    inherit\n      pname\n      version\n      optional-dependencies\n      passthru\n      meta\n      ;\n    dependencies = dependencies';\n\n    pyproject = true;\n\n    unpackPhase = ''\n      python -c \"import json, os, tomli_w; attrs = json.load(open(os.environ['NIX_ATTRS_JSON_FILE'], 'r')); print(tomli_w.dumps(attrs['pyprojectContents']))\" > pyproject.toml\n      echo 'import os.path, sys; sys.path.insert(0, os.path.expandvars(\"${root}\"))' > _${pname}.pth\n    '';\n\n    build-system = [ hatchling ];\n  }\n  // derivationArgs\n  // {\n    # Note: Using formats.toml generates another intermediary derivation that needs to be built.\n    # We inline the same functionality for better UX.\n    nativeBuildInputs = (derivationArgs.nativeBuildInputs or [ ]) ++ [ tomli-w ];\n    inherit pyprojectContents;\n    preferLocalBuild = true;\n    __structuredAttrs = true;\n  }\n)","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/editable.nix","line":7,"column":1},"path":["pkgs","python3Packages","mkPythonEditablePackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/editable.nix","line":7,"column":1},"path":["pkgs","python3Packages","mkPythonEditablePackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.mkPythonMetaPackage","path":["pkgs","python3Packages","mkPythonMetaPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/meta-package.nix","line":6,"column":1},"lambda_expr":"{\n  pname,\n  version,\n  dependencies ? [ ],\n  optional-dependencies ? { },\n  passthru ? { },\n  meta ? { },\n}:\n\n# Create a \"fake\" meta package to satisfy a dependency on a package, but don't actually build it.\n# This is useful for packages that have a split binary/source dichotomy like psycopg2/psycopg2-binary,\n# where we want to use the former, but some projects declare a dependency on the latter.\n\nbuildPythonPackage {\n  inherit\n    pname\n    version\n    dependencies\n    optional-dependencies\n    meta\n    passthru\n    ;\n\n  pyproject = true;\n\n  # Make a minimal pyproject.toml that can be built\n  unpackPhase = ''\n    cat > pyproject.toml << EOF\n    [project]\n    name = \"${pname}\"\n    version = \"${version}\"\n    dependencies = ${builtins.toJSON (map lib.getName dependencies)}\n\n    [project.optional-dependencies]\n    ${lib.optionalString (optional-dependencies != { }) (\n      lib.concatStringsSep \"\\n\" (\n        lib.mapAttrsToList (\n          group: deps: group + \" = \" + builtins.toJSON (map lib.getName deps)\n        ) optional-dependencies\n      )\n    )}\n\n    [tool.hatch.build.targets.wheel]\n    bypass-selection = true\n\n    [build-system]\n    requires = [\"hatchling\"]\n    build-backend = \"hatchling.build\"\n    EOF\n  '';\n\n  build-system = [ hatchling ];\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/meta-package.nix","line":6,"column":1},"path":["pkgs","python3Packages","mkPythonMetaPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/meta-package.nix","line":6,"column":1},"path":["pkgs","python3Packages","mkPythonMetaPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.newScope","path":["pkgs","python3Packages","newScope"],"aliases":[["pkgs","dotnetCorePackages","newScope"],["pkgs","rustPackages","rustPlatform","newScope"],["pkgs","rustPackages","buildRustPackages","rustPlatform","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"lambda_expr":"scope: newScope (spliced // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","python3Packages","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","python3Packages","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.override","path":["pkgs","python3Packages","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.python3Packages.overrideDerivation","path":["pkgs","python3Packages","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","python3Packages","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","python3Packages","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.overrideScope","path":["pkgs","python3Packages","overrideScope"],"aliases":[["pkgs","dotnetCorePackages","overrideScope"],["pkgs","rustPackages","rustPlatform","overrideScope"],["pkgs","rustPackages","buildRustPackages","rustPlatform","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"lambda_expr":"overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","python3Packages","overrideScope"],"pos_type":"Lambda"}},"content":{"content":"overridden.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","python3Packages","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.packages","path":["pkgs","python3Packages","packages"],"aliases":[["pkgs","dhallPackages","__unfix__"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":329,"column":7},"lambda_expr":"final:\n      let\n        prev = f final;\n      in\n      prev // overlay final prev","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":329,"column":7},"path":["pkgs","python3Packages","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/fixed-points.nix","line":329,"column":7},"path":["pkgs","python3Packages","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.pythonAtLeast","path":["pkgs","python3Packages","pythonAtLeast"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1989,"column":24},"lambda_expr":"v2: !versionOlder v1 v2","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.python3Packages.pythonOlder","path":["pkgs","python3Packages","pythonOlder"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/strings.nix","line":1955,"column":22},"lambda_expr":"v2: compareVersions v2 v1 == 1","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.python3Packages.requiredPythonModules","path":["pkgs","python3Packages","requiredPythonModules"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":132,"column":5},"lambda_expr":"requiredPythonModules =\n    drvs:\n    let\n      modules = lib.filter hasPythonModule drvs;\n    in\n    lib.unique (\n      [ python ] ++ modules ++ lib.concatLists (lib.catAttrs \"requiredPythonModules\" modules)\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":132,"column":5},"path":["pkgs","python3Packages","requiredPythonModules"],"pos_type":"Lambda"}},"content":{"content":"Get list of required Python modules given a list of derivations.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":132,"column":5},"path":["pkgs","python3Packages","requiredPythonModules"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.toPythonApplication","path":["pkgs","python3Packages","toPythonApplication"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":166,"column":5},"lambda_expr":"toPythonApplication =\n    drv:\n    drv.overrideAttrs (oldAttrs: {\n      passthru = (oldAttrs.passthru or { }) // {\n        # Remove Python prefix from name so we have a \"normal\" name.\n        # While the prefix shows up in the store path, it won't be\n        # used by `nix-env`.\n        name = removePythonPrefix oldAttrs.name;\n        pythonModule = false;\n      };\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":166,"column":5},"path":["pkgs","python3Packages","toPythonApplication"],"pos_type":"Lambda"}},"content":{"content":"Convert a Python library to an application.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":166,"column":5},"path":["pkgs","python3Packages","toPythonApplication"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.python3Packages.toPythonModule","path":["pkgs","python3Packages","toPythonModule"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":152,"column":5},"lambda_expr":"toPythonModule =\n    drv:\n    drv.overrideAttrs (oldAttrs: {\n      # Use passthru in order to prevent rebuilds when possible.\n      passthru = (oldAttrs.passthru or { }) // {\n        pythonModule = python;\n        pythonPath = [ ]; # Deprecated, for compatibility.\n        requiredPythonModules = builtins.addErrorContext \"while calculating requiredPythonModules for ${drv.name or drv.pname}:\" (\n          requiredPythonModules drv.propagatedBuildInputs\n        );\n      };\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":152,"column":5},"path":["pkgs","python3Packages","toPythonModule"],"pos_type":"Lambda"}},"content":{"content":"Convert derivation to a Python module.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/interpreters/python/python-packages-base.nix","line":152,"column":5},"path":["pkgs","python3Packages","toPythonModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.aggregate","path":["pkgs","releaseTools","aggregate"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":122,"column":3},"attr_expr":"aggregate =\n    {\n      name,\n      constituents,\n      meta ? { },\n    }:\n    pkgs.runCommand name\n      {\n        inherit constituents meta;\n        preferLocalBuild = true;\n        _hydraAggregate = true;\n      }\n      ''\n        mkdir -p $out/nix-support\n        touch $out/nix-support/hydra-build-products\n        echo $constituents > $out/nix-support/hydra-aggregate-constituents\n\n        # Propagate build failures.\n        for i in $constituents; do\n          if [ -e $i/nix-support/failed ]; then\n            touch $out/nix-support/failed\n          fi\n        done\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":123,"column":5},"lambda_expr":"{\n      name,\n      constituents,\n      meta ? { },\n    }:\n    pkgs.runCommand name\n      {\n        inherit constituents meta;\n        preferLocalBuild = true;\n        _hydraAggregate = true;\n      }\n      ''\n        mkdir -p $out/nix-support\n        touch $out/nix-support/hydra-build-products\n        echo $constituents > $out/nix-support/hydra-aggregate-constituents\n\n        # Propagate build failures.\n        for i in $constituents; do\n          if [ -e $i/nix-support/failed ]; then\n            touch $out/nix-support/failed\n          fi\n        done\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":123,"column":5},"path":["pkgs","releaseTools","aggregate"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":123,"column":5},"path":["pkgs","releaseTools","aggregate"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.binaryTarball","path":["pkgs","releaseTools","binaryTarball"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":42,"column":3},"attr_expr":"binaryTarball =\n    args:\n    import ./binary-tarball.nix (\n      {\n        inherit lib stdenv;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":43,"column":5},"lambda_expr":"binaryTarball =\n    args:\n    import ./binary-tarball.nix (\n      {\n        inherit lib stdenv;\n      }\n      // args\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":43,"column":5},"path":["pkgs","releaseTools","binaryTarball"],"pos_type":"Lambda"}},"content":{"content":"compatibility","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":43,"column":5},"path":["pkgs","releaseTools","binaryTarball"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.channel","path":["pkgs","releaseTools","channel"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":164,"column":3},"attr_expr":"channel =\n    {\n      name,\n      src,\n      constituents ? [ ],\n      meta ? { },\n      isNixOS ? true,\n      ...\n    }@args:\n    stdenv.mkDerivation (\n      {\n        preferLocalBuild = true;\n        _hydraAggregate = true;\n\n        dontConfigure = true;\n        dontBuild = true;\n\n        patchPhase = optionalString isNixOS ''\n          touch .update-on-nixos-rebuild\n        '';\n\n        installPhase = ''\n          mkdir -p $out/{tarballs,nix-support}\n\n          tar cJf \"$out/tarballs/nixexprs.tar.xz\" \\\n            --owner=0 --group=0 --mtime=\"1970-01-01 00:00:00 UTC\" \\\n            --transform='s!^\\.!${name}!' .\n\n          echo \"channel - $out/tarballs/nixexprs.tar.xz\" > \"$out/nix-support/hydra-build-products\"\n          echo $constituents > \"$out/nix-support/hydra-aggregate-constituents\"\n\n          # Propagate build failures.\n          for i in $constituents; do\n            if [ -e \"$i/nix-support/failed\" ]; then\n              touch \"$out/nix-support/failed\"\n            fi\n          done\n        '';\n\n        meta = meta // {\n          isHydraChannel = true;\n        };\n      }\n      // removeAttrs args [ \"meta\" ]\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":165,"column":5},"lambda_expr":"channel =\n    {\n      name,\n      src,\n      constituents ? [ ],\n      meta ? { },\n      isNixOS ? true,\n      ...\n    }@args:\n    stdenv.mkDerivation (\n      {\n        preferLocalBuild = true;\n        _hydraAggregate = true;\n\n        dontConfigure = true;\n        dontBuild = true;\n\n        patchPhase = optionalString isNixOS ''\n          touch .update-on-nixos-rebuild\n        '';\n\n        installPhase = ''\n          mkdir -p $out/{tarballs,nix-support}\n\n          tar cJf \"$out/tarballs/nixexprs.tar.xz\" \\\n            --owner=0 --group=0 --mtime=\"1970-01-01 00:00:00 UTC\" \\\n            --transform='s!^\\.!${name}!' .\n\n          echo \"channel - $out/tarballs/nixexprs.tar.xz\" > \"$out/nix-support/hydra-build-products\"\n          echo $constituents > \"$out/nix-support/hydra-aggregate-constituents\"\n\n          # Propagate build failures.\n          for i in $constituents; do\n            if [ -e \"$i/nix-support/failed\" ]; then\n              touch \"$out/nix-support/failed\"\n            fi\n          done\n        '';\n\n        meta = meta // {\n          isHydraChannel = true;\n        };\n      }\n      // removeAttrs args [ \"meta\" ]\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":165,"column":5},"path":["pkgs","releaseTools","channel"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a channel job which success depends on the success of all of\nits contituents. Channel jobs are a special type of jobs that are\nlisted in the channel tab of Hydra and that can be subscribed.\nA tarball of the src attribute is distributed via the channel.\n\n- constituents: a list of derivations on which the channel success depends.\n- name: the channel name that will be used in the hydra interface.\n- src: should point to the root folder of the nix-expressions used by the\n       channel, typically a folder containing a `default.nix`.\n\n  channel {\n    constituents = [ foo bar baz ];\n    name = \"my-channel\";\n    src = ./.;\n  };\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":165,"column":5},"path":["pkgs","releaseTools","channel"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.clangAnalysis","path":["pkgs","releaseTools","clangAnalysis"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":79,"column":3},"attr_expr":"clangAnalysis =\n    args:\n    nixBuild (\n      {\n        inherit clang-analyzer;\n        doClangAnalysis = true;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":80,"column":5},"lambda_expr":"args:\n    nixBuild (\n      {\n        inherit clang-analyzer;\n        doClangAnalysis = true;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":80,"column":5},"path":["pkgs","releaseTools","clangAnalysis"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":80,"column":5},"path":["pkgs","releaseTools","clangAnalysis"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.coverageAnalysis","path":["pkgs","releaseTools","coverageAnalysis"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":69,"column":3},"attr_expr":"coverageAnalysis =\n    args:\n    nixBuild (\n      {\n        inherit lcov enableGCOVInstrumentation makeGCOVReport;\n        doCoverageAnalysis = true;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":70,"column":5},"lambda_expr":"args:\n    nixBuild (\n      {\n        inherit lcov enableGCOVInstrumentation makeGCOVReport;\n        doCoverageAnalysis = true;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":70,"column":5},"path":["pkgs","releaseTools","coverageAnalysis"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":70,"column":5},"path":["pkgs","releaseTools","coverageAnalysis"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.coverityAnalysis","path":["pkgs","releaseTools","coverityAnalysis"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":89,"column":3},"attr_expr":"coverityAnalysis =\n    args:\n    nixBuild (\n      {\n        inherit cov-build xz;\n        doCoverityAnalysis = true;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":90,"column":5},"lambda_expr":"args:\n    nixBuild (\n      {\n        inherit cov-build xz;\n        doCoverityAnalysis = true;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":90,"column":5},"path":["pkgs","releaseTools","coverityAnalysis"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":90,"column":5},"path":["pkgs","releaseTools","coverityAnalysis"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.debBuild","path":["pkgs","releaseTools","debBuild"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":108,"column":3},"attr_expr":"debBuild =\n    args:\n    import ./debian-build.nix (\n      {\n        inherit\n          lib\n          stdenv\n          vmTools\n          checkinstall\n          ;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":109,"column":5},"lambda_expr":"args:\n    import ./debian-build.nix (\n      {\n        inherit\n          lib\n          stdenv\n          vmTools\n          checkinstall\n          ;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":109,"column":5},"path":["pkgs","releaseTools","debBuild"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":109,"column":5},"path":["pkgs","releaseTools","debBuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.makeSourceTarball","path":["pkgs","releaseTools","makeSourceTarball"],"aliases":[["pkgs","releaseTools","sourceTarball"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":40,"column":3},"attr_expr":"makeSourceTarball = sourceTarball;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":26,"column":5},"lambda_expr":"args:\n    import ./source-tarball.nix (\n      {\n        inherit\n          lib\n          stdenv\n          autoconf\n          automake\n          libtool\n          ;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":26,"column":5},"path":["pkgs","releaseTools","makeSourceTarball"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":26,"column":5},"path":["pkgs","releaseTools","makeSourceTarball"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.mvnBuild","path":["pkgs","releaseTools","mvnBuild"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":51,"column":3},"attr_expr":"mvnBuild =\n    args:\n    import ./maven-build.nix (\n      {\n        inherit lib stdenv;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":52,"column":5},"lambda_expr":"args:\n    import ./maven-build.nix (\n      {\n        inherit lib stdenv;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":52,"column":5},"path":["pkgs","releaseTools","mvnBuild"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":52,"column":5},"path":["pkgs","releaseTools","mvnBuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.nixBuild","path":["pkgs","releaseTools","nixBuild"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":60,"column":3},"attr_expr":"nixBuild =\n    args:\n    import ./nix-build.nix (\n      {\n        inherit lib stdenv;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":61,"column":5},"lambda_expr":"args:\n    import ./nix-build.nix (\n      {\n        inherit lib stdenv;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":61,"column":5},"path":["pkgs","releaseTools","nixBuild"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":61,"column":5},"path":["pkgs","releaseTools","nixBuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.override","path":["pkgs","releaseTools","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.releaseTools.overrideDerivation","path":["pkgs","releaseTools","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","releaseTools","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","releaseTools","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.rpmBuild","path":["pkgs","releaseTools","rpmBuild"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":99,"column":3},"attr_expr":"rpmBuild =\n    args:\n    import ./rpm-build.nix (\n      {\n        inherit lib vmTools;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":100,"column":5},"lambda_expr":"args:\n    import ./rpm-build.nix (\n      {\n        inherit lib vmTools;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":100,"column":5},"path":["pkgs","releaseTools","rpmBuild"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":100,"column":5},"path":["pkgs","releaseTools","rpmBuild"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.releaseTools.sourceTarball","path":["pkgs","releaseTools","sourceTarball"],"aliases":[["pkgs","releaseTools","makeSourceTarball"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":25,"column":3},"attr_expr":"sourceTarball =\n    args:\n    import ./source-tarball.nix (\n      {\n        inherit\n          lib\n          stdenv\n          autoconf\n          automake\n          libtool\n          ;\n      }\n      // args\n    );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":26,"column":5},"lambda_expr":"args:\n    import ./source-tarball.nix (\n      {\n        inherit\n          lib\n          stdenv\n          autoconf\n          automake\n          libtool\n          ;\n      }\n      // args\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":26,"column":5},"path":["pkgs","releaseTools","sourceTarball"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/release/default.nix","line":26,"column":5},"path":["pkgs","releaseTools","sourceTarball"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.callPackage","path":["pkgs","rustPackages","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":627,"column":9},"attr_expr":"callPackage = self.newScope { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.newScope","path":["pkgs","rustPackages","newScope"],"aliases":[["pkgs","agdaPackages","newScope"],["pkgs","elmPackages","newScope"],["pkgs","emacsPackages","newScope"],["pkgs","rustPackages","buildRustPackages","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":9},"attr_expr":"newScope = scope: newScope (self // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"lambda_expr":"scope: newScope (self // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","rustPackages","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","rustPackages","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.overrideScope","path":["pkgs","rustPackages","overrideScope"],"aliases":[["pkgs","agdaPackages","overrideScope"],["pkgs","elmPackages","overrideScope"],["pkgs","emacsPackages","overrideScope"],["pkgs","rustPackages","buildRustPackages","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":9},"attr_expr":"overrideScope = g: makeScope newScope (extends g f);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"lambda_expr":"g: makeScope newScope (extends g f)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","rustPackages","overrideScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","rustPackages","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.packages","path":["pkgs","rustPackages","packages"],"aliases":[["pkgs","rustPackages","buildRustPackages","packages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":633,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/default.nix","line":75,"column":7},"lambda_expr":"self:\n      let\n        # Like `buildRustPackages`, but may also contain prebuilt binaries to\n        # break cycle. Just like `bootstrapTools` for nixpkgs as a whole,\n        # nothing in the final package set should refer to this.\n        bootstrapRustPackages =\n          if fastCross then\n            pkgsBuildBuild.rustPackages\n          else\n            self.buildRustPackages.overrideScope (\n              _: _:\n              lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)\n                (selectRustPackage pkgsBuildHost).packages.prebuilt\n            );\n        bootRustPlatform = makeRustPlatform bootstrapRustPackages;\n      in\n      {\n        # Packages suitable for build-time, e.g. `build.rs`-type stuff.\n        buildRustPackages = (selectRustPackage pkgsBuildHost).packages.stable;\n        # Analogous to stdenv\n        rustPlatform = makeRustPlatform self.buildRustPackages;\n        rustc-unwrapped = self.callPackage ./rustc.nix {\n          version = rustcVersion;\n          sha256 = rustcSha256;\n          inherit enableRustcDev;\n          inherit\n            llvmShared\n            llvmSharedForBuild\n            llvmSharedForHost\n            llvmSharedForTarget\n            llvmPackages\n            fastCross\n            ;\n\n          patches = rustcPatches;\n\n          # Use boot package set to break cycle\n          inherit (bootstrapRustPackages) cargo rustc rustfmt;\n        };\n        rustc = wrapRustcWith {\n          inherit (self) rustc-unwrapped;\n          sysroot = if fastCross then self.rustc-unwrapped else null;\n        };\n        rustfmt = self.callPackage ./rustfmt.nix {\n          inherit (self.buildRustPackages) rustc;\n        };\n        cargo =\n          if (!fastCross) then\n            self.callPackage ./cargo.nix {\n              # Use boot package set to break cycle\n              rustPlatform = bootRustPlatform;\n            }\n          else\n            self.callPackage ./cargo_cross.nix { };\n        inherit cargo-auditable;\n        cargo-auditable-cargo-wrapper = self.callPackage ./cargo-auditable-cargo-wrapper.nix { };\n        clippy-unwrapped = self.callPackage ./clippy.nix { };\n        clippy = if !fastCross then self.clippy-unwrapped else self.callPackage ./clippy-wrapper.nix { };\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/default.nix","line":75,"column":7},"path":["pkgs","rustPackages","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/default.nix","line":75,"column":7},"path":["pkgs","rustPackages","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.callPackage","path":["pkgs","rustPackages","buildRustPackages","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":627,"column":9},"attr_expr":"callPackage = self.newScope { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.newScope","path":["pkgs","rustPackages","buildRustPackages","newScope"],"aliases":[["pkgs","agdaPackages","newScope"],["pkgs","elmPackages","newScope"],["pkgs","emacsPackages","newScope"],["pkgs","rustPackages","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":9},"attr_expr":"newScope = scope: newScope (self // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"lambda_expr":"scope: newScope (self // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","rustPackages","buildRustPackages","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":631,"column":20},"path":["pkgs","rustPackages","buildRustPackages","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.overrideScope","path":["pkgs","rustPackages","buildRustPackages","overrideScope"],"aliases":[["pkgs","agdaPackages","overrideScope"],["pkgs","elmPackages","overrideScope"],["pkgs","emacsPackages","overrideScope"],["pkgs","rustPackages","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":9},"attr_expr":"overrideScope = g: makeScope newScope (extends g f);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"lambda_expr":"g: makeScope newScope (extends g f)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","rustPackages","buildRustPackages","overrideScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":632,"column":25},"path":["pkgs","rustPackages","buildRustPackages","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.packages","path":["pkgs","rustPackages","buildRustPackages","packages"],"aliases":[["pkgs","rustPackages","packages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":633,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/default.nix","line":75,"column":7},"lambda_expr":"self:\n      let\n        # Like `buildRustPackages`, but may also contain prebuilt binaries to\n        # break cycle. Just like `bootstrapTools` for nixpkgs as a whole,\n        # nothing in the final package set should refer to this.\n        bootstrapRustPackages =\n          if fastCross then\n            pkgsBuildBuild.rustPackages\n          else\n            self.buildRustPackages.overrideScope (\n              _: _:\n              lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)\n                (selectRustPackage pkgsBuildHost).packages.prebuilt\n            );\n        bootRustPlatform = makeRustPlatform bootstrapRustPackages;\n      in\n      {\n        # Packages suitable for build-time, e.g. `build.rs`-type stuff.\n        buildRustPackages = (selectRustPackage pkgsBuildHost).packages.stable;\n        # Analogous to stdenv\n        rustPlatform = makeRustPlatform self.buildRustPackages;\n        rustc-unwrapped = self.callPackage ./rustc.nix {\n          version = rustcVersion;\n          sha256 = rustcSha256;\n          inherit enableRustcDev;\n          inherit\n            llvmShared\n            llvmSharedForBuild\n            llvmSharedForHost\n            llvmSharedForTarget\n            llvmPackages\n            fastCross\n            ;\n\n          patches = rustcPatches;\n\n          # Use boot package set to break cycle\n          inherit (bootstrapRustPackages) cargo rustc rustfmt;\n        };\n        rustc = wrapRustcWith {\n          inherit (self) rustc-unwrapped;\n          sysroot = if fastCross then self.rustc-unwrapped else null;\n        };\n        rustfmt = self.callPackage ./rustfmt.nix {\n          inherit (self.buildRustPackages) rustc;\n        };\n        cargo =\n          if (!fastCross) then\n            self.callPackage ./cargo.nix {\n              # Use boot package set to break cycle\n              rustPlatform = bootRustPlatform;\n            }\n          else\n            self.callPackage ./cargo_cross.nix { };\n        inherit cargo-auditable;\n        cargo-auditable-cargo-wrapper = self.callPackage ./cargo-auditable-cargo-wrapper.nix { };\n        clippy-unwrapped = self.callPackage ./clippy.nix { };\n        clippy = if !fastCross then self.clippy-unwrapped else self.callPackage ./clippy-wrapper.nix { };\n      }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/default.nix","line":75,"column":7},"path":["pkgs","rustPackages","buildRustPackages","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/default.nix","line":75,"column":7},"path":["pkgs","rustPackages","buildRustPackages","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.buildRustPackage","path":["pkgs","rustPackages","rustPlatform","buildRustPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":33,"column":7},"attr_expr":"buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {\n        inherit\n          stdenv\n          rustc\n          cargo\n          cargo-auditable\n          ;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.callPackage","path":["pkgs","rustPackages","rustPlatform","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":742,"column":9},"attr_expr":"callPackage = newScope spliced;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.rustPlatform.fetchCargoVendor","path":["pkgs","rustPackages","rustPlatform","fetchCargoVendor"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":29,"column":7},"attr_expr":"fetchCargoVendor = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-vendor.nix {\n        inherit cargo;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetch-cargo-vendor.nix","line":65,"column":1},"lambda_expr":"{\n  name ? if args ? pname && args ? version then \"${args.pname}-${args.version}\" else \"cargo-deps\",\n  hash ? (throw \"fetchCargoVendor requires a `hash` value to be set for ${name}\"),\n  nativeBuildInputs ? [ ],\n  ...\n}@args:\n\n# TODO: add asserts about pname version and name\n\nlet\n  vendorStaging = stdenvNoCC.mkDerivation (\n    {\n      name = \"${name}-vendor-staging\";\n\n      impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n\n      nativeBuildInputs = [\n        fetchCargoVendorUtilV2\n        cacert\n        nix-prefetch-git'\n      ]\n      ++ nativeBuildInputs;\n\n      buildPhase = ''\n        runHook preBuild\n\n        if [ -n \"''${cargoRoot-}\" ]; then\n          cd \"$cargoRoot\"\n        fi\n\n        fetch-cargo-vendor-util-v2 create-vendor-staging ./Cargo.lock \"$out\"\n\n        runHook postBuild\n      '';\n\n      strictDeps = true;\n\n      dontConfigure = true;\n      dontInstall = true;\n      dontFixup = true;\n\n      outputHash = hash;\n      outputHashAlgo = if hash == \"\" then \"sha256\" else null;\n      outputHashMode = \"recursive\";\n    }\n    // removeAttrs args removedArgs\n  );\nin\nrunCommand \"${name}-vendor\"\n  {\n    inherit vendorStaging;\n    nativeBuildInputs = [\n      fetchCargoVendorUtil\n      cargo\n      replaceWorkspaceValues\n    ];\n  }\n  ''\n    fetch-cargo-vendor-util create-vendor \"$vendorStaging\" \"$out\"\n  ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetch-cargo-vendor.nix","line":65,"column":1},"path":["pkgs","rustPackages","rustPlatform","fetchCargoVendor"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetch-cargo-vendor.nix","line":65,"column":1},"path":["pkgs","rustPackages","rustPlatform","fetchCargoVendor"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.importCargoLock","path":["pkgs","rustPackages","rustPlatform","importCargoLock"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":42,"column":7},"attr_expr":"importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {\n        inherit cargo;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/import-cargo-lock.nix","line":12,"column":1},"lambda_expr":"{\n  # Cargo lock file\n  lockFile ? null,\n\n  # Cargo lock file contents as string\n  lockFileContents ? null,\n\n  # Allow `fetchGit` to be used to not require hashes for git dependencies\n  allowBuiltinFetchGit ? false,\n\n  # Additional registries to pull sources from\n  #   { \"https://<registry index URL>\" = \"https://<registry download URL>\"; }\n  #   or if the registry is using the new sparse protocol\n  #   { \"sparse+https://<registry download URL>\" = \"https://<registry download URL>\"; }\n  # where:\n  # - \"index URL\" is the \"index\" value of the configuration entry for that registry\n  #   https://doc.rust-lang.org/cargo/reference/registries.html#using-an-alternate-registry\n  # - \"download URL\" is the \"dl\" value of its associated index configuration\n  #   https://doc.rust-lang.org/cargo/reference/registry-index.html#index-configuration\n  extraRegistries ? { },\n\n  # Hashes for git dependencies.\n  outputHashes ? { },\n}@args:\n\nassert (lockFile == null) != (lockFileContents == null);\n\nlet\n  # Parse a git source into different components.\n  parseGit =\n    src:\n    let\n      parts = builtins.match ''git\\+([^?]+)(\\?(rev|tag|branch)=(.*))?#(.*)'' src;\n      type = builtins.elemAt parts 2; # rev, tag or branch\n      value = builtins.elemAt parts 3;\n    in\n    if parts == null then\n      null\n    else\n      {\n        url = builtins.elemAt parts 0;\n        sha = builtins.elemAt parts 4;\n      }\n      // lib.optionalAttrs (type != null) { inherit type value; };\n\n  # shadows args.lockFileContents\n  lockFileContents = if lockFile != null then builtins.readFile lockFile else args.lockFileContents;\n\n  parsedLockFile = fromTOML lockFileContents;\n\n  # lockfile v1 and v2 don't have the `version` key, so assume v2\n  # we can implement more fine-grained detection later, if needed\n  lockFileVersion = parsedLockFile.version or 2;\n\n  packages = parsedLockFile.package;\n\n  # There is no source attribute for the source package itself. But\n  # since we do not want to vendor the source package anyway, we can\n  # safely skip it.\n  depPackages = builtins.filter (p: p ? \"source\") packages;\n\n  # Create dependent crates from packages.\n  #\n  # Force evaluation of the git SHA -> hash mapping, so that an error is\n  # thrown if there are stale hashes. We cannot rely on gitShaOutputHash\n  # being evaluated otherwise, since there could be no git dependencies.\n  depCrates = builtins.deepSeq gitShaOutputHash (map mkCrate depPackages);\n\n  # Map package name + version to git commit SHA for packages with a git source.\n  namesGitShas = builtins.listToAttrs (\n    map nameGitSha (builtins.filter (pkg: lib.hasPrefix \"git+\" pkg.source) depPackages)\n  );\n\n  nameGitSha =\n    pkg:\n    let\n      gitParts = parseGit pkg.source;\n    in\n    {\n      name = \"${pkg.name}-${pkg.version}\";\n      value = gitParts.sha;\n    };\n\n  # Convert the attrset provided through the `outputHashes` argument to a\n  # a mapping from git commit SHA -> output hash.\n  #\n  # There may be multiple different packages with different names\n  # originating from the same git repository (typically a Cargo\n  # workspace). By using the git commit SHA as a universal identifier,\n  # the user does not have to specify the output hash for every package\n  # individually.\n  gitShaOutputHash = lib.mapAttrs' (\n    nameVer: hash:\n    let\n      unusedHash = throw \"A hash was specified for ${nameVer}, but there is no corresponding git dependency.\";\n      rev = namesGitShas.${nameVer} or unusedHash;\n    in\n    {\n      name = rev;\n      value = hash;\n    }\n  ) outputHashes;\n\n  # We can't use the existing fetchCrate function, since it uses a\n  # recursive hash of the unpacked crate.\n  fetchCrate =\n    pkg: downloadUrl:\n    let\n      checksum =\n        pkg.checksum or parsedLockFile.metadata.\"checksum ${pkg.name} ${pkg.version} (${pkg.source})\";\n    in\n    assert lib.assertMsg (checksum != null) ''\n      Package ${pkg.name} does not have a checksum.\n    '';\n    fetchurl {\n      name = \"crate-${pkg.name}-${pkg.version}.tar.gz\";\n      url = \"${downloadUrl}/${pkg.name}/${pkg.version}/download\";\n      sha256 = checksum;\n    };\n\n  registries = {\n    # Use static.crates.io (CDN) instead of crates.io/api to avoid the 1 req/sec\n    # rate limit on the API servers, which currently returns intermittent 403s.\n    # See https://github.com/rust-lang/crates.io/issues/13482\n    \"https://github.com/rust-lang/crates.io-index\" = \"https://static.crates.io/crates\";\n  }\n  // extraRegistries;\n\n  # Replaces values inherited by workspace members.\n  replaceWorkspaceValues = writers.writePython3 \"replace-workspace-values\" {\n    libraries = with python3Packages; [\n      tomli\n      tomli-w\n    ];\n    flakeIgnore = [\n      \"E501\"\n      \"W503\"\n    ];\n  } (builtins.readFile ./replace-workspace-values.py);\n\n  # Fetch and unpack a crate.\n  mkCrate =\n    pkg:\n    let\n      gitParts = parseGit pkg.source;\n      registryIndexUrl = lib.removePrefix \"registry+\" pkg.source;\n    in\n    if\n      (lib.hasPrefix \"registry+\" pkg.source || lib.hasPrefix \"sparse+\" pkg.source)\n      && builtins.hasAttr registryIndexUrl registries\n    then\n      let\n        crateTarball = fetchCrate pkg registries.${registryIndexUrl};\n      in\n      runCommand \"${pkg.name}-${pkg.version}\" { } ''\n        mkdir $out\n        tar xf \"${crateTarball}\" -C $out --strip-components=1\n\n        # Cargo is happy with largely empty metadata.\n        printf '{\"files\":{},\"package\":\"${crateTarball.outputHash}\"}' > \"$out/.cargo-checksum.json\"\n      ''\n    else if gitParts != null then\n      let\n        missingHash = throw ''\n          No hash was found while vendoring the git dependency ${pkg.name}-${pkg.version}. You can add\n          a hash through the `outputHashes` argument of `importCargoLock`:\n\n          outputHashes = {\n            \"${pkg.name}-${pkg.version}\" = \"<hash>\";\n          };\n\n          If you use `buildRustPackage`, you can add this attribute to the `cargoLock`\n          attribute set.\n        '';\n        tree =\n          if gitShaOutputHash ? ${gitParts.sha} then\n            fetchgit {\n              inherit (gitParts) url;\n              rev = gitParts.sha; # The commit SHA is always available.\n              sha256 = gitShaOutputHash.${gitParts.sha};\n            }\n          else if allowBuiltinFetchGit then\n            fetchGit {\n              inherit (gitParts) url;\n              rev = gitParts.sha;\n              allRefs = true;\n              submodules = true;\n            }\n          else\n            missingHash;\n      in\n      runCommand \"${pkg.name}-${pkg.version}\" { } ''\n        tree=${tree}\n\n        # If the target package is in a workspace, or if it's the top-level\n        # crate, we should find the crate path using `cargo metadata`.\n        # Some packages do not have a Cargo.toml at the top-level,\n        # but only in nested directories.\n        # Only check the top-level Cargo.toml, if it actually exists\n        if [[ -f $tree/Cargo.toml ]]; then\n          crateCargoTOML=$(${cargo}/bin/cargo metadata --format-version 1 --no-deps --manifest-path $tree/Cargo.toml | \\\n          ${jq}/bin/jq -r '.packages[] | select(.name == \"${pkg.name}\") | .manifest_path')\n        fi\n\n        # If the repository is not a workspace the package might be in a subdirectory.\n        if [[ -z $crateCargoTOML ]]; then\n          for manifest in $(find $tree -name \"Cargo.toml\"); do\n            echo Looking at $manifest\n            crateCargoTOML=$(${cargo}/bin/cargo metadata --format-version 1 --no-deps --manifest-path \"$manifest\" | ${jq}/bin/jq -r '.packages[] | select(.name == \"${pkg.name}\") | .manifest_path' || :)\n            if [[ ! -z $crateCargoTOML ]]; then\n              break\n            fi\n          done\n\n          if [[ -z $crateCargoTOML ]]; then\n            >&2 echo \"Cannot find path for crate '${pkg.name}-${pkg.version}' in the tree in: $tree\"\n            exit 1\n          fi\n        fi\n\n        echo Found crate ${pkg.name} at $crateCargoTOML\n        tree=$(dirname $crateCargoTOML)\n\n        cp -prvL \"$tree\" \"$out\" || echo \"Warning: certain files couldn't be copied!\" >&2\n        chmod u+w $out\n\n        if grep -q workspace \"$out/Cargo.toml\"; then\n          chmod u+w \"$out/Cargo.toml\"\n          ${replaceWorkspaceValues} \"$out/Cargo.toml\" \"$(${cargo}/bin/cargo metadata --format-version 1 --no-deps --manifest-path $crateCargoTOML | ${jq}/bin/jq -r .workspace_root)/Cargo.toml\"\n        fi\n\n        # Cargo is happy with empty metadata.\n        printf '{\"files\":{},\"package\":null}' > \"$out/.cargo-checksum.json\"\n\n        ${lib.optionalString (gitParts ? type) ''\n          gitPartsValue=${lib.escapeShellArg gitParts.value}\n          # starting with lockfile version v4 the git source url contains encoded query parameters\n          # our regex parser does not know how to unescape them to get the actual value, so we do it here\n          ${lib.optionalString (lockFileVersion >= 4) ''\n            gitPartsValue=$(${lib.getExe python3Packages.python} -c \"import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))\" \"$gitPartsValue\")\n          ''}\n        ''}\n\n        # Set up configuration for the vendor directory.\n        cat > $out/.cargo-config <<EOF\n        [source.\"${pkg.source}\"]\n        git = \"${gitParts.url}\"\n        ${lib.optionalString (gitParts ? type) \"${gitParts.type} = \\\"$gitPartsValue\\\"\"}\n        replace-with = \"vendored-sources\"\n        EOF\n      ''\n    else\n      throw \"Cannot handle crate source: ${pkg.source}\";\n\n  vendorDir =\n    runCommand \"cargo-vendor-dir\"\n      (\n        {\n          __structuredAttrs = true;\n        }\n        // (\n          if lockFile == null then\n            {\n              inherit lockFileContents;\n            }\n          else\n            {\n              passthru = {\n                inherit lockFile;\n              };\n            }\n        )\n      )\n      ''\n            mkdir -p $out/.cargo\n\n            ${\n              if lockFile == null then\n                ''\n                  printf \"%s\" \"$lockFileContents\" > \"$out/Cargo.lock\"\n                ''\n              else\n                \"ln -s ${lockFile} $out/Cargo.lock\"\n            }\n\n            cat > $out/.cargo/config.toml <<EOF\n        [source.crates-io]\n        replace-with = \"vendored-sources\"\n\n        [source.vendored-sources]\n        directory = \"cargo-vendor-dir\"\n        EOF\n\n            declare -A keysSeen\n\n            for registry in ${toString (builtins.attrNames extraRegistries)}; do\n              cat >> $out/.cargo/config.toml <<EOF\n\n        [source.\"$registry\"]\n        registry = \"$registry\"\n        replace-with = \"vendored-sources\"\n        EOF\n            done\n\n            for crate in ${toString depCrates}; do\n              # Link the crate directory, removing the output path hash from the destination.\n              ln -s \"$crate\" $out/$(basename \"$crate\" | cut -c 34-)\n\n              if [ -e \"$crate/.cargo-config\" ]; then\n                key=$(sed 's/\\[source\\.\"\\(.*\\)\"\\]/\\1/; t; d' < \"$crate/.cargo-config\")\n                if [[ -z ''${keysSeen[$key]} ]]; then\n                  keysSeen[$key]=1\n                  cat \"$crate/.cargo-config\" >> $out/.cargo/config.toml\n                fi\n              fi\n            done\n      '';\nin\nvendorDir","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/import-cargo-lock.nix","line":12,"column":1},"path":["pkgs","rustPackages","rustPlatform","importCargoLock"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/import-cargo-lock.nix","line":12,"column":1},"path":["pkgs","rustPackages","rustPlatform","importCargoLock"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.newScope","path":["pkgs","rustPackages","rustPlatform","newScope"],"aliases":[["pkgs","dotnetCorePackages","newScope"],["pkgs","python3Packages","newScope"],["pkgs","rustPackages","buildRustPackages","rustPlatform","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":9},"attr_expr":"newScope = scope: newScope (spliced // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"lambda_expr":"scope: newScope (spliced // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","rustPackages","rustPlatform","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","rustPackages","rustPlatform","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.overrideScope","path":["pkgs","rustPackages","rustPlatform","overrideScope"],"aliases":[["pkgs","dotnetCorePackages","overrideScope"],["pkgs","python3Packages","overrideScope"],["pkgs","rustPackages","buildRustPackages","rustPlatform","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":745,"column":9},"attr_expr":"overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"lambda_expr":"overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","rustPackages","rustPlatform","overrideScope"],"pos_type":"Lambda"}},"content":{"content":"overridden.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","rustPackages","rustPlatform","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.packages","path":["pkgs","rustPackages","rustPlatform","packages"],"aliases":[["pkgs","rustPackages","buildRustPackages","rustPlatform","packages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":751,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":24,"column":5},"lambda_expr":"self:\n    let\n      inherit (self) callPackage;\n    in\n    {\n      fetchCargoVendor = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-vendor.nix {\n        inherit cargo;\n      };\n\n      buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {\n        inherit\n          stdenv\n          rustc\n          cargo\n          cargo-auditable\n          ;\n      };\n\n      importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {\n        inherit cargo;\n      };\n\n      rustcSrc = callPackage ./rust-src.nix {\n        inherit runCommand rustc;\n      };\n\n      rustLibSrc = callPackage ./rust-lib-src.nix {\n        inherit runCommand rustc;\n      };\n\n      # Useful when rebuilding std\n      # e.g. when building wasm with wasm-pack\n      rustVendorSrc = callPackage ./rust-vendor-src.nix {\n        inherit runCommand rustc;\n      };\n\n      # Hooks\n      inherit\n        (callPackages ../../../build-support/rust/hooks {\n          inherit\n            stdenv\n            ;\n        })\n        cargoBuildHook\n        cargoCheckHook\n        cargoInstallHook\n        cargoNextestHook\n        cargoSetupHook\n        maturinBuildHook\n        bindgenHook\n        ;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":24,"column":5},"path":["pkgs","rustPackages","rustPlatform","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":24,"column":5},"path":["pkgs","rustPackages","rustPlatform","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.buildRustPackage","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":33,"column":7},"attr_expr":"buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {\n        inherit\n          stdenv\n          rustc\n          cargo\n          cargo-auditable\n          ;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"lambda_expr":"fpargs:\n        transformDrv (\n          constructDrv (\n            final:\n            let\n              previous = if isFunction fpargs then fpargs final else fpargs;\n            in\n            removeAttrs previous excludeDrvArgNames // extendDrvArgs final previous\n          )\n        )","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":865,"column":15},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.callPackage","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","callPackage"],"aliases":[["pkgs","agdaPackages","callPackage"],["pkgs","dhallPackages","callPackage"],["pkgs","dotnetCorePackages","callPackage"],["pkgs","elmPackages","callPackage"],["pkgs","emacsPackages","callPackage"],["pkgs","callPackage"],["pkgs","python3Packages","callPackage"],["pkgs","rustPackages","callPackage"],["pkgs","rustPackages","buildRustPackages","callPackage"],["pkgs","rustPackages","rustPlatform","callPackage"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":742,"column":9},"attr_expr":"callPackage = newScope spliced;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":307,"column":15},"lambda_expr":"fn: args:\n    let\n      f = if isFunction fn then fn else import fn;\n      fargs = functionArgs f;\n\n      # All arguments that will be passed to the function\n      # This includes automatic ones and ones passed explicitly\n      allArgs = intersectAttrs fargs autoArgs // args;\n\n      # arguments that weren't passed automatically to the function\n      unpassedArgs = removeAttrs fargs (attrNames allArgs);\n\n    in\n    # if nonempty, check if the function has defaults for those other args\n    if unpassedArgs == { } || all (value: value) (attrValues unpassedArgs) then\n      makeOverridable f allArgs\n    else\n      # Only show the error for the first missing argument\n      # This needs to be an abort so it can't be caught with `builtins.tryEval`,\n      # which is used by nix-env and ofborg to filter out packages that don't evaluate.\n      # This way we're forced to fix such errors in Nixpkgs,\n      # which is especially relevant with allowAliases = false\n      abort (makeErrorMessage autoArgs fn args fargs unpassedArgs)","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.fetchCargoVendor","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","fetchCargoVendor"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":29,"column":7},"attr_expr":"fetchCargoVendor = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-vendor.nix {\n        inherit cargo;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetch-cargo-vendor.nix","line":65,"column":1},"lambda_expr":"{\n  name ? if args ? pname && args ? version then \"${args.pname}-${args.version}\" else \"cargo-deps\",\n  hash ? (throw \"fetchCargoVendor requires a `hash` value to be set for ${name}\"),\n  nativeBuildInputs ? [ ],\n  ...\n}@args:\n\n# TODO: add asserts about pname version and name\n\nlet\n  vendorStaging = stdenvNoCC.mkDerivation (\n    {\n      name = \"${name}-vendor-staging\";\n\n      impureEnvVars = lib.fetchers.proxyImpureEnvVars;\n\n      nativeBuildInputs = [\n        fetchCargoVendorUtilV2\n        cacert\n        nix-prefetch-git'\n      ]\n      ++ nativeBuildInputs;\n\n      buildPhase = ''\n        runHook preBuild\n\n        if [ -n \"''${cargoRoot-}\" ]; then\n          cd \"$cargoRoot\"\n        fi\n\n        fetch-cargo-vendor-util-v2 create-vendor-staging ./Cargo.lock \"$out\"\n\n        runHook postBuild\n      '';\n\n      strictDeps = true;\n\n      dontConfigure = true;\n      dontInstall = true;\n      dontFixup = true;\n\n      outputHash = hash;\n      outputHashAlgo = if hash == \"\" then \"sha256\" else null;\n      outputHashMode = \"recursive\";\n    }\n    // removeAttrs args removedArgs\n  );\nin\nrunCommand \"${name}-vendor\"\n  {\n    inherit vendorStaging;\n    nativeBuildInputs = [\n      fetchCargoVendorUtil\n      cargo\n      replaceWorkspaceValues\n    ];\n  }\n  ''\n    fetch-cargo-vendor-util create-vendor \"$vendorStaging\" \"$out\"\n  ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetch-cargo-vendor.nix","line":65,"column":1},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","fetchCargoVendor"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/fetch-cargo-vendor.nix","line":65,"column":1},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","fetchCargoVendor"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.importCargoLock","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","importCargoLock"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":42,"column":7},"attr_expr":"importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {\n        inherit cargo;\n      };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/import-cargo-lock.nix","line":12,"column":1},"lambda_expr":"{\n  # Cargo lock file\n  lockFile ? null,\n\n  # Cargo lock file contents as string\n  lockFileContents ? null,\n\n  # Allow `fetchGit` to be used to not require hashes for git dependencies\n  allowBuiltinFetchGit ? false,\n\n  # Additional registries to pull sources from\n  #   { \"https://<registry index URL>\" = \"https://<registry download URL>\"; }\n  #   or if the registry is using the new sparse protocol\n  #   { \"sparse+https://<registry download URL>\" = \"https://<registry download URL>\"; }\n  # where:\n  # - \"index URL\" is the \"index\" value of the configuration entry for that registry\n  #   https://doc.rust-lang.org/cargo/reference/registries.html#using-an-alternate-registry\n  # - \"download URL\" is the \"dl\" value of its associated index configuration\n  #   https://doc.rust-lang.org/cargo/reference/registry-index.html#index-configuration\n  extraRegistries ? { },\n\n  # Hashes for git dependencies.\n  outputHashes ? { },\n}@args:\n\nassert (lockFile == null) != (lockFileContents == null);\n\nlet\n  # Parse a git source into different components.\n  parseGit =\n    src:\n    let\n      parts = builtins.match ''git\\+([^?]+)(\\?(rev|tag|branch)=(.*))?#(.*)'' src;\n      type = builtins.elemAt parts 2; # rev, tag or branch\n      value = builtins.elemAt parts 3;\n    in\n    if parts == null then\n      null\n    else\n      {\n        url = builtins.elemAt parts 0;\n        sha = builtins.elemAt parts 4;\n      }\n      // lib.optionalAttrs (type != null) { inherit type value; };\n\n  # shadows args.lockFileContents\n  lockFileContents = if lockFile != null then builtins.readFile lockFile else args.lockFileContents;\n\n  parsedLockFile = fromTOML lockFileContents;\n\n  # lockfile v1 and v2 don't have the `version` key, so assume v2\n  # we can implement more fine-grained detection later, if needed\n  lockFileVersion = parsedLockFile.version or 2;\n\n  packages = parsedLockFile.package;\n\n  # There is no source attribute for the source package itself. But\n  # since we do not want to vendor the source package anyway, we can\n  # safely skip it.\n  depPackages = builtins.filter (p: p ? \"source\") packages;\n\n  # Create dependent crates from packages.\n  #\n  # Force evaluation of the git SHA -> hash mapping, so that an error is\n  # thrown if there are stale hashes. We cannot rely on gitShaOutputHash\n  # being evaluated otherwise, since there could be no git dependencies.\n  depCrates = builtins.deepSeq gitShaOutputHash (map mkCrate depPackages);\n\n  # Map package name + version to git commit SHA for packages with a git source.\n  namesGitShas = builtins.listToAttrs (\n    map nameGitSha (builtins.filter (pkg: lib.hasPrefix \"git+\" pkg.source) depPackages)\n  );\n\n  nameGitSha =\n    pkg:\n    let\n      gitParts = parseGit pkg.source;\n    in\n    {\n      name = \"${pkg.name}-${pkg.version}\";\n      value = gitParts.sha;\n    };\n\n  # Convert the attrset provided through the `outputHashes` argument to a\n  # a mapping from git commit SHA -> output hash.\n  #\n  # There may be multiple different packages with different names\n  # originating from the same git repository (typically a Cargo\n  # workspace). By using the git commit SHA as a universal identifier,\n  # the user does not have to specify the output hash for every package\n  # individually.\n  gitShaOutputHash = lib.mapAttrs' (\n    nameVer: hash:\n    let\n      unusedHash = throw \"A hash was specified for ${nameVer}, but there is no corresponding git dependency.\";\n      rev = namesGitShas.${nameVer} or unusedHash;\n    in\n    {\n      name = rev;\n      value = hash;\n    }\n  ) outputHashes;\n\n  # We can't use the existing fetchCrate function, since it uses a\n  # recursive hash of the unpacked crate.\n  fetchCrate =\n    pkg: downloadUrl:\n    let\n      checksum =\n        pkg.checksum or parsedLockFile.metadata.\"checksum ${pkg.name} ${pkg.version} (${pkg.source})\";\n    in\n    assert lib.assertMsg (checksum != null) ''\n      Package ${pkg.name} does not have a checksum.\n    '';\n    fetchurl {\n      name = \"crate-${pkg.name}-${pkg.version}.tar.gz\";\n      url = \"${downloadUrl}/${pkg.name}/${pkg.version}/download\";\n      sha256 = checksum;\n    };\n\n  registries = {\n    # Use static.crates.io (CDN) instead of crates.io/api to avoid the 1 req/sec\n    # rate limit on the API servers, which currently returns intermittent 403s.\n    # See https://github.com/rust-lang/crates.io/issues/13482\n    \"https://github.com/rust-lang/crates.io-index\" = \"https://static.crates.io/crates\";\n  }\n  // extraRegistries;\n\n  # Replaces values inherited by workspace members.\n  replaceWorkspaceValues = writers.writePython3 \"replace-workspace-values\" {\n    libraries = with python3Packages; [\n      tomli\n      tomli-w\n    ];\n    flakeIgnore = [\n      \"E501\"\n      \"W503\"\n    ];\n  } (builtins.readFile ./replace-workspace-values.py);\n\n  # Fetch and unpack a crate.\n  mkCrate =\n    pkg:\n    let\n      gitParts = parseGit pkg.source;\n      registryIndexUrl = lib.removePrefix \"registry+\" pkg.source;\n    in\n    if\n      (lib.hasPrefix \"registry+\" pkg.source || lib.hasPrefix \"sparse+\" pkg.source)\n      && builtins.hasAttr registryIndexUrl registries\n    then\n      let\n        crateTarball = fetchCrate pkg registries.${registryIndexUrl};\n      in\n      runCommand \"${pkg.name}-${pkg.version}\" { } ''\n        mkdir $out\n        tar xf \"${crateTarball}\" -C $out --strip-components=1\n\n        # Cargo is happy with largely empty metadata.\n        printf '{\"files\":{},\"package\":\"${crateTarball.outputHash}\"}' > \"$out/.cargo-checksum.json\"\n      ''\n    else if gitParts != null then\n      let\n        missingHash = throw ''\n          No hash was found while vendoring the git dependency ${pkg.name}-${pkg.version}. You can add\n          a hash through the `outputHashes` argument of `importCargoLock`:\n\n          outputHashes = {\n            \"${pkg.name}-${pkg.version}\" = \"<hash>\";\n          };\n\n          If you use `buildRustPackage`, you can add this attribute to the `cargoLock`\n          attribute set.\n        '';\n        tree =\n          if gitShaOutputHash ? ${gitParts.sha} then\n            fetchgit {\n              inherit (gitParts) url;\n              rev = gitParts.sha; # The commit SHA is always available.\n              sha256 = gitShaOutputHash.${gitParts.sha};\n            }\n          else if allowBuiltinFetchGit then\n            fetchGit {\n              inherit (gitParts) url;\n              rev = gitParts.sha;\n              allRefs = true;\n              submodules = true;\n            }\n          else\n            missingHash;\n      in\n      runCommand \"${pkg.name}-${pkg.version}\" { } ''\n        tree=${tree}\n\n        # If the target package is in a workspace, or if it's the top-level\n        # crate, we should find the crate path using `cargo metadata`.\n        # Some packages do not have a Cargo.toml at the top-level,\n        # but only in nested directories.\n        # Only check the top-level Cargo.toml, if it actually exists\n        if [[ -f $tree/Cargo.toml ]]; then\n          crateCargoTOML=$(${cargo}/bin/cargo metadata --format-version 1 --no-deps --manifest-path $tree/Cargo.toml | \\\n          ${jq}/bin/jq -r '.packages[] | select(.name == \"${pkg.name}\") | .manifest_path')\n        fi\n\n        # If the repository is not a workspace the package might be in a subdirectory.\n        if [[ -z $crateCargoTOML ]]; then\n          for manifest in $(find $tree -name \"Cargo.toml\"); do\n            echo Looking at $manifest\n            crateCargoTOML=$(${cargo}/bin/cargo metadata --format-version 1 --no-deps --manifest-path \"$manifest\" | ${jq}/bin/jq -r '.packages[] | select(.name == \"${pkg.name}\") | .manifest_path' || :)\n            if [[ ! -z $crateCargoTOML ]]; then\n              break\n            fi\n          done\n\n          if [[ -z $crateCargoTOML ]]; then\n            >&2 echo \"Cannot find path for crate '${pkg.name}-${pkg.version}' in the tree in: $tree\"\n            exit 1\n          fi\n        fi\n\n        echo Found crate ${pkg.name} at $crateCargoTOML\n        tree=$(dirname $crateCargoTOML)\n\n        cp -prvL \"$tree\" \"$out\" || echo \"Warning: certain files couldn't be copied!\" >&2\n        chmod u+w $out\n\n        if grep -q workspace \"$out/Cargo.toml\"; then\n          chmod u+w \"$out/Cargo.toml\"\n          ${replaceWorkspaceValues} \"$out/Cargo.toml\" \"$(${cargo}/bin/cargo metadata --format-version 1 --no-deps --manifest-path $crateCargoTOML | ${jq}/bin/jq -r .workspace_root)/Cargo.toml\"\n        fi\n\n        # Cargo is happy with empty metadata.\n        printf '{\"files\":{},\"package\":null}' > \"$out/.cargo-checksum.json\"\n\n        ${lib.optionalString (gitParts ? type) ''\n          gitPartsValue=${lib.escapeShellArg gitParts.value}\n          # starting with lockfile version v4 the git source url contains encoded query parameters\n          # our regex parser does not know how to unescape them to get the actual value, so we do it here\n          ${lib.optionalString (lockFileVersion >= 4) ''\n            gitPartsValue=$(${lib.getExe python3Packages.python} -c \"import sys, urllib.parse; print(urllib.parse.unquote(sys.argv[1]))\" \"$gitPartsValue\")\n          ''}\n        ''}\n\n        # Set up configuration for the vendor directory.\n        cat > $out/.cargo-config <<EOF\n        [source.\"${pkg.source}\"]\n        git = \"${gitParts.url}\"\n        ${lib.optionalString (gitParts ? type) \"${gitParts.type} = \\\"$gitPartsValue\\\"\"}\n        replace-with = \"vendored-sources\"\n        EOF\n      ''\n    else\n      throw \"Cannot handle crate source: ${pkg.source}\";\n\n  vendorDir =\n    runCommand \"cargo-vendor-dir\"\n      (\n        {\n          __structuredAttrs = true;\n        }\n        // (\n          if lockFile == null then\n            {\n              inherit lockFileContents;\n            }\n          else\n            {\n              passthru = {\n                inherit lockFile;\n              };\n            }\n        )\n      )\n      ''\n            mkdir -p $out/.cargo\n\n            ${\n              if lockFile == null then\n                ''\n                  printf \"%s\" \"$lockFileContents\" > \"$out/Cargo.lock\"\n                ''\n              else\n                \"ln -s ${lockFile} $out/Cargo.lock\"\n            }\n\n            cat > $out/.cargo/config.toml <<EOF\n        [source.crates-io]\n        replace-with = \"vendored-sources\"\n\n        [source.vendored-sources]\n        directory = \"cargo-vendor-dir\"\n        EOF\n\n            declare -A keysSeen\n\n            for registry in ${toString (builtins.attrNames extraRegistries)}; do\n              cat >> $out/.cargo/config.toml <<EOF\n\n        [source.\"$registry\"]\n        registry = \"$registry\"\n        replace-with = \"vendored-sources\"\n        EOF\n            done\n\n            for crate in ${toString depCrates}; do\n              # Link the crate directory, removing the output path hash from the destination.\n              ln -s \"$crate\" $out/$(basename \"$crate\" | cut -c 34-)\n\n              if [ -e \"$crate/.cargo-config\" ]; then\n                key=$(sed 's/\\[source\\.\"\\(.*\\)\"\\]/\\1/; t; d' < \"$crate/.cargo-config\")\n                if [[ -z ''${keysSeen[$key]} ]]; then\n                  keysSeen[$key]=1\n                  cat \"$crate/.cargo-config\" >> $out/.cargo/config.toml\n                fi\n              fi\n            done\n      '';\nin\nvendorDir","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/import-cargo-lock.nix","line":12,"column":1},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","importCargoLock"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/import-cargo-lock.nix","line":12,"column":1},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","importCargoLock"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.newScope","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","newScope"],"aliases":[["pkgs","dotnetCorePackages","newScope"],["pkgs","python3Packages","newScope"],["pkgs","rustPackages","rustPlatform","newScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":9},"attr_expr":"newScope = scope: newScope (spliced // scope);","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"lambda_expr":"scope: newScope (spliced // scope)","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","newScope"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":741,"column":20},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","newScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.overrideScope","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","overrideScope"],"aliases":[["pkgs","dotnetCorePackages","overrideScope"],["pkgs","python3Packages","overrideScope"],["pkgs","rustPackages","rustPlatform","overrideScope"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":745,"column":9},"attr_expr":"overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"lambda_expr":"overrideScope =\n          g:\n          (makeScopeWithSplicing' { inherit splicePackages newScope; } {\n            inherit otherSplices keep extra;\n            f = extends g f;\n          });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","overrideScope"],"pos_type":"Lambda"}},"content":{"content":"overridden.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":746,"column":11},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","overrideScope"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.packages","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","packages"],"aliases":[["pkgs","rustPackages","rustPlatform","packages"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":751,"column":9},"attr_expr":"packages = f;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":24,"column":5},"lambda_expr":"self:\n    let\n      inherit (self) callPackage;\n    in\n    {\n      fetchCargoVendor = buildPackages.callPackage ../../../build-support/rust/fetch-cargo-vendor.nix {\n        inherit cargo;\n      };\n\n      buildRustPackage = callPackage ../../../build-support/rust/build-rust-package {\n        inherit\n          stdenv\n          rustc\n          cargo\n          cargo-auditable\n          ;\n      };\n\n      importCargoLock = buildPackages.callPackage ../../../build-support/rust/import-cargo-lock.nix {\n        inherit cargo;\n      };\n\n      rustcSrc = callPackage ./rust-src.nix {\n        inherit runCommand rustc;\n      };\n\n      rustLibSrc = callPackage ./rust-lib-src.nix {\n        inherit runCommand rustc;\n      };\n\n      # Useful when rebuilding std\n      # e.g. when building wasm with wasm-pack\n      rustVendorSrc = callPackage ./rust-vendor-src.nix {\n        inherit runCommand rustc;\n      };\n\n      # Hooks\n      inherit\n        (callPackages ../../../build-support/rust/hooks {\n          inherit\n            stdenv\n            ;\n        })\n        cargoBuildHook\n        cargoCheckHook\n        cargoInstallHook\n        cargoNextestHook\n        cargoSetupHook\n        maturinBuildHook\n        bindgenHook\n        ;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":24,"column":5},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","packages"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/development/compilers/rust/make-rust-platform.nix","line":24,"column":5},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","packages"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.buildRustPackage.constructDrv","path":["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],"aliases":[["pkgs","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","buildRebar3","constructDrv"],["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","stdenv","mkDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"lambda_expr":"mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],"pos_type":"Lambda"}},"content":{"content":"\nThis function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)\nthat refers to the derivation's outputs.\n\n`mkDerivation` takes many argument attributes, most of which affect the derivation environment,\nbut [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.\n\nThe `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.\nSee [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).\n\nReference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv\n\n:::{.note}\nThis is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.\n\nMost arguments are also passed through to the underlying call of [`derivation`](https://nixos.org/manual/nix/stable/language/derivations).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.buildRustPackage.extendDrvArgs","path":["pkgs","rustPackages","rustPlatform","buildRustPackage","extendDrvArgs"],"aliases":[["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-package/default.nix","line":43,"column":5},"lambda_expr":"finalAttrs:\n    {\n      # Name for the vendored dependencies tarball\n      cargoDepsName ? null,\n\n      cargoPatches ? [ ],\n      patches ? [ ],\n      sourceRoot ? null,\n      cargoRoot ? null,\n      logLevel ? \"\",\n      buildInputs ? [ ],\n      nativeBuildInputs ? [ ],\n      cargoUpdateHook ? \"\",\n      cargoDepsHook ? \"\",\n      buildType ? \"release\",\n      meta ? { },\n      useFetchCargoVendor ? true,\n      cargoDeps ? null,\n      cargoLock ? null,\n      cargoVendorDir ? null,\n      checkType ? buildType,\n      buildNoDefaultFeatures ? false,\n      checkNoDefaultFeatures ? buildNoDefaultFeatures,\n      buildFeatures ? [ ],\n      checkFeatures ? buildFeatures,\n      useNextest ? false,\n      auditable ? !cargo-auditable.meta.broken,\n\n      depsExtraArgs ? { },\n\n      # Needed to `pushd`/`popd` into a subdir of a tarball if this subdir\n      # contains a Cargo.toml, but isn't part of a workspace (which is e.g. the\n      # case for `rustfmt`/etc from the `rust-sources).\n      # Otherwise, everything from the tarball would've been built/tested.\n      buildAndTestSubdir ? null,\n      ...\n    }@args:\n\n    assert lib.assertMsg useFetchCargoVendor\n      \"buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it\";\n\n    assert lib.warnIf (args ? useFetchCargoVendor)\n      \"buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it\"\n      true;\n    {\n      env =\n        let\n          isDarwinDebug = stdenv.hostPlatform.isDarwin && buildType == \"debug\";\n        in\n        {\n          PKG_CONFIG_ALLOW_CROSS = if stdenv.buildPlatform != stdenv.hostPlatform then 1 else 0;\n          RUST_LOG = logLevel;\n          # Prevent shadowing *_RUSTFLAGS environment variables\n          ${if args ? RUSTFLAGS || isDarwinDebug then \"RUSTFLAGS\" else null} =\n            lib.optionalString isDarwinDebug \"-C split-debuginfo=packed \"\n            # Workaround the existing RUSTFLAGS specified as a list.\n            + interpolateString (args.RUSTFLAGS or \"\");\n        }\n        // args.env or { };\n\n      cargoDeps =\n        if cargoVendorDir != null then\n          null\n        else if cargoDeps != null then\n          cargoDeps\n        else if cargoLock != null then\n          importCargoLock cargoLock\n        else if args.cargoHash or null == null then\n          throw \"cargoHash, cargoVendorDir, cargoDeps, or cargoLock must be set\"\n        else\n          fetchCargoVendor (\n            getOptionalAttrs [\n              \"name\"\n              \"pname\"\n              \"version\"\n              \"src\"\n              \"srcs\"\n              \"sourceRoot\"\n              \"cargoRoot\"\n              \"preUnpack\"\n              \"unpackPhase\"\n              \"postUnpack\"\n            ] finalAttrs\n            // {\n              ${if cargoDepsName != null then \"name\" else null} = cargoDepsName;\n              patches = cargoPatches;\n              hash = args.cargoHash;\n            }\n            // depsExtraArgs\n          );\n      inherit buildAndTestSubdir;\n\n      cargoBuildType = buildType;\n\n      cargoCheckType = checkType;\n\n      cargoBuildNoDefaultFeatures = buildNoDefaultFeatures;\n\n      cargoCheckNoDefaultFeatures = checkNoDefaultFeatures;\n\n      cargoBuildFeatures = buildFeatures;\n\n      cargoCheckFeatures = checkFeatures;\n\n      nativeBuildInputs =\n        nativeBuildInputs\n        ++ lib.optionals auditable [\n          (buildPackages.cargo-auditable-cargo-wrapper.override {\n            inherit cargo cargo-auditable;\n          })\n        ]\n        ++ [\n          cargoBuildHook\n          (if useNextest then cargoNextestHook else cargoCheckHook)\n          cargoInstallHook\n          cargoSetupHook\n          rustc\n          cargo\n        ];\n\n      buildInputs = buildInputs ++ lib.optionals stdenv.hostPlatform.isMinGW [ windows.pthreads ];\n\n      patches = cargoPatches ++ patches;\n\n      configurePhase =\n        args.configurePhase or ''\n          runHook preConfigure\n          runHook postConfigure\n        '';\n\n      doCheck = args.doCheck or true;\n\n      strictDeps = true;\n\n      meta = meta // {\n        badPlatforms = meta.badPlatforms or [ ] ++ rustc.badTargetPlatforms;\n        # default to Rust's platforms\n        platforms = lib.intersectLists meta.platforms or lib.platforms.all rustc.targetPlatforms;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-package/default.nix","line":43,"column":5},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-package/default.nix","line":43,"column":5},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.buildRustPackage.override","path":["pkgs","rustPackages","rustPlatform","buildRustPackage","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.rustPlatform.buildRustPackage.overrideDerivation","path":["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.buildRustPackage.transformDrv","path":["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.rustPackages.rustPlatform.fetchCargoVendor.override","path":["pkgs","rustPackages","rustPlatform","fetchCargoVendor","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.rustPlatform.importCargoLock.override","path":["pkgs","rustPackages","rustPlatform","importCargoLock","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.buildRustPackage.constructDrv","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],"aliases":[["pkgs","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","buildRebar3","constructDrv"],["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","stdenv","mkDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":885,"column":9},"attr_expr":"constructDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"lambda_expr":"mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],"pos_type":"Lambda"}},"content":{"content":"\nThis function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)\nthat refers to the derivation's outputs.\n\n`mkDerivation` takes many argument attributes, most of which affect the derivation environment,\nbut [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.\n\nThe `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.\nSee [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).\n\nReference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv\n\n:::{.note}\nThis is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.\n\nMost arguments are also passed through to the underlying call of [`derivation`](https://nixos.org/manual/nix/stable/language/derivations).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.buildRustPackage.extendDrvArgs","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","extendDrvArgs"],"aliases":[["pkgs","rustPackages","rustPlatform","buildRustPackage","extendDrvArgs"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":887,"column":9},"attr_expr":"extendDrvArgs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-package/default.nix","line":43,"column":5},"lambda_expr":"finalAttrs:\n    {\n      # Name for the vendored dependencies tarball\n      cargoDepsName ? null,\n\n      cargoPatches ? [ ],\n      patches ? [ ],\n      sourceRoot ? null,\n      cargoRoot ? null,\n      logLevel ? \"\",\n      buildInputs ? [ ],\n      nativeBuildInputs ? [ ],\n      cargoUpdateHook ? \"\",\n      cargoDepsHook ? \"\",\n      buildType ? \"release\",\n      meta ? { },\n      useFetchCargoVendor ? true,\n      cargoDeps ? null,\n      cargoLock ? null,\n      cargoVendorDir ? null,\n      checkType ? buildType,\n      buildNoDefaultFeatures ? false,\n      checkNoDefaultFeatures ? buildNoDefaultFeatures,\n      buildFeatures ? [ ],\n      checkFeatures ? buildFeatures,\n      useNextest ? false,\n      auditable ? !cargo-auditable.meta.broken,\n\n      depsExtraArgs ? { },\n\n      # Needed to `pushd`/`popd` into a subdir of a tarball if this subdir\n      # contains a Cargo.toml, but isn't part of a workspace (which is e.g. the\n      # case for `rustfmt`/etc from the `rust-sources).\n      # Otherwise, everything from the tarball would've been built/tested.\n      buildAndTestSubdir ? null,\n      ...\n    }@args:\n\n    assert lib.assertMsg useFetchCargoVendor\n      \"buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it\";\n\n    assert lib.warnIf (args ? useFetchCargoVendor)\n      \"buildRustPackage: `useFetchCargoVendor` is non‐optional and enabled by default as of 25.05, remove it\"\n      true;\n    {\n      env =\n        let\n          isDarwinDebug = stdenv.hostPlatform.isDarwin && buildType == \"debug\";\n        in\n        {\n          PKG_CONFIG_ALLOW_CROSS = if stdenv.buildPlatform != stdenv.hostPlatform then 1 else 0;\n          RUST_LOG = logLevel;\n          # Prevent shadowing *_RUSTFLAGS environment variables\n          ${if args ? RUSTFLAGS || isDarwinDebug then \"RUSTFLAGS\" else null} =\n            lib.optionalString isDarwinDebug \"-C split-debuginfo=packed \"\n            # Workaround the existing RUSTFLAGS specified as a list.\n            + interpolateString (args.RUSTFLAGS or \"\");\n        }\n        // args.env or { };\n\n      cargoDeps =\n        if cargoVendorDir != null then\n          null\n        else if cargoDeps != null then\n          cargoDeps\n        else if cargoLock != null then\n          importCargoLock cargoLock\n        else if args.cargoHash or null == null then\n          throw \"cargoHash, cargoVendorDir, cargoDeps, or cargoLock must be set\"\n        else\n          fetchCargoVendor (\n            getOptionalAttrs [\n              \"name\"\n              \"pname\"\n              \"version\"\n              \"src\"\n              \"srcs\"\n              \"sourceRoot\"\n              \"cargoRoot\"\n              \"preUnpack\"\n              \"unpackPhase\"\n              \"postUnpack\"\n            ] finalAttrs\n            // {\n              ${if cargoDepsName != null then \"name\" else null} = cargoDepsName;\n              patches = cargoPatches;\n              hash = args.cargoHash;\n            }\n            // depsExtraArgs\n          );\n      inherit buildAndTestSubdir;\n\n      cargoBuildType = buildType;\n\n      cargoCheckType = checkType;\n\n      cargoBuildNoDefaultFeatures = buildNoDefaultFeatures;\n\n      cargoCheckNoDefaultFeatures = checkNoDefaultFeatures;\n\n      cargoBuildFeatures = buildFeatures;\n\n      cargoCheckFeatures = checkFeatures;\n\n      nativeBuildInputs =\n        nativeBuildInputs\n        ++ lib.optionals auditable [\n          (buildPackages.cargo-auditable-cargo-wrapper.override {\n            inherit cargo cargo-auditable;\n          })\n        ]\n        ++ [\n          cargoBuildHook\n          (if useNextest then cargoNextestHook else cargoCheckHook)\n          cargoInstallHook\n          cargoSetupHook\n          rustc\n          cargo\n        ];\n\n      buildInputs = buildInputs ++ lib.optionals stdenv.hostPlatform.isMinGW [ windows.pthreads ];\n\n      patches = cargoPatches ++ patches;\n\n      configurePhase =\n        args.configurePhase or ''\n          runHook preConfigure\n          runHook postConfigure\n        '';\n\n      doCheck = args.doCheck or true;\n\n      strictDeps = true;\n\n      meta = meta // {\n        badPlatforms = meta.badPlatforms or [ ] ++ rustc.badTargetPlatforms;\n        # default to Rust's platforms\n        platforms = lib.intersectLists meta.platforms or lib.platforms.all rustc.targetPlatforms;\n      };\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-package/default.nix","line":43,"column":5},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","extendDrvArgs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/rust/build-rust-package/default.nix","line":43,"column":5},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","extendDrvArgs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.buildRustPackage.override","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.buildRustPackage.overrideDerivation","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.buildRustPackage.transformDrv","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","transformDrv"],"aliases":[["pkgs","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","buildRebar3","transformDrv"],["pkgs","beamPackages","beamPackages","buildMix","transformDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","transformDrv"],["pkgs","emacsPackages","elpaBuild","transformDrv"],["pkgs","emacsPackages","melpaBuild","transformDrv"],["pkgs","emacsPackages","trivialBuild","transformDrv"],["pkgs","emacsPackages","elpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","melpaBuild","constructDrv","transformDrv"],["pkgs","emacsPackages","trivialBuild","constructDrv","transformDrv"],["lib","id"],["lib","mkFixStrictness"],["lib","modules","mkFixStrictness"],["lib","trivial","id"],["pkgs","rustPackages","rustPlatform","buildRustPackage","transformDrv"]],"signature":"id :: a -> a\n","is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":888,"column":9},"attr_expr":"transformDrv","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":8},"lambda_expr":"id = x: x;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}},"content":{"content":"\nThe identity function\nFor when you need a function that does “nothing”.\n\n# Inputs\n\n`x`\n\n: The value to return\n\n# Type\n\n```\nid :: a -> a\n```\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":63,"column":3},"path":["lib","trivial","id"],"pos_type":"Attribute"}}},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.fetchCargoVendor.override","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","fetchCargoVendor","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.rustPackages.buildRustPackages.rustPlatform.importCargoLock.override","path":["pkgs","rustPackages","buildRustPackages","rustPlatform","importCargoLock","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.stdenv.fetchurlBoot","path":["pkgs","stdenv","fetchurlBoot"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/default.nix","line":213,"column":15},"attr_expr":"fetchurlBoot","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/fetchurl/boot.nix","line":10,"column":1},"lambda_expr":"{\n  url ? builtins.head urls,\n  urls ? [ ],\n  sha256 ? \"\",\n  hash ? \"\",\n  name ? baseNameOf (toString url),\n}:\n\n# assert exactly one hash is set\nassert hash != \"\" || sha256 != \"\";\nassert hash != \"\" -> sha256 == \"\";\n\nimport <nix/fetchurl.nix> {\n  inherit\n    system\n    hash\n    sha256\n    name\n    ;\n\n  url =\n    # Handle mirror:// URIs. Since <nix/fetchurl.nix> currently\n    # supports only one URI, use the first listed mirror.\n    let\n      url_ =\n        let\n          u = rewriteURL url;\n        in\n        if builtins.isString u then\n          u\n        else\n          throw \"rewriteURL deleted the only URL passed to fetchurlBoot (was ${url})\";\n      m = builtins.match \"mirror://([a-z]+)/(.*)\" url_;\n    in\n    if m == null then url_ else builtins.head (mirrors.${builtins.elemAt m 0}) + (builtins.elemAt m 1);\n}","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.stdenv.mkDerivation","path":["pkgs","stdenv","mkDerivation"],"aliases":[["pkgs","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","buildRebar3","constructDrv"],["pkgs","beamPackages","beamPackages","buildMix","constructDrv"],["pkgs","beamPackages","beamPackages","buildRebar3","constructDrv"],["pkgs","rustPackages","rustPlatform","buildRustPackage","constructDrv"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","constructDrv"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/default.nix","line":211,"column":7},"attr_expr":"mkDerivation = mkDerivationFromStdenv stdenv;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"lambda_expr":"mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs);","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","stdenv","mkDerivation"],"pos_type":"Lambda"}},"content":{"content":"\nThis function creates a derivation, and returns it in the form of a [package attribute set](https://nix.dev/manual/nix/latest/glossary#package-attribute-set)\nthat refers to the derivation's outputs.\n\n`mkDerivation` takes many argument attributes, most of which affect the derivation environment,\nbut [`meta`](#chap-meta) and [`passthru`](#var-stdenv-passthru) only directly affect package attributes.\n\nThe `mkDerivation` argument attributes can be made to refer to one another by passing a function to `mkDerivation`.\nSee [Fixed-point argument of `mkDerivation`](#mkderivation-recursive-attributes).\n\nReference documentation see: https://nixos.org/manual/nixpkgs/stable/#sec-using-stdenv\n\n:::{.note}\nThis is used as the fundamental building block of most other functions in Nixpkgs for creating derivations.\n\nMost arguments are also passed through to the underlying call of [`derivation`](https://nixos.org/manual/nix/stable/language/derivations).\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/make-derivation.nix","line":84,"column":18},"path":["pkgs","stdenv","mkDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.stdenv.override","path":["pkgs","stdenv","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.stdenv.overrideDerivation","path":["pkgs","stdenv","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","stdenv","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","stdenv","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.stdenv.overrides","path":["pkgs","stdenv","overrides"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/generic/default.nix","line":215,"column":15},"attr_expr":"overrides","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/linux/default.nix","line":834,"column":11},"lambda_expr":"self: super:\n          {\n            inherit (prevStage)\n              gzip\n              bzip2\n              xz\n              bashNonInteractive\n              coreutils\n              diffutils\n              findutils\n              gawk\n              gnused\n              gnugrep\n              gnupatch\n              patchelf\n              attr\n              acl\n              zlib\n              libunistring\n              ;\n            inherit (prevStage.gnugrep) pcre2;\n            ${localSystem.libc} = prevStage.${localSystem.libc};\n\n            # Hack: avoid libidn2.{bin,dev} referencing bootstrap tools.  There's a logical cycle.\n            libidn2 = import ../../development/libraries/libidn2/no-bootstrap-reference.nix {\n              inherit lib;\n              inherit (prevStage) libidn2;\n              inherit (self)\n                stdenv\n                runCommandLocal\n                patchelf\n                libunistring\n                ;\n            };\n          }\n          // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {\n            # Need to get rid of these when cross-compiling.\n            inherit (prevStage) binutils binutils-unwrapped;\n            gcc = cc;\n          }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/linux/default.nix","line":834,"column":11},"path":["pkgs","stdenv","overrides"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/stdenv/linux/default.nix","line":834,"column":11},"path":["pkgs","stdenv","overrides"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.hasCmakeConfigModules","path":["pkgs","testers","hasCmakeConfigModules"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":256,"column":3},"attr_expr":"hasCmakeConfigModules = callPackage ./hasCmakeConfigModules/tester.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/hasCmakeConfigModules/tester.nix","line":9,"column":1},"lambda_expr":"{\n  package,\n  moduleNames,\n  # Extra nativeBuildInputs needed to pass the cmake find_package test, e.g. pkg-config.\n  nativeBuildInputs ? [ ],\n  # buildInputs is used to help pass the cmake find_package test.\n  # The purpose of buildInputs here is to allow us to iteratively add\n  # any missing dependencies required by the *Config.cmake module\n  # during testing. This allows us to test and fix the CMake setup\n  # without rebuilding the finalPackage each time. Once all required\n  # packages are properly added to the finalPackage's propagateBuildInputs,\n  # this buildInputs should be set to an empty list [].\n  buildInputs ? [ ],\n  # Extra cmakeFlags needed to pass the cmake find_package test.\n  # Can be used to set verbose/debug flags.\n  cmakeFlags ? [ ],\n  testName ? \"check-cmake-config-${package.pname or package.name}\",\n  version ? package.version or null,\n  versionCheck ? false,\n}:\n\nrunCommandCC testName\n  {\n    inherit moduleNames versionCheck cmakeFlags;\n    version = if versionCheck then version else null;\n    nativeBuildInputs = [\n      cmake\n    ]\n    ++ nativeBuildInputs;\n    buildInputs = [ package ] ++ buildInputs;\n    meta = {\n      description = \"Test whether ${package.name} exposes cmake-config modules ${lib.concatStringsSep \", \" moduleNames}\";\n    }\n    # Make sure licensing info etc is preserved, as this is a concern for e.g. cache.nixos.org,\n    # as hydra can't check this meta info in dependencies.\n    # The test itself is just Nixpkgs, with MIT license.\n    // builtins.intersectAttrs {\n      available = throw \"unused\";\n      broken = throw \"unused\";\n      insecure = throw \"unused\";\n      license = throw \"unused\";\n      maintainers = throw \"unused\";\n      teams = throw \"unused\";\n      platforms = throw \"unused\";\n      unfree = throw \"unused\";\n      unsupported = throw \"unused\";\n    } package.meta;\n  }\n  ''\n    touch \"$out\"\n    notFound=0\n    for moduleName in $moduleNames; do\n      echo \"checking cmake-config module $moduleName\"\n\n      cat <<EOF > CMakeLists.txt\n    cmake_minimum_required(VERSION 3.14)\n    project(CheckCmakeModule)\n\n    find_package($moduleName $version EXACT NO_MODULE REQUIRED)\n    EOF\n\n      echoCmd 'cmake flags' $cmakeFlags\n      set +e\n      cmake . $cmakeFlags\n      r=$?\n      set -e\n      if [[ $r = 0 ]]; then\n        echo \"✅ cmake-config module $moduleName exists\"\n      else\n        echo \"❌ cmake-config module $moduleName was not found\"\n        ((notFound+=1))\n      fi\n    done\n\n    if [[ $notFound -ne 0 ]]; then\n      exit 1\n    fi\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/hasCmakeConfigModules/tester.nix","line":9,"column":1},"path":["pkgs","testers","hasCmakeConfigModules"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/hasCmakeConfigModules/tester.nix","line":9,"column":1},"path":["pkgs","testers","hasCmakeConfigModules"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.hasPkgConfigModule","path":["pkgs","testers","hasPkgConfigModule"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":242,"column":3},"attr_expr":"hasPkgConfigModule =\n    { moduleName, ... }@args:\n    lib.warn\n      \"testers.hasPkgConfigModule has been deprecated in favor of testers.hasPkgConfigModules. It accepts a list of strings via the moduleNames argument instead of a single moduleName.\"\n      (\n        testers.hasPkgConfigModules (\n          removeAttrs args [ \"moduleName\" ]\n          // {\n            moduleNames = [ moduleName ];\n          }\n        )\n      );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":243,"column":5},"lambda_expr":"{ moduleName, ... }@args:\n    lib.warn\n      \"testers.hasPkgConfigModule has been deprecated in favor of testers.hasPkgConfigModules. It accepts a list of strings via the moduleNames argument instead of a single moduleName.\"\n      (\n        testers.hasPkgConfigModules (\n          removeAttrs args [ \"moduleName\" ]\n          // {\n            moduleNames = [ moduleName ];\n          }\n        )\n      )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":243,"column":5},"path":["pkgs","testers","hasPkgConfigModule"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":243,"column":5},"path":["pkgs","testers","hasPkgConfigModule"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.hasPkgConfigModules","path":["pkgs","testers","hasPkgConfigModules"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":254,"column":3},"attr_expr":"hasPkgConfigModules = callPackage ./hasPkgConfigModules/tester.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/hasPkgConfigModules/tester.nix","line":9,"column":1},"lambda_expr":"{\n  package,\n  moduleNames ? package.meta.pkgConfigModules,\n  testName ? \"check-pkg-config-${package.pname or package.name}\",\n  version ? package.version or null,\n  versionCheck ? false,\n}:\n\nrunCommand testName\n  {\n    nativeBuildInputs = [ pkg-config ];\n    buildInputs = [ package ];\n    inherit moduleNames version versionCheck;\n    meta = {\n      description = \"Test whether ${package.name} exposes pkg-config modules ${lib.concatStringsSep \", \" moduleNames}\";\n    }\n    # Make sure licensing info etc is preserved, as this is a concern for e.g. cache.nixos.org,\n    # as hydra can't check this meta info in dependencies.\n    # The test itself is just Nixpkgs, with MIT license.\n    // builtins.intersectAttrs {\n      available = throw \"unused\";\n      broken = throw \"unused\";\n      insecure = throw \"unused\";\n      license = throw \"unused\";\n      maintainers = throw \"unused\";\n      teams = throw \"unused\";\n      platforms = throw \"unused\";\n      unfree = throw \"unused\";\n      unsupported = throw \"unused\";\n    } package.meta;\n  }\n  ''\n    touch \"$out\"\n    notFound=0\n    versionMismatch=0\n    for moduleName in $moduleNames; do\n      echo \"checking pkg-config module $moduleName in $buildInputs\"\n      set +e\n      moduleVersion=\"$($PKG_CONFIG --modversion $moduleName)\"\n      r=$?\n      set -e\n      if [[ $r = 0 ]]; then\n        if [[ \"$moduleVersion\" == \"$version\" ]]; then\n          echo \"✅ pkg-config module $moduleName exists and has version $moduleVersion\"\n        else\n          echo \"${\n            if versionCheck then \"❌\" else \"ℹ️\"\n          } pkg-config module $moduleName exists at version $moduleVersion != $version (drv version)\"\n          ((versionMismatch+=1))\n        fi\n        printf '%s\\t%s\\n' \"$moduleName\" \"$version\" >> \"$out\"\n      else\n        echo \"❌ pkg-config module $moduleName was not found\"\n        ((notFound+=1))\n      fi\n    done\n\n    if [[ $notFound -eq 0 ]] && ([[ $versionMismatch -eq 0 ]] || [[ -z \"$versionCheck\" ]]); then\n      exit 0\n    fi\n    if [[ $notFound -ne 0 ]]; then\n      echo \"$notFound modules not found\"\n      echo \"These modules were available in the input propagation closure:\"\n      $PKG_CONFIG --list-all\n    fi\n    if [[ $versionMismatch -ne 0 ]]; then\n      echo \"$versionMismatch version mismatches\"\n    fi\n    exit 1\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/hasPkgConfigModules/tester.nix","line":9,"column":1},"path":["pkgs","testers","hasPkgConfigModules"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/hasPkgConfigModules/tester.nix","line":9,"column":1},"path":["pkgs","testers","hasPkgConfigModules"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.invalidateFetcherByDrvHash","path":["pkgs","testers","invalidateFetcherByDrvHash"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":132,"column":3},"attr_expr":"invalidateFetcherByDrvHash =\n    f: args:\n    let\n      optionalFix = if lib.isFunction args then lib.id else lib.fix;\n      unsalted = f args;\n      drvPath = unsalted.drvPath;\n      # It's safe to discard the context, because we don't access the path.\n      salt = builtins.unsafeDiscardStringContext (lib.substring 0 12 (baseNameOf drvPath));\n      saltName = name: \"${name}-salted-${salt}\";\n      getSaltedNames =\n        args:\n        if args.pname or null != null then\n          { pname = saltName args.pname; }\n        else\n          { name = saltName args.name or \"source\"; };\n      # New derivation incorporating the original drv hash in the name\n      saltedByArgs = f (optionalFix (lib.extends (lib.toExtension getSaltedNames) (lib.toFunction args)));\n      saltedByOverrideAttrs = unsalted.overrideAttrs (previousAttrs: getSaltedNames previousAttrs);\n      saltedByOverrideAttrsForced = unsalted.overrideAttrs (previousAttrs: {\n        name = saltName unsalted.name;\n      });\n      # Make sure we did change the derivation.\n      # If the fetcher ignores `pname` and `name` and provide a broken `overrideAttrs`,\n      # `invalidateFetcherByDrvHash` doesn't work.\n      checked =\n        if saltedByArgs.drvPath != drvPath then\n          saltedByArgs\n        else if saltedByOverrideAttrs.drvPath != drvPath then\n          saltedByOverrideAttrs\n        else if saltedByOverrideAttrsForced.drvPath != drvPath then\n          saltedByOverrideAttrsForced\n        else\n          throw \"invalidateFetcherByDrvHash: Neither adding pname/name to the fetcher args nor overriding with overrideAttrs change the result drvPath.\";\n    in\n    checked;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":133,"column":5},"lambda_expr":"invalidateFetcherByDrvHash =\n    f: args:\n    let\n      optionalFix = if lib.isFunction args then lib.id else lib.fix;\n      unsalted = f args;\n      drvPath = unsalted.drvPath;\n      # It's safe to discard the context, because we don't access the path.\n      salt = builtins.unsafeDiscardStringContext (lib.substring 0 12 (baseNameOf drvPath));\n      saltName = name: \"${name}-salted-${salt}\";\n      getSaltedNames =\n        args:\n        if args.pname or null != null then\n          { pname = saltName args.pname; }\n        else\n          { name = saltName args.name or \"source\"; };\n      # New derivation incorporating the original drv hash in the name\n      saltedByArgs = f (optionalFix (lib.extends (lib.toExtension getSaltedNames) (lib.toFunction args)));\n      saltedByOverrideAttrs = unsalted.overrideAttrs (previousAttrs: getSaltedNames previousAttrs);\n      saltedByOverrideAttrsForced = unsalted.overrideAttrs (previousAttrs: {\n        name = saltName unsalted.name;\n      });\n      # Make sure we did change the derivation.\n      # If the fetcher ignores `pname` and `name` and provide a broken `overrideAttrs`,\n      # `invalidateFetcherByDrvHash` doesn't work.\n      checked =\n        if saltedByArgs.drvPath != drvPath then\n          saltedByArgs\n        else if saltedByOverrideAttrs.drvPath != drvPath then\n          saltedByOverrideAttrs\n        else if saltedByOverrideAttrsForced.drvPath != drvPath then\n          saltedByOverrideAttrsForced\n        else\n          throw \"invalidateFetcherByDrvHash: Neither adding pname/name to the fetcher args nor overriding with overrideAttrs change the result drvPath.\";\n    in\n    checked;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":133,"column":5},"path":["pkgs","testers","invalidateFetcherByDrvHash"],"pos_type":"Lambda"}},"content":{"content":"or doc/build-helpers/testers.chapter.md","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":133,"column":5},"path":["pkgs","testers","invalidateFetcherByDrvHash"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.lycheeLinkCheck","path":["pkgs","testers","lycheeLinkCheck"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":20,"column":42},"attr_expr":"lycheeLinkCheck","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/lychee.nix","line":35,"column":5},"lambda_expr":"lycheeLinkCheck =\n    {\n      site,\n      remap ? { },\n      lychee ? deps.lychee,\n      extraConfig ? { },\n      extraArgs ? [ ],\n    }:\n    stdenv.mkDerivation (finalAttrs: {\n      name = \"lychee-link-check\";\n      __structuredAttrs = true;\n      inherit site;\n      nativeBuildInputs = [\n        finalAttrs.passthru.lychee\n        cacert\n      ];\n      configFile = (formats.toml { }).generate \"lychee.toml\" finalAttrs.passthru.config;\n      inherit extraArgs;\n\n      # These can be overridden with overrideAttrs if needed.\n      passthru = {\n        inherit lychee remap;\n        config = {\n          include_fragments = \"full\";\n        }\n        // lib.optionalAttrs (finalAttrs.passthru.remap != { }) {\n          remap = mapAttrsToList (\n            name: value: withCheckedName name \"${name} ${toURL value}\"\n          ) finalAttrs.passthru.remap;\n        }\n        // extraConfig;\n        online = writeShellApplication {\n          name = \"run-lychee-online\";\n          runtimeInputs = [ finalAttrs.passthru.lychee ];\n          # Comment out to run shellcheck:\n          checkPhase = \"\";\n          text = ''\n            site=${finalAttrs.site}\n            configFile=${finalAttrs.configFile}\n            echo Checking links on $site\n            exec lychee --config $configFile ${lib.escapeShellArgs extraArgs} $site \"$@\"\n          '';\n        };\n      };\n      buildCommand = ''\n        echo Checking internal links on $site\n        lychee --offline --config $configFile \"''${extraArgs[@]}\" $site\n        touch $out\n      '';\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/lychee.nix","line":35,"column":5},"path":["pkgs","testers","lycheeLinkCheck"],"pos_type":"Lambda"}},"content":{"content":"or doc/build-helpers/testers.chapter.md","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/lychee.nix","line":35,"column":5},"path":["pkgs","testers","lycheeLinkCheck"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.nixosTest","path":["pkgs","testers","nixosTest"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":214,"column":3},"attr_expr":"nixosTest =\n    let\n      /*\n        The nixos/lib/testing-python.nix module, preapplied with arguments that\n        make sense for this evaluation of Nixpkgs.\n      */\n      nixosTesting = (\n        import ../../../nixos/lib/testing-python.nix {\n          inherit (stdenv.hostPlatform) system;\n          inherit pkgs;\n          extraConfigurations = [\n            (\n              { lib, ... }:\n              {\n                config.nixpkgs.pkgs = lib.mkDefault pkgsLinux;\n              }\n            )\n          ];\n        }\n      );\n    in\n    test:\n    let\n      loadedTest = if builtins.typeOf test == \"path\" then import test else test;\n      calledTest = lib.toFunction loadedTest pkgs;\n    in\n    nixosTesting.simpleTest calledTest;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":235,"column":5},"lambda_expr":"test:\n    let\n      loadedTest = if builtins.typeOf test == \"path\" then import test else test;\n      calledTest = lib.toFunction loadedTest pkgs;\n    in\n    nixosTesting.simpleTest calledTest","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":235,"column":5},"path":["pkgs","testers","nixosTest"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":235,"column":5},"path":["pkgs","testers","nixosTest"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.override","path":["pkgs","testers","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.overrideDerivation","path":["pkgs","testers","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","testers","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","testers","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.runCommand","path":["pkgs","testers","runCommand"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":169,"column":3},"attr_expr":"runCommand = testers.invalidateFetcherByDrvHash (\n    {\n      hash ? pkgs.emptyFile.outputHash,\n      name,\n      script,\n      stdenv ? stdenvNoCC,\n      ...\n    }@args:\n\n    runCommandWith {\n      inherit name stdenv;\n\n      derivationArgs = {\n        outputHash = hash;\n        outputHashMode = \"recursive\";\n      }\n      // lib.removeAttrs args [\n        \"hash\"\n        \"name\"\n        \"script\"\n        \"stdenv\"\n      ];\n    } script\n  );","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":133,"column":8},"lambda_expr":"args:\n    let\n      optionalFix = if lib.isFunction args then lib.id else lib.fix;\n      unsalted = f args;\n      drvPath = unsalted.drvPath;\n      # It's safe to discard the context, because we don't access the path.\n      salt = builtins.unsafeDiscardStringContext (lib.substring 0 12 (baseNameOf drvPath));\n      saltName = name: \"${name}-salted-${salt}\";\n      getSaltedNames =\n        args:\n        if args.pname or null != null then\n          { pname = saltName args.pname; }\n        else\n          { name = saltName args.name or \"source\"; };\n      # New derivation incorporating the original drv hash in the name\n      saltedByArgs = f (optionalFix (lib.extends (lib.toExtension getSaltedNames) (lib.toFunction args)));\n      saltedByOverrideAttrs = unsalted.overrideAttrs (previousAttrs: getSaltedNames previousAttrs);\n      saltedByOverrideAttrsForced = unsalted.overrideAttrs (previousAttrs: {\n        name = saltName unsalted.name;\n      });\n      # Make sure we did change the derivation.\n      # If the fetcher ignores `pname` and `name` and provide a broken `overrideAttrs`,\n      # `invalidateFetcherByDrvHash` doesn't work.\n      checked =\n        if saltedByArgs.drvPath != drvPath then\n          saltedByArgs\n        else if saltedByOverrideAttrs.drvPath != drvPath then\n          saltedByOverrideAttrs\n        else if saltedByOverrideAttrsForced.drvPath != drvPath then\n          saltedByOverrideAttrsForced\n        else\n          throw \"invalidateFetcherByDrvHash: Neither adding pname/name to the fetcher args nor overriding with overrideAttrs change the result drvPath.\";\n    in\n    checked","count_applied":1,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.runNixOSTest","path":["pkgs","testers","runNixOSTest"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":196,"column":3},"attr_expr":"runNixOSTest =\n    let\n      nixos = import ../../../nixos/lib {\n        inherit lib;\n      };\n    in\n    testModule:\n    nixos.runTest {\n      _file = \"pkgs.runNixOSTest implementation\";\n      imports = [\n        (lib.setDefaultModuleLocation \"the argument that was passed to pkgs.runNixOSTest\" testModule)\n      ];\n      hostPkgs = pkgs;\n      node.pkgs = pkgsLinux;\n    };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":202,"column":5},"lambda_expr":"testModule:\n    nixos.runTest {\n      _file = \"pkgs.runNixOSTest implementation\";\n      imports = [\n        (lib.setDefaultModuleLocation \"the argument that was passed to pkgs.runNixOSTest\" testModule)\n      ];\n      hostPkgs = pkgs;\n      node.pkgs = pkgsLinux;\n    }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":202,"column":5},"path":["pkgs","testers","runNixOSTest"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":202,"column":5},"path":["pkgs","testers","runNixOSTest"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.shellcheck","path":["pkgs","testers","shellcheck"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":260,"column":3},"attr_expr":"shellcheck = callPackage ./shellcheck/tester.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/shellcheck/tester.nix","line":11,"column":1},"lambda_expr":"{\n  name ? null,\n  src,\n}:\nstdenvNoCC.mkDerivation {\n  __structuredAttrs = true;\n  strictDeps = true;\n  name =\n    if name == null then\n      lib.warn \"testers.shellcheck: name will be required in a future release, defaulting to run-shellcheck\" \"run-shellcheck\"\n    else\n      \"shellcheck-${name}\";\n  inherit src;\n  dontUnpack = true; # Unpack phase tries to extract an archive, which we don't want to do with source trees\n  nativeBuildInputs = [ shellcheck ];\n  doCheck = true;\n  dontConfigure = true;\n  dontBuild = true;\n  checkPhase = ''\n    find \"$src\" -type f -print0 | xargs -0 shellcheck --source-path=\"$src\"\n  '';\n  installPhase = ''\n    touch \"$out\"\n  '';\n}","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/shellcheck/tester.nix","line":11,"column":1},"path":["pkgs","testers","shellcheck"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/shellcheck/tester.nix","line":11,"column":1},"path":["pkgs","testers","shellcheck"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.shfmt","path":["pkgs","testers","shfmt"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":262,"column":3},"attr_expr":"shfmt = callPackage ./shfmt { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/shfmt/default.nix","line":8,"column":1},"lambda_expr":"{\n  name,\n  src,\n  indent ? 2,\n}:\nstdenvNoCC.mkDerivation (finalAttrs: {\n  __structuredAttrs = true;\n  strictDeps = true;\n  inherit src indent;\n  name = \"shfmt-${name}\";\n  dontUnpack = true; # Unpack phase tries to extract archive\n  nativeBuildInputs = [ shfmt ];\n  doCheck = true;\n  dontConfigure = true;\n  dontBuild = true;\n  checkPhase = ''\n    shfmt --diff --indent $indent --simplify \"$src\"\n  '';\n  installPhase = ''\n    touch \"$out\"\n  '';\n})","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/shfmt/default.nix","line":8,"column":1},"path":["pkgs","testers","shfmt"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/shfmt/default.nix","line":8,"column":1},"path":["pkgs","testers","shfmt"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testBuildFailure","path":["pkgs","testers","testBuildFailure"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":24,"column":3},"attr_expr":"testBuildFailure =\n    drv:\n    drv.overrideAttrs (orig: {\n      builder = buildPackages.bash;\n      args = [\n        (replaceVars ./expect-failure.sh {\n          coreutils = buildPackages.coreutils;\n          vars = lib.toShellVars {\n            outputNames = (orig.outputs or [ \"out\" ]);\n          };\n        })\n        orig.realBuilder or stdenv.shell\n      ]\n      ++ orig.args or [\n        \"-e\"\n        ../../stdenv/generic/source-stdenv.sh\n        (orig.builder or ../../stdenv/generic/default-builder.sh)\n      ];\n    });","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":25,"column":5},"lambda_expr":"testBuildFailure =\n    drv:\n    drv.overrideAttrs (orig: {\n      builder = buildPackages.bash;\n      args = [\n        (replaceVars ./expect-failure.sh {\n          coreutils = buildPackages.coreutils;\n          vars = lib.toShellVars {\n            outputNames = (orig.outputs or [ \"out\" ]);\n          };\n        })\n        orig.realBuilder or stdenv.shell\n      ]\n      ++ orig.args or [\n        \"-e\"\n        ../../stdenv/generic/source-stdenv.sh\n        (orig.builder or ../../stdenv/generic/default-builder.sh)\n      ];\n    });","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":25,"column":5},"path":["pkgs","testers","testBuildFailure"],"pos_type":"Lambda"}},"content":{"content":"or doc/build-helpers/testers.chapter.md","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":25,"column":5},"path":["pkgs","testers","testBuildFailure"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testBuildFailure' (Prime)","path":["pkgs","testers","testBuildFailure'"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":46,"column":3},"attr_expr":"testBuildFailure' = callPackage ./testBuildFailurePrime { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testBuildFailurePrime/default.nix","line":9,"column":3},"lambda_expr":"{\n    drv,\n    name ? \"testBuildFailure-${drv.name}\",\n    expectedBuilderExitCode ? 1,\n    expectedBuilderLogEntries ? [ ],\n    script ? \"\",\n  }:\n  stdenvNoCC.mkDerivation (finalAttrs: {\n    __structuredAttrs = true;\n    strictDeps = true;\n\n    inherit name;\n\n    nativeBuildInputs = [ finalAttrs.failed ];\n\n    failed = testers.testBuildFailure drv;\n\n    inherit expectedBuilderExitCode expectedBuilderLogEntries;\n\n    inherit script;\n\n    buildCommandPath = ./build-command.sh;\n\n    meta = {\n      description = \"Wrapper around testers.testBuildFailure to simplify common use cases\";\n      maintainers = [ lib.maintainers.connorbaker ];\n    };\n  })","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testBuildFailurePrime/default.nix","line":9,"column":3},"path":["pkgs","testers","testBuildFailure'"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testBuildFailurePrime/default.nix","line":9,"column":3},"path":["pkgs","testers","testBuildFailure'"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testEqualArrayOrMap","path":["pkgs","testers","testEqualArrayOrMap"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":97,"column":3},"attr_expr":"testEqualArrayOrMap = callPackage ./testEqualArrayOrMap { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testEqualArrayOrMap/default.nix","line":7,"column":3},"lambda_expr":"{\n    name,\n    valuesArray ? null,\n    valuesMap ? null,\n    expectedArray ? null,\n    expectedMap ? null,\n    script,\n  }:\n  assert lib.assertMsg (\n    expectedArray != null || expectedMap != null\n  ) \"testEqualArrayOrMap: at least one of 'expectedArray' or 'expectedMap' must be provided\";\n  stdenvNoCC.mkDerivation {\n    __structuredAttrs = true;\n    strictDeps = true;\n\n    inherit name;\n\n    nativeBuildInputs = [\n      arrayUtilities.isDeclaredArray\n      ./assert-equal-array.sh\n      arrayUtilities.isDeclaredMap\n      arrayUtilities.getSortedMapKeys\n      ./assert-equal-map.sh\n    ];\n\n    inherit valuesArray valuesMap;\n    inherit expectedArray expectedMap;\n\n    inherit script;\n\n    buildCommandPath = ./build-command.sh;\n  }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testEqualArrayOrMap/default.nix","line":7,"column":3},"path":["pkgs","testers","testEqualArrayOrMap"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testEqualArrayOrMap/default.nix","line":7,"column":3},"path":["pkgs","testers","testEqualArrayOrMap"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testEqualContents","path":["pkgs","testers","testEqualContents"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":54,"column":3},"attr_expr":"testEqualContents =\n    {\n      assertion,\n      actual,\n      expected,\n      postFailureMessage ? null,\n      checkMetadata ? true,\n    }:\n    runCommand \"equal-contents-${lib.strings.toLower assertion}\"\n      {\n        inherit\n          assertion\n          actual\n          expected\n          postFailureMessage\n          ;\n        excludeMetadata = if checkMetadata then \"no\" else \"yes\";\n        nativeBuildInputs = [ diffoscopeMinimal ];\n      }\n      ''\n        echo \"Checking:\"\n        printf '%s\\n' \"$assertion\"\n        if ! diffoscope --no-progress --text-color=always --exclude-directory-metadata=\"$excludeMetadata\" -- \"$actual\" \"$expected\"\n        then\n          echo\n          echo 'Contents must be equal, but were not!'\n          if [[ -n \"''${postFailureMessage:-}\" ]]; then\n            echo\n            echo \"$postFailureMessage\"\n          fi\n          echo\n          echo \"+: expected,   at $expected\"\n          echo \"-: unexpected, at $actual\"\n          false\n        else\n          echo \"expected $expected and actual $actual match.\"\n          echo OK\n          touch -- \"$out\"\n        fi\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":55,"column":5},"lambda_expr":"testEqualContents =\n    {\n      assertion,\n      actual,\n      expected,\n      postFailureMessage ? null,\n      checkMetadata ? true,\n    }:\n    runCommand \"equal-contents-${lib.strings.toLower assertion}\"\n      {\n        inherit\n          assertion\n          actual\n          expected\n          postFailureMessage\n          ;\n        excludeMetadata = if checkMetadata then \"no\" else \"yes\";\n        nativeBuildInputs = [ diffoscopeMinimal ];\n      }\n      ''\n        echo \"Checking:\"\n        printf '%s\\n' \"$assertion\"\n        if ! diffoscope --no-progress --text-color=always --exclude-directory-metadata=\"$excludeMetadata\" -- \"$actual\" \"$expected\"\n        then\n          echo\n          echo 'Contents must be equal, but were not!'\n          if [[ -n \"''${postFailureMessage:-}\" ]]; then\n            echo\n            echo \"$postFailureMessage\"\n          fi\n          echo\n          echo \"+: expected,   at $expected\"\n          echo \"-: unexpected, at $actual\"\n          false\n        else\n          echo \"expected $expected and actual $actual match.\"\n          echo OK\n          touch -- \"$out\"\n        fi\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":55,"column":5},"path":["pkgs","testers","testEqualContents"],"pos_type":"Lambda"}},"content":{"content":"or doc/build-helpers/testers.chapter.md","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":55,"column":5},"path":["pkgs","testers","testEqualContents"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testEqualDerivation","path":["pkgs","testers","testEqualDerivation"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":50,"column":3},"attr_expr":"testEqualDerivation = callPackage ./test-equal-derivation.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/test-equal-derivation.nix","line":8,"column":1},"lambda_expr":"assertion: a: b:\nlet\n  drvA =\n    builtins.unsafeDiscardOutputDependency\n      a.drvPath or (throw \"testEqualDerivation second argument must be a package\");\n  drvB =\n    builtins.unsafeDiscardOutputDependency\n      b.drvPath or (throw \"testEqualDerivation third argument must be a package\");\n  name = if a ? name then \"testEqualDerivation-${a.name}\" else \"testEqualDerivation\";\nin\nif drvA == drvB then\n  emptyFile\nelse\n  runCommand name\n    {\n      inherit assertion drvA drvB;\n      nativeBuildInputs = [ nix-diff ];\n    }\n    ''\n      echo \"$assertion\"\n      echo \"However, the derivations differ:\"\n      echo\n      echo nix-diff $drvA $drvB\n      nix-diff $drvA $drvB\n      exit 1\n    ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/test-equal-derivation.nix","line":8,"column":1},"path":["pkgs","testers","testEqualDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/test-equal-derivation.nix","line":8,"column":1},"path":["pkgs","testers","testEqualDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testMetaPkgConfig","path":["pkgs","testers","testMetaPkgConfig"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":258,"column":3},"attr_expr":"testMetaPkgConfig = callPackage ./testMetaPkgConfig/tester.nix { };","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testMetaPkgConfig/tester.nix","line":7,"column":1},"lambda_expr":"package:\n\nrunCommand \"check-meta-pkg-config-modules-for-${package.name}\"\n  {\n    meta = {\n      description = \"Test whether ${package.name} exposes all pkg-config modules ${toString package.meta.pkgConfigModules}\";\n    };\n    dependsOn = testers.hasPkgConfigModules { inherit package; };\n  }\n  ''\n    echo \"found all of ${toString package.meta.pkgConfigModules}\" > \"$out\"\n  ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testMetaPkgConfig/tester.nix","line":7,"column":1},"path":["pkgs","testers","testMetaPkgConfig"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/testMetaPkgConfig/tester.nix","line":7,"column":1},"path":["pkgs","testers","testMetaPkgConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testVersion","path":["pkgs","testers","testVersion"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":101,"column":3},"attr_expr":"testVersion =\n    {\n      package,\n      command ? \"${package.meta.mainProgram or package.pname or package.name} --version\",\n      version ? package.version,\n    }:\n    runCommand \"${package.name}-test-version\"\n      {\n        nativeBuildInputs = [ package ];\n        meta.timeout = 60;\n      }\n      ''\n        if output=$(${command} 2>&1 | sed -e 's|${builtins.storeDir}/[^/ ]*/|{{storeDir}}/|g'); then\n          if grep -Fw -- \"${version}\" - <<< \"$output\"; then\n            touch $out\n          else\n            echo \"Version string '${version}' not found!\" >&2\n            echo \"The output was:\" >&2\n            echo \"$output\" >&2\n            exit 1\n          fi\n        else\n          echo -n ${lib.escapeShellArg command} >&2\n          echo \" returned a non-zero exit code.\" >&2\n          echo \"$output\" >&2\n          exit 1\n        fi\n      '';","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":102,"column":5},"lambda_expr":"testVersion =\n    {\n      package,\n      command ? \"${package.meta.mainProgram or package.pname or package.name} --version\",\n      version ? package.version,\n    }:\n    runCommand \"${package.name}-test-version\"\n      {\n        nativeBuildInputs = [ package ];\n        meta.timeout = 60;\n      }\n      ''\n        if output=$(${command} 2>&1 | sed -e 's|${builtins.storeDir}/[^/ ]*/|{{storeDir}}/|g'); then\n          if grep -Fw -- \"${version}\" - <<< \"$output\"; then\n            touch $out\n          else\n            echo \"Version string '${version}' not found!\" >&2\n            echo \"The output was:\" >&2\n            echo \"$output\" >&2\n            exit 1\n          fi\n        else\n          echo -n ${lib.escapeShellArg command} >&2\n          echo \" returned a non-zero exit code.\" >&2\n          echo \"$output\" >&2\n          exit 1\n        fi\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":102,"column":5},"path":["pkgs","testers","testVersion"],"pos_type":"Lambda"}},"content":{"content":"or doc/build-helpers/testers.chapter.md","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/testers/default.nix","line":102,"column":5},"path":["pkgs","testers","testVersion"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.hasCmakeConfigModules.override","path":["pkgs","testers","hasCmakeConfigModules","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.hasPkgConfigModules.override","path":["pkgs","testers","hasPkgConfigModules","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.shellcheck.override","path":["pkgs","testers","shellcheck","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.shfmt.override","path":["pkgs","testers","shfmt","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.testBuildFailure' (Prime).override","path":["pkgs","testers","testBuildFailure'","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.testBuildFailure' (Prime).overrideDerivation","path":["pkgs","testers","testBuildFailure'","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","testers","testBuildFailure'","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","testers","testBuildFailure'","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testEqualArrayOrMap.override","path":["pkgs","testers","testEqualArrayOrMap","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.testEqualArrayOrMap.overrideDerivation","path":["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","vmTools","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.testers.testEqualDerivation.override","path":["pkgs","testers","testEqualDerivation","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.testers.testMetaPkgConfig.override","path":["pkgs","testers","testMetaPkgConfig","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":197,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.buildRPM","path":["pkgs","vmTools","buildRPM"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1578,"column":5},"attr_expr":"buildRPM","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":637,"column":5},"lambda_expr":"buildRPM =\n    attrs:\n    runInLinuxImage (\n      stdenv.mkDerivation (\n        {\n          prePhases = [\n            \"prepareImagePhase\"\n            \"sysInfoPhase\"\n          ];\n          dontConfigure = true;\n\n          outDir = \"rpms/${attrs.diskImage.name}\";\n\n          prepareImagePhase = ''\n            if test -n \"$extraRPMs\"; then\n              for rpmdir in $extraRPMs ; do\n                rpm -iv $(ls $rpmdir/rpms/*/*.rpm | grep -v 'src\\.rpm' | sort | head -1)\n              done\n            fi\n          '';\n\n          sysInfoPhase = ''\n            echo \"System/kernel: $(uname -a)\"\n            if test -e /etc/fedora-release; then echo \"Fedora release: $(cat /etc/fedora-release)\"; fi\n            if test -e /etc/SuSE-release; then echo \"SUSE release: $(cat /etc/SuSE-release)\"; fi\n            echo \"installed RPM packages\"\n            rpm -qa --qf \"%{Name}-%{Version}-%{Release} (%{Arch}; %{Distribution}; %{Vendor})\\n\"\n          '';\n\n          buildPhase = ''\n            eval \"$preBuild\"\n\n            srcName=\"$(rpmspec --srpm -q --qf '%{source}' *.spec)\"\n            cp \"$src\" \"$srcName\" # `ln' doesn't work always work: RPM requires that the file is owned by root\n\n            export HOME=/tmp/home\n            mkdir $HOME\n\n            rpmout=/tmp/rpmout\n            mkdir $rpmout $rpmout/SPECS $rpmout/BUILD $rpmout/RPMS $rpmout/SRPMS\n\n            echo \"%_topdir $rpmout\" >> $HOME/.rpmmacros\n\n            if [ `uname -m` = i686 ]; then extra=\"--target i686-linux\"; fi\n            rpmbuild -vv $extra -ta \"$srcName\"\n\n            eval \"$postBuild\"\n          '';\n\n          installPhase = ''\n            eval \"$preInstall\"\n\n            mkdir -p $out/$outDir\n            find $rpmout -name \"*.rpm\" -exec cp {} $out/$outDir \\;\n\n            for i in $out/$outDir/*.rpm; do\n              echo \"Generated RPM/SRPM: $i\"\n              rpm -qip $i\n            done\n\n            eval \"$postInstall\"\n          ''; # */\n        }\n        // attrs\n      )\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":637,"column":5},"path":["pkgs","vmTools","buildRPM"],"pos_type":"Lambda"}},"content":{"content":"\nBuild RPM packages from the tarball `src' in the Linux\ndistribution installed in the filesystem `diskImage'.  The\ntarball must contain an RPM specfile.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":637,"column":5},"path":["pkgs","vmTools","buildRPM"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.createEmptyImage","path":["pkgs","vmTools","createEmptyImage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1583,"column":5},"attr_expr":"createEmptyImage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":334,"column":5},"lambda_expr":"createEmptyImage =\n    {\n      # Disk image size in MiB (1024*1024 bytes)\n      size,\n      # Name that will be written to ${destination}/nix-support/full-name\n      fullName,\n      # Where to write the image files, defaulting to $out\n      destination ? \"$out\",\n    }:\n    ''\n      mkdir -p ${destination}\n      diskImage=${destination}/disk-image.qcow2\n      ${qemu}/bin/qemu-img create -f qcow2 $diskImage \"${toString size}M\"\n\n      mkdir ${destination}/nix-support\n      echo \"${fullName}\" > ${destination}/nix-support/full-name\n    '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":334,"column":5},"path":["pkgs","vmTools","createEmptyImage"],"pos_type":"Lambda"}},"content":{"content":"A bash script fragment that produces a disk image at `destination`.","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":334,"column":5},"path":["pkgs","vmTools","createEmptyImage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.debClosureGenerator","path":["pkgs","vmTools","debClosureGenerator"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1584,"column":5},"attr_expr":"debClosureGenerator","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":931,"column":5},"lambda_expr":"debClosureGenerator =\n    {\n      name,\n      packagesLists,\n      urlPrefix,\n      packages,\n    }:\n\n    runCommand \"${name}.nix\"\n      {\n        nativeBuildInputs = [\n          buildPackages.perl\n          buildPackages.dpkg\n          buildPackages.nixfmt\n        ];\n      }\n      ''\n        for i in ${toString packagesLists}; do\n          echo \"adding $i...\"\n          case $i in\n            *.xz | *.lzma)\n              xz -d < $i >> ./Packages\n              ;;\n            *.bz2)\n              bunzip2 < $i >> ./Packages\n              ;;\n            *.gz)\n              gzip -dc < $i >> ./Packages\n              ;;\n          esac\n        done\n\n        perl -w ${deb/deb-closure.pl} \\\n          ./Packages ${urlPrefix} ${toString packages} > $out\n        nixfmt $out\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":931,"column":5},"path":["pkgs","vmTools","debClosureGenerator"],"pos_type":"Lambda"}},"content":{"content":"\nLike `rpmClosureGenerator', but now for Debian/Ubuntu releases\n(i.e. generate a closure from a Packages.bz2 file).\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":931,"column":5},"path":["pkgs","vmTools","debClosureGenerator"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.extractFs","path":["pkgs","vmTools","extractFs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1590,"column":5},"attr_expr":"extractFs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":412,"column":5},"lambda_expr":"{\n      file,\n      fs ? null,\n    }:\n    runInLinuxVM (\n      stdenv.mkDerivation {\n        name = \"extract-file\";\n        buildInputs = [ util-linux ];\n        buildCommand = ''\n          ln -s ${kernel}/lib /lib\n          ${kmod}/bin/modprobe loop\n          ${kmod}/bin/modprobe ext4\n          ${kmod}/bin/modprobe hfs\n          ${kmod}/bin/modprobe hfsplus\n          ${kmod}/bin/modprobe squashfs\n          ${kmod}/bin/modprobe iso9660\n          ${kmod}/bin/modprobe ufs\n          ${kmod}/bin/modprobe cramfs\n\n          mkdir -p $out\n          mkdir -p tmp\n          mount -o loop,ro,ufstype=44bsd ${lib.optionalString (fs != null) \"-t ${fs} \"}${file} tmp ||\n            mount -o loop,ro ${lib.optionalString (fs != null) \"-t ${fs} \"}${file} tmp\n          cp -Rv tmp/* $out/ || exit 0\n        '';\n      }\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":412,"column":5},"path":["pkgs","vmTools","extractFs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":412,"column":5},"path":["pkgs","vmTools","extractFs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.extractMTDfs","path":["pkgs","vmTools","extractMTDfs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1591,"column":5},"attr_expr":"extractMTDfs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":441,"column":5},"lambda_expr":"{\n      file,\n      fs ? null,\n    }:\n    runInLinuxVM (\n      stdenv.mkDerivation {\n        name = \"extract-file-mtd\";\n        buildInputs = [\n          util-linux\n          mtdutils\n        ];\n        buildCommand = ''\n          ln -s ${kernel}/lib /lib\n          ${kmod}/bin/modprobe mtd\n          ${kmod}/bin/modprobe mtdram total_size=131072\n          ${kmod}/bin/modprobe mtdchar\n          ${kmod}/bin/modprobe mtdblock\n          ${kmod}/bin/modprobe jffs2\n          ${kmod}/bin/modprobe zlib\n\n          mkdir -p $out\n          mkdir -p tmp\n\n          dd if=${file} of=/dev/mtd0\n          mount ${lib.optionalString (fs != null) \"-t ${fs} \"}/dev/mtdblock0 tmp\n\n          cp -R tmp/* $out/\n        '';\n      }\n    )","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":441,"column":5},"path":["pkgs","vmTools","extractMTDfs"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":441,"column":5},"path":["pkgs","vmTools","extractMTDfs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.fillDiskWithDebs","path":["pkgs","vmTools","fillDiskWithDebs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1592,"column":5},"attr_expr":"fillDiskWithDebs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":711,"column":5},"lambda_expr":"fillDiskWithDebs =\n    {\n      size ? 4096,\n      debs,\n      name,\n      fullName,\n      postInstall ? null,\n      createRootFS ? defaultCreateRootFS,\n      QEMU_OPTS ? \"\",\n      memSize ? 512,\n      ...\n    }@args:\n\n    runInLinuxVM (\n      stdenv.mkDerivation (\n        {\n          inherit\n            name\n            postInstall\n            QEMU_OPTS\n            memSize\n            ;\n\n          debsFlat = lib.flatten debs;\n          debsGrouped = map toString debs;\n\n          preVM = createEmptyImage { inherit size fullName; };\n\n          buildCommand = ''\n            ${createRootFS}\n\n            PATH=$PATH:${\n              lib.makeBinPath [\n                dpkg\n                glibc\n                xz\n              ]\n            }\n\n            # Unpack the .debs.  We do this to prevent pre-install scripts\n            # (which have lots of circular dependencies) from barfing.\n            echo \"unpacking Debs...\"\n\n            for deb in \"''${debsFlat[@]}\"; do\n              echo \"$deb...\"\n              dpkg-deb --extract \"$deb\" /mnt\n            done\n\n            # Make the Nix store available in /mnt, because that's where the .debs live.\n            mkdir -p /mnt/inst${storeDir}\n            ${util-linux}/bin/mount -o bind ${storeDir} /mnt/inst${storeDir}\n            ${util-linux}/bin/mount -o bind /proc /mnt/proc\n            ${util-linux}/bin/mount -o bind /dev /mnt/dev\n\n            # Misc. files/directories assumed by various packages.\n            echo \"initialising Dpkg DB...\"\n            touch /mnt/etc/shells\n            touch /mnt/var/lib/dpkg/status\n            touch /mnt/var/lib/dpkg/available\n            touch /mnt/var/lib/dpkg/diversions\n\n            # Now install the .debs.  This is basically just to register\n            # them with dpkg and to make their pre/post-install scripts\n            # run.\n            echo \"installing Debs...\"\n\n            export DEBIAN_FRONTEND=noninteractive\n\n            for component in \"''${debsGrouped[@]}\"; do\n              echo\n              echo \">>> INSTALLING COMPONENT: $component\"\n              debs=\n              for i in $component; do\n                debs=\"$debs /inst/$i\";\n              done\n              chroot=$(type -tP chroot)\n\n              # Create a fake start-stop-daemon script, as done in debootstrap.\n              mv \"/mnt/sbin/start-stop-daemon\" \"/mnt/sbin/start-stop-daemon.REAL\"\n              echo \"#!/bin/true\" > \"/mnt/sbin/start-stop-daemon\"\n              chmod 755 \"/mnt/sbin/start-stop-daemon\"\n\n              PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \\\n                /usr/bin/dpkg --install --force-all $debs < /dev/null || true\n\n              # Move the real start-stop-daemon back into its place.\n              mv \"/mnt/sbin/start-stop-daemon.REAL\" \"/mnt/sbin/start-stop-daemon\"\n            done\n\n            echo \"running post-install script...\"\n            eval \"$postInstall\"\n\n            rm /mnt/.debug\n\n            ${util-linux}/bin/umount /mnt/inst${storeDir}\n            ${util-linux}/bin/umount /mnt/proc\n            ${util-linux}/bin/umount /mnt/dev\n            ${util-linux}/bin/umount /mnt\n          '';\n\n          passthru = { inherit fullName; };\n        }\n        // args\n      )\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":711,"column":5},"path":["pkgs","vmTools","fillDiskWithDebs"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a filesystem image of the specified size and fill it with\na set of Debian packages.  `debs' must be a list of list of\n.deb files, namely, the Debian packages grouped together into\nstrongly connected components.  See deb/deb-closure.nix.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":711,"column":5},"path":["pkgs","vmTools","fillDiskWithDebs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.fillDiskWithRPMs","path":["pkgs","vmTools","fillDiskWithRPMs"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1593,"column":5},"attr_expr":"fillDiskWithRPMs","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":520,"column":5},"lambda_expr":"fillDiskWithRPMs =\n    {\n      size ? 4096,\n      rpms,\n      name,\n      fullName,\n      preInstall ? \"\",\n      postInstall ? \"\",\n      runScripts ? true,\n      createRootFS ? defaultCreateRootFS,\n      QEMU_OPTS ? \"\",\n      memSize ? 512,\n      unifiedSystemDir ? false,\n    }:\n\n    runInLinuxVM (\n      stdenv.mkDerivation {\n        inherit\n          name\n          preInstall\n          postInstall\n          rpms\n          QEMU_OPTS\n          memSize\n          ;\n        preVM = createEmptyImage { inherit size fullName; };\n\n        buildCommand = ''\n          ${createRootFS}\n\n          chroot=$(type -tP chroot)\n\n          # Make the Nix store available in /mnt, because that's where the RPMs live.\n          mkdir -p /mnt${storeDir}\n          ${util-linux}/bin/mount -o bind ${storeDir} /mnt${storeDir}\n          # Some programs may require devices in /dev to be available (e.g. /dev/random)\n          ${util-linux}/bin/mount -o bind /dev /mnt/dev\n\n          # Newer distributions like Fedora 18 require /lib etc. to be\n          # symlinked to /usr.\n          ${lib.optionalString unifiedSystemDir ''\n            mkdir -p /mnt/usr/bin /mnt/usr/lib /mnt/usr/lib64\n            ln -s /usr/bin /mnt/bin\n            ln -s /usr/bin /mnt/sbin\n            ln -s /usr/bin /mnt/usr/sbin\n            ln -s /usr/lib /mnt/lib\n            ln -s /usr/lib64 /mnt/lib64\n            ${util-linux}/bin/mount -t proc none /mnt/proc\n          ''}\n\n          echo \"unpacking RPMs...\"\n          set +o pipefail\n          for i in \"''${rpms[@]}\"; do\n              echo \"$i...\"\n              ${rpm}/bin/rpm2cpio \"$i\" | chroot /mnt ${cpio}/bin/cpio -i --make-directories --unconditional\n          done\n\n          eval \"$preInstall\"\n\n          echo \"initialising RPM DB...\"\n          PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \\\n            ldconfig -v || true\n          PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \\\n            rpm --initdb\n\n          ${util-linux}/bin/mount -o bind /tmp /mnt/tmp\n\n          echo \"installing RPMs...\"\n          PATH=/usr/bin:/bin:/usr/sbin:/sbin $chroot /mnt \\\n            rpm -iv --nosignature ${lib.optionalString (!runScripts) \"--noscripts\"} \"''${rpms[@]}\"\n\n          echo \"running post-install script...\"\n          eval \"$postInstall\"\n\n          rm /mnt/.debug\n\n          ${util-linux}/bin/umount /mnt${storeDir} /mnt/tmp /mnt/dev ${lib.optionalString unifiedSystemDir \"/mnt/proc\"}\n          ${util-linux}/bin/umount /mnt\n        '';\n\n        passthru = { inherit fullName; };\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":520,"column":5},"path":["pkgs","vmTools","fillDiskWithRPMs"],"pos_type":"Lambda"}},"content":{"content":"\nCreate a filesystem image of the specified size and fill it with\na set of RPM packages.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":520,"column":5},"path":["pkgs","vmTools","fillDiskWithRPMs"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.makeImageFromDebDist","path":["pkgs","vmTools","makeImageFromDebDist"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1597,"column":5},"attr_expr":"makeImageFromDebDist","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":974,"column":5},"lambda_expr":"makeImageFromDebDist =\n    {\n      name,\n      fullName,\n      size ? 4096,\n      urlPrefix,\n      packagesList ? \"\",\n      packagesLists ? [ packagesList ],\n      packages,\n      extraPackages ? [ ],\n      postInstall ? \"\",\n      extraDebs ? [ ],\n      createRootFS ? defaultCreateRootFS,\n      QEMU_OPTS ? \"\",\n      memSize ? 512,\n      ...\n    }@args:\n\n    let\n      expr = debClosureGenerator {\n        inherit name packagesLists urlPrefix;\n        packages = packages ++ extraPackages;\n      };\n    in\n    (fillDiskWithDebs (\n      {\n        inherit\n          name\n          fullName\n          size\n          postInstall\n          createRootFS\n          QEMU_OPTS\n          memSize\n          ;\n        debs = import expr { inherit fetchurl; } ++ extraDebs;\n      }\n      // args\n    ))\n    // {\n      inherit expr;\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":974,"column":5},"path":["pkgs","vmTools","makeImageFromDebDist"],"pos_type":"Lambda"}},"content":{"content":"\nHelper function that combines debClosureGenerator and\nfillDiskWithDebs to generate a disk image from a set of package\nnames.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":974,"column":5},"path":["pkgs","vmTools","makeImageFromDebDist"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.makeImageFromRPMDist","path":["pkgs","vmTools","makeImageFromRPMDist"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1598,"column":5},"attr_expr":"makeImageFromRPMDist","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":878,"column":5},"lambda_expr":"makeImageFromRPMDist =\n    {\n      name,\n      fullName,\n      size ? 4096,\n      urlPrefix ? \"\",\n      urlPrefixes ? [ urlPrefix ],\n      packagesList ? \"\",\n      packagesLists ? [ packagesList ],\n      packages,\n      extraPackages ? [ ],\n      preInstall ? \"\",\n      postInstall ? \"\",\n      archs ? [\n        \"noarch\"\n        \"i386\"\n      ],\n      runScripts ? true,\n      createRootFS ? defaultCreateRootFS,\n      QEMU_OPTS ? \"\",\n      memSize ? 512,\n      unifiedSystemDir ? false,\n    }:\n\n    fillDiskWithRPMs {\n      inherit\n        name\n        fullName\n        size\n        preInstall\n        postInstall\n        runScripts\n        createRootFS\n        unifiedSystemDir\n        QEMU_OPTS\n        memSize\n        ;\n      rpms = import (rpmClosureGenerator {\n        inherit\n          name\n          packagesLists\n          urlPrefixes\n          archs\n          ;\n        packages = packages ++ extraPackages;\n      }) { inherit fetchurl; };\n    };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":878,"column":5},"path":["pkgs","vmTools","makeImageFromRPMDist"],"pos_type":"Lambda"}},"content":{"content":"\nHelper function that combines rpmClosureGenerator and\nfillDiskWithRPMs to generate a disk image from a set of package\nnames.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":878,"column":5},"path":["pkgs","vmTools","makeImageFromRPMDist"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.makeImageTestScript","path":["pkgs","vmTools","makeImageTestScript"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1599,"column":5},"attr_expr":"makeImageTestScript","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":609,"column":5},"lambda_expr":"makeImageTestScript =\n    image:\n    writeScript \"image-test\" ''\n      #! ${bash}/bin/sh\n      if test -z \"$1\"; then\n        echo \"Syntax: $0 <copy-on-write-temp-file>\"\n        exit 1\n      fi\n      diskImage=\"$1\"\n      if ! test -e \"$diskImage\"; then\n        ${qemu}/bin/qemu-img create -b ${image}/disk-image.qcow2 -f qcow2 -F qcow2 \"$diskImage\"\n      fi\n      export TMPDIR=$(mktemp -d)\n      export out=/dummy\n      export origBuilder=\n      export origArgs=\n      mkdir $TMPDIR/xchg\n      export > $TMPDIR/xchg/saved-env\n      mountDisk=1\n      ${qemuCommandLinux}\n    '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":609,"column":5},"path":["pkgs","vmTools","makeImageTestScript"],"pos_type":"Lambda"}},"content":{"content":"\nGenerate a script that can be used to run an interactive session\nin the given image.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":609,"column":5},"path":["pkgs","vmTools","makeImageTestScript"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.override","path":["pkgs","vmTools","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.overrideDerivation","path":["pkgs","vmTools","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","writers","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","vmTools","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","vmTools","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.rpmClosureGenerator","path":["pkgs","vmTools","rpmClosureGenerator"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1603,"column":5},"attr_expr":"rpmClosureGenerator","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":823,"column":5},"lambda_expr":"rpmClosureGenerator =\n    {\n      name,\n      packagesLists,\n      urlPrefixes,\n      packages,\n      archs ? [ ],\n    }:\n    assert (builtins.length packagesLists) == (builtins.length urlPrefixes);\n    runCommand \"${name}.nix\"\n      {\n        nativeBuildInputs = [\n          buildPackages.perl\n          buildPackages.perlPackages.URI\n          buildPackages.perlPackages.XMLSimple\n          buildPackages.zstd\n        ];\n        inherit archs;\n      }\n      ''\n        ${lib.concatImapStrings (i: pl: ''\n          echo \"decompressing ${pl}...\"\n          case ${pl} in\n            *.zst)\n              zstd -d < ${pl} > ./packages_${toString i}.xml\n              ;;\n            *.xz | *.lzma)\n              xz -d < ${pl} > ./packages_${toString i}.xml\n              ;;\n            *.bz2)\n              bunzip2 < ${pl} > ./packages_${toString i}.xml\n              ;;\n            *.gz)\n              gunzip < ${pl} > ./packages_${toString i}.xml\n              ;;\n            *)\n              cp ${pl} ./packages_${toString i}.xml\n              ;;\n          esac\n        '') packagesLists}\n        perl -w ${rpm/rpm-closure.pl} \\\n          ${\n            lib.concatImapStrings (i: pl: \"./packages_${toString i}.xml ${pl.snd} \") (\n              lib.zipLists packagesLists urlPrefixes\n            )\n          } \\\n          ${toString packages} > $out\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":823,"column":5},"path":["pkgs","vmTools","rpmClosureGenerator"],"pos_type":"Lambda"}},"content":{"content":"\nGenerate a Nix expression containing fetchurl calls for the\nclosure of a set of top-level RPM packages from the\n`primary.xml.gz' file of a Fedora or openSUSE distribution.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":823,"column":5},"path":["pkgs","vmTools","rpmClosureGenerator"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.runInLinuxImage","path":["pkgs","vmTools","runInLinuxImage"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1605,"column":5},"attr_expr":"runInLinuxImage","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":480,"column":5},"lambda_expr":"runInLinuxImage =\n    drv:\n    runInLinuxVM (\n      lib.overrideDerivation drv (attrs: {\n        mountDisk = attrs.mountDisk or true;\n\n        /*\n          Mount `image' as the root FS, but use a temporary copy-on-write\n          image since we don't want to (and can't) write to `image'.\n        */\n        preVM = ''\n          diskImage=$(pwd)/disk-image.qcow2\n          origImage=${attrs.diskImage}\n          if test -d \"$origImage\"; then origImage=\"$origImage/disk-image.qcow2\"; fi\n          ${qemu}/bin/qemu-img create -F ${attrs.diskImageFormat} -b \"$origImage\" -f qcow2 $diskImage\n        '';\n\n        /*\n          Inside the VM, run the stdenv setup script normally, but at the\n          very end set $PATH and $SHELL to the `native' paths for the\n          distribution inside the VM.\n        */\n        postHook = ''\n          PATH=/usr/bin:/bin:/usr/sbin:/sbin\n          SHELL=/bin/sh\n          eval \"$origPostHook\"\n        '';\n\n        origPostHook = lib.optionalString (attrs ? postHook) attrs.postHook;\n\n        # Don't run Nix-specific build steps like patchelf.\n        fixupPhase = \"true\";\n      })\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":480,"column":5},"path":["pkgs","vmTools","runInLinuxImage"],"pos_type":"Lambda"}},"content":{"content":"\nLike runInLinuxVM, but run the build not using the stdenv from\nthe Nix store, but using the tools provided by /bin, /usr/bin\netc. from the specified filesystem image, which typically is a\nfilesystem containing a non-NixOS Linux distribution.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":480,"column":5},"path":["pkgs","vmTools","runInLinuxImage"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.runInLinuxVM","path":["pkgs","vmTools","runInLinuxVM"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1606,"column":5},"attr_expr":"runInLinuxVM","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":388,"column":5},"lambda_expr":"runInLinuxVM =\n    drv:\n    lib.overrideDerivation drv (\n      {\n        memSize ? 512,\n        QEMU_OPTS ? \"\",\n        args,\n        builder,\n        ...\n      }:\n      {\n        requiredSystemFeatures = [ \"kvm\" ];\n        builder = \"${bash}/bin/sh\";\n        args = [\n          \"-e\"\n          (vmRunCommand qemuCommandLinux)\n        ];\n        origArgs = args;\n        origBuilder = builder;\n        env.QEMU_OPTS = \"${QEMU_OPTS} -m ${toString memSize} -object memory-backend-memfd,id=mem,size=${toString memSize}M,share=on -machine memory-backend=mem\";\n        __structuredAttrs = true;\n      }\n    );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":388,"column":5},"path":["pkgs","vmTools","runInLinuxVM"],"pos_type":"Lambda"}},"content":{"content":"\nRun a derivation in a Linux virtual machine (using Qemu/KVM).  By\ndefault, there is no disk image; the root filesystem is a tmpfs,\nand the nix store is shared with the host (via the 9P protocol).\nThus, any pure Nix derivation should run unmodified, e.g. the\ncall\n\n  runInLinuxVM patchelf\n\nwill build the derivation `patchelf' inside a VM.  The attribute\n`preVM' can optionally contain a shell command to be evaluated\n*before* the VM is started (i.e., on the host).  The attribute\n`memSize' specifies the memory size of the VM in MiB (1024*1024\nbytes), defaulting to 512.  The attribute `diskImage' can\noptionally specify a file system image to be attached to /dev/sda.\n(Note that currently we expect the image to contain a filesystem,\nnot a full disk image with a partition table etc.)\n\nIf the build fails and Nix is run with the `-K' option, a script\n`run-vm' will be left behind in the temporary build directory\nthat allows you to boot into the VM and debug it interactively.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":388,"column":5},"path":["pkgs","vmTools","runInLinuxVM"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.vmRunCommand","path":["pkgs","vmTools","vmRunCommand"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1609,"column":5},"attr_expr":"vmRunCommand","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":271,"column":5},"lambda_expr":"qemuCommand:\n    writeText \"vm-run\" ''\n      ${coreutils}/bin/mkdir xchg\n      export > xchg/saved-env\n\n      if [ -f \"''${NIX_ATTRS_SH_FILE-}\" ]; then\n        ${coreutils}/bin/cp $NIX_ATTRS_JSON_FILE $NIX_ATTRS_SH_FILE xchg\n        source \"$NIX_ATTRS_SH_FILE\"\n      fi\n      source $stdenv/setup\n\n      eval \"$preVM\"\n\n      if [ \"$enableParallelBuilding\" = 1 ]; then\n        QEMU_NR_VCPUS=0\n        if [ ''${NIX_BUILD_CORES:-0} = 0 ]; then\n          QEMU_NR_VCPUS=\"$(nproc)\"\n        else\n          QEMU_NR_VCPUS=\"$NIX_BUILD_CORES\"\n        fi\n        # qemu only supports 255 vCPUs (see error from `qemu-system-x86_64 -smp 256`)\n        if [ \"$QEMU_NR_VCPUS\" -gt 255 ]; then\n          QEMU_NR_VCPUS=255\n        fi\n        QEMU_OPTS+=\" -smp cpus=$QEMU_NR_VCPUS\"\n      fi\n\n      # Write the command to start the VM to a file so that the user can\n      # debug inside the VM if the build fails (when Nix is called with\n      # the -K option to preserve the temporary build directory).\n      ${coreutils}/bin/cat > ./run-vm <<EOF\n      #! ${bash}/bin/sh\n      ''${diskImage:+diskImage=$diskImage}\n      # GitHub Actions runners seems to not allow installing seccomp filter: https://github.com/rcambrj/nix-pi-loader/issues/1#issuecomment-2605497516\n      # Since we are running in a sandbox already, the difference between seccomp and none is minimal\n      ${virtiofsd}/bin/virtiofsd --xattr --socket-path virtio-store.sock --sandbox none --seccomp none --shared-dir \"${storeDir}\" &\n      ${virtiofsd}/bin/virtiofsd --xattr --socket-path virtio-xchg.sock --sandbox none --seccomp none --shared-dir xchg &\n\n      # Wait until virtiofsd has created these sockets to avoid race condition.\n      until [[ -e virtio-store.sock ]]; do ${coreutils}/bin/sleep 0.1; done\n      until [[ -e virtio-xchg.sock ]]; do ${coreutils}/bin/sleep 0.1; done\n\n      ${qemuCommand}\n      EOF\n\n      ${coreutils}/bin/chmod +x ./run-vm\n      source ./run-vm\n\n      if ! test -e xchg/in-vm-exit; then\n        echo \"Virtual machine didn't produce an exit code.\"\n        exit 1\n      fi\n\n      exitCode=\"$(${coreutils}/bin/cat xchg/in-vm-exit)\"\n      if [ \"$exitCode\" != \"0\" ]; then\n        exit \"$exitCode\"\n      fi\n\n      eval \"$postVM\"\n    ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":271,"column":5},"path":["pkgs","vmTools","vmRunCommand"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":271,"column":5},"path":["pkgs","vmTools","vmRunCommand"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.alma10x86_64","path":["pkgs","vmTools","diskImageExtraFuns","alma10x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.alma9x86_64","path":["pkgs","vmTools","diskImageExtraFuns","alma9x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.amazon2023x86_64","path":["pkgs","vmTools","diskImageExtraFuns","amazon2023x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.debian11i386","path":["pkgs","vmTools","diskImageExtraFuns","debian11i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.debian11x86_64","path":["pkgs","vmTools","diskImageExtraFuns","debian11x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.debian12i386","path":["pkgs","vmTools","diskImageExtraFuns","debian12i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.debian12x86_64","path":["pkgs","vmTools","diskImageExtraFuns","debian12x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.debian13i386","path":["pkgs","vmTools","diskImageExtraFuns","debian13i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.debian13x86_64","path":["pkgs","vmTools","diskImageExtraFuns","debian13x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.fedora42x86_64","path":["pkgs","vmTools","diskImageExtraFuns","fedora42x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.fedora43x86_64","path":["pkgs","vmTools","diskImageExtraFuns","fedora43x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.oracle9x86_64","path":["pkgs","vmTools","diskImageExtraFuns","oracle9x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.rocky10x86_64","path":["pkgs","vmTools","diskImageExtraFuns","rocky10x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.rocky9x86_64","path":["pkgs","vmTools","diskImageExtraFuns","rocky9x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.ubuntu2204i386","path":["pkgs","vmTools","diskImageExtraFuns","ubuntu2204i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.ubuntu2204x86_64","path":["pkgs","vmTools","diskImageExtraFuns","ubuntu2204x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageExtraFuns.ubuntu2404x86_64","path":["pkgs","vmTools","diskImageExtraFuns","ubuntu2404x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1566,"column":14},"lambda_expr":"extraPackages:\n    f { inherit extraPackages; }","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.alma10x86_64","path":["pkgs","vmTools","diskImageFuns","alma10x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.alma9x86_64","path":["pkgs","vmTools","diskImageFuns","alma9x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.amazon2023x86_64","path":["pkgs","vmTools","diskImageFuns","amazon2023x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.debian11i386","path":["pkgs","vmTools","diskImageFuns","debian11i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.debian11x86_64","path":["pkgs","vmTools","diskImageFuns","debian11x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.debian12i386","path":["pkgs","vmTools","diskImageFuns","debian12i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.debian12x86_64","path":["pkgs","vmTools","diskImageFuns","debian12x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.debian13i386","path":["pkgs","vmTools","diskImageFuns","debian13i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.debian13x86_64","path":["pkgs","vmTools","diskImageFuns","debian13x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.fedora42x86_64","path":["pkgs","vmTools","diskImageFuns","fedora42x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.fedora43x86_64","path":["pkgs","vmTools","diskImageFuns","fedora43x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.oracle9x86_64","path":["pkgs","vmTools","diskImageFuns","oracle9x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.rocky10x86_64","path":["pkgs","vmTools","diskImageFuns","rocky10x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.rocky9x86_64","path":["pkgs","vmTools","diskImageFuns","rocky9x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1556,"column":17},"lambda_expr":"as2:\n      makeImageFromRPMDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.ubuntu2204i386","path":["pkgs","vmTools","diskImageFuns","ubuntu2204i386"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.ubuntu2204x86_64","path":["pkgs","vmTools","diskImageFuns","ubuntu2204x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.vmTools.diskImageFuns.ubuntu2404x86_64","path":["pkgs","vmTools","diskImageFuns","ubuntu2404x86_64"],"aliases":[],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/vm/default.nix","line":1560,"column":17},"lambda_expr":"as2:\n      makeImageFromDebDist (as // as2)","count_applied":2,"content_meta":null},"content":null},{"meta":{"title":"pkgs.writers.makeBinWriter","path":["pkgs","writers","makeBinWriter"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":241,"column":5},"lambda_expr":"makeBinWriter =\n    {\n      compileScript,\n      strip ? true,\n      makeWrapperArgs ? [ ],\n    }:\n    nameOrPath: content:\n    assert\n      (types.path.check nameOrPath)\n      || (builtins.match \"([0-9A-Za-z._])[0-9A-Za-z._-]*\" nameOrPath != null);\n    assert (types.path.check content) || (types.str.check content);\n    let\n      nameIsPath = types.path.check nameOrPath;\n      name = last (builtins.split \"/\" nameOrPath);\n      path = if nameIsPath then nameOrPath else \"/bin/${name}\";\n      # The inner derivation which creates the executable under $out/bin (never at $out directly)\n      # This is required in order to support wrapping, as wrapped programs consist of at least two files: the executable and the wrapper.\n      inner =\n        pkgs.runCommandLocal name\n          (\n            {\n              inherit makeWrapperArgs;\n              nativeBuildInputs = [ makeBinaryWrapper ];\n              meta.mainProgram = name;\n            }\n            // (\n              if (types.str.check content) then\n                {\n                  inherit content;\n                  passAsFile = [ \"content\" ];\n                }\n              else\n                { contentPath = content; }\n            )\n          )\n          ''\n            ${compileScript}\n            ${lib.optionalString strip \"${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out\"}\n            # Sometimes binaries produced for darwin (e. g. by GHC) won't be valid\n            # mach-o executables from the get-go, but need to be corrected somehow\n            # which is done by fixupPhase.\n            ${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin \"fixupPhase\"}\n            mv $out tmp\n            mkdir -p $out/$(dirname \"${path}\")\n            mv tmp $out/${path}\n            if [ -n \"''${makeWrapperArgs+''${makeWrapperArgs[@]}}\" ]; then\n              wrapProgram $out/${path} ''${makeWrapperArgs[@]}\n            fi\n          '';\n    in\n    if nameIsPath then\n      inner\n    # In case nameOrPath is a name, the user intends the executable to be located at $out.\n    # This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.\n    # This breaks the override pattern.\n    # In case this turns out to be a problem, we can still add more magic\n    else\n      pkgs.runCommandLocal name { } ''\n        ln -s ${inner}/bin/${name} $out\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":241,"column":5},"path":["pkgs","writers","makeBinWriter"],"pos_type":"Lambda"}},"content":{"content":"\n`makeBinWriter` returns a derivation which compiles the given script into an executable format.\n\n:::{.note}\nThis function is the base implementation for other compile language `writers`, such as `writeHaskell` and `writeRust`.\n:::\n\n# Inputs\n\nconfig (AttrSet)\n: `compileScript` (String)\n  : The script that compiles the given content into an executable.\n\n: `strip` (Boolean, Default: true)\n  : Whether to [strip](https://nixos.org/manual/nixpkgs/stable/#ssec-fixup-phase) the executable or not.\n\n: `makeWrapperArgs` (Optional, [String], Default: [])\n  : Arguments forwarded to (`makeWrapper`)[#fun-makeWrapper]\n\n`nameOrPath` (String)\n: The name of the script or the path to the script.\n\n  When a `string` starting with \"/\" is passed, the script will be created at the specified path in $out.\n  For example, `\"/bin/hello\"` will create a script at `$out/bin/hello`.\n\n  Any other `string` is interpreted as a filename.\n  It must be a [POSIX filename](https://en.wikipedia.org/wiki/Filename) starting with a letter, digit, dot, or underscore.\n  Spaces or special characters are not allowed.\n\n# Examples\n:::{.example}\n## `pkgs.writers.makeBinWriter` example\n\n```c\n// main.c\n#include <stdio.h>\n\nint main()\n{\n    printf(\"Hello, World!\\n\");\n    return 0;\n}\n```\n\n```nix-repl\n:b makeBinWriter { compileScript = \"${pkgs.gcc}/bin/gcc -o $out $contentPath\"; } \"hello\" ./main.c\nout -> /nix/store/f6crc8mwj3lvcxqclw7n09cm8nb6kxbh-hello\n```\n\nThe above example creates an executable named `hello` that outputs `Hello, World!` when executed.\n\n```sh\n> /nix/store/f6crc8mwj3lvcxqclw7n09cm8nb6kxbh-hello\nHello, World!\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":241,"column":5},"path":["pkgs","writers","makeBinWriter"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.makeDataWriter","path":["pkgs","writers","makeDataWriter"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/data.nix","line":38,"column":5},"lambda_expr":"{\n      input ? lib.id,\n      output ? \"cp $inputPath $out\",\n    }:\n    nameOrPath: data:\n    assert\n      (types.path.check nameOrPath)\n      || (builtins.match \"([0-9A-Za-z._])[0-9A-Za-z._-]*\" nameOrPath != null);\n    let\n      name = last (builtins.split \"/\" nameOrPath);\n    in\n    runCommand name\n      {\n        input = input data;\n        passAsFile = [ \"input\" ];\n      }\n      ''\n        ${output}\n\n        ${optionalString (types.path.check nameOrPath) ''\n          mv $out tmp\n          mkdir -p $out/$(dirname \"${nameOrPath}\")\n          mv tmp $out/${nameOrPath}\n        ''}\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/data.nix","line":38,"column":5},"path":["pkgs","writers","makeDataWriter"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/data.nix","line":38,"column":5},"path":["pkgs","writers","makeDataWriter"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.makeFSharpWriter","path":["pkgs","writers","makeFSharpWriter"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1303,"column":5},"lambda_expr":"{\n      dotnet-sdk ? pkgs.dotnet-sdk,\n      fsi-flags ? \"\",\n      libraries ? _: [ ],\n      ...\n    }@args:\n    nameOrPath:\n    let\n      fname = last (builtins.split \"/\" nameOrPath);\n      path = if strings.hasSuffix \".fsx\" nameOrPath then nameOrPath else \"${nameOrPath}.fsx\";\n      _nugetDeps = mkNugetDeps {\n        name = \"${fname}-nuget-deps\";\n        nugetDeps = libraries;\n      };\n\n      nuget-source = mkNugetSource {\n        name = \"${fname}-nuget-source\";\n        description = \"Nuget source with the dependencies for ${fname}\";\n        deps = [ _nugetDeps ];\n      };\n\n      fsi = writeBash \"fsi\" ''\n        set -euo pipefail\n        export HOME=$NIX_BUILD_TOP/.home\n        export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1\n        export DOTNET_CLI_TELEMETRY_OPTOUT=1\n        export DOTNET_NOLOGO=1\n        export DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK=1\n        script=\"$1\"; shift\n        (\n          ${lib.getExe dotnet-sdk} new nugetconfig\n          ${lib.getExe dotnet-sdk} nuget disable source nuget\n        ) > /dev/null\n        ${lib.getExe dotnet-sdk} fsi --quiet --nologo --readline- ${fsi-flags} \"$@\" < \"$script\"\n      '';\n\n    in\n    content:\n    makeScriptWriter\n      (\n        (removeAttrs args [\n          \"dotnet-sdk\"\n          \"fsi-flags\"\n          \"libraries\"\n        ])\n        // {\n          interpreter = fsi;\n        }\n      )\n      path\n      ''\n        #i \"nuget: ${nuget-source}/lib\"\n        ${content}\n        exit 0\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1303,"column":5},"path":["pkgs","writers","makeFSharpWriter"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1303,"column":5},"path":["pkgs","writers","makeFSharpWriter"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.makeLuaWriter","path":["pkgs","writers","makeLuaWriter"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":967,"column":5},"lambda_expr":"makeLuaWriter =\n    lua: luaPackages: buildLuaPackages: name:\n    {\n      libraries ? [ ],\n      ...\n    }@args:\n    makeScriptWriter (\n      (removeAttrs args [ \"libraries\" ])\n      // {\n        interpreter = lua.interpreter;\n        # if libraries == []\n        # then lua.interpreter\n        # else (lua.withPackages (ps: libraries)).interpreter\n        # This should support packages! I just cant figure out why some dependency collision happens whenever I try to run this.\n        check = (\n          writeDash \"luacheck.sh\" ''\n            exec ${buildLuaPackages.luacheck}/bin/luacheck \"$1\"\n          ''\n        );\n      }\n    ) name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":967,"column":5},"path":["pkgs","writers","makeLuaWriter"],"pos_type":"Lambda"}},"content":{"content":"\nmakeLuaWriter takes lua and compatible luaPackages and produces lua script writer,\nwhich validates the script with luacheck at build time. If any libraries are specified,\nlua.withPackages is used as interpreter, otherwise the \"bare\" lua is used.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":967,"column":5},"path":["pkgs","writers","makeLuaWriter"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.makePythonWriter","path":["pkgs","writers","makePythonWriter"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1183,"column":5},"lambda_expr":"makePythonWriter =\n    python: pythonPackages: buildPythonPackages: name:\n    {\n      libraries ? [ ],\n      flakeIgnore ? [ ],\n      doCheck ? true,\n      ...\n    }@args:\n    let\n      ignoreAttribute =\n        optionalString (flakeIgnore != [ ])\n          \"--ignore ${concatMapStringsSep \",\" escapeShellArg flakeIgnore}\";\n    in\n    makeScriptWriter (\n      (removeAttrs args [\n        \"libraries\"\n        \"flakeIgnore\"\n        \"doCheck\"\n      ])\n      // {\n        interpreter =\n          if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then\n            if libraries == [ ] then\n              python.interpreter\n            else if (lib.isFunction libraries) then\n              (python.withPackages libraries).interpreter\n            else\n              (python.withPackages (ps: libraries)).interpreter\n          else\n            python.interpreter;\n        check = optionalString (python.isPy3k && doCheck) (\n          writeDash \"pythoncheck.sh\" ''\n            exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} \"$1\"\n          ''\n        );\n      }\n    ) name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1183,"column":5},"path":["pkgs","writers","makePythonWriter"],"pos_type":"Lambda"}},"content":{"content":"\nmakePythonWriter takes python and compatible pythonPackages and produces python script writer,\nwhich validates the script with flake8 at build time. If any libraries are specified,\npython.withPackages is used as interpreter, otherwise the \"bare\" python is used.\n\n# Inputs\n\n`python`\n\n: 1\\. Function argument\n\n`pythonPackages`\n\n: 2\\. Function argument\n\n`buildPythonPackages`\n\n: 3\\. Function argument\n\n`name`\n\n: 4\\. Function argument\n\n`attrs`\n\n: 5\\. Function argument\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1183,"column":5},"path":["pkgs","writers","makePythonWriter"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.makeRubyWriter","path":["pkgs","writers","makeRubyWriter"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":925,"column":5},"lambda_expr":"makeRubyWriter =\n    ruby: rubyPackages: buildRubyPackages: name:\n    {\n      libraries ? [ ],\n      ...\n    }@args:\n    makeScriptWriter (\n      (removeAttrs args [ \"libraries\" ])\n      // {\n        interpreter =\n          if libraries == [ ] then \"${ruby}/bin/ruby\" else \"${(ruby.withPackages (ps: libraries))}/bin/ruby\";\n        # Rubocop doesn't seem to like running in this fashion.\n        #check = (writeDash \"rubocop.sh\" ''\n        #  exec ${lib.getExe buildRubyPackages.rubocop} \"$1\"\n        #'');\n      }\n    ) name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":925,"column":5},"path":["pkgs","writers","makeRubyWriter"],"pos_type":"Lambda"}},"content":{"content":"\nmakeRubyWriter takes ruby and compatible rubyPackages and produces ruby script writer,\nIf any libraries are specified, ruby.withPackages is used as interpreter, otherwise the \"bare\" ruby is used.\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":925,"column":5},"path":["pkgs","writers","makeRubyWriter"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.makeScriptWriter","path":["pkgs","writers","makeScriptWriter"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":93,"column":5},"lambda_expr":"makeScriptWriter =\n    {\n      interpreter,\n      check ? \"\",\n      makeWrapperArgs ? [ ],\n    }:\n    nameOrPath: content:\n    assert\n      (types.path.check nameOrPath)\n      || (builtins.match \"([0-9A-Za-z._])[0-9A-Za-z._-]*\" nameOrPath != null);\n    assert (types.path.check content) || (types.str.check content);\n    let\n      nameIsPath = types.path.check nameOrPath;\n      name = last (builtins.split \"/\" nameOrPath);\n      path = if nameIsPath then nameOrPath else \"/bin/${name}\";\n      # The inner derivation which creates the executable under $out/bin (never at $out directly)\n      # This is required in order to support wrapping, as wrapped programs consist of\n      # at least two files: the executable and the wrapper.\n      inner =\n        pkgs.runCommandLocal name\n          (\n            {\n              inherit makeWrapperArgs;\n              nativeBuildInputs = [ makeBinaryWrapper ];\n              meta.mainProgram = name;\n            }\n            // (\n              if (types.str.check content) then\n                {\n                  inherit content interpreter;\n                  passAsFile = [ \"content\" ];\n                }\n              else\n                {\n                  inherit interpreter;\n                  contentPath = content;\n                }\n            )\n          )\n          ''\n            # On darwin a script cannot be used as an interpreter in a shebang but\n            # there doesn't seem to be a limit to the size of shebang and multiple\n            # arguments to the interpreter are allowed.\n            if [[ -n \"${toString pkgs.stdenvNoCC.hostPlatform.isDarwin}\" ]] && isScript $interpreter\n            then\n              wrapperInterpreterLine=$(head -1 \"$interpreter\" | tail -c+3)\n              # Get first word from the line (note: xargs echo remove leading spaces)\n              wrapperInterpreter=$(echo \"$wrapperInterpreterLine\" | xargs echo | cut -d \" \" -f1)\n\n              if isScript $wrapperInterpreter\n              then\n                echo \"error: passed interpreter ($interpreter) is a script which has another script ($wrapperInterpreter) as an interpreter, which is not supported.\"\n                exit 1\n              fi\n\n              # This should work as long as wrapperInterpreter is a shell, which is\n              # the case for programs wrapped with makeWrapper, like\n              # python3.withPackages etc.\n              interpreterLine=\"$wrapperInterpreterLine $interpreter\"\n            else\n              interpreterLine=$interpreter\n            fi\n\n            echo \"#! $interpreterLine\" > $out\n            cat \"$contentPath\" >> $out\n            ${optionalString (check != \"\") ''\n              ${check} $out\n            ''}\n            chmod +x $out\n\n            # Relocate executable\n            # Wrap it if makeWrapperArgs are specified\n            mv $out tmp\n              mkdir -p $out/$(dirname \"${path}\")\n              mv tmp $out/${path}\n            if [ -n \"''${makeWrapperArgs+''${makeWrapperArgs[@]}}\" ]; then\n                wrapProgram $out/${path} ''${makeWrapperArgs[@]}\n            fi\n          '';\n    in\n    if nameIsPath then\n      inner\n    # In case nameOrPath is a name, the user intends the executable to be located at $out.\n    # This is achieved by creating a separate derivation containing a symlink at $out linking to ${inner}/bin/${name}.\n    # This breaks the override pattern.\n    # In case this turns out to be a problem, we can still add more magic\n    else\n      pkgs.runCommandLocal name { } ''\n        ln -s ${inner}/bin/${name} $out\n      '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":93,"column":5},"path":["pkgs","writers","makeScriptWriter"],"pos_type":"Lambda"}},"content":{"content":"\n`makeScriptWriter` returns a derivation which creates an executable script.\n\n# Inputs\n\nconfig (AttrSet)\n: `interpreter` (String)\n  : the [interpreter](https://en.wikipedia.org/wiki/Shebang_(Unix)) to use for the script.\n: `check` (String)\n  : A command to check the script. For example, this could be a linting check.\n: `makeWrapperArgs` (Optional, [String], Default: [])\n  : Arguments forwarded to (`makeWrapper`)[#fun-makeWrapper].\n\n`nameOrPath` (String)\n: The name of the script or the path to the script.\n\n  When a `string` starting with \"/\" is passed, the script will be created at the specified path in $out.\n  I.e. `\"/bin/hello\"` will create a script at `$out/bin/hello`.\n\n  Any other `string` is interpreted as a filename.\n  It must be a [POSIX filename](https://en.wikipedia.org/wiki/Filename) starting with a letter, digit, dot, or underscore.\n  Spaces or special characters are not allowed.\n\n`content` (String)\n: The content of the script.\n\n:::{.note}\nThis function is used as base implementation for other high-level writer functions.\n\nFor example, `writeBash` can (roughly) be implemented as:\n\n```nix\nwriteBash = makeScriptWriter { interpreter = \"${pkgs.bash}/bin/bash\"; }\n```\n:::\n\n# Examples\n:::{.example}\n## `pkgs.writers.makeScriptWriter` dash example\n\n```nix-repl\n:b makeScriptWriter { interpreter = \"${pkgs.dash}/bin/dash\"; } \"hello\" \"echo hello world\"\n-> /nix/store/indvlr9ckmnv4f0ynkmasv2h4fxhand0-hello\n```\n\nThe above example creates a script named `hello` that outputs `hello world` when executed.\n\n```sh\n> /nix/store/indvlr9ckmnv4f0ynkmasv2h4fxhand0-hello\nhello world\n```\n:::\n\n:::{.example}\n## `pkgs.writers.makeScriptWriter` python example\n\n```nix-repl\n:b makeScriptWriter { interpreter = \"${pkgs.python3}/bin/python\"; } \"python-hello\" \"print('hello world')\"\n-> /nix/store/4kvby1hqr45ffcdrvfpnpj62hanskw93-python-hello\n```\n\n```sh\n> /nix/store/4kvby1hqr45ffcdrvfpnpj62hanskw93-python-hello\nhello world\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":93,"column":5},"path":["pkgs","writers","makeScriptWriter"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.override","path":["pkgs","writers","override"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":177,"column":13},"attr_expr":"override = overrideArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/trivial.nix","line":1182,"column":8},"lambda_expr":"{\n      __functor = self: g;\n      __functionArgs = fArgs;\n    }","count_applied":null,"content_meta":null},"content":null},{"meta":{"title":"pkgs.writers.overrideDerivation","path":["pkgs","writers","overrideDerivation"],"aliases":[["pkgs","agdaPackages","overrideDerivation"],["pkgs","appimageTools","overrideDerivation"],["pkgs","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","buildRebar3","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildMix","overrideDerivation"],["pkgs","beamPackages","beamPackages","buildRebar3","overrideDerivation"],["pkgs","dhallPackages","overrideDerivation"],["pkgs","dockerTools","overrideDerivation"],["pkgs","dotnetCorePackages","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_2xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_10_0_3xx","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_11","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_8","overrideDerivation"],["pkgs","dotnetCorePackages","dotnet_9","overrideDerivation"],["pkgs","dotnetCorePackages","fetchNupkg","overrideDerivation"],["pkgs","dotnetCorePackages","mkNugetDeps","overrideDerivation"],["pkgs","elmPackages","overrideDerivation"],["pkgs","emacsPackages","overrideDerivation"],["pkgs","emacsPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","elpaBuild","overrideDerivation"],["pkgs","emacsPackages","elpaDevelPackages","overrideDerivation"],["pkgs","emacsPackages","elpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaBuild","overrideDerivation"],["pkgs","emacsPackages","melpaPackages","overrideDerivation"],["pkgs","emacsPackages","melpaStablePackages","overrideDerivation"],["pkgs","emacsPackages","nongnuDevelPackages","overrideDerivation"],["pkgs","emacsPackages","nongnuPackages","overrideDerivation"],["pkgs","emacsPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","overrideDerivation"],["pkgs","emacsPackages","manualPackages","eaf","overrideDerivation"],["pkgs","emacsPackages","manualPackages","treesit-grammars","overrideDerivation"],["pkgs","emacsPackages","trivialBuild","constructDrv","overrideDerivation"],["pkgs","gradle-packages","overrideDerivation"],["pkgs","ociTools","overrideDerivation"],["pkgs","python3Packages","overrideDerivation"],["pkgs","releaseTools","overrideDerivation"],["pkgs","rustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","rustPackages","buildRustPackages","rustPlatform","buildRustPackage","overrideDerivation"],["pkgs","stdenv","overrideDerivation"],["pkgs","testers","overrideDerivation"],["pkgs","testers","testBuildFailure'","overrideDerivation"],["pkgs","testers","testEqualArrayOrMap","overrideDerivation"],["pkgs","vmTools","overrideDerivation"]],"signature":null,"is_primop":false,"primop_meta":null,"is_functor":null,"attr_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":178,"column":13},"attr_expr":"overrideDerivation =\n              fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs;","lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"lambda_expr":"fdrv: makeOverridable (mirrorArgs (args: overrideDerivation (f args) fdrv)) origArgs","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","writers","overrideDerivation"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/lib/customisation.nix","line":179,"column":15},"path":["pkgs","writers","overrideDerivation"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeBabashka","path":["pkgs","writers","writeBabashka"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":595,"column":5},"lambda_expr":"writeBabashka =\n    name:\n    {\n      makeWrapperArgs ? [ ],\n      babashka ? pkgs.babashka-unwrapped,\n      check ? \"${lib.getExe pkgs.clj-kondo} --lint\",\n      ...\n    }@args:\n    makeScriptWriter (\n      (removeAttrs args [\n        \"babashka\"\n      ])\n      // {\n        interpreter = \"${lib.getExe babashka}\";\n      }\n    ) name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":595,"column":5},"path":["pkgs","writers","writeBabashka"],"pos_type":"Lambda"}},"content":{"content":"\nwriteBabashka takes a name, an attrset with babashka interpreter and linting check (both optional)\nand some babashka source code and returns an executable.\n\n`pkgs.babashka-unwrapped` is used as default interpreter for small closure size. If dependencies needed, use `pkgs.babashka` instead. Pass empty string to check to disable the default clj-kondo linting.\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeBabashka` with empty arguments\n\n```nix\nwriteBabashka \"example\" { } ''\n  (println \"hello world\")\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeBabashka` with arguments\n\n```nix\nwriteBabashka \"example\"\n{\n  makeWrapperArgs = [\n    \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n  ];\n}\n''\n  (require '[babashka.tasks :as tasks])\n  (tasks/shell \"hello\" \"-g\" \"Hello babashka!\")\n''\n```\n:::\n\n:::{.note}\nBabashka needs Java for fetching dependencies. Wrapped babashka contains jdk,\npass wrapped version `pkgs.babashka` to babashka if dependencies are required.\n\nFor example:\n\n```nix\nwriteBabashka \"example\"\n{\n  babashka = pkgs.babashka;\n}\n''\n  (require '[babashka.deps :as deps])\n  (deps/add-deps '{:deps {medley/medley {:mvn/version \"1.3.0\"}}})\n  (require '[medley.core :as m])\n  (prn (m/index-by :id [{:id 1} {:id 2}]))\n''\n```\n:::\n\n:::{.note}\nDisable clj-kondo linting:\n\n```nix\nwriteBabashka \"example\"\n{\n  check = \"\";\n}\n''\n  (println \"hello world\")\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":595,"column":5},"path":["pkgs","writers","writeBabashka"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeBabashkaBin","path":["pkgs","writers","writeBabashkaBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":615,"column":22},"lambda_expr":"writeBabashkaBin = name: writeBabashka \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":615,"column":22},"path":["pkgs","writers","writeBabashkaBin"],"pos_type":"Lambda"}},"content":{"content":"\nwriteBabashkaBin takes the same arguments as writeBabashka but outputs a directory\n(like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":615,"column":22},"path":["pkgs","writers","writeBabashkaBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeBash","path":["pkgs","writers","writeBash"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":332,"column":5},"lambda_expr":"writeBash =\n    name: argsOrScript:\n    if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then\n      makeScriptWriter (argsOrScript // { interpreter = \"${lib.getExe pkgs.bashNonInteractive}\"; }) name\n    else\n      makeScriptWriter { interpreter = \"${lib.getExe pkgs.bashNonInteractive}\"; } name argsOrScript;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":332,"column":5},"path":["pkgs","writers","writeBash"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScript but the first line is a shebang to bash\nCan be called with or without extra arguments.\n\n# Examples\n:::{.example}\n\n## Without arguments\n\n```nix\nwriteBash \"example\" ''\necho hello world\n''\n```\n\n## With arguments\n\n```nix\nwriteBash \"example\"\n{\n  makeWrapperArgs = [\n    \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n  ];\n}\n''\n  hello\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":332,"column":5},"path":["pkgs","writers","writeBash"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeBashBin","path":["pkgs","writers","writeBashBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":370,"column":18},"lambda_expr":"writeBashBin = name: writeBash \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":370,"column":18},"path":["pkgs","writers","writeBashBin"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScriptBin but the first line is a shebang to bash\n\nCan be called with or without extra arguments.\n\n## Examples\n:::{.example}\n## `pkgs.writers.writeBashBin` example without arguments\n\n```nix\nwriteBashBin \"example\" ''\n  echo hello world\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeBashBin` example with arguments\n\n```nix\nwriteBashBin \"example\"\n{\n  makeWrapperArgs = [\n    \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n  ];\n}\n''\n  hello\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":370,"column":18},"path":["pkgs","writers","writeBashBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeDash","path":["pkgs","writers","writeDash"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":405,"column":5},"lambda_expr":"writeDash =\n    name: argsOrScript:\n    if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then\n      makeScriptWriter (argsOrScript // { interpreter = \"${lib.getExe pkgs.dash}\"; }) name\n    else\n      makeScriptWriter { interpreter = \"${lib.getExe pkgs.dash}\"; } name argsOrScript;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":405,"column":5},"path":["pkgs","writers","writeDash"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScript but the first line is a shebang to dash\n\nCan be called with or without extra arguments.\n\n# Example\n:::{.example}\n## `pkgs.writers.writeDash` example without arguments\n\n```nix\nwriteDash \"example\" ''\n  echo hello world\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeDash` example with arguments\n\n```nix\nwriteDash \"example\"\n{\n  makeWrapperArgs = [\n    \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n  ];\n}\n''\n  hello\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":405,"column":5},"path":["pkgs","writers","writeDash"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeDashBin","path":["pkgs","writers","writeDashBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":443,"column":18},"lambda_expr":"writeDashBin = name: writeDash \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":443,"column":18},"path":["pkgs","writers","writeDashBin"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScriptBin but the first line is a shebang to dash\n\nCan be called with or without extra arguments.\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeDashBin` without arguments\n\n```nix\nwriteDashBin \"example\" ''\n  echo hello world\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeDashBin` with arguments\n\n```nix\nwriteDashBin \"example\"\n{\n  makeWrapperArgs = [\n    \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n  ];\n}\n''\n  hello\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":443,"column":18},"path":["pkgs","writers","writeDashBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeFSharp","path":["pkgs","writers","writeFSharp"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1309,"column":5},"lambda_expr":"nameOrPath:\n    let\n      fname = last (builtins.split \"/\" nameOrPath);\n      path = if strings.hasSuffix \".fsx\" nameOrPath then nameOrPath else \"${nameOrPath}.fsx\";\n      _nugetDeps = mkNugetDeps {\n        name = \"${fname}-nuget-deps\";\n        nugetDeps = libraries;\n      };\n\n      nuget-source = mkNugetSource {\n        name = \"${fname}-nuget-source\";\n        description = \"Nuget source with the dependencies for ${fname}\";\n        deps = [ _nugetDeps ];\n      };\n\n      fsi = writeBash \"fsi\" ''\n        set -euo pipefail\n        export HOME=$NIX_BUILD_TOP/.home\n        export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1\n        export DOTNET_CLI_TELEMETRY_OPTOUT=1\n        export DOTNET_NOLOGO=1\n        export DOTNET_SKIP_WORKLOAD_INTEGRITY_CHECK=1\n        script=\"$1\"; shift\n        (\n          ${lib.getExe dotnet-sdk} new nugetconfig\n          ${lib.getExe dotnet-sdk} nuget disable source nuget\n        ) > /dev/null\n        ${lib.getExe dotnet-sdk} fsi --quiet --nologo --readline- ${fsi-flags} \"$@\" < \"$script\"\n      '';\n\n    in\n    content:\n    makeScriptWriter\n      (\n        (removeAttrs args [\n          \"dotnet-sdk\"\n          \"fsi-flags\"\n          \"libraries\"\n        ])\n        // {\n          interpreter = fsi;\n        }\n      )\n      path\n      ''\n        #i \"nuget: ${nuget-source}/lib\"\n        ${content}\n        exit 0\n      ''","count_applied":1,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1309,"column":5},"path":["pkgs","writers","writeFSharp"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1309,"column":5},"path":["pkgs","writers","writeFSharp"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeFSharpBin","path":["pkgs","writers","writeFSharpBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1361,"column":20},"lambda_expr":"name: writeFSharp \"/bin/${name}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1361,"column":20},"path":["pkgs","writers","writeFSharpBin"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1361,"column":20},"path":["pkgs","writers","writeFSharpBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeFish","path":["pkgs","writers","writeFish"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":477,"column":5},"lambda_expr":"writeFish =\n    name: argsOrScript:\n    if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then\n      makeScriptWriter (\n        argsOrScript\n        // {\n          interpreter = \"${lib.getExe pkgs.fish} --no-config\";\n          check = \"${lib.getExe pkgs.fish} --no-config --no-execute\"; # syntax check only\n        }\n      ) name\n    else\n      makeScriptWriter {\n        interpreter = \"${lib.getExe pkgs.fish} --no-config\";\n        check = \"${lib.getExe pkgs.fish} --no-config --no-execute\"; # syntax check only\n      } name argsOrScript;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":477,"column":5},"path":["pkgs","writers","writeFish"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScript but the first line is a shebang to fish\n\nCan be called with or without extra arguments.\n\n:::{.example}\n## `pkgs.writers.writeFish` without arguments\n\n```nix\nwriteFish \"example\" ''\n  echo hello world\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeFish` with arguments\n\n```nix\nwriteFish \"example\"\n{\n  makeWrapperArgs = [\n    \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n  ];\n}\n''\n  hello\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":477,"column":5},"path":["pkgs","writers","writeFish"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeFishBin","path":["pkgs","writers","writeFishBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":524,"column":18},"lambda_expr":"writeFishBin = name: writeFish \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":524,"column":18},"path":["pkgs","writers","writeFishBin"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScriptBin but the first line is a shebang to fish\n\nCan be called with or without extra arguments.\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeFishBin` without arguments\n\n```nix\nwriteFishBin \"example\" ''\n  echo hello world\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeFishBin` with arguments\n\n```nix\nwriteFishBin \"example\"\n{\n  makeWrapperArgs = [\n    \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n  ];\n}\n''\n  hello\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":524,"column":18},"path":["pkgs","writers","writeFishBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeGuile","path":["pkgs","writers","writeGuile"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":673,"column":5},"lambda_expr":"writeGuile =\n    nameOrPath:\n    {\n      guile ? pkgs.guile,\n      libraries ? [ ],\n      r6rs ? false,\n      r7rs ? false,\n      srfi ? [ ],\n      ...\n    }@config:\n    content:\n    assert builtins.all builtins.isInt srfi;\n    let\n      finalGuile = pkgs.buildEnv {\n        name = \"guile-env\";\n        paths = [ guile ] ++ libraries;\n        passthru = {\n          inherit (guile) siteDir siteCcacheDir;\n        };\n        meta.mainProgram = guile.meta.mainProgram or \"guile\";\n      };\n    in\n    makeScriptWriter\n      (\n        (removeAttrs config [\n          \"guile\"\n          \"libraries\"\n          \"r6rs\"\n          \"r7rs\"\n          \"srfi\"\n        ])\n        // {\n          interpreter = \"${lib.getExe finalGuile} \\\\\";\n          makeWrapperArgs = [\n            \"--set\"\n            \"GUILE_LOAD_PATH\"\n            \"${finalGuile}/${finalGuile.siteDir}:${finalGuile}/lib/scheme-libs\"\n            \"--set\"\n            \"GUILE_LOAD_COMPILED_PATH\"\n            \"${finalGuile}/${finalGuile.siteCcacheDir}:${finalGuile}/lib/libobj\"\n            \"--set\"\n            \"LD_LIBRARY_PATH\"\n            \"${finalGuile}/lib/ffi\"\n            \"--set\"\n            \"DYLD_LIBRARY_PATH\"\n            \"${finalGuile}/lib/ffi\"\n          ];\n        }\n      )\n      nameOrPath\n      /*\n        Spaces, newlines and tabs are significant for the \"meta switch\" of Guile, so\n        certain complication must be made to ensure correctness.\n      */\n      (\n        lib.concatStringsSep \"\\n\" [\n          (lib.concatStringsSep \" \" (\n            [ \"--no-auto-compile\" ]\n            ++ lib.optional r6rs \"--r6rs\"\n            ++ lib.optional r7rs \"--r7rs\"\n            ++ lib.optional (srfi != [ ]) (\"--use-srfi=\" + concatMapStringsSep \",\" toString srfi)\n            ++ [ \"-s\" ]\n          ))\n          \"!#\"\n          content\n        ]\n      );","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":673,"column":5},"path":["pkgs","writers","writeGuile"],"pos_type":"Lambda"}},"content":{"content":"\n`writeGuile` returns a derivation that creates an executable Guile script.\n\n# Inputs\n\n`nameOrPath` (String)\n: Name of or path to the script. The semantics is the same as that of\n `makeScriptWriter`.\n\n`config` (AttrSet)\n: `guile` (Optional, Derivation, Default: `pkgs.guile`)\n  : Guile package used for the script.\n: `libraries` (Optional, [ Derivation ], Default: [])\n  : Extra Guile libraries exposed to the script.\n: `r6rs` and `r7rs` (Optional, Boolean, Default: false)\n  : Whether to adapt Guile’s initial environment to better support R6RS/\n    R7RS. See the [Guile Reference Manual](https://www.gnu.org/software/guile/manual/html_node/index.html)\n    for details.\n: `srfi` (Optional, [ Int ], Default: [])\n  : SRFI module to be loaded into the interpreter before evaluating a\n    script file or starting the REPL. See the Guile Reference Manual to\n    know which SRFI are supported.\n: Other attributes are directly passed to `makeScriptWriter`.\n\n`content` (String)\n: Content of the script.\n\n# Examples\n\n:::{.example}\n## `pkgs.writers.writeGuile` with default config\n\n```nix\nwriteGuile \"guile-script\" { }\n''\n  (display \"Hello, world!\")\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeGuile` with SRFI-1 enabled and extra libraries\n\n```nix\nwriteGuile \"guile-script\" {\n  libraries = [ pkgs.guile-semver ];\n  srfi = [ 1 ];\n}\n''\n  (use-modules (semver))\n  (make-semver 1 (third '(2 3 4)) 5) ; => #<semver 1.4.5>\n''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":673,"column":5},"path":["pkgs","writers","writeGuile"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeGuileBin","path":["pkgs","writers","writeGuileBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":744,"column":19},"lambda_expr":"writeGuileBin = name: writeGuile \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":744,"column":19},"path":["pkgs","writers","writeGuileBin"],"pos_type":"Lambda"}},"content":{"content":"\nwriteGuileBin takes the same arguments as writeGuile but outputs a directory\n(like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":744,"column":19},"path":["pkgs","writers","writeGuileBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeHaskell","path":["pkgs","writers","writeHaskell"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":764,"column":5},"lambda_expr":"writeHaskell =\n    name:\n    {\n      ghc ? pkgs.ghc,\n      ghcArgs ? [ ],\n      libraries ? [ ],\n      makeWrapperArgs ? [ ],\n      strip ? true,\n      threadedRuntime ? true,\n    }:\n    let\n      appendIfNotSet = el: list: if elem el list then list else list ++ [ el ];\n      ghcArgs' = if threadedRuntime then appendIfNotSet \"-threaded\" ghcArgs else ghcArgs;\n\n    in\n    makeBinWriter {\n      compileScript = ''\n        cp $contentPath tmp.hs\n        ${(ghc.withPackages (toFunction libraries))}/bin/ghc ${lib.escapeShellArgs ghcArgs'} tmp.hs\n        mv tmp $out\n      '';\n      inherit makeWrapperArgs strip;\n    } name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":764,"column":5},"path":["pkgs","writers","writeHaskell"],"pos_type":"Lambda"}},"content":{"content":"\nwriteHaskell takes a name, an attrset with libraries and haskell version (both optional)\nand some haskell source code and returns an executable.\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeHaskell` usage example\n\n```nix\nwriteHaskell \"missiles\" { libraries = hpkgs: [ hpkgs.acme-missiles ]; } ''\n  import Acme.Missiles\n\n  main = launchMissiles\n'';\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":764,"column":5},"path":["pkgs","writers","writeHaskell"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeHaskellBin","path":["pkgs","writers","writeHaskellBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":790,"column":21},"lambda_expr":"writeHaskellBin = name: writeHaskell \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":790,"column":21},"path":["pkgs","writers","writeHaskellBin"],"pos_type":"Lambda"}},"content":{"content":"\nwriteHaskellBin takes the same arguments as writeHaskell but outputs a directory (like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":790,"column":21},"path":["pkgs","writers","writeHaskellBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeJS","path":["pkgs","writers","writeJS"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1076,"column":5},"lambda_expr":"writeJS =\n    name:\n    {\n      libraries ? [ ],\n    }:\n    content:\n    let\n      node-env = pkgs.buildEnv {\n        name = \"node\";\n        paths = libraries;\n        pathsToLink = [ \"/lib/node_modules\" ];\n      };\n    in\n    writeDash name ''\n      export NODE_PATH=${node-env}/lib/node_modules\n      exec ${lib.getExe pkgs.nodejs-slim} ${pkgs.writeText \"js\" content} \"$@\"\n    '';","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1076,"column":5},"path":["pkgs","writers","writeJS"],"pos_type":"Lambda"}},"content":{"content":"\nwriteJS takes a name an attributeset with libraries and some JavaScript sourcecode and\nreturns an executable\n\n# Inputs\n\n`name`\n\n: 1\\. Function argument\n\n`attrs`\n\n: 2\\. Function argument\n\n`content`\n\n: 3\\. Function argument\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeJS` usage example\n\n```nix\nwriteJS \"example\" { libraries = [ pkgs.uglify-js ]; } ''\n  var UglifyJS = require(\"uglify-js\");\n  var code = \"function add(first, second) { return first + second; }\";\n  var result = UglifyJS.minify(code);\n  console.log(result.code);\n''\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1076,"column":5},"path":["pkgs","writers","writeJS"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeJSBin","path":["pkgs","writers","writeJSBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1096,"column":16},"lambda_expr":"writeJSBin = name: writeJS \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1096,"column":16},"path":["pkgs","writers","writeJSBin"],"pos_type":"Lambda"}},"content":{"content":"\nwriteJSBin takes the same arguments as writeJS but outputs a directory (like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1096,"column":16},"path":["pkgs","writers","writeJSBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeJSON","path":["pkgs","writers","writeJSON"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":137,"column":9},"lambda_expr":"name: value:\n        pkgs.callPackage (\n          { runCommand, jq }:\n          runCommand name\n            {\n              nativeBuildInputs = [ jq ];\n              value = builtins.toJSON value;\n              preferLocalBuild = true;\n              __structuredAttrs = true;\n            }\n            ''\n              valuePath=\"$TMPDIR/value\"\n              printf \"%s\" \"$value\" > \"$valuePath\"\n              jq . \"$valuePath\" > $out\n            ''\n        ) { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":137,"column":9},"path":["pkgs","writers","writeJSON"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":137,"column":9},"path":["pkgs","writers","writeJSON"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeLua","path":["pkgs","writers","writeLua"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":967,"column":41},"lambda_expr":"name:\n    {\n      libraries ? [ ],\n      ...\n    }@args:\n    makeScriptWriter (\n      (removeAttrs args [ \"libraries\" ])\n      // {\n        interpreter = lua.interpreter;\n        # if libraries == []\n        # then lua.interpreter\n        # else (lua.withPackages (ps: libraries)).interpreter\n        # This should support packages! I just cant figure out why some dependency collision happens whenever I try to run this.\n        check = (\n          writeDash \"luacheck.sh\" ''\n            exec ${buildLuaPackages.luacheck}/bin/luacheck \"$1\"\n          ''\n        );\n      }\n    ) name","count_applied":3,"content_meta":null},"content":null},{"meta":{"title":"pkgs.writers.writeLuaBin","path":["pkgs","writers","writeLuaBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1019,"column":17},"lambda_expr":"name: writeLua \"/bin/${name}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1019,"column":17},"path":["pkgs","writers","writeLuaBin"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1019,"column":17},"path":["pkgs","writers","writeLuaBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeNginxConfig","path":["pkgs","writers","writeNginxConfig"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1107,"column":5},"lambda_expr":"name: text:\n    pkgs.runCommandLocal name\n      {\n        inherit text;\n        passAsFile = [ \"text\" ];\n        nativeBuildInputs = [ gixy ];\n      } # sh\n      ''\n        # nginx-config-formatter has an error - https://github.com/1connect/nginx-config-formatter/issues/16\n        awk -f ${awkFormatNginx} \"$textPath\" | sed '/^\\s*$/d' > $out\n        gixy $out || (echo \"\\n\\nThis can be caused by combining multiple incompatible services on the same hostname.\\n\\nFull merged config:\\n\\n\"; cat $out; exit 1)\n      ''","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1107,"column":5},"path":["pkgs","writers","writeNginxConfig"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1107,"column":5},"path":["pkgs","writers","writeNginxConfig"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeNim","path":["pkgs","writers","writeNim"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":808,"column":5},"lambda_expr":"writeNim =\n    name:\n    {\n      makeWrapperArgs ? [ ],\n      nim ? pkgs.nim2,\n      nimCompileOptions ? { },\n      strip ? true,\n    }:\n    let\n      optionFormat = optionName: {\n        option = \"--${optionName}\";\n        sep = \":\";\n        explicitBool = false;\n      };\n\n      nimCompileCmdArgs = lib.cli.toCommandLineShell optionFormat (\n        {\n          d = \"release\";\n          nimcache = \".\";\n        }\n        // nimCompileOptions\n      );\n    in\n    makeBinWriter {\n      compileScript = ''\n        cp $contentPath tmp.nim\n        ${lib.getExe nim} compile ${nimCompileCmdArgs} tmp.nim\n        mv tmp $out\n      '';\n      inherit makeWrapperArgs strip;\n    } name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":808,"column":5},"path":["pkgs","writers","writeNim"],"pos_type":"Lambda"}},"content":{"content":"\nwriteNim takes a name, an attrset with an optional Nim compiler, and some\nNim source code, returning an executable.\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeNim` usage example\n\n```nix\n  writeNim \"hello-nim\" { nim = pkgs.nim2; } ''\n    echo \"hello nim\"\n  '';\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":808,"column":5},"path":["pkgs","writers","writeNim"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeNimBin","path":["pkgs","writers","writeNimBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":843,"column":17},"lambda_expr":"writeNimBin = name: writeNim \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":843,"column":17},"path":["pkgs","writers","writeNimBin"],"pos_type":"Lambda"}},"content":{"content":"\nwriteNimBin takes the same arguments as writeNim but outputs a directory\n(like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":843,"column":17},"path":["pkgs","writers","writeNimBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeNu","path":["pkgs","writers","writeNu"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":878,"column":5},"lambda_expr":"writeNu =\n    name: argsOrScript:\n    if lib.isAttrs argsOrScript && !lib.isDerivation argsOrScript then\n      makeScriptWriter (\n        argsOrScript // { interpreter = \"${lib.getExe pkgs.nushell} --no-config-file\"; }\n      ) name\n    else\n      makeScriptWriter { interpreter = \"${lib.getExe pkgs.nushell} --no-config-file\"; } name argsOrScript;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":878,"column":5},"path":["pkgs","writers","writeNu"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScript but the first line is a shebang to nu\n\nCan be called with or without extra arguments.\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeNu` without arguments\n\n```nix\nwriteNu \"example\" ''\n  echo hello world\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeNu` with arguments\n\n```nix\nwriteNu \"example\"\n  {\n    makeWrapperArgs = [\n      \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n    ];\n  }\n  ''\n    hello\n  ''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":878,"column":5},"path":["pkgs","writers","writeNu"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeNuBin","path":["pkgs","writers","writeNuBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":918,"column":16},"lambda_expr":"writeNuBin = name: writeNu \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":918,"column":16},"path":["pkgs","writers","writeNuBin"],"pos_type":"Lambda"}},"content":{"content":"\nLike writeScriptBin but the first line is a shebang to nu\n\nCan be called with or without extra arguments.\n\n# Examples\n:::{.example}\n## `pkgs.writers.writeNuBin` without arguments\n\n```nix\nwriteNuBin \"example\" ''\n  echo hello world\n''\n```\n:::\n\n:::{.example}\n## `pkgs.writers.writeNuBin` with arguments\n\n```nix\nwriteNuBin \"example\"\n  {\n    makeWrapperArgs = [\n      \"--prefix\" \"PATH\" \":\" \"${lib.makeBinPath [ pkgs.hello ]}\"\n    ];\n  }\n  ''\n    hello\n  ''\n```\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":918,"column":16},"path":["pkgs","writers","writeNuBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writePerl","path":["pkgs","writers","writePerl"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1138,"column":5},"lambda_expr":"writePerl =\n    name:\n    {\n      libraries ? [ ],\n      ...\n    }@args:\n    makeScriptWriter (\n      (removeAttrs args [ \"libraries\" ])\n      // {\n        interpreter = \"${lib.getExe (pkgs.perl.withPackages (p: libraries))}\";\n      }\n    ) name;","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1138,"column":5},"path":["pkgs","writers","writePerl"],"pos_type":"Lambda"}},"content":{"content":"\nwritePerl takes a name an attributeset with libraries and some perl sourcecode and\nreturns an executable\n\n# Examples\n:::{.example}\n## `pkgs.writers.writePerl` usage example\n\n```nix\nwritePerl \"example\" { libraries = [ pkgs.perlPackages.boolean ]; } ''\n  use boolean;\n  print \"Howdy!\\n\" if true;\n''\n```\n\n:::\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1138,"column":5},"path":["pkgs","writers","writePerl"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writePerlBin","path":["pkgs","writers","writePerlBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1153,"column":18},"lambda_expr":"writePerlBin = name: writePerl \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1153,"column":18},"path":["pkgs","writers","writePerlBin"],"pos_type":"Lambda"}},"content":{"content":"\nwritePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1153,"column":18},"path":["pkgs","writers","writePerlBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writePyPy2","path":["pkgs","writers","writePyPy2"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1183,"column":50},"lambda_expr":"name:\n    {\n      libraries ? [ ],\n      flakeIgnore ? [ ],\n      doCheck ? true,\n      ...\n    }@args:\n    let\n      ignoreAttribute =\n        optionalString (flakeIgnore != [ ])\n          \"--ignore ${concatMapStringsSep \",\" escapeShellArg flakeIgnore}\";\n    in\n    makeScriptWriter (\n      (removeAttrs args [\n        \"libraries\"\n        \"flakeIgnore\"\n        \"doCheck\"\n      ])\n      // {\n        interpreter =\n          if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then\n            if libraries == [ ] then\n              python.interpreter\n            else if (lib.isFunction libraries) then\n              (python.withPackages libraries).interpreter\n            else\n              (python.withPackages (ps: libraries)).interpreter\n          else\n            python.interpreter;\n        check = optionalString (python.isPy3k && doCheck) (\n          writeDash \"pythoncheck.sh\" ''\n            exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} \"$1\"\n          ''\n        );\n      }\n    ) name","count_applied":3,"content_meta":null},"content":null},{"meta":{"title":"pkgs.writers.writePyPy2Bin","path":["pkgs","writers","writePyPy2Bin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1246,"column":19},"lambda_expr":"writePyPy2Bin = name: writePyPy2 \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1246,"column":19},"path":["pkgs","writers","writePyPy2Bin"],"pos_type":"Lambda"}},"content":{"content":"\nwritePyPy2Bin takes the same arguments as writePyPy2 but outputs a directory (like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1246,"column":19},"path":["pkgs","writers","writePyPy2Bin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writePyPy3","path":["pkgs","writers","writePyPy3"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1183,"column":50},"lambda_expr":"name:\n    {\n      libraries ? [ ],\n      flakeIgnore ? [ ],\n      doCheck ? true,\n      ...\n    }@args:\n    let\n      ignoreAttribute =\n        optionalString (flakeIgnore != [ ])\n          \"--ignore ${concatMapStringsSep \",\" escapeShellArg flakeIgnore}\";\n    in\n    makeScriptWriter (\n      (removeAttrs args [\n        \"libraries\"\n        \"flakeIgnore\"\n        \"doCheck\"\n      ])\n      // {\n        interpreter =\n          if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then\n            if libraries == [ ] then\n              python.interpreter\n            else if (lib.isFunction libraries) then\n              (python.withPackages libraries).interpreter\n            else\n              (python.withPackages (ps: libraries)).interpreter\n          else\n            python.interpreter;\n        check = optionalString (python.isPy3k && doCheck) (\n          writeDash \"pythoncheck.sh\" ''\n            exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} \"$1\"\n          ''\n        );\n      }\n    ) name","count_applied":3,"content_meta":null},"content":null},{"meta":{"title":"pkgs.writers.writePyPy3Bin","path":["pkgs","writers","writePyPy3Bin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1300,"column":19},"lambda_expr":"writePyPy3Bin = name: writePyPy3 \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1300,"column":19},"path":["pkgs","writers","writePyPy3Bin"],"pos_type":"Lambda"}},"content":{"content":"\nwritePyPy3Bin takes the same arguments as writePyPy3 but outputs a directory (like writeScriptBin)\n","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1300,"column":19},"path":["pkgs","writers","writePyPy3Bin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writePython3","path":["pkgs","writers","writePython3"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1183,"column":50},"lambda_expr":"name:\n    {\n      libraries ? [ ],\n      flakeIgnore ? [ ],\n      doCheck ? true,\n      ...\n    }@args:\n    let\n      ignoreAttribute =\n        optionalString (flakeIgnore != [ ])\n          \"--ignore ${concatMapStringsSep \",\" escapeShellArg flakeIgnore}\";\n    in\n    makeScriptWriter (\n      (removeAttrs args [\n        \"libraries\"\n        \"flakeIgnore\"\n        \"doCheck\"\n      ])\n      // {\n        interpreter =\n          if pythonPackages != pkgs.pypy2Packages || pythonPackages != pkgs.pypy3Packages then\n            if libraries == [ ] then\n              python.interpreter\n            else if (lib.isFunction libraries) then\n              (python.withPackages libraries).interpreter\n            else\n              (python.withPackages (ps: libraries)).interpreter\n          else\n            python.interpreter;\n        check = optionalString (python.isPy3k && doCheck) (\n          writeDash \"pythoncheck.sh\" ''\n            exec ${buildPythonPackages.flake8}/bin/flake8 --show-source ${ignoreAttribute} \"$1\"\n          ''\n        );\n      }\n    ) name","count_applied":3,"content_meta":null},"content":null},{"meta":{"title":"pkgs.writers.writePython3Bin","path":["pkgs","writers","writePython3Bin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1272,"column":21},"lambda_expr":"writePython3Bin = name: writePython3 \"/bin/${name}\";","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1272,"column":21},"path":["pkgs","writers","writePython3Bin"],"pos_type":"Lambda"}},"content":{"content":"writePython3Bin takes the same arguments as writePython3 but outputs a directory (like writeScriptBin)","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1272,"column":21},"path":["pkgs","writers","writePython3Bin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeRuby","path":["pkgs","writers","writeRuby"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":925,"column":44},"lambda_expr":"name:\n    {\n      libraries ? [ ],\n      ...\n    }@args:\n    makeScriptWriter (\n      (removeAttrs args [ \"libraries\" ])\n      // {\n        interpreter =\n          if libraries == [ ] then \"${ruby}/bin/ruby\" else \"${(ruby.withPackages (ps: libraries))}/bin/ruby\";\n        # Rubocop doesn't seem to like running in this fashion.\n        #check = (writeDash \"rubocop.sh\" ''\n        #  exec ${lib.getExe buildRubyPackages.rubocop} \"$1\"\n        #'');\n      }\n    ) name","count_applied":3,"content_meta":null},"content":null},{"meta":{"title":"pkgs.writers.writeRubyBin","path":["pkgs","writers","writeRubyBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":959,"column":18},"lambda_expr":"name: writeRuby \"/bin/${name}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":959,"column":18},"path":["pkgs","writers","writeRubyBin"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":959,"column":18},"path":["pkgs","writers","writeRubyBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeRust","path":["pkgs","writers","writeRust"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1022,"column":5},"lambda_expr":"name:\n    {\n      makeWrapperArgs ? [ ],\n      rustc ? pkgs.rustc,\n      rustcArgs ? [ ],\n      strip ? true,\n    }:\n    let\n      darwinArgs = lib.optionals stdenv.hostPlatform.isDarwin [ \"-L${lib.getLib libiconv}/lib\" ];\n    in\n    makeBinWriter {\n      compileScript = ''\n        cp \"$contentPath\" tmp.rs\n        PATH=${lib.makeBinPath [ pkgs.gcc ]} ${rustc}/bin/rustc ${lib.escapeShellArgs rustcArgs} ${lib.escapeShellArgs darwinArgs} -o \"$out\" tmp.rs\n      '';\n      inherit makeWrapperArgs strip;\n    } name","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1022,"column":5},"path":["pkgs","writers","writeRust"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1022,"column":5},"path":["pkgs","writers","writeRust"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeRustBin","path":["pkgs","writers","writeRustBin"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1040,"column":18},"lambda_expr":"name: writeRust \"/bin/${name}\"","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1040,"column":18},"path":["pkgs","writers","writeRustBin"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/writers/scripts.nix","line":1040,"column":18},"path":["pkgs","writers","writeRustBin"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeTOML","path":["pkgs","writers","writeTOML"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":467,"column":9},"lambda_expr":"name: value:\n        pkgs.callPackage (\n          { runCommand, remarshal }:\n          runCommand name\n            {\n              nativeBuildInputs = [ remarshal ];\n              value = builtins.toJSON value;\n              preferLocalBuild = true;\n              __structuredAttrs = true;\n            }\n            ''\n              valuePath=\"$TMPDIR/value\"\n              printf \"%s\" \"$value\" > \"$valuePath\"\n              json2toml \"$valuePath\" \"$out\"\n            ''\n        ) { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":467,"column":9},"path":["pkgs","writers","writeTOML"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":467,"column":9},"path":["pkgs","writers","writeTOML"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeText","path":["pkgs","writers","writeText"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":185,"column":5},"lambda_expr":"writeText =\n    name: text:\n    # TODO: To fully deprecate, replace the assertion with `lib.isString` and remove the warning\n    assert lib.assertMsg (lib.strings.isConvertibleWithToString text)\n      \"pkgs.writeText ${lib.strings.escapeNixString name}: The second argument should be a string, but it's a ${builtins.typeOf text} instead.\";\n    lib.warnIf (!lib.isString text)\n      \"pkgs.writeText ${lib.strings.escapeNixString name}: The second argument should be a string, but it's a ${builtins.typeOf text} instead, which is deprecated. Use `toString` to convert the value to a string first.\"\n      writeTextFile\n      { inherit name text; };","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":185,"column":5},"path":["pkgs","writers","writeText"],"pos_type":"Lambda"}},"content":{"content":"or https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-text-writing","source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/build-support/trivial-builders/default.nix","line":185,"column":5},"path":["pkgs","writers","writeText"],"pos_type":"Lambda"}}},{"meta":{"title":"pkgs.writers.writeYAML","path":["pkgs","writers","writeYAML"],"aliases":null,"signature":null,"is_primop":false,"primop_meta":null,"is_functor":true,"attr_position":null,"attr_expr":null,"lambda_position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":162,"column":9},"lambda_expr":"name: value:\n        pkgs.callPackage (\n          { runCommand, remarshal_0_17 }:\n          runCommand name\n            {\n              nativeBuildInputs = [ remarshal_0_17 ];\n              value = builtins.toJSON value;\n              preferLocalBuild = true;\n              __structuredAttrs = true;\n            }\n            ''\n              valuePath=\"$TMPDIR/value\"\n              printf \"%s\" \"$value\" > \"$valuePath\"\n              json2yaml \"$valuePath\" \"$out\"\n            ''\n        ) { }","count_applied":0,"content_meta":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":162,"column":9},"path":["pkgs","writers","writeYAML"],"pos_type":"Lambda"}},"content":{"content":null,"source":{"position":{"file":"/nix/store/jg5a6z6if7cpf013y8fa8d4nv2ih5a0z-source/pkgs/pkgs-lib/formats.nix","line":162,"column":9},"path":["pkgs","writers","writeYAML"],"pos_type":"Lambda"}}}],"builtinTypes":{"abort":{"fn_type":"abort :: String -> Never"},"add":{"fn_type":"add :: Number -> Number -> Number"},"addErrorContext":{"fn_type":"addErrorContext :: String -> a -> a"},"all":{"fn_type":"all :: (a -> Bool) -> [a] -> Bool"},"any":{"fn_type":"any :: (a -> Bool) -> [a] -> Bool"},"attrNames":{"fn_type":"attrNames :: AttrSet -> [String]"},"attrValues":{"fn_type":"attrValues :: AttrSet -> [a]"},"baseNameOf":{"fn_type":"baseNameOf :: String -> String"},"bitAnd":{"fn_type":"bitAnd :: Int -> Int -> Int"},"bitOr":{"fn_type":"bitOr :: Int -> Int -> Int"},"bitXor":{"fn_type":"bitXor :: Int -> Int -> Int"},"break":{"fn_type":"break :: a -> a"},"catAttrs":{"fn_type":"catAttrs :: String -> [ { ${name} :: a } ] -> [a]"},"ceil":{"fn_type":"ceil :: Float -> Int"},"compareVersions":{"fn_type":"compareVersions :: String -> String -> Int"},"concatLists":{"fn_type":"concatLists :: [[a]] -> [a]"},"concatMap":{"fn_type":"concatMap :: (a -> [b]) -> [a] -> [b]"},"concatStringsSep":{"fn_type":"concatStringsSep :: String -> [String] -> String"},"deepSeq":{"fn_type":"deepSeq :: a -> b -> b"},"derivation":{"fn_type":"let \n    Derivation :: {\n        all :: [ Derivation ];\n        builder :: String;\n        drvAttrs :: {\n            builder = String; \n            name = String;\n            outputs = [ output :: String ]; \n            system = String;\n            ${additionalArgs} :: String;\n        }\n        drvPath :: String;\n        name :: String;\n        outPath :: String;\n        outputName :: String;\n        outputs :: [ output :: String ];\n        system :: String;\n        type :: \"derivation\";\n        ${output} :: Derivation;\n        ${additionalArgs} :: String;\n    };\nin\n    builtins.derivation :: {\n        name :: String;\n        outputs :: [ output :: String ] ? [ \"out\" ];\n        builder :: String;\n        system :: String;\n        ${additionalArgs} :: String;\n    } -> Derivation"},"dirOf":{"fn_type":"dirOf :: String -> String"},"div":{"fn_type":"div :: Number -> Number -> Number"},"elem":{"fn_type":"elem :: a -> [b] -> Bool"},"elemAt":{"fn_type":"elemAt :: [a] -> Int -> a"},"fetchClosure":{"fn_type":"fetchClosure :: AttrSet -> AttrSet"},"fetchGit":{"fn_type":"fetchgit :: AttrSet -> AttrSet"},"fetchTarball":{"fn_type":"fetchTarball :: AttrSet -> String"},"fetchurl":{"fn_type":"fetchurl :: String -> String"},"filter":{"fn_type":"filter :: (a -> Bool) -> [a] -> [a]"},"filterSource":{"fn_type":"filterSource :: (Path -> String -> Bool) -> Path -> StorePath"},"floor":{"fn_type":"floor :: Float -> Int"},"foldl'":{"fn_type":"foldl' :: (a -> b -> a) -> a -> [b] -> a"},"fromJSON":{"fn_type":"fromJSON :: String -> a"},"functionArgs":{"fn_type":"functionArgs :: (a) -> AttrSet"},"genList":{"fn_type":"genList :: (Int -> a) -> Int -> [a]"},"genericClosure":{"fn_type":"genericClosure :: AttrSet -> [AttrSet]"},"getAttr":{"fn_type":"getAttr :: String -> AttrSet -> a"},"getEnv":{"fn_type":"getEnv :: String -> String"},"getFlake":{"fn_type":"getFlake :: String -> AttrSet"},"groupBy":{"fn_type":"groupBy :: (a -> String) -> [ a ] -> { [String] :: [a] }"},"hasAttr":{"fn_type":"hasAttr :: String -> AttrSet -> Bool"},"hashFile":{"fn_type":"hashFile :: String -> Path -> String"},"hashString":{"fn_type":"hashString :: String -> String -> String"},"head":{"fn_type":"head :: [a] -> a"},"import":{"fn_type":"import :: Path -> a"},"intersectAttrs":{"fn_type":"intersectAttrs :: AttrSet -> AttrSet -> AttrSet"},"isAttrs":{"fn_type":"isAttrs :: a -> Bool"},"isBool":{"fn_type":"isBool :: a -> Bool"},"isFloat":{"fn_type":"isFloat :: a -> Bool"},"isFunction":{"fn_type":"isFunction :: a -> Bool"},"isInt":{"fn_type":"isInt :: a -> Bool"},"isList":{"fn_type":"isList :: a -> Bool"},"isNull":{"fn_type":"isNull :: a -> Bool"},"isPath":{"fn_type":"isPath :: a -> Bool"},"isString":{"fn_type":"isString :: a -> Bool"},"length":{"fn_type":"length :: [a] -> Int"},"lessThan":{"fn_type":"lessThan :: Number -> Number -> Bool"},"listToAttrs":{"fn_type":"listToAttrs :: [{name :: String; value :: a}] -> AttrSet"},"map":{"fn_type":"map :: (a -> b) -> [a] -> [b]"},"mapAttrs":{"fn_type":"mapAttrs :: (String -> a -> b) -> AttrSet -> AttrSet"},"match":{"fn_type":"match :: String -> String -> Bool"},"mul":{"fn_type":"mul :: Number -> Number -> Number"},"parseDrvName":{"fn_type":"parseDrvName :: String -> { name :: String; version :: String }"},"partition":{"fn_type":"partition :: (a -> Bool) -> [a] -> { right :: [a]; wrong :: [a] }"},"Path":{"fn_type":"Path :: AttrSet -> StorePath"},"pathExists":{"fn_type":"pathExists :: Path -> Bool"},"placeholder":{"fn_type":"placeholder :: String -> String"},"readDir":{"fn_type":"readDir :: Path -> AttrSet"},"readFile":{"fn_type":"readFile :: Path -> String"},"removeAttrs":{"fn_type":"removeAttrs :: AttrSet -> [String] -> AttrSet"},"replaceStrings":{"fn_type":"replaceStrings :: [String] -> [String] -> String -> String"},"seq":{"fn_type":"seq :: a -> b -> b"},"sort":{"fn_type":"sort :: (a -> b -> Bool) -> [a] -> [b]"},"split":{"fn_type":"split :: String -> String -> [String]"},"splitVersion":{"fn_type":"splitVersion :: String -> [String]"},"storePath":{"fn_type":"storePath :: StorePath -> StorePath"},"stringLength":{"fn_type":"stringLength :: String -> Int"},"sub":{"fn_type":"sub :: Number -> Number -> Number"},"substring":{"fn_type":"substring :: Int -> Int -> String -> String"},"tail":{"fn_type":"tail :: [a] -> [a]"},"throw":{"fn_type":"throw :: String -> Never"},"toFile":{"fn_type":"toFile :: Path -> String -> StorePath"},"toJSON":{"fn_type":"toJSON :: a -> String"},"toPath":{"fn_type":"toPath :: String -> Path"},"toString":{"fn_type":"toString :: a -> String"},"toXML":{"fn_type":"toXML :: a -> String"},"trace":{"fn_type":"trace :: a -> b -> b"},"traceVerbose":{"fn_type":"traceVerbose :: a -> b -> b"},"tryEval":{"fn_type":"tryEval :: a"},"typeOf":{"fn_type":"typeOf :: a -> String"},"zipAttrsWith":{"fn_type":"zipAttrsWith :: (String -> [a] ) -> [a] -> AttrSet"},"fromTOML":{"fn_type":"fromTOML :: String -> AttrSet"}},"upstreamInfo":{"lastModified":1779931091,"rev":"3052ddf0614791c1869384a868248be5607a309f"},"nixInfo":{"lastModified":1779916484,"rev":"a3f46f26a43a7958ea2ee3ee69bc0c2dab2f0401"}}