1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
{ fetchFromGitHub
, glib
, gobject-introspection
, meson
, ninja
, pkg-config
, lib
, stdenv
, wrapGAppsHook3
, libxml2
, gtk3
, gvfs
, cinnamon-desktop
, xapp
, libexif
, json-glib
, gtk-layer-shell
, exempi
, intltool
, shared-mime-info
, cinnamon-translations
, libgsf
}:
stdenv.mkDerivation rec {
pname = "nemo";
version = "6.2.3";
src = fetchFromGitHub {
owner = "linuxmint";
repo = pname;
rev = version;
sha256 = "sha256-wyz2pzwJGYMFKoKVqrhLnkJqXG8Qg2+BygpOm2yegpM=";
};
patches = [
# Load extensions from NEMO_EXTENSION_DIR environment variable
# https://github.com/NixOS/nixpkgs/issues/78327
./load-extensions-from-env.patch
];
outputs = [ "out" "dev" ];
buildInputs = [
glib
gtk3
cinnamon-desktop
libxml2
xapp
libexif
exempi
gvfs
libgsf
json-glib
gtk-layer-shell
];
nativeBuildInputs = [
meson
pkg-config
ninja
wrapGAppsHook3
intltool
shared-mime-info
gobject-introspection
];
mesonFlags = [
# use locales from cinnamon-translations
"--localedir=${cinnamon-translations}/share/locale"
# enabled by default in Mint packaging (see debian/rules)
"-Dgtk_layer_shell=true"
];
postInstall = ''
# This fixes open as root and handles nemo-with-extensions well.
# https://github.com/NixOS/nixpkgs/issues/297570
substituteInPlace $out/share/polkit-1/actions/org.nemo.root.policy \
--replace-fail "$out/bin/nemo" "/run/current-system/sw/bin/nemo"
'';
preFixup = ''
# Used for some non-fd.o icons (e.g. xapp-text-case-symbolic)
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${xapp}/share"
)
'';
# Taken from libnemo-extension.pc.
passthru.extensiondir = "lib/nemo/extensions-3.0";
meta = with lib; {
homepage = "https://github.com/linuxmint/nemo";
description = "File browser for Cinnamon";
license = [ licenses.gpl2 licenses.lgpl2 ];
platforms = platforms.linux;
maintainers = teams.cinnamon.members;
mainProgram = "nemo";
};
}
|