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: move FDK codec to optional choice #38809

Merged
merged 1 commit into from Apr 12, 2018
Merged

handbrake: move FDK codec to optional choice #38809

merged 1 commit into from Apr 12, 2018

Conversation

Anton-Latukha
Copy link
Contributor

Motivation for this change
  1. Enabling FDK by default violates GPL2 license of HandBrake.
    HandBrake 1.1.0 build fails in Nix HandBrake/HandBrake#1273 (comment)

  2. They had skew back in time: https://forum.handbrake.fr/viewtopic.php?f=33&t=34143
    This is a very serious question for them throught the years.

  3. Nix HandBrake is marked GPL2. And as such also allowed in free NixOS space. FDK codec has a weird non-free license that is not compatible with GPL2.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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.

@Anton-Latukha
Copy link
Contributor Author

I thought about what NixOS tests could I apply to package like this (C++ GTK+ package).

@@ -75,7 +75,6 @@ stdenv.mkDerivation rec {
configureFlags = [
"--disable-df-fetch"
"--disable-df-verify"
"--enable-fdk-aac"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you make this optional like useGtk below, so that users could still enable it easily?

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 didn't knew there is such possibility.
Ok. I would redo it now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, you can install it using pkgs.handbrake.override { useFdk = true; }.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh. Yes, you are right.

I used those options, but newer implemented them until now.

@Anton-Latukha Anton-Latukha changed the title handbrake: rm FDK codec handbrake: move FDK codec to optional choise Apr 11, 2018
@Anton-Latukha Anton-Latukha changed the title handbrake: move FDK codec to optional choise handbrake: move FDK codec to optional choice Apr 11, 2018
@jtojnar
Copy link
Contributor

jtojnar commented Apr 11, 2018

@GrahamcOfBorg build handbrake

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: handbrake

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: handbrake

Partial log (click to expand)

   Compiling tempdir v0.3.5
   Compiling filetime v0.1.15
   Compiling build_helper v0.1.0 (file:///build/rustc-1.25.0-src/src/build_helper)
   Compiling rustc_binaryen v0.0.0 (file:///build/rustc-1.25.0-src/src/librustc_binaryen)
building of '/nix/store/0p4h4m63ki245n14vpk2xihn23lq1a4a-rustc-1.25.0.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/apcj2slll2axzpsnpyw7qxq0mymqdhly-cargo-0.26.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/qi8m0z84cdhfspfx4chzl5ffamky2pm6-librsvg-2.42.2.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/5ysb8xkdvpvzm4x0czkj4dlfzjzzyj09-hook.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/0f1m8mf44sjhpzys57flhw97ifr238p0-handbrake-1.0.7.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/0f1m8mf44sjhpzys57flhw97ifr238p0-handbrake-1.0.7.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: handbrake

Partial log (click to expand)

Wrapping program /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7/bin/ghb
Wrapping program /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7/bin/HandBrakeCLI
shrinking RPATHs of ELF executables and libraries in /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7
shrinking /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7/bin/.ghb-wrapped
shrinking /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7/bin/.HandBrakeCLI-wrapped
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7/bin
patching script interpreter paths in /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7
checking for references to /tmp/nix-build-handbrake-1.0.7.drv-0 in /nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7...
/nix/store/bsbp2jg193p80v2hd6qdr13kikgrgvs3-handbrake-1.0.7

@jtojnar jtojnar merged commit 365f083 into NixOS:master Apr 12, 2018
@Anton-Latukha Anton-Latukha deleted the handbrake/remove-unfree-fdk branch April 17, 2018 19:42
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

4 participants