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