mirror of
https://codeberg.org/privacy1st/nix-git
synced 2025-01-10 05:01:20 +01:00
kde ark: add unrar to decompress .rar archives
This commit is contained in:
parent
8a0df61165
commit
2000500f76
43
modules/ark.nix
Normal file
43
modules/ark.nix
Normal file
@ -0,0 +1,43 @@
|
||||
# Archive manager: Compress and decompress
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/311240
|
||||
# The package definition for `kdePackages.ark` does not specify the extra tools that can be used by Ark. The older definition `libsForQt5.ark` contains extra tools such as unar to handle extra types of archives.
|
||||
#
|
||||
# Solution: To extract `.rar` files, we manually override some of the attributes based on how it is done in the old file of `libsForQt5.ark`.
|
||||
|
||||
{ config, pkgs, mkKdeDerivation, lib, ... }:
|
||||
let
|
||||
extraTools = with pkgs; [
|
||||
p7zip
|
||||
lrzip
|
||||
unar
|
||||
unrar
|
||||
];
|
||||
|
||||
# https://ryantm.github.io/nixpkgs/using/overrides/#sec-pkg-overrideAttrs
|
||||
ark-with-unrar = pkgs.kdePackages.ark.overrideAttrs {
|
||||
buildInputs = with pkgs; [
|
||||
libarchive
|
||||
libzip
|
||||
] ++ extraTools;
|
||||
|
||||
qtWrapperArgs = [
|
||||
"--prefix"
|
||||
"PATH"
|
||||
":"
|
||||
(lib.makeBinPath extraTools)
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
allowUnfree = [
|
||||
# Required for ark
|
||||
"unrar"
|
||||
];
|
||||
|
||||
users.users.yoda = {
|
||||
packages = with pkgs; [
|
||||
ark-with-unrar # Archive manager: Compress and decompress
|
||||
];
|
||||
};
|
||||
}
|
@ -40,6 +40,7 @@
|
||||
#
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
krdp # Remote Desktop Protocol (RDP)
|
||||
ark # Archive manager: Compress and decompress
|
||||
];
|
||||
|
||||
# GNOME desktop integration.
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, mkKdeDerivation, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./file-roller.nix
|
||||
./ark.nix # Archive manager: Compress and decompress
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user