1{ fetchurl, lib, stdenv, nss, nspr, pkg-config }:
2
3
4stdenv.mkDerivation rec {
5 pname = "liboauth";
6 version = "1.0.3";
7
8 src = fetchurl {
9 url = "mirror://sourceforge/liboauth/${pname}-${version}.tar.gz";
10 sha256 = "07w1aq8y8wld43wmbk2q8134p3bfkp2vma78mmsfgw2jn1bh3xhd";
11 };
12
13 outputs = [ "out" "dev" ];
14
15 nativeBuildInputs = [ pkg-config ];
16
17 propagatedBuildInputs = [ nss nspr ];
18
19 configureFlags = [ "--enable-nss" ];
20
21 postInstall = ''
22 substituteInPlace $out/lib/liboauth.la \
23 --replace "-lnss3" "-L${nss.out}/lib -lnss3"
24 '';
25
26 meta = with lib; {
27 platforms = platforms.all;
28 description = "C library implementing the OAuth secure authentication protocol";
29 homepage = "http://liboauth.sourceforge.net/";
30 license = licenses.mit;
31 };
32
33}