I have a local version of nixpkgs in /home/xxx/nixpkgs I want to make the following…
- User
I have a local version of nixpkgs in /home/xxx/nixpkgs
I want to make the following change:
$ git diff diff --git a/pkgs/development/libraries/mesa/common.nix b/pkgs/development/libraries/mesa/common.nix index 23e5104ffcf6..28b69a0f134d 100644 --- a/pkgs/development/libraries/mesa/common.nix +++ b/pkgs/development/libraries/mesa/common.nix @@ -5,7 +5,7 @@
nix build .#legacyPackages.x86_64-darwin.mesa .#legacyPackages.aarch64-darwin.mesa
rec { pname = "mesa";
- version = "25.0.1";
- version = "25.0.0";
Now, how do I use this change in my own nixos configuration instead of using mesa from the repositories?
- Assistant
To use your local modifications to mesa in your NixOS configuration, you can override the default package in your configuration.nix file to point to your local version of nixpkgs, which includes the changes you made. Here’s how you can do that:
-
Point to your local nixpkgs: In your NixOS configuration, you need to specify that you want to use your local version of nixpkgs. You can do this in the
nixpkgsconfiguration. -
Override mesa: You will need to override the mesa package to use your local version with the version change.
Here’s a step-by-step guide for your :
-
- User
Ok, I did it but I'm still seeing mesa 25.0.1 being used and I didn't get a hash mismatch even though I didn't change the hash in my local nixpkgs
- Assistant
- User
$ nix-build -A mesa /nix/store/g5hxc3ipiczm5srqrri4ngahrazd2g06-mesa-25.0.0
- Assistant
- User
For some reason
$ nix-shell -p vulkan-tools --run "vulkaninfo --summary"
still prints driverVersion = 25.0.1
- Assistant