From 3609cddfad2c2b9345e6dc0ccd4dc63fcc3d1328 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Tue, 4 Mar 2025 15:47:50 +0200 Subject: [PATCH] Add nemo-engrampa extension Based on AUR package nemo-engrampa https://aur.archlinux.org/packages/nemo-engrampa --- modules/desktop-essentials.nix | 2 +- pkgs/default.nix | 1 + pkgs/nemo-engrampa/default.nix | 66 ++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 pkgs/nemo-engrampa/default.nix diff --git a/modules/desktop-essentials.nix b/modules/desktop-essentials.nix index 2efb12e..ea0d424 100644 --- a/modules/desktop-essentials.nix +++ b/modules/desktop-essentials.nix @@ -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 diff --git a/pkgs/default.nix b/pkgs/default.nix index 4de1474..5d595be 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -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 {}; } diff --git a/pkgs/nemo-engrampa/default.nix b/pkgs/nemo-engrampa/default.nix new file mode 100644 index 0000000..9dd6aaf --- /dev/null +++ b/pkgs/nemo-engrampa/default.nix @@ -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 ]; + }; +}