2021-01-17 08:45:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, substituteAll
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, libnotify
|
|
|
|
, olm
|
|
|
|
, pulseaudio
|
|
|
|
, sound-theme-freedesktop
|
|
|
|
}:
|
2018-05-14 18:18:19 +01:00
|
|
|
|
2019-06-28 13:17:55 +01:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gomuks";
|
2021-02-20 09:15:01 +00:00
|
|
|
version = "0.2.3";
|
2018-05-14 18:18:19 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tulir";
|
2019-06-28 13:17:55 +01:00
|
|
|
repo = pname;
|
2021-01-12 13:51:03 +00:00
|
|
|
rev = "v${version}";
|
2021-02-20 09:15:01 +00:00
|
|
|
sha256 = "0g0aa6h6bm00mdgkb38wm66rcrhqfvs2xj9rl04bwprsa05q5lca";
|
2018-05-14 18:18:19 +01:00
|
|
|
};
|
|
|
|
|
2021-02-20 09:15:01 +00:00
|
|
|
vendorSha256 = "14ya5advpv4q5il235h5dxy8c2ap2yzrvqs0sjqgw0v1vm6vpwdx";
|
2020-06-03 10:53:38 +01:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ olm ];
|
2021-01-17 08:45:00 +00:00
|
|
|
|
|
|
|
# Upstream issue: https://github.com/tulir/gomuks/issues/260
|
|
|
|
patches = lib.optional stdenv.isLinux (substituteAll {
|
|
|
|
src = ./hardcoded_path.patch;
|
|
|
|
soundTheme = sound-theme-freedesktop;
|
|
|
|
});
|
2020-04-03 09:22:45 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
cp -r ${
|
|
|
|
makeDesktopItem {
|
|
|
|
name = "net.maunium.gomuks.desktop";
|
|
|
|
exec = "@out@/bin/gomuks";
|
|
|
|
terminal = "true";
|
|
|
|
desktopName = "Gomuks";
|
|
|
|
genericName = "Matrix client";
|
|
|
|
categories = "Network;Chat";
|
|
|
|
comment = meta.description;
|
|
|
|
}
|
|
|
|
}/* $out/
|
|
|
|
substituteAllInPlace $out/share/applications/*
|
2021-01-17 08:45:00 +00:00
|
|
|
wrapProgram $out/bin/gomuks \
|
|
|
|
--prefix PATH : "${lib.makeBinPath (lib.optionals stdenv.isLinux [ libnotify pulseaudio ])}"
|
2020-04-03 09:22:45 +01:00
|
|
|
'';
|
2019-06-28 13:17:55 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-06-28 13:17:55 +01:00
|
|
|
homepage = "https://maunium.net/go/gomuks/";
|
2018-05-14 18:18:19 +01:00
|
|
|
description = "A terminal based Matrix client written in Go";
|
2021-02-20 11:06:35 +00:00
|
|
|
license = licenses.agpl3Plus;
|
2021-02-20 11:03:24 +00:00
|
|
|
maintainers = with maintainers; [ chvp emily ];
|
2018-05-14 18:18:19 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2020-06-03 10:53:38 +01:00
|
|
|
}
|