From 521a721dbf22bc65dfb61d899354c32ebb1fd8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 6 May 2019 01:38:07 +0200 Subject: Use standard packages and move bitlbee-mastodon to pkgs for bitlbee --- nixops/modules/irc/default.nix | 57 +++------------------------------------ pkgs/bitlbee-mastodon/default.nix | 28 +++++++++++++++++++ pkgs/default.nix | 2 ++ 3 files changed, 33 insertions(+), 54 deletions(-) create mode 100644 pkgs/bitlbee-mastodon/default.nix diff --git a/nixops/modules/irc/default.nix b/nixops/modules/irc/default.nix index 4cf27e5..6500ca5 100644 --- a/nixops/modules/irc/default.nix +++ b/nixops/modules/irc/default.nix @@ -1,55 +1,4 @@ { lib, pkgs, config, myconfig, mylibs, ... }: -let - bitlbee-mastodon = with pkgs; stdenv.mkDerivation rec { - name = "bitlbee-mastodon-${version}"; - version = "v1.4.2"; - - src = fetchFromGitHub { - rev = version; - owner = "kensanata"; - repo = "bitlbee-mastodon"; - sha256 = "04rakgr1pfsg1vhfwlfbggbzw249j7dmk88xrsnf3n84c5ccdyas"; - }; - - nativeBuildInputs = [ autoreconfHook pkgconfig ]; - buildInputs = [ bitlbee glib ]; - - preConfigure = '' - export BITLBEE_PLUGINDIR=$out/lib/bitlbee - ./autogen.sh - ''; - - meta = { - description = "Bitlbee plugin for Mastodon"; - - homepage = https://github.com/kensanata/bitlbee-mastodon; - license = lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - }; - }; - bitlbee-discord = pkgs.bitlbee-discord.overrideAttrs(old: rec { - name = "bitlbee-discord-${version}"; - version = "0.4.2"; - - src = pkgs.fetchFromGitHub { - rev = version; - owner = "sm00th"; - repo = "bitlbee-discord"; - sha256 = "02pigk2vbz0jdz11f96sygdvp1j762yjn62h124fkcsc070g7a2f"; - }; - }); - bitlbee-facebook = pkgs.bitlbee-facebook.overrideAttrs(old: rec { - name = "bitlbee-facebook-${version}"; - version = "1.2.0"; - - src = pkgs.fetchFromGitHub { - rev = "v${version}"; - owner = "bitlbee"; - repo = "bitlbee-facebook"; - sha256 = "11068zhb1v55b1x0nhjc4f3p0glccxpcyk5c1630hfdzkj7vyqhn"; - }; - }); -in { options = { services.irc.enable = lib.mkOption { @@ -78,9 +27,9 @@ in pkgs.purple-matrix ]; plugins = [ - bitlbee-mastodon - bitlbee-facebook - bitlbee-discord + pkgs.bitlbee-mastodon + pkgs.bitlbee-facebook + pkgs.bitlbee-discord pkgs.bitlbee-steam ]; }; diff --git a/pkgs/bitlbee-mastodon/default.nix b/pkgs/bitlbee-mastodon/default.nix new file mode 100644 index 0000000..0451068 --- /dev/null +++ b/pkgs/bitlbee-mastodon/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, bitlbee, glib, lib }: +stdenv.mkDerivation rec { + name = "bitlbee-mastodon-${version}"; + version = "v1.4.2"; + + src = fetchFromGitHub { + rev = version; + owner = "kensanata"; + repo = "bitlbee-mastodon"; + sha256 = "04rakgr1pfsg1vhfwlfbggbzw249j7dmk88xrsnf3n84c5ccdyas"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = [ bitlbee glib ]; + + preConfigure = '' + export BITLBEE_PLUGINDIR=$out/lib/bitlbee + ./autogen.sh + ''; + + meta = { + description = "Bitlbee plugin for Mastodon"; + + homepage = https://github.com/kensanata/bitlbee-mastodon; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 0833cc2..c407a75 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -34,5 +34,7 @@ in mpd = (callPackage ../pkgs/mpd_0_21 {}).mpd; mpd-small = (callPackage ../pkgs/mpd_0_21 {}).mpd-small; + bitlbee-mastodon = callPackage ./bitlbee-mastodon {}; + webapps = callPackage ./webapps { inherit mylibs; }; } -- cgit v1.2.3