Skip to content
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

heroic: fix cursor issues #358010

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

Steinhagen
Copy link
Contributor

Fix the Xorg mouse issues initialy found with Lutris in: #348533

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Fix the Xorg mouse issues initialy found with Lutris in:
NixOS#348533
Copy link
Contributor

@aidalgol aidalgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I have any way of testing this, but adding these Xorg packages to the FHS environment seems perfectly sensible to me.

@Atemu
Copy link
Member

Atemu commented Nov 22, 2024

For testing, please simply point your Nixpkgs at this branch. If you use NIX_PATH then use -I nixpkgs=https://github.com/Steinhagen/nixpkgs/archive/refs/heads/heroic-xorg-mouse-fix.zip and flakes users can use the flake url github:Steinhagen/nixpkgs/heroic-xorg-mouse-fix.

@Steinhagen
Copy link
Contributor Author

Steinhagen commented Nov 22, 2024

If you are using flakes, another way to test this would be:

============================== flake.nix ===============================

{
  ......................................................................
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    heroicfix.url = "github:Steinhagen/nixpkgs/heroic-xorg-mouse-fix";
  ......................................................................
  };
  outputs =
    {
      self,
      nixpkgs,
      ...
    }@inputs:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages."x86_64-linux";
      pkgs-heroicfix = import inputs.heroicfix {
        inherit system;
        config.allowUnfree = true;
      };
    in
    {
      nixosConfigurations = {
        test-machine = nixpkgs.lib.nixosSystem {
          specialArgs = {
            inherit
              system
              inputs
              pkgs-heroicfix
              ;
          ..............................................................
          };
          modules = [
            ./configuration.nix
  ......................................................................

=========================== configuration.nix ==========================

{
  pkgs,
  pkgs-heroicfix,
  ...
}:
{
  ......................................................................
  users.users = {
    demouser = {
      ..................................................................
      packages =
        (with pkgs; [
          ..............................................................
        ])
        ++ (with pkgs-heroicfix; [
          (heroic.override {
            extraPkgs = pkgs-heroicfix: [
              wineWowPackages.staging
              winetricks
              wineWowPackages.waylandFull
            ];
          })
        ]);
    };
  };
}

@Atemu
Copy link
Member

Atemu commented Nov 22, 2024

nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
heroicfix.url = "github:Steinhagen/nixpkgs/heroic-xorg-mouse-fix";

I'd recommend replacing the nixpkgs input entirely. You should never mix multiple nixpkgs revisions in a single derivation.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 22, 2024
@KennethHoff
Copy link

KennethHoff commented Nov 22, 2024

nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
heroicfix.url = "github:Steinhagen/nixpkgs/heroic-xorg-mouse-fix";

I'd recommend replacing the nixpkgs input entirely. You should never mix multiple nixpkgs revisions in a single derivation.

What does this mean? Would doing this in a flake.nix do the trick?

- nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ nixpkgs.url = "github:Steinhagen/nixpkgs/heroic-xorg-mouse-fix";

@Atemu
Copy link
Member

Atemu commented Nov 22, 2024

Yup, please test with that and report back.

@KennethHoff
Copy link

KennethHoff commented Nov 22, 2024

I realized I was on a relatively old unstable branch so it takes a little while to rebuild. First gonna test if my PC works on the newest unstable and then I can test out @Steinhagen's branch.

Tangent, but how do I set the download-buffer-size setting? My Google-fu is unusually bad at this; I literally get 3 results on Google and even ChatGPT is failing me. It says something about nix.conf (which, for reference, I've never even heard about before now), but I want to set it in my configuration.nix instead 😅

@Atemu
Copy link
Member

Atemu commented Nov 22, 2024

I realized I was on a relatively old unstable branch so it takes a little while to rebuild. First gonna test if my PC works on the newest unstable and then I can test out @Steinhagen's branch.

Note that this PR is based on master rather than unstable and there's usually a couple of days delay and a lot of things can happen in a few days (i.e. a staging-next merge).

(Handy Nixpkgs contributior trick: Unless there are conflicts, always base your branch on nixos-unstable. Even when targetting staging. This makes your PR much easier to work with in some cases like this one.)

how do I set the download-buffer-size setting

The same way you configure any nix.conf setting: https://search.nixos.org/options?channel=unstable&show=nix.settings&from=0&size=50&sort=relevance&type=packages&query=nix.conf

@KennethHoff
Copy link

After like an hour of compiling Firefox for some reason I was able to verify that nixos-unstable w/ Heroic still does not work, but this PR w/ Heroic does work! (I checked Lutris too just for fun, and it still worked)

@Atemu
Copy link
Member

Atemu commented Nov 22, 2024

Great, thanks :)

@Atemu Atemu merged commit 1fd02d9 into NixOS:master Nov 22, 2024
17 of 18 checks passed
@Steinhagen Steinhagen deleted the heroic-xorg-mouse-fix branch November 22, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: games 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants