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

add unrar license and use #341115

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/licenses.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,13 @@ in mkLicense lset) ({
fullName = "The Unlicense";
};

unrar = {
fullName = "UnRAR - free utility for RAR archives: License for use and distribution of FREEWARE version";
# also contained the in the source of the unrar package
url = "https://fedoraproject.org/wiki/Licensing:Unrar";
free = false;
};

upl = {
spdxId = "UPL-1.0";
fullName = "Universal Permissive License";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/kde/ark/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mkDerivation {
homepage = "https://apps.kde.org/ark/";
description = "Graphical file compression/decompression utility";
mainProgram = "ark";
license = with licenses; [ gpl2 lgpl3 ] ++ optional unfreeEnableUnrar unfree;
license = with licenses; [ gpl2 lgpl3 ] ++ optional unfreeEnableUnrar unrar;
maintainers = [ maintainers.ttuegel ];
};
}
5 changes: 2 additions & 3 deletions pkgs/applications/misc/calibre/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ stdenv.mkDerivation (finalAttrs: {
free and open source and great for both casual users and computer experts.
'';
changelog = "https://github.com/kovidgoyal/calibre/releases/tag/v${finalAttrs.version}";
license = if unrarSupport
then lib.licenses.unfreeRedistributable
else lib.licenses.gpl3Plus;
license = [ lib.licenses.gpl3Plus ]
++ lib.optional unrarSupport lib.licenses.unrar;
Comment on lines +199 to +200
Copy link
Member

Choose a reason for hiding this comment

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

Note that even though unrar should probably be redistributable = true;, this should be [ lib.licenses.unrar lib.licenses.unfree ] because GPL-3.0-or-later and the UnRAR licence are incompatible and cannot be legally combined or redistributed together.

Copy link
Member

Choose a reason for hiding this comment

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

Relevant: #283706

Copy link
Member Author

Choose a reason for hiding this comment

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

Like this?

Suggested change
license = [ lib.licenses.gpl3Plus ]
++ lib.optional unrarSupport lib.licenses.unrar;
# the extra unfree is because gpl license cannot legally be combined with unfree licenses
++ lib.optionals unrarSupport [ lib.licenses.unrar lib.licenses.unfree];

maintainers = with lib.maintainers; [ pSub ];
platforms = lib.platforms.unix;
broken = stdenv.isDarwin;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/un/unrar/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = with lib; {
description = "Utility for RAR archives";
homepage = "https://www.rarlab.com/";
license = licenses.unfreeRedistributable;
license = licenses.unrar;
mainProgram = "unrar";
maintainers = with maintainers; [ wegank ];
platforms = platforms.all;
Expand Down
3 changes: 1 addition & 2 deletions pkgs/tools/archivers/7zz/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ stdenv.mkDerivation (finalAttrs: {
# CPP/7zip/Compress/LzfseDecoder.cpp is bsd3
[ lgpl2Plus /* and */ bsd3 ] ++
# and CPP/7zip/Compress/Rar* are unfree with the unRAR license restriction
# the unRAR compression code is disabled by default
lib.optionals enableUnfree [ unfree ];
lib.optionals enableUnfree [ unrar ];
maintainers = with lib.maintainers; [ anna328p eclairevoyant jk peterhoeg ];
platforms = with lib.platforms; unix ++ windows;
mainProgram = "7zz";
Expand Down
3 changes: 1 addition & 2 deletions pkgs/tools/archivers/p7zip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ stdenv.mkDerivation (finalAttrs: {
# CPP/7zip/Compress/LzfseDecoder.cpp is bsd3
[ lgpl2Plus /* and */ bsd3 ] ++
# and CPP/7zip/Compress/Rar* are unfree with the unRAR license restriction
# the unRAR compression code is disabled by default
lib.optionals enableUnfree [ unfree ];
lib.optionals enableUnfree [ unrar ];
maintainers = with maintainers; [ raskin jk ];
platforms = platforms.unix;
mainProgram = "7z";
Expand Down