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

clementine: provide free derivation by default #38513

Merged
merged 2 commits into from Apr 9, 2018

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Apr 6, 2018

Motivation for this change

The clementine package is actually released under Apache license, but
requires the unfree libspotify package to build.

Now nixpkgs.clementine points to the free derivation and
nixpkgs.clementineUnfree has been introduced for the package bundled
with spotify support.

Fixes #38315

Note: I had to revert commit ca54d50 as it broke clementine previously (see the Hydra logs at https://hydra.nixos.org/build/72403466)

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.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: clementine

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1
shrinking /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1/bin/clementine
shrinking /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1/bin/clementine-tagreader
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1/bin
patching script interpreter paths in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1
checking for references to /build in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1...
/nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: clementine

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1
shrinking /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1/bin/clementine-tagreader
shrinking /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1/bin/clementine
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1/bin
patching script interpreter paths in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1
checking for references to /build in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1...
/nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1

'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = http://www.clementine-player.org;
description = "Spotify integration for Clementine";
# The blob itself is Apache-licensed, although libspotify is unfree.
license = licenses.asl20;
# Therefore the license will be marked as `unfree` because of its dependencies.
license = licenses.unfree;
Copy link
Member

Choose a reason for hiding this comment

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

Not sure whether that is needed. Because of its dependency on libspotify the leaf will be unfree and thus this package would fail to build or install because it requires unfree software.

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'll change that for now. The original issue was filed because of the package shipped with a free license, but libspotify broke the evaluation on systems which disallow unfree packages. However the affected package is now named clementineUnfree, so I guess that it should be sufficiently obvious :)

@FRidh FRidh requested a review from ttuegel April 7, 2018 05:50
The `clementine` package is actually released under Apache license, but
requires the unfree `libspotify` package to build.

Now `nixpkgs.clementine` points to the free derivation and
`nixpkgs.clementineUnfree` has been introduced for the package bundled
with spotify support.

Fixes NixOS#38315
@Ma27 Ma27 force-pushed the clementine-license-fixes branch from 8f2a469 to ef5e212 Compare April 7, 2018 09:36
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: clementine

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1
shrinking /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1/bin/clementine-tagreader
shrinking /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1/bin/clementine
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1/bin
patching script interpreter paths in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1
checking for references to /tmp/nix-build-clementine-free-1.3.1.drv-0 in /nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1...
/nix/store/r7m7rnsp0dmpx24p5yjz6cbwq5kpf6z5-clementine-free-1.3.1

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: clementine

Partial log (click to expand)

glibPreFixupPhase
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1
shrinking /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1/bin/clementine-tagreader
shrinking /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1/bin/clementine
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1/bin
patching script interpreter paths in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1
checking for references to /build in /nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1...
/nix/store/xcr05zy9xr94ggsn1vvlfl4srn6sifmx-clementine-free-1.3.1

Ma27 added a commit to Ma27/nixpkgs-update that referenced this pull request Apr 7, 2018
The current checklist for filing new patches suggests to run `nox-review wip` to ensure
that the current change (e.g. package bumps) don't break package bumps:
https://github.com/NixOS/nixpkgs/blob/e1dee4efcbffc72260025078bf8297a3b732509c/.github/PULL_REQUEST_TEMPLATE.md

I experienced this behavior from time to time (see NixOS/nixpkgs#38513
or NixOS/nixpkgs#38361) which cost me some extra time to spot the
reasons for additional breackage.

Running `nox-review wip` can be quite time consuming, especially when
bumping packages that trigger a mass-rebuild or a stdenv rebuild,
*however* this patch helps to reduce the risk of additional breackage
caused by unwanted package bumps.
@matthewbauer
Copy link
Member

I'm not sure if this is the right thing to do. Shouldn't we just add a config option to "celementine", something like "withSpotify"? You can just call it with clementine.overideAttrs { withSpotify = true; } etc.

@Ma27
Copy link
Member Author

Ma27 commented Apr 9, 2018

So you propose to disable the unfree build by default?
What I’m trying to do is to use the entirely free clementine build by default and clementineUnfree comes with libspotify. Both variants will be prebuilt on Hydra so noone will have to recompile locally.
I may be misunderstanding you, but why would you want to solve this with override parameters only?

@Mic92 Mic92 merged commit c757928 into NixOS:master Apr 9, 2018
@Mic92
Copy link
Member

Mic92 commented Apr 9, 2018

A config option is possible, but less convenient/discoverable at the moment without module system.
Hydra does not build unfree packages, but this should not be a big deal here.

@Ma27 Ma27 deleted the clementine-license-fixes branch April 9, 2018 08:00
@FRidh
Copy link
Member

FRidh commented Apr 9, 2018

A flag is fine as well, as long as the unfree parts are off by default.

I may be misunderstanding you, but why would you want to solve this with override parameters only?

We can't have top-level attributes for every combination of parameters.

@Ma27
Copy link
Member Author

Ma27 commented Apr 9, 2018

previously we used clementine and clementineFree as toplevel attributes, I didn't introduce a new one. In order to remain consistent I justed swapped both attributes and renamed clementineFree accordingly to clementineUnfree.

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

6 participants