forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
66 lines
1.5 KiB
Nix
66 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchhg, pidgin, glib, json-glib, autoreconfHook }:
|
|
|
|
|
|
let
|
|
pidginHg = fetchhg {
|
|
url = "https://bitbucket.org/pidgin/main";
|
|
# take from VERSION file
|
|
rev = "9ff9acf9fa14";
|
|
sha256 = "06imlhsps4wrjgjb92zpaxprxfxl2pjb2x9pl859c8cryssrz2jv";
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
name = "purple-facebook-0.9.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dequis";
|
|
repo = "purple-facebook";
|
|
rev = "v0.9.5-9ff9acf9fa14";
|
|
sha256 = "0a1860bkzrmyxahm9rlxi80z335w491wzdaqaw6j9ccavbymhwhs";
|
|
};
|
|
|
|
postPatch = ''
|
|
# we do all patching from update.sh in preAutoreconf
|
|
echo "#!${stdenv.shell}" > update.sh
|
|
'';
|
|
|
|
preAutoreconf = ''
|
|
for FILE in $(cat MANIFEST_PIDGIN); do
|
|
install -Dm644 "${pidginHg}/$FILE" "pidgin/$FILE" || true
|
|
done
|
|
|
|
touch $(cat MANIFEST_VOIDS)
|
|
|
|
patchdir="$(pwd)/patches"
|
|
pushd pidgin
|
|
|
|
for patch in $(ls -1 "$patchdir"); do
|
|
patch -p1 -i "$patchdir/$patch"
|
|
done
|
|
popd
|
|
|
|
./autogen.sh
|
|
'';
|
|
|
|
makeFlags = [
|
|
"PLUGIN_DIR_PURPLE=/lib/pidgin/"
|
|
"DATA_ROOT_DIR_PURPLE=/share"
|
|
];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/purple-2
|
|
cp pidgin/libpurple/protocols/facebook/.libs/*.so $out/lib/purple-2/
|
|
'';
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
buildInputs = [ pidgin glib json-glib ];
|
|
|
|
meta = with lib; {
|
|
inherit (src.meta) homepage;
|
|
description = "Facebook protocol plugin for libpurple";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ davorb ];
|
|
};
|
|
}
|