3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/instant-messengers/gomuks/default.nix

63 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 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
doCheck = false;
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;
});
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 13:17:55 +01: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
}