Add nemo-engrampa extension

Based on AUR package nemo-engrampa https://aur.archlinux.org/packages/nemo-engrampa
This commit is contained in:
JuliusFreudenberger 2025-03-04 15:47:50 +02:00
parent 161fdc9e97
commit 3609cddfad
3 changed files with 68 additions and 1 deletions

View file

@ -3,7 +3,7 @@
lib,
...
}: let
nemo-with-nextcloud-extensions = pkgs.nemo-with-extensions.override { extensions = [pkgs.nextcloud-client];};
nemo-with-nextcloud-extensions = pkgs.nemo-with-extensions.override { extensions = [ pkgs.nextcloud-client pkgs.nemo-engrampa ];};
in {
environment.systemPackages = with pkgs; [
sakura

View file

@ -1,6 +1,7 @@
pkgs: rec {
rofirefox = pkgs.callPackage ./rofirefox {};
nemo-nextcloud = pkgs.callPackage ./nemo-nextcloud {};
nemo-engrampa = pkgs.callPackage ./nemo-engrampa {};
dlrg-fonts = pkgs.callPackage ./dlrg-fonts {};
i3-scrot = pkgs.callPackage ./i3-scrot {};
}

View file

@ -0,0 +1,66 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
pkg-config,
ninja,
glib,
gtk3,
nemo,
mate,
cinnamon-translations,
}:
stdenv.mkDerivation rec {
pname = "nemo-engrampa";
version = "6.2.0";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo-extensions";
rev = version;
hash = "sha256-qghGgd+OWYiXvcGUfgiQT6rR4mJPAOfOtYB3lWLg4iA=";
};
sourceRoot = "${src.name}/nemo-fileroller";
nativeBuildInputs = [
meson
pkg-config
ninja
];
buildInputs = [
glib
gtk3
nemo
];
postPatch = ''
pushd src
for file in *fileroller* ; do
mv "''${file}" "''${file/fileroller/engrampa}"
done
popd
substituteInPlace src/nemo-engrampa.c \
--replace-fail "file-roller" "${lib.getExe mate.engrampa}" \
--replace-fail "fileroller" "engrampa" \
--replace-fail "FileRoller" "Engrampa" \
--replace-quiet "GNOMELOCALEDIR" "${cinnamon-translations}/share/locale"
substituteInPlace src/engrampa-module.c \
--replace-fail "fileroller" "engrampa"
substituteInPlace src/meson.build \
--replace-fail "fileroller" "engrampa"
'';
PKG_CONFIG_LIBNEMO_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/${nemo.extensiondir}";
meta = {
homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-fileroller";
description = "Nemo engrampa extension";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ JuliusFreudenberger ];
};
}