Skip to content

nix: move package to nix/package.nix and add expose overlay - #47

Merged
HikariKnight merged 1 commit into
OpenGamingCollective:mainfrom
LucasOe:nix-overlay
Jul 21, 2026
Merged

nix: move package to nix/package.nix and add expose overlay#47
HikariKnight merged 1 commit into
OpenGamingCollective:mainfrom
LucasOe:nix-overlay

Conversation

@LucasOe

@LucasOe LucasOe commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This pull request refactors the Nix packaging setup.

  • Cleaned up flake.nix and moved the package derivation logic into a new file nix/package.nix
  • Added an overlay output to expose the package as scopebuddy
  • The package now uses lib.cleanSource to avoid including unnecessary files in the build context
  • Added a meta section

Why add an overlay?

The overlay makes it possible for users to build scopebuddy with their own customized package set.

A user may override gamescope to apply a patch or workaround. When installing via the flake's packages output, those overrides are not used. Installing via the overlay (pkgs.scopebuddy) ensures user-defined overrides are respected.

For example, some users may want to override gamescope to work around upstream issues:

{
  nixpkgs.overlays = [
    (final: prev: {
      # https://github.com/ValveSoftware/gamescope/issues/1924
      gamescope = prev.gamescope.overrideAttrs (_: {
        NIX_CFLAGS_COMPILE = [ "-fno-fast-math" ];
      });
    })
  ];
}

@HikariKnight
HikariKnight merged commit 86f03ce into OpenGamingCollective:main Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants