diff options
author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-02-01 12:24:57 +0100 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2024-02-01 12:25:11 +0100 |
commit | 27fa02d0f19b46920eaf78f74c6b700e31086379 (patch) | |
tree | 715ce671c4de5ecc52d4d40aa40a0b16cfd2ba00 /pkgs/by-name/al | |
parent | a7e73864b4d7a8dbd9df8e144e612ed1ed5577d4 (diff) | |
parent | 2c582510dbd6657db54222db0567e7c34bd9bb24 (diff) |
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts: - pkgs/development/compilers/llvm/10/clang/default.nix - pkgs/development/compilers/llvm/8/clang/default.nix
Diffstat (limited to 'pkgs/by-name/al')
-rw-r--r-- | pkgs/by-name/al/alsa-lib-with-plugins/package.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/by-name/al/alsa-lib-with-plugins/package.nix b/pkgs/by-name/al/alsa-lib-with-plugins/package.nix new file mode 100644 index 0000000000000..4388884f75a6d --- /dev/null +++ b/pkgs/by-name/al/alsa-lib-with-plugins/package.nix @@ -0,0 +1,52 @@ +{ lib +, pkgs +, alsa-lib +, plugins ? [ pkgs.alsa-plugins ] +, lndir +, symlinkJoin +, runCommand +}: +let + merged = symlinkJoin { name = "alsa-plugins-merged"; paths = plugins; }; +in +runCommand "${alsa-lib.pname}-${alsa-lib.version}" { + meta = with lib; { + description = "wrapper to ease access to ALSA plugins"; + platforms = platforms.linux; + maintainers = with maintainers; [ gm6k ]; + }; + outputs = alsa-lib.outputs; +} ( + ( + lib.concatMapStringsSep "\n" ( + output: '' + mkdir ${builtins.placeholder output} + ${lndir}/bin/lndir ${lib.attrByPath [output] null alsa-lib} \ + ${builtins.placeholder output} + '' + ) alsa-lib.outputs + ) + '' + cp -r ${merged}/lib/alsa-lib $out/lib + ( + echo $out | wc -c + echo ${alsa-lib} | wc -c + ) | xargs echo | grep -q "^\(.*\) \1$" || ( + echo cannot binary patch + exit 1 + ) + rm $out/lib/libasound.la + rm $out/lib/libasound.so.?.?.? + rm $dev/lib/pkgconfig/alsa.pc + rm $dev/nix-support/propagated-build-inputs + cp ${alsa-lib}/lib/libasound.la $out/lib + cp ${alsa-lib}/lib/libasound.so.?.?.? $out/lib + cp ${alsa-lib.dev}/lib/pkgconfig/alsa.pc $dev/lib/pkgconfig + cp ${alsa-lib.dev}/nix-support/propagated-build-inputs $dev/nix-support + sed -i \ + $out/lib/libasound.la \ + $out/lib/libasound.so.?.?.? \ + $dev/lib/pkgconfig/alsa.pc \ + $dev/nix-support/propagated-build-inputs \ + -e "s@${alsa-lib}@$out@g" + '' +) |