-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(modules): extract shared customPackages overlay into flake.lib #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # Shared nixpkgs overlay surfaced as `config.flake.lib.overlays.customPackages`. | ||
| # This module only *defines* the overlay; hosts opt in by composing it into | ||
| # `nixpkgs.overlays` (see `modules/system76/custom-packages-overlay.nix` for an | ||
| # example that prepends this overlay and then layers a hardware-specific patch | ||
| # on top). | ||
| # | ||
| # Resolution rules: | ||
| # - `final.callPackage` for in-tree derivations under `packages/`. | ||
| # - `prev.<pkg>.overrideAttrs` for upstream packages that need patching, version | ||
| # bumps, or dependency tweaks until the upstream issue is resolved. | ||
| _: { | ||
| flake.lib.overlays.customPackages = final: prev: { | ||
| # In-tree custom packages from `packages/`. | ||
| brave-origin = final.callPackage ../../packages/brave-origin { }; | ||
| raindrop = final.callPackage ../../packages/raindrop { }; | ||
| electron-mail = final.callPackage ../../packages/electron-mail { }; | ||
| wappalyzer-next = final.callPackage ../../packages/wappalyzer-next { }; | ||
| age-plugin-fido2prf = final.callPackage ../../packages/age-plugin-fido2prf { }; | ||
| azd = final.callPackage ../../packages/azd { }; | ||
| charles = final.callPackage ../../packages/charles { }; | ||
| dnsleak = final.callPackage ../../packages/dnsleak { }; | ||
| gitlawb = final.callPackage ../../packages/gitlawb { }; | ||
| opendirectorydownloader = final.callPackage ../../packages/opendirectorydownloader { }; | ||
| malimite = final.callPackage ../../packages/malimite { }; | ||
| claude-wpa = final.callPackage ../../packages/claude-wpa { }; | ||
| codeburn = final.callPackage ../../packages/codeburn { }; | ||
| rg-fzf = final.callPackage ../../packages/rg-fzf { }; | ||
| sss-nix-repair = final.callPackage ../../packages/sss-nix-repair { }; | ||
| source-map-explorer = final.callPackage ../../packages/source-map-explorer { }; | ||
| webcrack = final.callPackage ../../packages/webcrack { }; | ||
| wakaru = final.callPackage ../../packages/wakaru { }; | ||
| restringer = final.callPackage ../../packages/restringer { }; | ||
| tweakcc = final.callPackage ../../packages/tweakcc { }; | ||
| video-cache = final.callPackage ../../packages/video-cache { }; | ||
|
|
||
| # nixpkgs wfuzz silently drops the `screenshot` plugin on Python 3.13 | ||
| # (removed `pipes` stdlib module) and ships netaddr as a test-only dep, | ||
| # leaving iprange/ipnet payloads broken with a misleading "pip install" | ||
| # message. Patches are pending upstream review at xmendez/wfuzz#380 and | ||
| # nixpkgs PR; remove this override once they land. | ||
| wfuzz = final.python3Packages.toPythonApplication ( | ||
| final.python3Packages.callPackage ../../packages/wfuzz { } | ||
| ); | ||
|
|
||
| # Bump librepods to v0.2.5 (nixpkgs pins v0.2.0). v0.2.5 swaps | ||
| # qtquick3d for qtdeclarative + qttools and adds Widgets/DBus. | ||
| # Dep lookups go through `final` so any later overlay (e.g. an `openssl` | ||
| # CVE patch) feeds into this build instead of being silently bypassed. | ||
| librepods = prev.librepods.overrideAttrs (_old: rec { | ||
| version = "0.2.5"; | ||
| src = final.fetchFromGitHub { | ||
| owner = "kavishdevar"; | ||
| repo = "librepods"; | ||
| tag = "v${version}"; | ||
| hash = "sha256-6l1WjwjDbv5e3tDaWo9+XSEjr9ge/hKysIkeUqyiO4U="; | ||
| }; | ||
| buildInputs = [ | ||
| final.libpulseaudio | ||
| final.openssl | ||
| final.qt6.qtbase | ||
| final.qt6.qtconnectivity | ||
| final.qt6.qtdeclarative | ||
| final.qt6.qttools | ||
| ]; | ||
| }); | ||
|
|
||
| # Workaround: marktext 0.17.0's native module rebuild can fail with | ||
| # `node-gyp: not found` under the current Node 24 toolchain. Pull | ||
| # `node-gyp` from `final` for the same fixpoint reason as `librepods`. | ||
| marktext = prev.marktext.overrideAttrs (old: { | ||
| nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ | ||
| final."node-gyp" | ||
| ]; | ||
| npm_config_node_gyp = "${final."node-gyp"}/bin/node-gyp"; | ||
| NODE_GYP = "${final."node-gyp"}/bin/node-gyp"; | ||
| }); | ||
|
Bad3r marked this conversation as resolved.
|
||
|
|
||
| # i3 window manager utilities | ||
| i3-focus-or-launch = final.callPackage ../../packages/i3-focus-or-launch { }; | ||
| i3-scratchpad-show-or-create = final.callPackage ../../packages/i3-scratchpad-show-or-create { }; | ||
| monitor-query = import ../../lib/shell/monitor-query.nix { inherit (final) writeText; }; | ||
| # toggle-logseq is created in modules/apps/i3wm/config.nix (needs config.gui.scratchpad) | ||
| }; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,75 +1,8 @@ | ||
| _: { | ||
| { config, ... }: | ||
| { | ||
| configurations.nixos.tpnix.module = { | ||
| nixpkgs.overlays = [ | ||
| (final: prev: { | ||
| # Add custom packages to nixpkgs | ||
| brave-origin = final.callPackage ../../packages/brave-origin { }; | ||
| raindrop = final.callPackage ../../packages/raindrop { }; | ||
| electron-mail = final.callPackage ../../packages/electron-mail { }; | ||
| wappalyzer-next = final.callPackage ../../packages/wappalyzer-next { }; | ||
| age-plugin-fido2prf = final.callPackage ../../packages/age-plugin-fido2prf { }; | ||
| azd = final.callPackage ../../packages/azd { }; | ||
| charles = final.callPackage ../../packages/charles { }; | ||
| dnsleak = final.callPackage ../../packages/dnsleak { }; | ||
| gitlawb = final.callPackage ../../packages/gitlawb { }; | ||
| opendirectorydownloader = final.callPackage ../../packages/opendirectorydownloader { }; | ||
| malimite = final.callPackage ../../packages/malimite { }; | ||
| claude-wpa = final.callPackage ../../packages/claude-wpa { }; | ||
| codeburn = final.callPackage ../../packages/codeburn { }; | ||
| rg-fzf = final.callPackage ../../packages/rg-fzf { }; | ||
| sss-nix-repair = final.callPackage ../../packages/sss-nix-repair { }; | ||
| source-map-explorer = final.callPackage ../../packages/source-map-explorer { }; | ||
| webcrack = final.callPackage ../../packages/webcrack { }; | ||
| wakaru = final.callPackage ../../packages/wakaru { }; | ||
| restringer = final.callPackage ../../packages/restringer { }; | ||
| tweakcc = final.callPackage ../../packages/tweakcc { }; | ||
| video-cache = final.callPackage ../../packages/video-cache { }; | ||
|
|
||
| # nixpkgs wfuzz silently drops the `screenshot` plugin on Python 3.13 | ||
| # (removed `pipes` stdlib module) and ships netaddr as a test-only dep, | ||
| # leaving iprange/ipnet payloads broken with a misleading "pip install" | ||
| # message. Patches are pending upstream review at xmendez/wfuzz#380 and | ||
| # nixpkgs PR; remove this override once they land. | ||
| wfuzz = final.python3Packages.toPythonApplication ( | ||
| final.python3Packages.callPackage ../../packages/wfuzz { } | ||
| ); | ||
|
|
||
| # Bump librepods to v0.2.5 (nixpkgs pins v0.2.0). v0.2.5 swaps | ||
| # qtquick3d for qtdeclarative + qttools and adds Widgets/DBus. | ||
| librepods = prev.librepods.overrideAttrs (_old: rec { | ||
| version = "0.2.5"; | ||
| src = prev.fetchFromGitHub { | ||
| owner = "kavishdevar"; | ||
| repo = "librepods"; | ||
| tag = "v${version}"; | ||
| hash = "sha256-6l1WjwjDbv5e3tDaWo9+XSEjr9ge/hKysIkeUqyiO4U="; | ||
| }; | ||
| buildInputs = [ | ||
| prev.libpulseaudio | ||
| prev.openssl | ||
| prev.qt6.qtbase | ||
| prev.qt6.qtconnectivity | ||
| prev.qt6.qtdeclarative | ||
| prev.qt6.qttools | ||
| ]; | ||
| }); | ||
|
|
||
| # Workaround: marktext 0.17.0's native module rebuild can fail with | ||
| # `node-gyp: not found` under the current Node 24 toolchain. | ||
| marktext = prev.marktext.overrideAttrs (old: { | ||
| nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ | ||
| prev."node-gyp" | ||
| ]; | ||
| npm_config_node_gyp = "${prev."node-gyp"}/bin/node-gyp"; | ||
| NODE_GYP = "${prev."node-gyp"}/bin/node-gyp"; | ||
| }); | ||
|
|
||
| # i3 window manager utilities | ||
| i3-focus-or-launch = final.callPackage ../../packages/i3-focus-or-launch { }; | ||
| i3-scratchpad-show-or-create = final.callPackage ../../packages/i3-scratchpad-show-or-create { }; | ||
| monitor-query = import ../../lib/shell/monitor-query.nix { inherit (final) writeText; }; | ||
| # toggle-logseq is created in modules/apps/i3wm/config.nix (needs config.gui.scratchpad) | ||
| }) | ||
| config.flake.lib.overlays.customPackages | ||
| ]; | ||
| }; | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.