nixpkgs/pkgs/desktops/gnome/apps/file-roller/default.nix

106 lines
2.2 KiB
Nix
Raw Normal View History

2021-10-21 09:52:16 +02:00
{ lib
, stdenv
, fetchurl
2021-10-21 11:07:23 +02:00
, fetchpatch
2021-10-21 09:52:16 +02:00
, desktop-file-utils
, gettext
, glibcLocales
, itstool
, libxml2
, meson
, ninja
, pkg-config
, python3
, wrapGAppsHook
, cpio
, file
, glib
, gnome
, gtk3
, json-glib
, libarchive
, libnotify
, nautilus
2021-10-21 11:07:23 +02:00
, pantheon
2021-10-21 09:52:16 +02:00
, unzip
2021-10-21 11:07:23 +02:00
, withPantheon ? false
2021-10-21 09:52:16 +02:00
}:
stdenv.mkDerivation rec {
pname = "file-roller";
2021-05-02 19:10:27 +02:00
version = "3.40.0";
src = fetchurl {
2021-01-15 14:21:58 +01:00
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
2021-05-02 19:10:27 +02:00
sha256 = "039w1dcpa5ypmv6sm634alk9vbcdkyvy595vkh5gn032jsiqca2a";
};
2021-10-21 11:07:23 +02:00
patches = lib.optionals withPantheon [
# Make this respect dark mode settings from Pantheon
# https://github.com/elementary/fileroller/
(fetchpatch {
url = "https://raw.githubusercontent.com/elementary/fileroller/f183eac36c68c9c9441e72294d4e305cf5fe36ed/fr-application-prefers-color-scheme.patch";
sha256 = "sha256-d/sqf4Oen9UrzYqru7Ck15o/6g6WfxRDH/iAGFXgYAA=";
})
];
2018-03-14 01:39:32 +01:00
LANG = "en_US.UTF-8"; # postinstall.py
2021-10-21 09:52:16 +02:00
nativeBuildInputs = [
desktop-file-utils
gettext
glibcLocales
itstool
libxml2
meson
ninja
pkg-config
python3
wrapGAppsHook
];
2021-10-21 09:52:16 +02:00
buildInputs = [
cpio
file
glib
gnome.adwaita-icon-theme
gtk3
json-glib
libarchive
libnotify
nautilus
2021-10-21 11:07:23 +02:00
] ++ lib.optionals withPantheon [
pantheon.granite
2021-10-21 09:52:16 +02:00
];
PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0";
2018-03-14 01:39:32 +01:00
postPatch = ''
chmod +x postinstall.py # patchShebangs requires executable file
patchShebangs postinstall.py
2018-09-05 02:43:48 +02:00
patchShebangs data/set-mime-type-entry.py
2018-03-14 01:39:32 +01:00
'';
preFixup = ''
# Workaround because of https://gitlab.gnome.org/GNOME/file-roller/issues/40
gappsWrapperArgs+=(
--prefix PATH : ${lib.makeBinPath [ unzip ]}
)
'';
2018-03-14 01:39:32 +01:00
passthru = {
updateScript = gnome.updateScript {
2018-03-14 01:39:32 +01:00
packageName = "file-roller";
attrPath = "gnome.file-roller";
2018-03-14 01:39:32 +01:00
};
};
meta = with lib; {
homepage = "https://wiki.gnome.org/Apps/FileRoller";
description = "Archive manager for the GNOME desktop environment";
2018-03-14 01:39:32 +01:00
license = licenses.gpl2Plus;
platforms = platforms.linux;
2021-10-21 11:07:23 +02:00
maintainers = teams.gnome.members ++ teams.pantheon.members;
};
}