{"id":27945289,"url":"https://github.com/jonringer/language-specific-config-overlays-proposal","last_synced_at":"2026-02-15T23:04:16.150Z","repository":{"id":285438456,"uuid":"859061604","full_name":"jonringer/language-specific-config-overlays-proposal","owner":"jonringer","description":"Proposal for passing language overlays through config options.","archived":false,"fork":false,"pushed_at":"2025-03-31T18:20:37.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T00:42:30.649Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonringer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-18T02:36:06.000Z","updated_at":"2025-03-31T18:20:41.000Z","dependencies_parsed_at":"2025-03-31T19:24:38.685Z","dependency_job_id":"6c9f78ef-63c8-48d4-9c53-e9f723b86123","html_url":"https://github.com/jonringer/language-specific-config-overlays-proposal","commit_stats":null,"previous_names":["jonringer/language-specific-config-overlays-proposal"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonringer/language-specific-config-overlays-proposal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Flanguage-specific-config-overlays-proposal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Flanguage-specific-config-overlays-proposal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Flanguage-specific-config-overlays-proposal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Flanguage-specific-config-overlays-proposal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonringer","download_url":"https://codeload.github.com/jonringer/language-specific-config-overlays-proposal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Flanguage-specific-config-overlays-proposal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29491998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T19:29:10.908Z","status":"ssl_error","status_checked_at":"2026-02-15T19:29:10.419Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-07T12:56:52.427Z","updated_at":"2026-02-15T23:04:16.120Z","avatar_url":"https://github.com/jonringer.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"---\nTitle: Pass language ecosystem overlays as pkgs.config options\nAuthor: jonringer\nDiscussions-To: https://github.com/NixOS/nixpkgs/issues/44426\nStatus: Draft\nType: Standards Track\nTopic: Packaging\nCreated: 2024-9-17\n---\n\n# Summary\n\nExtending language package sets (e.g. `python3Packages`) is notoriously difficult\nas each ecosystem is created differently. This proposal attempts to provide a\nseries of `config.overlays.\u003cscope\u003e` options in which overlays can be passed to\nthe respective package set(s).\n\n## Detailed Implementation\n\nThis is using python as an example, but applicable to almost all package sets.\n\nConfig support:\n```\n  # pkgs/top-level/config.nix\n\n  overlayType = lib.mkOptionType {\n    name = \"overlay\";\n    description = \"overlay\";\n    check = lib.isFunction;\n    merge = lib.mergeOneOption;\n  };\n\n  ...\n\n  options.overlays.python = mkOption {\n    type = types.listOf overlayType;\n    default = [];\n    description = ''\n      Overlays which will be applied to every python interpreter package set.\n    '';\n  };\n```\n\nIntegration with python package sets, in this case it would replace the need\nfor the `pythonPackagesExtensions` you can define at the top-level:\n```diff\n--- a/pkgs/development/interpreters/python/passthrufun.nix\n+++ b/pkgs/development/interpreters/python/passthrufun.nix\n@@ -56,7 +56,7 @@\n         pythonExtension\n       ] ++ (optionalExtensions (!self.isPy3k) [\n         python2Extension\n-      ]) ++ pythonPackagesExtensions ++ [\n+      ]) ++ config.overlays.python ++ [\n         overrides\n       ]);\n```\n\n## Example python use case\n\nIn a downstream overlay:\n```nix\n# flake.nix or default.nix\nimport poly-repo {\n  ...\n  config.overlays.python = [ (final: _: {\n    myPythonPackage = final.callPackage ./package.nix { };\n  )}];\n}\n```\n\nThen building for any python interpreter would just be:\n```bash\n$ nix-build -A python311.pkgs.myPythonPackage\n/nix/store/\u003chash\u003e-python3.11-mypythonpackage-1.0\n$ nix-build -A python312.pkgs.myPythonPackage\n/nix/store/\u003chash\u003e-python3.12-mypythonpackage-1.0\n```\n\n## Migration plan\n\n- If a package set does expose a way to inject overlays (e.g. python + `pythonPackagesExtensions`), then deprecate old usage.\n- `overlays` from the import statement should map to `overlays.pkgs`\n\n## Future work\n\n- Apply overlay options for every language ecosystem and package set.\n\n## Relevant topics\n\n- Recursive Overlays: https://github.com/NixOS/nixpkgs/pull/54266\n- Common Override Interface: https://github.com/NixOS/rfcs/pull/67\n- \"Better extensible\" attrsets: https://github.com/NixOS/nixpkgs/pull/51213\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonringer%2Flanguage-specific-config-overlays-proposal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonringer%2Flanguage-specific-config-overlays-proposal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonringer%2Flanguage-specific-config-overlays-proposal/lists"}