nixpkgs/pkgs/by-name/ab/abaddon/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

99 lines
1.7 KiB
Nix
Raw Normal View History

2023-04-21 11:53:50 +00:00
{
lib,
fetchFromGitHub,
stdenv,
cmake,
copyDesktopItems,
makeDesktopItem,
makeWrapper,
pkg-config,
2024-05-27 09:30:50 +00:00
alsa-lib,
2023-04-21 11:53:50 +00:00
curl,
gtkmm3,
libhandy,
2023-08-23 22:15:53 +00:00
libopus,
2024-05-27 09:30:50 +00:00
libpulseaudio,
2023-04-21 11:53:50 +00:00
libsecret,
2023-08-23 22:15:53 +00:00
libsodium,
2023-04-21 11:53:50 +00:00
nlohmann_json,
2023-08-23 22:15:53 +00:00
pcre2,
spdlog,
2023-04-21 11:53:50 +00:00
sqlite,
}:
stdenv.mkDerivation rec {
pname = "abaddon";
2024-04-06 12:17:46 +00:00
version = "0.2.1";
2023-04-21 11:53:50 +00:00
src = fetchFromGitHub {
owner = "uowuo";
repo = "abaddon";
rev = "v${version}";
2024-04-06 12:17:46 +00:00
hash = "sha256-FPhHy+4BmaoGrHGsc5o79Au9JcH5C+iWTYQYwnTLaUY=";
2023-04-21 11:53:50 +00:00
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
copyDesktopItems
makeWrapper
pkg-config
];
buildInputs = [
curl
gtkmm3
libhandy
2023-08-23 22:15:53 +00:00
libopus
2023-04-21 11:53:50 +00:00
libsecret
2023-08-23 22:15:53 +00:00
libsodium
2023-04-21 11:53:50 +00:00
nlohmann_json
2023-08-23 22:15:53 +00:00
pcre2
spdlog
2023-04-21 11:53:50 +00:00
sqlite
];
installPhase = ''
runHook preInstall
mkdir -p $out/share/abaddon
cp -r ../res/{css,res} $out/share/abaddon
mkdir $out/bin
cp abaddon $out/bin
wrapProgram $out/bin/abaddon \
2024-05-27 09:30:50 +00:00
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
alsa-lib
libpulseaudio
]
}" \
2023-04-21 11:53:50 +00:00
--chdir $out/share/abaddon
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = pname;
exec = pname;
desktopName = "Abaddon";
genericName = meta.description;
startupWMClass = pname;
categories = [
"Network"
"InstantMessaging"
];
mimeTypes = [ "x-scheme-handler/discord" ];
})
];
meta = with lib; {
description = "A discord client reimplementation, written in C++";
mainProgram = "abaddon";
2023-04-21 11:53:50 +00:00
homepage = "https://github.com/uowuo/abaddon";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ genericnerdyusername ];
platforms = lib.platforms.linux;
2023-04-21 11:53:50 +00:00
};
}