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

handbrake: refactor (fx, clenup, description, cosmetics, add maintainer) #39117

Merged
merged 1 commit into from Apr 23, 2018

Conversation

Anton-Latukha
Copy link
Contributor

Motivation for this change
  • fx: ffmpeg was one of default buildInputs
  • by request adding myself as a maintainer of the package
  • description was outdated. Rewrote to much more precise modernized description.
  • version.txt patch no longer needed in 1.0.7. Moreover in the version 1.1.0 this patching should be removed.
Things done
  • Tested using sandboxing
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.


buildInputs = [
fribidi fontconfig freetype jansson zlib
libass libiconv libsamplerate libxml2 bzip2
libogg libopus libtheora libvorbis libdvdcss a52dec libmkv
lame ffmpeg libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264 x265 libvpx
lame libdvdread libdvdnav libbluray mp4v2 mpeg2dec x264 x265 libvpx
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I missed to contribute rm of this in the previous commit, that made switch from ffmpeg to libav_12.

@@ -97,13 +93,17 @@ stdenv.mkDerivation rec {

meta = with stdenv.lib; {
homepage = http://handbrake.fr/;
description = "A tool for ripping DVDs into video files";
description = "A tool for converting video files and ripping DVDs";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is really not only DVD ripping software. It is a way much more.

'';
license = licenses.gpl2;
maintainers = with maintainers; [ wmertens ];
maintainers = with maintainers; [ Anton-Latukha wmertens ];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added myself as a maintainer of package, by suggestion from peterhoeg in #38811 (comment).

@@ -37,15 +37,13 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [
cmake python2 pkgconfig yasm autoconf automake libtool m4
Copy link
Contributor

Choose a reason for hiding this comment

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

With cmake, it is a good idea to also use ninja.

Copy link
Member

Choose a reason for hiding this comment

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

Are you sure autoconf and automake are still needed with cmake/ninja?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have old mild knowledge of C++ builds. I used to C++ years ago, when Ninja was not around.

So:
If I add ninja to nativeBuildInputs system tries to use it and fails:

Build is configured!
You may now cd into ./build and run make (/nix/store/h9w5yn61phv86iirl273bpw5ksq98fzz-gnumake-4.2.1/bin/make).
building
no build.ninja, doing nothing
glibPreInstallPhase
installing
install flags: install
ninja: error: loading 'build.ninja': No such file or directory
builder for '/nix/store/38fygqhfawrhni6f166dl5ds8akhdgyb-handbrake-1.0.7.drv' failed with exit code 1

If I, while adding ninja, also remove autoconf and automake - it just falls flat the same way.

Obviously there is more steps needed here. Or HandBrake dudes do it the old way.

So from the hip, it did not went.

From first look at different NixPkgs sources - there is all that Ninja needs, to switch to it.

In a time I can try to understand more of what are you talking about or take your guidance.

It can be next PRs. Or in this one if you think so.

Copy link
Member

Choose a reason for hiding this comment

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

I can't find any CMakeLists.txt file in the source distribution so you might be able to rip out cmake.

@peterhoeg
Copy link
Member

As I recall, upstream also recommends fetching a tarball from their site instead of pulling from github so you'll probably want to change fetchFromGitHub to fetchurl.

@Anton-Latukha
Copy link
Contributor Author

Anton-Latukha commented Apr 21, 2018

It is for the later PRs.

Everything gradually.
I just waiting on this merge.

Ok, long story.

1.0.7 works from GitHub.

In 1.1.0 they changed the versioning model. Now they include different versions of different things for project. That makes manual patching, as was done in an old package, that I removed, - it makes manual patching a very cumbersome model.

And now, with 1.1.0 - distribution package build needs to take info from GitHub meta by itself during config/build.
Or build from URL that has versioning info with it in version.txt file.

Upstream wants that we used their-own bundle of libraries they distribute with sources, Windows-like. And that requirement is contrary to how we do things here.

1.1.0 falls during build in Nix with C++ error. And it has nothing to do with versioning. It stumbles on undefined variables in C++ code.

I created a new bugreport there on HB, where I talk about this code-library issue in C++.
And I am negotiating with them.
I am preparing package until we solve that in upstream.

HandBrake team does everything in their-own way, and most distributions AFAIK got softly banned from upstream support.

It is a pretty thin margin to collaborate with them.

@Anton-Latukha
Copy link
Contributor Author

@jtojnar @peterhoeg

Hey, this can be merged. This is a cosmetics, non-tech changes.

Let's merge and move further.

After merge I can continue work on technical changes.
As most of guys, I need our package to be fixed with my ongoing PRs, so I can talk about it with HandBrake upstream team and refer them to it.

@wmertens
Copy link
Contributor

Ok, I was the one that originally tried to split everything up because they had a bunch of useful patches but no upstream to send it to. If they want to do their own bundle so be it, it will just make the build slower and bigger, but ok.

In the meantime, this lgtm 👍

@wmertens wmertens merged commit 7c3dc2f into NixOS:master Apr 23, 2018
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

5 participants