Skip to content
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

rt{audio,midi}: refactor #111621

Merged

Conversation

OPNA2608
Copy link
Contributor

@OPNA2608 OPNA2608 commented Feb 2, 2021

Motivation for this change
  • Nixpkgs-fmt'd
  • switched both to CMake
  • using xyzSupport pattern & explicit CMake variables for audio APIs
  • moved RtAudio's patch into postPatch, way too simple of a fix to really need an in-tree patch file imo
  • fixed RtMidi's pkg-config file similar to RtAudio's previously
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@OPNA2608 OPNA2608 force-pushed the refactor/rtaudio_rtmidi/21.03 branch from 6f4dfec to 278765b Compare February 2, 2021 12:25
@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 111621 run on x86_64-linux 1

4 packages failed to build and are new build failures:
19 packages built:
  • csound-qt
  • cubicsdr
  • gqrx
  • gr-ais
  • gr-gsm
  • gr-osmosdr
  • milkytracker
  • polyphone
  • python37Packages.soapysdr-with-plugins
  • python38Packages.soapysdr-with-plugins
  • python39Packages.soapysdr-with-plugins
  • qradiolink
  • rtaudio
  • rtl_433
  • rtmidi
  • sdrangel
  • soapyaudio
  • soapysdr-with-plugins
  • welle-io

@OPNA2608 OPNA2608 force-pushed the refactor/rtaudio_rtmidi/21.03 branch from 278765b to 5355249 Compare February 2, 2021 22:02
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Feb 3, 2021

Result of nixpkgs-review pr 111621 run on aarch64-linux 1

1 package marked as broken and skipped:
  • giada
3 packages failed to build:
  • polyphone
  • sdrangel
  • vcv-rack
16 packages built:
  • csound-qt
  • cubicsdr
  • gqrx
  • gr-ais
  • gr-gsm
  • gr-osmosdr
  • pianobooster
  • python37Packages.soapysdr-with-plugins
  • python38Packages.soapysdr-with-plugins
  • python39Packages.soapysdr-with-plugins
  • qradiolink
  • rtaudio
  • rtl_433
  • rtmidi
  • soapyaudio
  • soapysdr-with-plugins

(build failures all replicable on master)

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 111621 run on x86_64-darwin 1

3 packages marked as broken and skipped:
  • giada
  • rtl_433
  • welle-io
1 package failed to build and already failed to build on hydra master:
1 package built:
  • rtaudio

Please apply the darwin patch:

diff --git a/pkgs/development/libraries/audio/rtmidi/default.nix b/pkgs/development/libraries/audio/rtmidi/default.nix
index 5ef525f9e11..7f454723a7b 100644
--- a/pkgs/development/libraries/audio/rtmidi/default.nix
+++ b/pkgs/development/libraries/audio/rtmidi/default.nix
@@ -9,7 +9,9 @@
 , jackSupport ? true
 , jack
 , coremidiSupport ? stdenv.hostPlatform.isDarwin
+, CoreAudio
 , CoreMIDI
+, CoreServices
 }:
 
 stdenv.mkDerivation rec {
@@ -49,7 +51,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = lib.optional alsaSupport alsaLib
     ++ lib.optional jackSupport jack
-    ++ lib.optional coremidiSupport CoreMIDI;
+    ++ lib.optionals coremidiSupport [ CoreAudio CoreMIDI CoreServices ];
 
   cmakeFlags = [
     "-DRTMIDI_API_ALSA=${if alsaSupport then "ON" else "OFF"}"
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index e5c8fd41013..1c8b6d3c0c0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7300,7 +7300,7 @@ in
 
   rtmidi = callPackage ../development/libraries/audio/rtmidi {
     jack = libjack2;
-    inherit (darwin.apple_sdk.frameworks) CoreMIDI;
+    inherit (darwin.apple_sdk.frameworks) CoreAudio CoreMIDI CoreServices;
   };
 
   openmpi = callPackage ../development/libraries/openmpi { };

@OPNA2608 OPNA2608 force-pushed the refactor/rtaudio_rtmidi/21.03 branch from 5355249 to 6c22ff0 Compare February 3, 2021 13:40
@OPNA2608
Copy link
Contributor Author

OPNA2608 commented Feb 3, 2021

CoreAudio & CoreServices dependencies added.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 111621 run on x86_64-linux 1

23 packages built:
  • csound-qt
  • cubicsdr
  • giada
  • gqrx
  • gr-ais
  • gr-gsm
  • gr-osmosdr
  • milkytracker
  • muse
  • pianobooster
  • polyphone
  • python37Packages.soapysdr-with-plugins
  • python38Packages.soapysdr-with-plugins
  • python39Packages.soapysdr-with-plugins
  • qradiolink
  • rtaudio
  • rtl_433
  • rtmidi
  • sdrangel
  • soapyaudio
  • soapysdr-with-plugins
  • vcv-rack
  • welle-io

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 111621 run on x86_64-darwin 1

3 packages marked as broken and skipped:
  • giada
  • rtl_433
  • welle-io
2 packages built:
  • rtaudio
  • rtmidi

@SuperSandro2000 SuperSandro2000 merged commit 7750e6a into NixOS:master Feb 3, 2021
@OPNA2608 OPNA2608 deleted the refactor/rtaudio_rtmidi/21.03 branch September 27, 2022 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants