Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 93 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 bash, 6 cabextract, 7 curl, 8 gnupg, 9 libX11, 10 libGLU, 11 libGL, 12 wine-staging, 13}: 14 15let 16 wine_custom = wine-staging; 17 18 mozillaPluginPath = "/lib/mozilla/plugins"; 19 20in 21stdenv.mkDerivation rec { 22 23 version = "0.2.8.2"; 24 25 pname = "pipelight"; 26 27 src = fetchurl { 28 url = "https://bitbucket.org/mmueller2012/pipelight/get/v${version}.tar.gz"; 29 sha256 = "1kyy6knkr42k34rs661r0f5sf6l1s2jdbphdg89n73ynijqmzjhk"; 30 }; 31 32 buildInputs = [ 33 wine_custom 34 libX11 35 libGLU 36 libGL 37 curl 38 ]; 39 40 env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ]; 41 42 patches = [ 43 ./pipelight.patch 44 ./wine-6.13-new-args.patch 45 # https://source.winehq.org/git/wine.git/commit/cf4a781e987a98a8d48610362a20a320c4a1016d 46 # adds ControlMask as a static variable. 47 ./wine-7.10-ControlMask.patch 48 ]; 49 50 configurePhase = '' 51 patchShebangs . 52 ./configure \ 53 --prefix=$out \ 54 --moz-plugin-path=$out/${mozillaPluginPath} \ 55 --wine-path=${wine_custom} \ 56 --gpg-exec=${gnupg}/bin/gpg \ 57 --bash-interp=${bash}/bin/bash \ 58 --downloader=${curl.bin}/bin/curl 59 $configureFlags 60 ''; 61 62 passthru = { 63 mozillaPlugin = mozillaPluginPath; 64 wine = wine_custom; 65 }; 66 67 postInstall = '' 68 $out/bin/pipelight-plugin --create-mozilla-plugins 69 ''; 70 71 preFixup = '' 72 substituteInPlace $out/share/pipelight/install-dependency \ 73 --replace cabextract ${cabextract}/bin/cabextract 74 ''; 75 76 enableParallelBuilding = true; 77 78 meta = { 79 homepage = "http://pipelight.net/"; 80 license = with lib.licenses; [ 81 mpl11 82 gpl2Only 83 lgpl21 84 ]; 85 description = "Wrapper for using Windows plugins in Linux browsers"; 86 maintainers = [ ]; 87 platforms = [ 88 "x86_64-linux" 89 "i686-linux" 90 ]; 91 mainProgram = "pipelight-plugin"; 92 }; 93}