!XrtRvzcHOrHtSKARne:nixos.org

NixOS Audio

138 Members
35 Servers

Load older messages


SenderMessageTime
7 Dec 2023
@sporesirius:matrix.orgSporesirius *

Hi, I quite new to NixOS. I have a DAC where the latest version (1.2.10) of alsa-ucm-conf has a bug, because I'm on nixpkgs unstable I thought to add another input nixpkgs 23.05, so I can install an older alsa version.
So e.g:

environment.systemPackages = with pkgs; [
    r2305.alsa-lib
    r2305.alsa-ucm-conf
    r2305.alsa-utils
    
    ...
 ];

Now, when I check what is installed, I have alsa-ucm-conf 1.2.10, 1.2.9 and alsa-lib 1.2.9, 1.2.8 installed, but each application still seems to reference alsa-lib 1.2.9, which in turn references alsa-ucm-conf 1.2.10.

21:05:38
@lily:lily.flowers@lily:lily.flowers
In reply to @sporesirius:matrix.org

Hi, I quite new to NixOS. I have a DAC where the latest version (1.2.10) of alsa-ucm-conf has a bug, because I'm on nixpkgs unstable I thought to add another input nixpkgs 23.05, so I can install an older alsa version.
So e.g:
environment.systemPackages = with pkgs; [

    r2305.alsa-lib
    r2305.alsa-ucm-conf
    r2305.alsa-utils
    
    ...
  ];

Now, when I check what is installed, I have alsa-ucm-conf 1.2.10, 1.2.9 and alsa-lib 1.2.9, 1.2.8 installed, but each application still seems to reference alsa-lib 1.2.9, which in turn references alsa-ucm-conf 1.2.10.

that is working as intended. if you want applications to use a different alsa-ucm-conf version, you'll have to overlay it or use system.replaceRuntimeDependencies option to graft it


is there a patch available for alsa-ucm-conf? grafting alsa-ucm-conf with a patch to fix the bug might be easier and have less consequences, and you would even be able to PR the patch stuff to nixpkgs and fix it out-of-the-box for everyone

21:09:33
@sporesirius:matrix.orgSporesirius *

Hi, I quite new to NixOS. I have a DAC where the latest version (1.2.10) of alsa-ucm-conf has a bug, because I'm on nixpkgs unstable I thought to add another input nixpkgs 23.05, so I can install an older alsa version.
So e.g:

environment.systemPackages = with pkgs; [
    r2305.alsa-lib
    r2305.alsa-ucm-conf
    r2305.alsa-utils
    
    ...
 ];

Now, when I check what is installed, I have alsa-ucm-conf 1.2.10, 1.2.9 and alsa-lib 1.2.9, 1.2.8 installed, but each application still seems to reference alsa-lib 1.2.9, which in turn references alsa-ucm-conf 1.2.10.
E.g. pipewire is still using alsa-lib 1.2.9:

✦ ❯ nix-store --query --referrers /nix/store/4gassvc0bjajf1kzjrllp599z6acx2zn-alsa-lib-1.2.9 | grep pipewire
/nix/store/ayj04lvgq3b958gickjx69ry4cqj1lki-pipewire-0.3.84
21:09:38
@sporesirius:matrix.orgSporesirius
In reply to @lily:lily.flowers

that is working as intended. if you want applications to use a different alsa-ucm-conf version, you'll have to overlay it or use system.replaceRuntimeDependencies option to graft it


is there a patch available for alsa-ucm-conf? grafting alsa-ucm-conf with a patch to fix the bug might be easier and have less consequences, and you would even be able to PR the patch stuff to nixpkgs and fix it out-of-the-box for everyone

Yeah, there is a commit. It's a one line fix, I tried that first, but unfortunately that didn't work, so I tried the method describe above.
21:12:42
@sporesirius:matrix.orgSporesirius
In reply to @lily:lily.flowers

that is working as intended. if you want applications to use a different alsa-ucm-conf version, you'll have to overlay it or use system.replaceRuntimeDependencies option to graft it


is there a patch available for alsa-ucm-conf? grafting alsa-ucm-conf with a patch to fix the bug might be easier and have less consequences, and you would even be able to PR the patch stuff to nixpkgs and fix it out-of-the-box for everyone

* Yeah, there is a commit. It's a one-line fix, I tried that first, but unfortunately it didn't work, so I tried the method described above.
21:15:24
@lily:lily.flowers@lily:lily.flowers
In reply to @sporesirius:matrix.org
Yeah, there is a commit. It's a one-line fix, I tried that first, but unfortunately it didn't work, so I tried the method described above.

doing a nixos config like the below should patch in the fix and then graft it into your system. it, uh, doesn't work in pure eval (e.g. flakes) so you'll need to add --impure or something if you use flakes (it also needs IFD, but unless you manually disabled that, it should be enabled):

system.replaceRuntimeDependencies = [
  ({
    original = pkgs.alsa-ucm-conf;
    replacement = pkgs.alsa-ucm-conf.overrideAttrs (oldAttrs: {
      patches = (oldAttrs.patches or []) ++ [
        (fetchpatch {
          name = "alsa-ucm-conf-splitpcm-device-argument-fix.patch";
          url = "https://github.com/alsa-project/alsa-ucm-conf/commit/b68aa52acdd2763fedad5eec0f435fbf43e5ccc6.patch";
          hash = "sha256-8WE4+uhi4W7cCSZYmL7uFpcHJ9muX09UkGXyZIpEd9I=";
        })
      ];
    });
  })
];
21:22:17
@lily:lily.flowers@lily:lily.flowers

and you should be able to PR a diff like this to nixpkgs staging branch:

diff --git a/pkgs/by-name/al/alsa-ucm-conf/package.nix b/pkgs/by-name/al/alsa-ucm-conf/package.nix
index b7203a737638..c77b2024dc4e 100644
--- a/pkgs/by-name/al/alsa-ucm-conf/package.nix
+++ b/pkgs/by-name/al/alsa-ucm-conf/package.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl }:
+{ lib, stdenv, fetchurl, fetchpatch }:
 
 stdenv.mkDerivation rec {
   pname = "alsa-ucm-conf";
@@ -9,6 +9,14 @@ stdenv.mkDerivation rec {
     hash = "sha256-nCHj8B/wC6p1jfF+hnzTbiTrtBpr7ElzfpkQXhbyrpc=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "alsa-ucm-conf-splitpcm-device-argument-fix.patch";
+      url = "https://github.com/alsa-project/alsa-ucm-conf/commit/b68aa52acdd2763fedad5eec0f435fbf43e5ccc6.patch";
+      hash = "sha256-8WE4+uhi4W7cCSZYmL7uFpcHJ9muX09UkGXyZIpEd9I=";
+    })
+  ];
+
   dontBuild = true;
 
   installPhase = ''
21:22:40
@lily:lily.flowers@lily:lily.flowers
In reply to @sporesirius:matrix.org
Yeah, there is a commit. It's a one-line fix, I tried that first, but unfortunately it didn't work, so I tried the method described above.
*

doing a nixos config like the below should patch in the fix and then graft it into your system. it, uh, doesn't work in pure eval (e.g. flakes) so you'll need to add --impure or something if you use flakes (it also needs IFD, but unless you manually disabled that, it should be enabled):

system.replaceRuntimeDependencies = [
  ({
    original = pkgs.alsa-ucm-conf;
    replacement = pkgs.alsa-ucm-conf.overrideAttrs (oldAttrs: {
      patches = (oldAttrs.patches or []) ++ [
        (fetchpatch {
          name = "alsa-ucm-conf-splitpcm-device-argument-fix.patch";
          url = "https://github.com/alsa-project/alsa-ucm-conf/commit/b68aa52acdd2763fedad5eec0f435fbf43e5ccc6.patch";
          hash = "sha256-8WE4+uhi4W7cCSZYmL7uFpcHJ9muX09UkGXyZIpEd9I=";
        })
      ];
    });
  })
];
21:22:47
@lily:lily.flowers@lily:lily.flowers
In reply to @lily:lily.flowers

doing a nixos config like the below should patch in the fix and then graft it into your system. it, uh, doesn't work in pure eval (e.g. flakes) so you'll need to add --impure or something if you use flakes (it also needs IFD, but unless you manually disabled that, it should be enabled):

system.replaceRuntimeDependencies = [
  ({
    original = pkgs.alsa-ucm-conf;
    replacement = pkgs.alsa-ucm-conf.overrideAttrs (oldAttrs: {
      patches = (oldAttrs.patches or []) ++ [
        (fetchpatch {
          name = "alsa-ucm-conf-splitpcm-device-argument-fix.patch";
          url = "https://github.com/alsa-project/alsa-ucm-conf/commit/b68aa52acdd2763fedad5eec0f435fbf43e5ccc6.patch";
          hash = "sha256-8WE4+uhi4W7cCSZYmL7uFpcHJ9muX09UkGXyZIpEd9I=";
        })
      ];
    });
  })
];
(and grafting instead of overlay means you don't need to rebuild every package depending on alsa-lib, which is, uh, a lot)
21:23:12
@alan:alnn.xyzalan set a profile picture.21:25:51
@alan:alnn.xyzalan changed their profile picture.21:36:22
8 Dec 2023
@sporesirius:matrix.orgSporesirius
In reply to @lily:lily.flowers

doing a nixos config like the below should patch in the fix and then graft it into your system. it, uh, doesn't work in pure eval (e.g. flakes) so you'll need to add --impure or something if you use flakes (it also needs IFD, but unless you manually disabled that, it should be enabled):

system.replaceRuntimeDependencies = [
  ({
    original = pkgs.alsa-ucm-conf;
    replacement = pkgs.alsa-ucm-conf.overrideAttrs (oldAttrs: {
      patches = (oldAttrs.patches or []) ++ [
        (fetchpatch {
          name = "alsa-ucm-conf-splitpcm-device-argument-fix.patch";
          url = "https://github.com/alsa-project/alsa-ucm-conf/commit/b68aa52acdd2763fedad5eec0f435fbf43e5ccc6.patch";
          hash = "sha256-8WE4+uhi4W7cCSZYmL7uFpcHJ9muX09UkGXyZIpEd9I=";
        })
      ];
    });
  })
];
Oh wow, I see, that makes a lot of sense. Thanks for the help.
I'll try to PR, but first I have to fix a problem compiling with the patch. xdg-desktop-portal-1.18.2.drv fails a test.
00:29:45
10 Dec 2023
@/yvan:matrix.orgYvan Sraka (old) changed their display name from Yvan Sraka to Yvan Sraka (old).10:56:12
@rootname:matrix.orgrootname joined the room.12:06:44
17 Dec 2023
@nam3l33ss:matrix.org·☽•Nameless☆•777 · changed their profile picture.04:39:12
21 Dec 2023
@eyduh:matrix.orgeyduh (she/they) joined the room.02:19:19
@jcelerier:matrix.orgJean-Michaël Celerier hello! what would be the next steps to get this PR to progress? https://github.com/NixOS/nixpkgs/pull/174802#issuecomment-1845238990 16:09:31
@Minijackson:matrix.orgMinijacksonoh I must've missed the latest notifications, I thought we were still waiting for a Qt6-compatible release17:40:16
@Minijackson:matrix.orgMinijacksonI'll see if I can update the PR tonight17:40:23
@Minijackson:matrix.orgMinijacksonif someone wants to co-maintain ossia-score, please step up, I'm pretty busy these days so it's easy for me to miss releases17:41:03
@Minijackson:matrix.orgMinijackson Jean-Michaël Celerier: done 19:06:40
@jcelerier:matrix.orgJean-Michaël Celerierthanks!19:24:05
@jcelerier:matrix.orgJean-Michaël Celerierthe latest releases are all based on Qt 619:24:15
@jcelerier:matrix.orgJean-Michaël CelerierI'd be up for participating to the co-maintainership at least by checking the build script swhen there's an update19:24:44
@jcelerier:matrix.orgJean-Michaël CelerierI'd like to add a Nix step to ossia's CI to make sure there aren't any breaking changes19:24:59
@jcelerier:matrix.orgJean-Michaël Celerier e.g. here: https://github.com/ossia/score/actions/runs/7267711945 19:25:34
@Minijackson:matrix.orgMinijacksonnice!19:25:56
@jcelerier:matrix.orgJean-Michaël Celerierbut I don't know the correct invocations and my personal Nix experiences were... very suboptimal aha19:26:13
@Minijackson:matrix.orgMinijacksondo you want me to add you to the maintainer list?19:26:28
@Minijackson:matrix.orgMinijacksonno worries, the Nix community tends to be very helpful19:26:40

Show newer messages


Back to Room ListRoom Version: 9