-
Notifications
You must be signed in to change notification settings - Fork 4
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
Tricky package overrides #69
Comments
We will focus on this topic this week at Wednesday 16:00 CEST! If anybody has any specific requests, either:
|
I'd like to thank for the video and regret not being there live. NixOS feel like these "get good" games, you suffer to pass the first box only to get hit by another challenge. Hard but never boring. Using the video and a lot of trying I managed to build the package in my VM. One boss down! But the next are is harder. This issue name is perfect. So what have I learned, you can create a simple I can clearly see that the override package is there on the REPL, but the moment I activate this option My { config, pkgs, ... }:
let
nixpkgs-unstable = fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/61c1d282153dbfcb5fe413c2
28d172d0fe7c2a7e.tar.gz";
sha256= "00f4chqjy9i5j6prn6qj8n3pnh50wk8inbli54zs8l8jj7jkfzyr";
};
unstablePkgs = import nixpkgs-unstable { };
in
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
nixpkgs.overlays = [
(final: prev: {
virtualbox= unstablePkgs.virtualbox;
})
];
virtualisation.virtualbox.guest.enable = true; So when working with
And in the config it seems the package is correctly overridden:
But after looking at the modules it seem the guest option loads something else. I even follow Replace Modules from nixos manula, but then I get other issues. Without
So it seem this is indeed tricker. This systemPackage is only there when |
Still looking at this a bit, seem the definition gets done top-level/linux-kernels.nix. |
I kind of feel dumb, after a lot of search this solved the problem: nixpkgs.overlays = [
(final: prev: {
virtualbox= unstablePkgs.virtualbox;
kernelPackages = unstablePkgs.kernelPackages;
})
]; With this I can see the version are correct. But if I understood, I'm actually replacing all |
I'm trying to understand how overriding works. I installed Nixos on a VirtualBox VM, version 7.0.14. However Nixos 23.11has the guest for 7.0.12 which does not work. There has been a recent PR to fix this, but its only on
unstable
. I've spent a week trying to get this to work, have read tons of Nix Pills, tickets, Reddit, etc and created a discourse thread and I'm still lost.For what I can understand I can get the main package replaced, but the internal derivations show the old code and hashes. I suspect that my override is somewhat shallow, but don't understand how the options are adding old references. I watched several videos on the Nixos Hour, and I like the approach. Not sure this is the right way to ask here.
The text was updated successfully, but these errors were encountered: