lol
1{ stdenv, fetchurl, bash, cabextract, curl, gnupg, libX11, libGLU_combined, perl, wineStaging
2 }:
3
4let
5 wine_custom = wineStaging;
6
7 mozillaPluginPath = "/lib/mozilla/plugins";
8
9
10in stdenv.mkDerivation rec {
11
12 version = "0.2.8";
13
14 name = "pipelight-${version}";
15
16 src = fetchurl {
17 url = "https://bitbucket.org/mmueller2012/pipelight/get/v${version}.tar.gz";
18 sha256 = "1i440rf22fmd2w86dlm1mpi3nb7410rfczc0yldnhgsvp5p3sm5f";
19 };
20
21 buildInputs = [ wine_custom libX11 libGLU_combined curl ];
22
23 propagatedbuildInputs = [ curl cabextract ];
24
25 patches = [ ./pipelight.patch ];
26
27 configurePhase = ''
28 patchShebangs .
29 ./configure \
30 --prefix=$out \
31 --moz-plugin-path=$out/${mozillaPluginPath} \
32 --wine-path=${wine_custom} \
33 --gpg-exec=${gnupg}/bin/gpg \
34 --bash-interp=${bash}/bin/bash \
35 --downloader=${curl.bin}/bin/curl
36 $configureFlags
37 '';
38
39 passthru = {
40 mozillaPlugin = mozillaPluginPath;
41 wine = wine_custom;
42 };
43
44 postInstall = ''
45 $out/bin/pipelight-plugin --create-mozilla-plugins
46 '';
47
48 preFixup = ''
49 substituteInPlace $out/share/pipelight/install-dependency \
50 --replace cabextract ${cabextract}/bin/cabextract
51 '';
52
53 enableParallelBuilding = true;
54
55 meta = {
56 homepage = http://pipelight.net/;
57 license = with stdenv.lib.licenses; [ mpl11 gpl2 lgpl21 ];
58 description = "A wrapper for using Windows plugins in Linux browsers";
59 maintainers = with stdenv.lib.maintainers; [ skeidel ];
60 platforms = [ "x86_64-linux" "i686-linux" ];
61 };
62}