1{
2 stdenv,
3 lib,
4 fetchFromGitLab,
5 gobject-introspection,
6 meson,
7 ninja,
8 pkg-config,
9 wrapGAppsHook3,
10 glib,
11 gtk3,
12 python3,
13 xfconf,
14 shared-mime-info,
15 xdg-utils,
16 gitUpdater,
17}:
18
19stdenv.mkDerivation (finalAttrs: {
20 pname = "catfish";
21 version = "4.20.1";
22
23 src = fetchFromGitLab {
24 domain = "gitlab.xfce.org";
25 owner = "apps";
26 repo = "catfish";
27 rev = "catfish-${finalAttrs.version}";
28 hash = "sha256-mTAunc1GJLkSu+3oWD5+2sCQemWdVsUURlP09UkbVyw=";
29 };
30
31 nativeBuildInputs = [
32 gobject-introspection
33 meson
34 ninja
35 pkg-config
36 wrapGAppsHook3
37 ];
38
39 buildInputs = [
40 glib
41 gtk3
42 (python3.withPackages (p: [
43 p.dbus-python
44 p.pygobject3
45 p.pexpect
46 ]))
47 xfconf
48 ];
49
50 postPatch = ''
51 substituteInPlace catfish/CatfishWindow.py \
52 --replace-fail "/usr/share/mime" "${shared-mime-info}/share/mime"
53 '';
54
55 preFixup = ''
56 # For xdg-mime and xdg-open.
57 gappsWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ xdg-utils ]}")
58 '';
59
60 passthru.updateScript = gitUpdater { rev-prefix = "catfish-"; };
61
62 meta = with lib; {
63 homepage = "https://docs.xfce.org/apps/catfish/start";
64 description = "Handy file search tool";
65 mainProgram = "catfish";
66 longDescription = ''
67 Catfish is a handy file searching tool. The interface is
68 intentionally lightweight and simple, using only GTK 3.
69 You can configure it to your needs by using several command line
70 options.
71 '';
72 license = licenses.gpl2Plus;
73 platforms = platforms.linux;
74 teams = [ teams.xfce ];
75 };
76})