Skip to content

musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-23#332035

Merged
emilazy merged 14 commits intoNixOS:masterfrom
emilazy:push-lqmvmtqtsnuo
Aug 27, 2024
Merged

musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-23#332035
emilazy merged 14 commits intoNixOS:masterfrom
emilazy:push-lqmvmtqtsnuo

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Aug 3, 2024

Description of changes

More time spent on software that probably nobody cares about at this point. One fewer FFmpeg 4 dependency in the world, and a couple more packages that work on macOS!

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot requested review from ggPeti and svanderburg August 3, 2024 18:33
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Aug 3, 2024
@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Aug 4, 2024
@emilazy
Copy link
Member Author

emilazy commented Aug 4, 2024

Against all odds, libresample upstream… is accepting my pull request to add a complete rewrite of the build system!

Drafting this for now until I can get it merged and integrated.

@emilazy emilazy marked this pull request as draft August 4, 2024 10:41
@emilazy emilazy force-pushed the push-lqmvmtqtsnuo branch from 88e2faf to 95459e7 Compare August 21, 2024 19:07
@emilazy emilazy changed the title musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4 musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-03 Aug 21, 2024
@emilazy emilazy force-pushed the push-lqmvmtqtsnuo branch from 95459e7 to 4c51454 Compare August 21, 2024 19:22
@emilazy
Copy link
Member Author

emilazy commented Aug 21, 2024

Updated to add myself as a libresample maintainer, to fix the libresample tests and update the build system patch, to do the necessary things to make it work with MinGW-w64 cross‐compilation, and to vendor PR‐based patches to make Alyssa happy. I am still waiting on libresample upstream to accept the final version of the Meson build system patch, but I don’t expect there to be any issues with it. I will work with them and bump to whatever the final upstream release is.

Marking this as ready for review because I don’t want to block FFmpeg 4 work on libresample upstream. @ggPeti, would be great if you could take another look!

@emilazy emilazy marked this pull request as ready for review August 21, 2024 19:25
@emilazy
Copy link
Member Author

emilazy commented Aug 21, 2024

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

18 packages built:
  • ardour
  • kissfft
  • kissfft.bin
  • kissfft.dev
  • kissfftFloat
  • kissfftFloat.bin
  • kissfftFloat.dev
  • libresample
  • libresample.bin
  • libresample.dev
  • loudgain
  • musly
  • musly.bin
  • musly.dev
  • musly.doc
  • qm-dsp
  • sonic-pi
  • zrythm

Result of nixpkgs-review pr 332035 run on aarch64-darwin 1

15 packages built:
  • kissfft
  • kissfft.bin
  • kissfft.dev
  • kissfftFloat
  • kissfftFloat.bin
  • kissfftFloat.dev
  • libresample
  • libresample.bin
  • libresample.dev
  • loudgain
  • musly
  • musly.bin
  • musly.dev
  • musly.doc
  • qm-dsp

@ofborg ofborg bot requested a review from ggPeti August 21, 2024 20:04
@emilazy emilazy mentioned this pull request Aug 21, 2024
13 tasks
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbis is the default and should explicitly not be added to reduce noise

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my previous response (and the one I linked last time with more thoughts from others). It adds value, does no harm, and the argument that it is redundant also applies to other possible settings of sourceProvenance. Nobody objects to the equivalent license = lib.licenses.free;. (Anyway, just like licence information and main programs, we should be moving in the direction of requiring explicit sourceProvenance for all packages, not away from it.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We add or licenses as both

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, this would make any software bill of materials for a Nix project using libresample strictly less useful, given that LGPL 2.1+’s requirements are a superset of BSD3’s, and there are examples of doing it the other way in‐tree (I suspect many dual licenses just aren’t represented at all, actually). However if you want me to make it less useful I can.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now meta.licenses is always the collection of all licenses the project uses and we don't reflect the details. Anything else is done wrong.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure you understand how dual licensing works: any downstream can pick any licence, at their option. libresample can be used entirely under the terms of a BSD licence without any consideration of the LGPL terms. Therefore simply declaring BSD is entirely correct: Nixpkgs has the option to choose that licence, is exercising it, and neither Nixpkgs nor any package depending on this library is under any LGPL‐related obligations.

Consider a program that is available under either the GPL or a proprietary, non‐free licence. There are many historical examples of this, for instance Qt. Do you really think that it ought to be declared licenses = [ lib.licenses.gpl3Only lib.licenses.unfreeRedistributable ] and flag up unfree warnings, when the whole point is that anyone who receives the software can choose to use it under the terms of the GPL?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong commit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it’s the correct commit. The tools were not being built before.

@ggPeti
Copy link
Member

ggPeti commented Aug 22, 2024

Tried musly with a bunch of audio files in the following way:

musly -N # initialize collection
musly -a . # add audio files from the current directory
musly -m sim # print similarity matrix to a file

and it seems to work fine.

@emilazy emilazy force-pushed the push-lqmvmtqtsnuo branch from 4c51454 to ea188a6 Compare August 22, 2024 14:17
@ofborg ofborg bot requested a review from ggPeti August 22, 2024 15:30
@smancill
Copy link
Contributor

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

1 package marked as broken and skipped:
  • zrythm
14 packages built:
  • kissfft
  • kissfft.bin
  • kissfft.dev
  • kissfftFloat
  • kissfftFloat.bin
  • kissfftFloat.dev
  • libresample
  • libresample.bin
  • libresample.dev
  • musly
  • musly.bin
  • musly.dev
  • musly.doc
  • qm-dsp

@smancill
Copy link
Contributor

Looks ok to me, although that's a lot of patches to maintain.

My only gripe is that I think we shouldn't be merging branches with random names.

@emilazy
Copy link
Member Author

emilazy commented Aug 23, 2024

The libresample Meson patch has been provisionally accepted upstream and I’m just waiting on final review. As soon as a new release is tagged I’ll update the package and drop the patches we have here. So there shouldn’t be any ongoing maintenance cost there and the new build system has already been incorporated into the Debian package.

The kissfft one I also sent a PR for, but no idea if or when it will be merged. It’s a one line patch that is smaller than the patch we were having to carry for the Make build system, so I think it’s fine.

The musly ones… yeah, no argument there. Upstream hasn’t done anything in half a decade, so it’s very unlikely the patches will require any ongoing maintenance cost. I have no idea if they’ll merge my PR or not. Given that it was already broken with a newer C++ standard and FFmpeg 4 is very close to completely removed from Nixpkgs now the alternative would probably be to drop the leaf package. Since the patches are already written and @ggPeti has been responsive as a maintainer I don’t think there’s any need to consider doing that at the present juncture, but I wouldn’t stand in the way of its removal either.

The branch name is a Jujutsu change ID and makes pushing out changes a lot easier for me. I know I’m not the only Nixpkgs contributor using Jujutsu, although I may be the most prolific. Agreed that they don’t make for fantastic merge commit subject lines, but scanning the merge log of Nixpkgs is kind of hopeless anyway, and I’ve seen many merged PRs with manually‐written branch names that are somewhere between unhelpful and actively inaccurate. The PR title is included in the second line of the merge commit messages, which is a much more sensible way to browse the merge history, but I do wish that GitHub would include it in the subject line instead. If you’re implacably opposed I can attach another branch name, but it would require closing this PR and opening another so I’m not sure it’s exactly worth it.

@smancill
Copy link
Contributor

smancill commented Aug 23, 2024

If you’re implacably opposed I can attach another branch name, but it would require closing this PR and opening another so I’m not sure it’s exactly worth it.

No, it would be pointless. I don't have strong feelings in this case. We can merge this.

Now, if you ask me about that jj tool design choices (which I didn't know), then I would start arguing that having developed a tool that puts random branches names is not so useful and not very Git-compatible in most other contexts 🤭

@emilazy emilazy marked this pull request as draft August 23, 2024 06:29
@emilazy
Copy link
Member Author

emilazy commented Aug 23, 2024

Back to a draft again as the libresample PR was merged upstream; will update this as soon as there’s a tag and get rid of those patches 😅

The Debian CMake build system rewrite patch was broken and generated
an unusable `.pc` file, so I rewrote it again in Meson. This was
accepted upstream, but is still awaiting a final release.

The licence also changed to BSD-2-Clause OR LGPL-2.1-or-later in 2013.
Fix the library install names on macOS and replace a patch with a
smaller one.
Please use `pkg-config`, people!
@emilazy emilazy changed the title musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-03 musly: add patches for FFmpeg 7, C++17, and external deps; kissfft: build with CMake; libresample: 0.1.3 -> 0.1.4-unstable-2024-08-23 Aug 26, 2024
@emilazy emilazy force-pushed the push-lqmvmtqtsnuo branch from ea188a6 to 7245ee2 Compare August 26, 2024 21:39
@emilazy emilazy marked this pull request as ready for review August 26, 2024 21:39
@emilazy
Copy link
Member Author

emilazy commented Aug 26, 2024

Okay, I don’t know how long it’ll be before upstream cuts a release and this is one of the few things remaining for the big FFmpeg 4 PR so I’ve just bumped it to drop the vendored Meson patch for libresample but keeping the smaller tests one for now. Now it just needs merging before any further developments happen!

@smancill
Copy link
Contributor

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

1 package marked as broken and skipped:
  • zrythm
14 packages built:
  • kissfft
  • kissfft.bin
  • kissfft.dev
  • kissfftFloat
  • kissfftFloat.bin
  • kissfftFloat.dev
  • libresample
  • libresample.bin
  • libresample.dev
  • musly
  • musly.bin
  • musly.dev
  • musly.doc
  • qm-dsp

@emilazy emilazy merged commit 0c7aafc into NixOS:master Aug 27, 2024
@emilazy emilazy deleted the push-lqmvmtqtsnuo branch September 17, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments