for the unstable binding you should set it to use the nixpkgs-unstable input instead of nixpkgs
if you really want to make it available via pkgs-unstable, you should add it to specialArgs, i.e. specialArgs = { inherit inputs; pkgs-unstable = unstable; };
you need to do the same with HM, but using extraSpecialArgs instead of specialArgs, i.e. put ({ home-manager.extraSpecialArgs = { ... }; }) in the modules list for the respective system configs
Overlay is unnecessary, I would not use overlays as they will slow down eval and it’s a misuse to use them for something like this.
Done:
Also changed unstable to pkgs-unstable, is that what you meant from your second point?
I’m not attached to how I do this as long as it’s not working against it’s intended use/configuration… specialArgs = { inherit inputs; pkgs-unstable = unstable; }; goes on the configuration.nix file and the next point in the flake.nix
Did it build the new version? What path does this command give?
readlink $(which amarok)
So, I don’t think pulling amarok from the unstable branch will help in this case because the QT versions are different, so the derivation will need to be build from your system.
We can easily do this by overlaying amarok with changes from unstable:
error: builder for '/nix/store/rxf1chlk99qmlj2rjmvmapk8ni3bl25q-amarok-2.9.71.tar.xz.drv' failed with exit code 1;
last 10 log lines:
> Dload Upload Total Spent Left Speed
> 0 150 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
> curl: (56) The requested URL returned error: 404
>
> trying https://ftp.funet.fi/pub/mirrors/ftp.kde.org/pub/kde/stable/amarok/2.9.71/amarok-2.9.71.tar.xz
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 0 315 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
> curl: (22) The requested URL returned error: 404
> error: cannot download amarok-2.9.71.tar.xz from any mirror
For full logs, run 'nix log /nix/store/rxf1chlk99qmlj2rjmvmapk8ni3bl25q-amarok-2.9.71.tar.xz.drv'.
error: 1 dependencies of derivation '/nix/store/mg692sq6r0j0ip9cdq3yd0ji103imbxd-amarok-3.0.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/7f24mprdai75863gf4n1lfj4airgq0jy-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dxhfxrl7gdp9l0r8lknyi5kp2qpmp91n-nixos-system-oak-24.05.20240531.63dacb4.drv' failed to build
These are the only references to Amarok. Scratching my head…
That is quite confusing indeed. I though just having finalAttrs is enough because I’ve used one argument once to pin a version package and it worked. Looking back, I think it was just be pinning the wrong version and just using the version number I specified for the name…
In this case with amarok, it was building 2.9.71, but naming the package 3.0.1
Okay, got Amarok (unstable) loading AND with sound. Which seems to be an issue on how Amarok is being compiled…
Had to add libsForQt5.phonon-backend-gstreamer for it to output sound.
Btw, don’t use pkgs in an overlay, prefer final whenever possible. If not possible, due to infrec, use prev.
Literally the same thing but without using overlays, just use the override directly where you want the package.blah.overrideAttrs { ... } returns another package.
Thanks I got it working as I wanted, no overlay and seems fine!
I need to add libsForQt5.phonon-backend-gstreamer because if I don’t there is no audio output. Amarok won’t even play at all. Even though the rest of the system works. Mainly, this line gave me the hint I needed: WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
This is on the stable and unstable branches…
No audio… This is the output of the amarok command with out gstreamer added:
**********************************************************************************************
** AMAROK WAS STARTED IN NORMAL MODE. IF YOU WANT TO SEE DEBUGGING INFORMATION, PLEASE USE: **
** amarok --debug **
**********************************************************************************************
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: Phonon::createPath: Cannot connect Phonon::MediaObject ( no objectName ) to Phonon::AudioOutput ( no objectName ).
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: Phonon::createPath: Cannot connect Phonon::MediaObject ( no objectName ) to Phonon::AudioDataOutput ( no objectName ).
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
Got ERROR: "Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist" errno: 2000
kf.kirigami: Failed to find a Kirigami platform plugin
Working… This is the output with it added:
**********************************************************************************************
** AMAROK WAS STARTED IN NORMAL MODE. IF YOU WANT TO SEE DEBUGGING INFORMATION, PLEASE USE: **
** amarok --debug **
**********************************************************************************************
Got ERROR: "Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist" errno: 2000
kf.kirigami: Failed to find a Kirigami platform plugin
file:///nix/store/s0m9rdvp25409sq2j9nnwi4l2zx7mifm-amarok-3.0.1/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:97:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///nix/store/s0m9rdvp25409sq2j9nnwi4l2zx7mifm-amarok-3.0.1/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:87:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///nix/store/s0m9rdvp25409sq2j9nnwi4l2zx7mifm-amarok-3.0.1/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:97:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///nix/store/s0m9rdvp25409sq2j9nnwi4l2zx7mifm-amarok-3.0.1/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:87:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///nix/store/s0m9rdvp25409sq2j9nnwi4l2zx7mifm-amarok-3.0.1/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:97:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
file:///nix/store/s0m9rdvp25409sq2j9nnwi4l2zx7mifm-amarok-3.0.1/share/kpackage/genericqml/org.kde.amarok.context/contents/ui/main.qml:87:25: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
[29915:30005:0802/111326.201816:ERROR:gl_context_egl.cc(259)] eglCreateContext failed with error EGL_BAD_CONTEXT
[29915:30005:0802/111326.201828:ERROR:gpu_channel_manager.cc(753)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[29915:30005:0802/111326.201834:ERROR:shared_image_stub.cc(470)] SharedImageStub: unable to create context
[29915:30005:0802/111326.201840:ERROR:gpu_channel.cc(449)] GpuChannel: Failed to create SharedImageStub