nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 autoconf,
4 automake,
5 itstool,
6 intltool,
7 pkg-config,
8 fetchFromGitHub,
9 glib,
10 gettext,
11 sqlite,
12 mono,
13 stfl,
14 makeWrapper,
15 lib,
16 guiSupport ? true,
17 gtk-sharp-2_0,
18 gdk-pixbuf,
19 pango,
20}:
21
22stdenv.mkDerivation rec {
23 pname = "smuxi";
24 version = "unstable-2023-07-01";
25
26 runtimeLoaderEnvVariableName =
27 if stdenv.hostPlatform.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH";
28
29 src = fetchFromGitHub {
30 owner = "meebey";
31 repo = "smuxi";
32 rev = "3e4b5050b66944532e95df3c31245c8ae6379b3f";
33 hash = "sha256-zSsckcEPEX99v3RkM4O4+Get5tnz4FOpiodoTGTZq+8=";
34 fetchSubmodules = true;
35 };
36
37 nativeBuildInputs = [
38 pkg-config
39 makeWrapper
40 ];
41 buildInputs = [
42 autoconf
43 automake
44 itstool
45 intltool
46 gettext
47 mono
48 stfl
49 ]
50 ++ lib.optionals (guiSupport) [
51 gtk-sharp-2_0
52 # loaded at runtime by GTK#
53 gdk-pixbuf
54 pango
55 ];
56
57 preConfigure = ''
58 NOCONFIGURE=1 NOGIT=1 ./autogen.sh
59 '';
60
61 configureFlags = [
62 "--disable-frontend-gnome"
63 "--enable-frontend-stfl"
64 ]
65 ++ lib.optional guiSupport "--enable-frontend-gnome";
66
67 postInstall = ''
68 makeWrapper "${mono}/bin/mono" "$out/bin/smuxi-message-buffer" \
69 --add-flags "$out/lib/smuxi/smuxi-message-buffer.exe" \
70 --prefix ${runtimeLoaderEnvVariableName} : ${
71 lib.makeLibraryPath [
72 gettext
73 sqlite
74 ]
75 }
76
77 makeWrapper "${mono}/bin/mono" "$out/bin/smuxi-server" \
78 --add-flags "$out/lib/smuxi/smuxi-server.exe" \
79 --prefix ${runtimeLoaderEnvVariableName} : ${
80 lib.makeLibraryPath [
81 gettext
82 sqlite
83 ]
84 }
85
86 makeWrapper "${mono}/bin/mono" "$out/bin/smuxi-frontend-stfl" \
87 --add-flags "$out/lib/smuxi/smuxi-frontend-stfl.exe" \
88 --prefix ${runtimeLoaderEnvVariableName} : ${
89 lib.makeLibraryPath [
90 gettext
91 sqlite
92 stfl
93 ]
94 }
95
96 makeWrapper "${mono}/bin/mono" "$out/bin/smuxi-frontend-gnome" \
97 --add-flags "$out/lib/smuxi/smuxi-frontend-gnome.exe" \
98 --prefix MONO_GAC_PREFIX : ${if guiSupport then gtk-sharp-2_0 else ""} \
99 --prefix ${runtimeLoaderEnvVariableName} : ${
100 lib.makeLibraryPath [
101 gettext
102 glib
103 sqlite
104 gtk-sharp-2_0
105 gtk-sharp-2_0.gtk
106 gdk-pixbuf
107 pango
108 ]
109 }
110
111 # install log4net and nini libraries
112 mkdir -p $out/lib/smuxi/
113 cp -a lib/log4net.dll $out/lib/smuxi/
114 cp -a lib/Nini.dll $out/lib/smuxi/
115
116 # install GTK+ icon theme on Darwin
117 ${
118 if guiSupport && stdenv.hostPlatform.isDarwin then
119 "
120 mkdir -p $out/lib/smuxi/icons/
121 cp -a images/Smuxi-Symbolic $out/lib/smuxi/icons/
122 "
123 else
124 ""
125 }
126 '';
127
128 meta = {
129 homepage = "https://smuxi.im/";
130 downloadPage = "https://smuxi.im/download/";
131 changelog = "https://github.com/meebey/smuxi/releases/tag/v${version}";
132 description = "irssi-inspired, detachable, cross-platform, multi-protocol (IRC, XMPP/Jabber) chat client for the GNOME desktop";
133 platforms = lib.platforms.unix;
134 license = lib.licenses.gpl2Plus;
135 maintainers = with lib.maintainers; [
136 meebey
137 ];
138 };
139}