Mirpkgs - Nix packages for reproducible MIR research

My buddies joke that I’m the only person in the world who happen to live in the intersection of people who love the ideas of the Nix project, and works with music information retrieval (MIR) research and development.

That might very well be true, but my “works on my machine” itch needs to go away once and for all, so here’s my ongoing community contribution that I’ll tinker with slow and steady:

I’d love help on:

  1. Successfully packaging the more tricky libraries
  2. Cleaning up my novice Nix expressions and making them idiomatic in preparation for eventual migration into nixpkgs
  3. Pointing out misconceptions or unclear documentation

Thanks for checking in!

16 Likes

Thank you! You are not alone, I also in the intersection of Nix, development and music, although I only tinker with demucs, and ffmpeg :slight_smile:

I am new to Nix as well, and already have been trying to package Demucs, but could not finish due to many of the dependencies not being presented in Nixpkgs.

Thanks! Appreciate your work

2 Likes

Oh, nice! :clap:

I managed to get Demucs to behave (I think), but feel free to test it in a python3.withPackages by this overlay, or by the usage example (the default package is a Python environment with all packages installed).

My next goal would be to get AudioCraft to work too, but that’s been somewhat more challenging since it has a long list of dependencies that were missing in nixpkgs and that do a lot of C compilation in their pip install.

Feel free to take over some of these if you’d like! Pull requests · carlthome/mirpkgs · GitHub

1 Like

Interesting project! However, I saw the following in your README:

The goal is to have these packages live within nixpkgs, but that can take a while.

Personally I’m also just getting started in my NixOS journey, but have had little issue getting packages into nixpkgs. Either they’re picked up quickly, or posting them in the PRs ready for review thread results in them getting noticed.

I still see the need for experimenting in a personal repo, but I wanted to remove any mental barriers for upstreaming packages once you think they’re ready. It’s easier than you think!

2 Likes

Thanks for the reminder @anoa! I’ve contributed to nixpkgs and it’s been pretty smooth (python3Packages.mir_eval: init at 0.7, add carlthome as maintainer by carlthome · Pull Request #231901 · NixOS/nixpkgs · GitHub).

However, https://github.com/NixOS/nixpkgs/tree/master/pkgs#quick-start-to-adding-a-package is a good reflection.

With the flake discussions, it’s not obvious to me that all MIR R&D packages should go into nixpkgs immediately, and with so many transitive dependencies missing for something like AudioCraft, it’s a long sequence of PRs (assuming the preference is to upstream one package at a time).

2 Likes