nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/default.nix

62 lines
1.5 KiB
Nix
Raw Normal View History

2021-01-17 08:45:00 +00:00
{ lib
, stdenv
, substituteAll
, buildGoModule
, fetchFromGitHub
, makeDesktopItem
, makeWrapper
, libnotify
, olm
, pulseaudio
, sound-theme-freedesktop
}:
2018-05-14 17:18:19 +00:00
2019-06-28 12:17:55 +00:00
buildGoModule rec {
pname = "gomuks";
2021-02-20 09:15:01 +00:00
version = "0.2.3";
2018-05-14 17:18:19 +00:00
src = fetchFromGitHub {
owner = "tulir";
2019-06-28 12:17:55 +00: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 17:18:19 +00:00
};
2021-02-20 09:15:01 +00:00
vendorSha256 = "14ya5advpv4q5il235h5dxy8c2ap2yzrvqs0sjqgw0v1vm6vpwdx";
2020-06-03 09:53:38 +00:00
doCheck = false;
2021-01-17 08:45:00 +00:00
buildInputs = [ makeWrapper olm ];
# Upstream issue: https://github.com/tulir/gomuks/issues/260
patches = lib.optional stdenv.isLinux (substituteAll {
src = ./hardcoded_path.patch;
soundTheme = sound-theme-freedesktop;
});
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 ])}"
'';
2019-06-28 12:17:55 +00:00
meta = with lib; {
2019-06-28 12:17:55 +00:00
homepage = "https://maunium.net/go/gomuks/";
2018-05-14 17:18:19 +00:00
description = "A terminal based Matrix client written in Go";
license = licenses.gpl3;
2021-02-20 11:03:24 +00:00
maintainers = with maintainers; [ chvp emily ];
2018-05-14 17:18:19 +00:00
platforms = platforms.unix;
};
2020-06-03 09:53:38 +00:00
}