3
0
Fork 0
forked from mirrors/nixpkgs

Add nspluginwrapper, a tool to execute browser plugins out-of-process

This commit is contained in:
Michael Raskin 2012-11-08 11:38:34 +04:00
parent c2bc48aef3
commit c7d2e34758
4 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,36 @@
{stdenv, fetchurl, which, pkgconfig, file, glib, gtk2, gtk3, curl}:
let
srcData = # Generated upstream information
rec {
baseName="nspluginwrapper";
version="1.4.4";
name="${baseName}-${version}";
hash="1fxjz9ifhw0drm12havlsl4jpsq1nv930gqa005kgddv5pa99vgj";
url="http://nspluginwrapper.org/download/nspluginwrapper-1.4.4.tar.gz";
};
in
stdenv.mkDerivation rec {
inherit(srcData) name version;
src = fetchurl{
inherit(srcData) url;
sha256 = srcData.hash;
};
preConfigure = ''
sed -e 's@/usr/bin/@@g' -i configure
sed -e '/gthread[.]h/d' -i src/npw-player.c
export configureFlags="$configureFlags --target-cpu=$(uname -m)"
'';
buildInputs = [which pkgconfig file glib gtk2 gtk3 curl];
meta = {
description = ''A wrapper to run browser plugins out-of-process'';
homepage = "http://nspluginwrapper.org/";
license = stdenv.lib.licenses.gpl2;
platforms = with stdenv.lib.platforms; linux;
maintainers = with stdenv.lib.maintainer; [raskin];
inherit (srcData) version;
};
}

View file

@ -0,0 +1,4 @@
name nspluginwrapper
target default.nix
url http://nspluginwrapper.org/download/
version_link /nspluginwrapper-[0-9]+

View file

@ -76,6 +76,10 @@ version () {
echo "Version: $CURRENT_VERSION" >&2
}
ensure_version () {
[ -z "$CURRENT_VERSION" ] && version '.*-([0-9.]+)[-._].*' '\1'
}
hash () {
CURRENT_HASH="$(nix-prefetch-url "$CURRENT_URL")"
}
@ -121,6 +125,7 @@ full_path () {
process_config () {
source "$(full_path "$1")"
retrieve_version
ensure_version
update_found && do_overwrite "$CURRENT_TARGET"
}

View file

@ -7487,6 +7487,8 @@ let
novaclient = callPackage ../applications/virtualization/nova/client.nix { };
nspluginwrapper = callPackage ../applications/networking/browsers/mozilla-plugins/nspluginwrapper {};
nvi = callPackage ../applications/editors/nvi { };
ocrad = callPackage ../applications/graphics/ocrad { };