Bitlbee and Discord Canary

Signed-off-by: main <magic_rb@redalder.org>
This commit is contained in:
main 2022-04-18 23:19:46 +02:00
parent 03e6940b04
commit 9f6f578be6
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
3 changed files with 50 additions and 1 deletions

View file

@ -168,6 +168,7 @@
overlays = { overlays = {
bootloadHID = import ./overlays/bootloadHID inputs; bootloadHID = import ./overlays/bootloadHID inputs;
bitlbee = import ./overlays/bitlbee;
hidapitester = import ./overlays/hidapitester inputs; hidapitester = import ./overlays/hidapitester inputs;
emacs = import ./overlays/emacs-ng/default.nix inputs; emacs = import ./overlays/emacs-ng/default.nix inputs;
emacsclient-remote = import ./overlays/emacsclient-remote; emacsclient-remote = import ./overlays/emacsclient-remote;
@ -175,7 +176,7 @@
screenshot = import ./overlays/screenshot; screenshot = import ./overlays/screenshot;
easy-hls-nix = import ./overlays/easy-hls-nix inputs.easy-hls-nix; easy-hls-nix = import ./overlays/easy-hls-nix inputs.easy-hls-nix;
mainsail = import ./overlays/mainsail; mainsail = import ./overlays/mainsail;
discord-canary = import "${inputs.yusdacra-dotfiles}/overlays/discord-canary-system.nix"; discord-canary = import ./overlays/discord-canary;
winetricks = import ./overlays/winetricks; winetricks = import ./overlays/winetricks;
dwarffs = inputs.dwarffs.overlay; dwarffs = inputs.dwarffs.overlay;
deploy-rs = deploy-rs.overlay; deploy-rs = deploy-rs.overlay;
@ -205,6 +206,7 @@
in in
{ {
bootloadHID = mkPkg "bootloadHID"; bootloadHID = mkPkg "bootloadHID";
bitlbee = mkPkg "bitlbee";
hidapitester = mkPkg "hidapitester"; hidapitester = mkPkg "hidapitester";
emacs = mkPkg "emacs"; emacs = mkPkg "emacs";
emacsclient-remote = mkPkg "emacsclient-remote"; emacsclient-remote = mkPkg "emacsclient-remote";

View file

@ -0,0 +1,16 @@
final: prev:
with final.lib;
{
magic_rb = prev.magic_rb or {} // {
bitlbee = (prev.bitlbee.override
{ enableLibPurple = true;
pidgin = prev.pidgin.override
{ plugins = with prev; [ purple-discord ];
};
}).overrideAttrs
(old:
{ configureFlags = old.configureFlags ++ singleton "--config=/tmp/bitlbee";
}
);
};
}

View file

@ -0,0 +1,31 @@
final: prev: {
discord-canary =
prev.discord-canary.overrideAttrs
(
old: let
binaryName = "DiscordCanary";
in rec {
version = "0.0.123";
src =
prev.fetchurl
{
url = "https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
sha256 = "0bijwfsd9s4awqkgxd9c2cxh7y5r06vix98qjp0dkv63r6jig8ch";
};
installPhase = ''
mkdir -p $out/{bin,opt/${binaryName},share/pixmaps}
mv * $out/opt/${binaryName}
chmod +x $out/opt/${binaryName}/${binaryName}
patchelf --set-interpreter ${prev.stdenv.cc.bintools.dynamicLinker} \
$out/opt/${binaryName}/${binaryName}
wrapProgram $out/opt/${binaryName}/${binaryName} \
"''${gappsWrapperArgs[@]}" \
--prefix XDG_DATA_DIRS : "${prev.gtk3}/share/gsettings-schemas/${prev.gtk3.name}/" \
--prefix LD_LIBRARY_PATH : "${old.libPath}:${prev.electron_15}/lib/electron:${prev.libdrm}/lib:${prev.mesa.drivers.out}/lib"
ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
ln -s $out/opt/${binaryName}/discord.png $out/share/pixmaps/${old.pname}.png
ln -s "${old.desktopItem}/share/applications" $out/share/
'';
}
);
}