mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
Merge remote-tracking branch 'upstream/master' into HEAD
This commit is contained in:
commit
0cd857bffd
22 changed files with 695 additions and 64 deletions
|
@ -488,6 +488,7 @@
|
|||
patternspandemic = "Brad Christensen <patternspandemic@live.com>";
|
||||
pawelpacana = "Paweł Pacana <pawel.pacana@gmail.com>";
|
||||
pbogdan = "Piotr Bogdan <ppbogdan@gmail.com>";
|
||||
pcarrier = "Pierre Carrier <pc@rrier.ca>";
|
||||
periklis = "theopompos@gmail.com";
|
||||
pesterhazy = "Paulus Esterhazy <pesterhazy@gmail.com>";
|
||||
peterhoeg = "Peter Hoeg <peter@hoeg.com>";
|
||||
|
|
|
@ -17,40 +17,6 @@ let
|
|||
nodeCfg = config.services.munin-node;
|
||||
cronCfg = config.services.munin-cron;
|
||||
|
||||
muninPlugins = pkgs.stdenv.mkDerivation {
|
||||
name = "munin-available-plugins";
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
|
||||
cp --preserve=mode ${pkgs.munin}/lib/plugins/* $out/
|
||||
|
||||
for file in $out/*; do
|
||||
case "$file" in
|
||||
*/plugin.sh|*/plugins.history)
|
||||
chmod +x "$file"
|
||||
continue;;
|
||||
esac
|
||||
|
||||
# read magic makers from the file
|
||||
family=$(sed -nr 's/.*#%#\s+family\s*=\s*(\S+)\s*/\1/p' $file)
|
||||
cap=$(sed -nr 's/.*#%#\s+capabilities\s*=\s*(.+)/\1/p' $file)
|
||||
|
||||
wrapProgram $file \
|
||||
--set PATH "/run/wrappers/bin:/run/current-system/sw/bin" \
|
||||
--set MUNIN_LIBDIR "${pkgs.munin}/lib" \
|
||||
--set MUNIN_PLUGSTATE "/var/run/munin"
|
||||
|
||||
# munin uses markers to tell munin-node-configure what a plugin can do
|
||||
echo "#%# family=$family" >> $file
|
||||
echo "#%# capabilities=$cap" >> $file
|
||||
done
|
||||
|
||||
# NOTE: we disable disktstats because plugin seems to fail and it hangs html generation (100% CPU + memory leak)
|
||||
rm -f $out/diskstats
|
||||
'';
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
};
|
||||
|
||||
muninConf = pkgs.writeText "munin.conf"
|
||||
''
|
||||
dbdir /var/lib/munin
|
||||
|
@ -83,6 +49,29 @@ let
|
|||
|
||||
${nodeCfg.extraConfig}
|
||||
'';
|
||||
|
||||
pluginConf = pkgs.writeText "munin-plugin-conf"
|
||||
''
|
||||
[hddtemp_smartctl]
|
||||
user root
|
||||
group root
|
||||
|
||||
[meminfo]
|
||||
user root
|
||||
group root
|
||||
|
||||
[ipmi*]
|
||||
user root
|
||||
group root
|
||||
'';
|
||||
|
||||
pluginConfDir = pkgs.stdenv.mkDerivation {
|
||||
name = "munin-plugin-conf.d";
|
||||
buildCommand = ''
|
||||
mkdir $out
|
||||
ln -s ${pluginConf} $out/nixos-config
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -179,17 +168,22 @@ in
|
|||
description = "Munin Node";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.munin ];
|
||||
path = with pkgs; [ munin smartmontools "/run/current-system/sw" "/run/wrappers" ];
|
||||
environment.MUNIN_LIBDIR = "${pkgs.munin}/lib";
|
||||
environment.MUNIN_PLUGSTATE = "/var/run/munin";
|
||||
environment.MUNIN_LOGDIR = "/var/log/munin";
|
||||
preStart = ''
|
||||
echo "updating munin plugins..."
|
||||
|
||||
mkdir -p /etc/munin/plugins
|
||||
rm -rf /etc/munin/plugins/*
|
||||
PATH="/run/wrappers/bin:/run/current-system/sw/bin" ${pkgs.munin}/sbin/munin-node-configure --shell --families contrib,auto,manual --config ${nodeConf} --libdir=${muninPlugins} --servicedir=/etc/munin/plugins 2>/dev/null | ${pkgs.bash}/bin/bash
|
||||
${pkgs.munin}/bin/munin-node-configure --suggest --shell --families contrib,auto,manual --config ${nodeConf} --libdir=${pkgs.munin}/lib/plugins --servicedir=/etc/munin/plugins --sconfdir=${pluginConfDir} 2>/dev/null | ${pkgs.bash}/bin/bash
|
||||
|
||||
# NOTE: we disable disktstats because plugin seems to fail and it hangs html generation (100% CPU + memory leak)
|
||||
rm /etc/munin/plugins/diskstats || true
|
||||
'';
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.munin}/sbin/munin-node --config ${nodeConf} --servicedir /etc/munin/plugins/";
|
||||
ExecStart = "${pkgs.munin}/sbin/munin-node --config ${nodeConf} --servicedir /etc/munin/plugins/ --sconfdir=${pluginConfDir}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -198,6 +198,13 @@ in {
|
|||
|
||||
environment.systemPackages = [ pkgs.xorg.xf86inputlibinput ];
|
||||
|
||||
environment.etc = [
|
||||
(let cfgPath = "X11/xorg.conf.d/40-libinput.conf"; in {
|
||||
source = pkgs.xorg.xf86inputlibinput.out + "/share/" + cfgPath;
|
||||
target = cfgPath;
|
||||
})
|
||||
];
|
||||
|
||||
services.udev.packages = [ pkgs.libinput ];
|
||||
|
||||
services.xserver.config =
|
||||
|
|
|
@ -700,7 +700,6 @@ in
|
|||
Section "InputClass"
|
||||
Identifier "Keyboard catchall"
|
||||
MatchIsKeyboard "on"
|
||||
Option "XkbRules" "base"
|
||||
Option "XkbModel" "${cfg.xkbModel}"
|
||||
Option "XkbLayout" "${cfg.layout}"
|
||||
Option "XkbOptions" "${cfg.xkbOptions}"
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
name= "riot-web-${version}";
|
||||
version = "0.12.6";
|
||||
version = "0.13.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/vector-im/riot-web/releases/download/v${version}/riot-v${version}.tar.gz";
|
||||
sha256 = "00hxjhnsm4622hv46xm7lc81kbnzi2iz77qppwma14cbh63jbilv";
|
||||
sha256 = "19g0d3wqmz4vj9flf7pfgfvm2qf2w3jhxp9qdyfbiwd670h5wjlv";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
|
39
pkgs/games/pysolfc/default.nix
Normal file
39
pkgs/games/pysolfc/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ fetchurl, python2, stdenv }:
|
||||
|
||||
with python2.pkgs;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "PySolFC";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/pysolfc/${pname}-${version}.tar.bz2";
|
||||
sha256 = "0v0v8iflw55f5mghglkw80j8b7lv1hffjassfhqc4y84dmz8xjyv";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./pysolfc-datadir.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
tkinter
|
||||
];
|
||||
|
||||
# No tests in archive
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
# executables should not have an extension
|
||||
pushd $out/bin
|
||||
mv pysol.py pysol
|
||||
rm pysol.pyc
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A collection of more than 1000 solitaire card games";
|
||||
homepage = http://pysolfc.sourceforge.net/;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ kierdavis ];
|
||||
};
|
||||
}
|
19
pkgs/games/pysolfc/pysolfc-datadir.patch
Normal file
19
pkgs/games/pysolfc/pysolfc-datadir.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
diff --git a/pysollib/util.py b/pysollib/util.py
|
||||
index 8de3f00..26f4bc7 100644
|
||||
--- a/pysollib/util.py
|
||||
+++ b/pysollib/util.py
|
||||
@@ -110,13 +110,7 @@ class DataLoader:
|
||||
head, tail = os.path.split(argv0)
|
||||
if not head:
|
||||
head = os.curdir
|
||||
- # dir where placed startup script
|
||||
- path.append(head)
|
||||
- path.append(os.path.join(head, "data"))
|
||||
- path.append(os.path.join(head, os.pardir, "data"))
|
||||
- # dir where placed pysol package
|
||||
- path.append(os.path.join(sys.path[0], "data"))
|
||||
- path.append(os.path.join(sys.path[0], "pysollib", "data"))
|
||||
+ path.append(os.path.join(head, "..", "share", "PySolFC"))
|
||||
# from settings.py
|
||||
path.extend(DATA_DIRS)
|
||||
# check path for valid directories
|
150
pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
Normal file
150
pkgs/misc/cups/drivers/cnijfilter_4_00/default.nix
Normal file
|
@ -0,0 +1,150 @@
|
|||
{ stdenv, lib, fetchzip,
|
||||
autoconf, automake, libtool,
|
||||
cups, popt, libtiff, libpng,
|
||||
ghostscript, glib, libusb, libxml2 }:
|
||||
|
||||
/* this derivation is basically just a transcription of the rpm .spec
|
||||
file included in the tarball */
|
||||
|
||||
let arch =
|
||||
if stdenv.system == "x86_64-linux" then "64"
|
||||
else if stdenv.system == "i686-linux" then "32"
|
||||
else abort "Unsupported architecture";
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "cnijfilter-${version}";
|
||||
|
||||
/* important note about versions: cnijfilter packages seem to use
|
||||
versions in a non-standard way. the version indicates which
|
||||
printers are supported in the package. so this package should
|
||||
not be "upgraded" in the usual way.
|
||||
|
||||
instead, if you want to include another version supporting your
|
||||
printer, you should try to abstract out the common things (which
|
||||
should be pretty much everything except the version and the 'pr'
|
||||
and 'pr_id' values to loop over). */
|
||||
version = "4.00";
|
||||
|
||||
src = fetchzip {
|
||||
url = "http://gdlp01.c-wss.com/gds/5/0100005515/01/cnijfilter-source-4.00-1.tar.gz";
|
||||
sha256 = "1f6vpx1z3qa88590i5m0s49j9n90vpk81xmw6pvj0nfd3qbvzkya";
|
||||
};
|
||||
|
||||
buildInputs = [ autoconf libtool automake
|
||||
cups popt libtiff libpng
|
||||
ghostscript glib libusb libxml2 ];
|
||||
|
||||
# patches from https://github.com/tokiclover/bar-overlay/tree/master/net-print/cnijfilter
|
||||
patches = [
|
||||
./patches/cnijfilter-3.80-1-cups-1.6.patch
|
||||
./patches/cnijfilter-3.80-6-cups-1.6.patch
|
||||
./patches/cnijfilter-4.00-4-ppd.patch
|
||||
./patches/cnijfilter-4.00-5-abi_x86_32.patch
|
||||
./patches/cnijfilter-4.00-6-headers.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" backend/src/Makefile.am;
|
||||
sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" backendnet/backend/Makefile.am;
|
||||
sed -i "s|/usr/lib/cups/backend|$out/lib/cups/backend|" cnijbe/src/Makefile.am;
|
||||
sed -i "s|/usr|$out|" backend/src/cnij_backend_common.c;
|
||||
sed -i "s|/usr/bin|${ghostscript}/bin|" pstocanonij/filter/pstocanonij.c;
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cd libs
|
||||
./autogen.sh --prefix=$out
|
||||
|
||||
cd ../bscc2sts
|
||||
./autogen.sh
|
||||
|
||||
cd ../cnijnpr
|
||||
./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib
|
||||
|
||||
cd ../cngpij
|
||||
./autogen.sh --prefix=$out --enable-progpath=$out/bin
|
||||
|
||||
cd ../cngpijmnt
|
||||
./autogen.sh --prefix=$out --enable-progpath=$out/bin
|
||||
|
||||
cd ../pstocanonij
|
||||
./autogen.sh --prefix=$out --enable-progpath=$out/bin
|
||||
|
||||
cd ../backend
|
||||
./autogen.sh --prefix=$out
|
||||
|
||||
cd ../backendnet
|
||||
./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib --enable-progpath=$out/bin
|
||||
|
||||
cd ../cmdtocanonij
|
||||
./autogen.sh --prefix=$out --datadir=$out/share
|
||||
|
||||
cd ../cnijbe
|
||||
./autogen.sh --prefix=$out --enable-progpath=$out/bin
|
||||
|
||||
cd ../lgmon2
|
||||
substituteInPlace src/Makefile.am \
|
||||
--replace /usr/include/libusb-1.0 \
|
||||
${libusb.dev}/include/libusb-1.0
|
||||
./autogen.sh --prefix=$out --enable-libpath=$out/lib/bjlib --enable-progpath=$out/bin
|
||||
|
||||
cd ..;
|
||||
|
||||
sed -e "s,cnijlgmon2_LDADD =,cnijlgmon2_LDADD = -L../../com/libs_bin${arch}," \
|
||||
-i lgmon2/src/Makefile.am || die
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin $out/lib/cups/filter $out/share/cups/model;
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
set -o xtrace
|
||||
for pr in mg2400 mg2500 mg3500 mg5500 mg6400 mg6500 mg7100 p200; do
|
||||
cd ppd;
|
||||
./autogen.sh --prefix=$out --program-suffix=$pr
|
||||
make clean;
|
||||
make;
|
||||
make install;
|
||||
|
||||
cd ../cnijfilter;
|
||||
./autogen.sh --prefix=$out --program-suffix=$pr --enable-libpath=/var/lib/cups/path/lib/bjlib --enable-binpath=$out/bin;
|
||||
make clean;
|
||||
make;
|
||||
make install;
|
||||
|
||||
cd ..;
|
||||
done;
|
||||
|
||||
mkdir -p $out/lib/bjlib;
|
||||
for pr_id in 423 424 425 426 427 428 429 430; do
|
||||
install -c -m 755 $pr_id/database/* $out/lib/bjlib;
|
||||
install -c -s -m 755 $pr_id/libs_bin${arch}/*.so.* $out/lib;
|
||||
done;
|
||||
|
||||
pushd $out/lib;
|
||||
for so_file in *.so.*; do
|
||||
ln -s $so_file ''${so_file/.so.*/}.so;
|
||||
patchelf --set-rpath $out/lib $so_file;
|
||||
done;
|
||||
popd;
|
||||
'';
|
||||
|
||||
/* the tarball includes some pre-built shared libraries. we run
|
||||
'patchelf --set-rpath' on them just a few lines above, so that
|
||||
they can find each other. but that's not quite enough. some of
|
||||
those libraries load each other in non-standard ways -- they
|
||||
don't list each other in the DT_NEEDED section. so, if the
|
||||
standard 'patchelf --shrink-rpath' (from
|
||||
pkgs/development/tools/misc/patchelf/setup-hook.sh) is run on
|
||||
them, it undoes the --set-rpath. this prevents that. */
|
||||
dontPatchELF = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Canon InkJet printer drivers for the MG2400 MG2500 MG3500 MG5500 MG6400 MG6500 MG7100 and P200 series.";
|
||||
homepage = https://www.canon-europe.com/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mg_series/pixma_mg5550.aspx?type=drivers&driverdetailid=tcm:13-1094072;
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ chpatrick ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
--- a/cngpij/cngpij/bjcups.c
|
||||
+++ a/cngpij/cngpij/bjcups.c
|
||||
@@ -698,8 +719,8 @@
|
||||
else {
|
||||
pRequest = ippNew();
|
||||
|
||||
- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
|
||||
- pRequest->request.op.request_id = 1;
|
||||
+ ippSetOperation(pRequest, CUPS_GET_PRINTERS);
|
||||
+ ippSetRequestId(pRequest, 1);
|
||||
|
||||
pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
|
||||
|
||||
@@ -708,29 +729,29 @@
|
||||
ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
|
||||
|
||||
if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
|
||||
- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
|
||||
+ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
|
||||
fputs("ERROR: IPP ERROR\n", stderr);
|
||||
goto onErr;
|
||||
}
|
||||
else {
|
||||
- pAttribute = pResponse->attrs;
|
||||
+ pAttribute = ippFirstAttribute(pResponse);
|
||||
|
||||
while (pAttribute != NULL) {
|
||||
- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
|
||||
- pAttribute = pAttribute->next;
|
||||
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
|
||||
+ pAttribute = ippNextAttribute(pResponse);
|
||||
}
|
||||
if (pAttribute == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
|
||||
- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
|
||||
- pPrinter = pAttribute->values[0].string.text;
|
||||
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
|
||||
+ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
|
||||
+ pPrinter = ippGetString(pAttribute, 0, NULL);
|
||||
}
|
||||
- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
|
||||
- pDUri = pAttribute->values[0].string.text;
|
||||
+ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
|
||||
+ pDUri = ippGetString(pAttribute, 0, NULL);
|
||||
}
|
||||
- pAttribute = pAttribute->next;
|
||||
+ pAttribute = ippNextAttribute(pResponse);
|
||||
}
|
||||
|
||||
if (strcasecmp(pDestName, pPrinter) == 0) {
|
||||
@@ -739,7 +760,7 @@
|
||||
}
|
||||
|
||||
if (pAttribute != NULL)
|
||||
- pAttribute = pAttribute->next;
|
||||
+ pAttribute = ippNextAttribute(pResponse);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
diff --git a/cngpijmnt/src/getipc.c b/cngpijmnt/src/getipc.c
|
||||
index 8688032..54c7933 100755
|
||||
--- a/cngpijmnt/src/getipc.c
|
||||
+++ b/cngpijmnt/src/getipc.c
|
||||
@@ -42,7 +42,7 @@ int GetIPCData(LPIPCU pipc, char *sname)
|
||||
int server_fd;
|
||||
int client_fd;
|
||||
char buf[128];
|
||||
- size_t len;
|
||||
+ socklen_t len;
|
||||
short ret = RET_ERROR;
|
||||
|
||||
if( (server_fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0 )
|
||||
|
||||
--- a/cngpijmnt/src/main.c 2016-11-12 23:39:03.534855723 +0100
|
||||
+++ b/cngpijmnt/src/main.c 2016-11-12 23:47:02.521847145 +0100
|
||||
@@ -308,8 +308,8 @@
|
||||
*pResponse; // Pointer to CUPS IPP response.
|
||||
ipp_attribute_t *pAttribute; // Pointer to CUPS attributes.
|
||||
cups_lang_t *pLanguage; // Pointer to language.
|
||||
- char *pPrinter = NULL; // Pointer to printer name.
|
||||
- char *pDUri = NULL; // Pointer to Device uri.
|
||||
+ const char *pPrinter = NULL; // Pointer to printer name.
|
||||
+ const char *pDUri = NULL; // Pointer to Device uri.
|
||||
short retVal = -1; // Return value.
|
||||
/*** Parameters end ***/
|
||||
|
||||
@@ -321,8 +321,8 @@
|
||||
else {
|
||||
pRequest = ippNew();
|
||||
|
||||
- pRequest->request.op.operation_id = CUPS_GET_PRINTERS;
|
||||
- pRequest->request.op.request_id = 1;
|
||||
+ ippSetOperation(pRequest, CUPS_GET_PRINTERS);
|
||||
+ ippSetRequestId(pRequest, 1);
|
||||
|
||||
pLanguage = bjcupsLangDefault(); // cupsLangDefault() -> bjcupsLangDefault() for cups-1.1.19
|
||||
|
||||
@@ -331,29 +331,29 @@
|
||||
ippAddString(pRequest, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", NULL, NULL);
|
||||
|
||||
if ((pResponse = cupsDoRequest(pHTTP, pRequest, "/")) != NULL) {
|
||||
- if (pResponse->request.status.status_code > IPP_OK_CONFLICT) {
|
||||
+ if (ippGetStatusCode(pResponse) > IPP_OK_CONFLICT) {
|
||||
fputs("ERROR: IPP ERROR\n", stderr);
|
||||
goto onErr;
|
||||
}
|
||||
else {
|
||||
- pAttribute = pResponse->attrs;
|
||||
+ pAttribute = ippFirstAttribute(pResponse);
|
||||
|
||||
while (pAttribute != NULL) {
|
||||
- while (pAttribute != NULL && pAttribute->group_tag != IPP_TAG_PRINTER) {
|
||||
- pAttribute = pAttribute->next;
|
||||
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) != IPP_TAG_PRINTER) {
|
||||
+ pAttribute = ippNextAttribute(pResponse);
|
||||
}
|
||||
if (pAttribute == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
- while (pAttribute != NULL && pAttribute->group_tag == IPP_TAG_PRINTER) {
|
||||
- if (strcmp(pAttribute->name, "printer-name") == 0 && pAttribute->value_tag == IPP_TAG_NAME) {
|
||||
- pPrinter = pAttribute->values[0].string.text;
|
||||
+ while (pAttribute != NULL && ippGetGroupTag(pAttribute) == IPP_TAG_PRINTER) {
|
||||
+ if (strcmp(ippGetName(pAttribute), "printer-name") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_NAME) {
|
||||
+ pPrinter = ippGetString(pAttribute, 0, NULL);
|
||||
}
|
||||
- if (strcmp(pAttribute->name, "device-uri") == 0 && pAttribute->value_tag == IPP_TAG_URI) {
|
||||
- pDUri = pAttribute->values[0].string.text;
|
||||
+ if (strcmp(ippGetName(pAttribute), "device-uri") == 0 && ippGetValueTag(pAttribute) == IPP_TAG_URI) {
|
||||
+ pDUri = ippGetString(pAttribute, 0, NULL);
|
||||
}
|
||||
- pAttribute = pAttribute->next;
|
||||
+ pAttribute = ippNextAttribute(pResponse);
|
||||
}
|
||||
|
||||
if (strcasecmp(pDestName, pPrinter) == 0) {
|
||||
@@ -362,7 +362,7 @@
|
||||
}
|
||||
|
||||
if (pAttribute != NULL)
|
||||
- pAttribute = pAttribute->next;
|
||||
+ pAttribute = ippNextAttribute(pResponse);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
--- a/backend/src/cnij_backend_common.c 2016-11-13 00:08:34.600824006 +0100
|
||||
+++ a/backend/src/cnij_backend_common.c 2016-11-13 00:08:52.037823694 +0100
|
||||
@@ -37,6 +37,7 @@
|
||||
// CUPS Header
|
||||
#include <cups/cups.h>
|
||||
#include <cups/ipp.h>
|
||||
+#include <cups/ppd.h>
|
||||
|
||||
// Header file for CANON
|
||||
#include "cnij_backend_common.h"
|
|
@ -0,0 +1,45 @@
|
|||
--- a/backendnet/configure.in 2014-08-11 08:38:46.034984462 +0200
|
||||
+++ a/backendnet/configure.in 2014-08-11 08:35:42.902985813 +0200
|
||||
@@ -19,7 +19,11 @@
|
||||
AC_DEFINE_UNQUOTED(BJLIB_PATH, "$enable_libpath")
|
||||
AC_SUBST(BJLIB_PATH)
|
||||
|
||||
-ARC=`getconf LONG_BIT`
|
||||
+case "$ABI" in
|
||||
+ x86) ARC=32;;
|
||||
+ amd64) ARC=64;;
|
||||
+ *) ARC=`getconf LONG_BIT`;;
|
||||
+esac
|
||||
AC_SUBST(ARC)
|
||||
|
||||
# Checks for programs.
|
||||
--- a/cnijfilter/configure.in 2014-08-11 08:39:44.426984031 +0200
|
||||
+++ a/cnijfilter/configure.in 2014-08-11 08:35:19.788985984 +0200
|
||||
@@ -43,7 +43,11 @@
|
||||
esac
|
||||
AC_SUBST(CNCL_LIB_ID)
|
||||
|
||||
-ARC=`getconf LONG_BIT`
|
||||
+case "$ABI" in
|
||||
+ x86) ARC=32;;
|
||||
+ amd64) ARC=64;;
|
||||
+ *) ARC=`getconf LONG_BIT`;;
|
||||
+esac
|
||||
AC_SUBST(ARC)
|
||||
|
||||
AC_PROG_CC
|
||||
--- a/cnijnpr/configure.in 2014-08-11 08:41:12.712983380 +0200
|
||||
+++ a/cnijnpr/configure.in 2014-08-11 08:40:44.354983589 +0200
|
||||
@@ -37,7 +37,11 @@
|
||||
|
||||
CFLAGS="-O2"
|
||||
|
||||
-ARC=`getconf LONG_BIT`
|
||||
+case "$ABI" in
|
||||
+ x86) ARC=32;;
|
||||
+ amd64) ARC=64;;
|
||||
+ *) ARC=`getconf LONG_BIT`;;
|
||||
+esac
|
||||
AC_SUBST(ARC)
|
||||
|
||||
AC_OUTPUT(Makefile
|
|
@ -0,0 +1,11 @@
|
|||
--- a/cnijnpr/src/cnijnpr.c 2016-11-13 21:51:33.844977618 +0100
|
||||
+++ a/cnijnpr/src/cnijnpr.c 2016-11-13 21:52:03.129977094 +0100
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/sysctl.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <unistd.h>
|
||||
#include <config.h>
|
||||
#include <fcntl.h>
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
commit af5fa3623bb9a73052f9154be4a0f38c60ea42a2
|
||||
Author: Kjetil Orbekk <kjetil.orbekk@gmail.com>
|
||||
Date: Thu Nov 23 21:21:36 2017 -0500
|
||||
|
||||
node: add --sconfdir to set plugin configuration dir
|
||||
|
||||
diff --git a/node/sbin/munin-node b/node/sbin/munin-node
|
||||
index 909c8c4e..0ccf3941 100755
|
||||
--- a/node/sbin/munin-node
|
||||
+++ b/node/sbin/munin-node
|
||||
@@ -100,9 +100,11 @@ sub parse_args
|
||||
my @ORIG_ARGV = @ARGV;
|
||||
|
||||
my $servicedir_cmdline;
|
||||
+ my $sconfdir_cmdline;
|
||||
print_usage_and_exit() unless GetOptions(
|
||||
"config=s" => \$conffile,
|
||||
"servicedir=s" => \$servicedir_cmdline,
|
||||
+ "sconfdir=s" => \$sconfdir_cmdline,
|
||||
"debug!" => \$DEBUG,
|
||||
"pidebug!" => \$PIDEBUG,
|
||||
"paranoia!" => \$paranoia,
|
||||
@@ -112,6 +114,7 @@ sub parse_args
|
||||
|
||||
# We untaint the args brutally, since the sysadm should know what he does
|
||||
$servicedir = $1 if defined $servicedir_cmdline && $servicedir_cmdline =~ m/(.*)/;
|
||||
+ $sconfdir = $1 if defined $sconfdir_cmdline && $sconfdir_cmdline =~ m/(.*)/;
|
||||
|
||||
# Reset ARGV (for HUPing)
|
||||
@ARGV = @ORIG_ARGV;
|
||||
@@ -175,6 +178,10 @@ Use E<lt>fileE<gt> as configuration file. [@@CONFDIR@@/munin-node.conf]
|
||||
|
||||
Override plugin directory [@@CONFDIR@@/plugins/]
|
||||
|
||||
+=item B<< --sconfdir <dir> >>
|
||||
+
|
||||
+Override plugin configuration directory [@@CONFDIR@@/plugin-conf.d/]
|
||||
+
|
||||
=item B< --[no]paranoia >
|
||||
|
||||
Only run plugins owned by root. Check permissions as well. [--noparanoia]
|
|
@ -3,14 +3,14 @@
|
|||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.0.33";
|
||||
version = "2.0.34";
|
||||
name = "munin-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "munin-monitoring";
|
||||
repo = "munin";
|
||||
rev = version;
|
||||
sha256 = "0rs05b7926mjd58sdry33i91m1h3v3svl0wg2gmhljl8wqidac5w";
|
||||
sha256 = "0mb5m0nc3nr9781d3s99sjdssmvkv37gxyplzr6d73i4hi31m7fr";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -67,6 +67,9 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# https://github.com/munin-monitoring/munin/pull/134
|
||||
./adding_servicedir_munin-node.patch
|
||||
|
||||
./adding_sconfdir_munin-node.patch
|
||||
./preserve_environment.patch
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
|
|
41
pkgs/servers/monitoring/munin/preserve_environment.patch
Normal file
41
pkgs/servers/monitoring/munin/preserve_environment.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
commit d94c29b7397362857b81d8c877a989fdb28490d8
|
||||
Author: Kjetil Orbekk <kjetil.orbekk@gmail.com>
|
||||
Date: Tue Nov 21 15:37:42 2017 -0500
|
||||
|
||||
Keep environment variables instead of overwriting them.
|
||||
|
||||
diff --git a/common/lib/Munin/Common/Defaults.pm b/common/lib/Munin/Common/Defaults.pm
|
||||
index 131f52c0..bbf42697 100644
|
||||
--- a/common/lib/Munin/Common/Defaults.pm
|
||||
+++ b/common/lib/Munin/Common/Defaults.pm
|
||||
@@ -71,7 +71,7 @@ sub export_to_environment {
|
||||
|
||||
my %defaults = %{$class->get_defaults()};
|
||||
while (my ($k, $v) = each %defaults) {
|
||||
- $ENV{$k} = $v;
|
||||
+ $ENV{$k} = $ENV{$k} || $v;
|
||||
}
|
||||
|
||||
return
|
||||
diff --git a/node/lib/Munin/Node/Service.pm b/node/lib/Munin/Node/Service.pm
|
||||
index 1b4f6114..be58bd77 100644
|
||||
--- a/node/lib/Munin/Node/Service.pm
|
||||
+++ b/node/lib/Munin/Node/Service.pm
|
||||
@@ -122,7 +122,7 @@ sub export_service_environment {
|
||||
# We append the USER to the MUNIN_PLUGSTATE, to avoid CVE-2012-3512
|
||||
my $uid = $self->_resolve_uid($service);
|
||||
my $user = getpwuid($uid);
|
||||
- $ENV{MUNIN_PLUGSTATE} = "$Munin::Common::Defaults::MUNIN_PLUGSTATE/$user";
|
||||
+ $ENV{MUNIN_PLUGSTATE} = "$ENV{MUNIN_PLUGSTATE}/$user";
|
||||
|
||||
# Provide a consistent default state-file.
|
||||
$ENV{MUNIN_STATEFILE} = "$ENV{MUNIN_PLUGSTATE}/$service-$ENV{MUNIN_MASTER_IP}";
|
||||
@@ -243,7 +243,7 @@ sub exec_service
|
||||
|
||||
# XXX - Create the statedir for the user
|
||||
my $uid = $self->_resolve_uid($service);
|
||||
- Munin::Node::OS->mkdir_subdir("$Munin::Common::Defaults::MUNIN_PLUGSTATE", $uid);
|
||||
+ Munin::Node::OS->mkdir_subdir("$ENV{MUNIN_PLUGSTATE}", $uid);
|
||||
|
||||
$self->change_real_and_effective_user_and_group($service);
|
||||
|
|
@ -1,24 +1,19 @@
|
|||
{ stdenv, buildGoPackage, fetchurl, bash, go-bindata}:
|
||||
{ stdenv, buildGoPackage, fetchFromGitHub, bash, go-bindata}:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "traefik-${version}";
|
||||
version = "1.3.8";
|
||||
version = "1.4.4";
|
||||
|
||||
goPackagePath = "github.com/containous/traefik";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/containous/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
|
||||
sha256 = "6fce36dd30bb5ae5f91e69f2950f22fe7a74b920e80c6b441a0721122f6a6174";
|
||||
src = fetchFromGitHub {
|
||||
owner = "containous";
|
||||
repo = "traefik";
|
||||
rev = "v${version}";
|
||||
sha256 = "114861v8kg77zwnf742n25h7c4fly3i52inqx1kcpqs074rqm1wn";
|
||||
};
|
||||
|
||||
buildInputs = [ go-bindata bash ];
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
mkdir traefik
|
||||
tar -C traefik -xvzf $src
|
||||
export sourceRoot="traefik"
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
|
76
pkgs/tools/misc/hdf5/1_8.nix
Normal file
76
pkgs/tools/misc/hdf5/1_8.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{ stdenv
|
||||
, fetchurl
|
||||
, gcc
|
||||
, removeReferencesTo
|
||||
, cpp ? false
|
||||
, gfortran ? null
|
||||
, fortran2003 ? false
|
||||
, zlib ? null
|
||||
, szip ? null
|
||||
, mpi ? null
|
||||
, enableShared ? true
|
||||
}:
|
||||
|
||||
# cpp and mpi options are mutually exclusive
|
||||
# (--enable-unsupported could be used to force the build)
|
||||
assert !cpp || mpi == null;
|
||||
|
||||
# Need a Fortran compiler for Fortran2003 bindings
|
||||
assert fortran2003 -> gfortran != null;
|
||||
|
||||
# No point splitting version 1.8.18 into multiple outputs.
|
||||
# The library /lib/libhdf5.so has a reference to gcc-wrapper
|
||||
|
||||
let inherit (stdenv.lib) optional optionals; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.8.19";
|
||||
name = "hdf5-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/${name}/src/${name}.tar.bz2";
|
||||
sha256 = "0f3jfbqpaaq21ighi40qzs52nb52kc2d2yjk541rjmsx20b3ih2r" ;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
mpiSupport = (mpi != null);
|
||||
inherit mpi;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ removeReferencesTo ];
|
||||
|
||||
buildInputs = []
|
||||
++ optional (gfortran != null) gfortran
|
||||
++ optional (szip != null) szip;
|
||||
|
||||
propagatedBuildInputs = []
|
||||
++ optional (zlib != null) zlib
|
||||
++ optional (mpi != null) mpi;
|
||||
|
||||
configureFlags = []
|
||||
++ optional cpp "--enable-cxx"
|
||||
++ optional (gfortran != null) "--enable-fortran"
|
||||
++ optional fortran2003 "--enable-fortran2003"
|
||||
++ optional (szip != null) "--with-szlib=${szip}"
|
||||
++ optionals (mpi != null) ["--enable-parallel" "CC=${mpi}/bin/mpicc"]
|
||||
++ optional enableShared "--enable-shared";
|
||||
|
||||
patches = [./bin-mv.patch];
|
||||
|
||||
postInstall = ''
|
||||
find "$out" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Data model, library, and file format for storing and managing data";
|
||||
longDescription = ''
|
||||
HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient
|
||||
I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
|
||||
applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
|
||||
applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.
|
||||
'';
|
||||
license = stdenv.lib.licenses.free; # BSD-like
|
||||
homepage = https://www.hdfgroup.org/HDF5/;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
broken = (gfortran != null) && stdenv.isDarwin;
|
||||
};
|
||||
}
|
|
@ -14,17 +14,14 @@
|
|||
# (--enable-unsupported could be used to force the build)
|
||||
assert !cpp || mpi == null;
|
||||
|
||||
# No point splitting version 1.8.18 into multiple outputs.
|
||||
# The library /lib/libhdf5.so has a reference to gcc-wrapper
|
||||
|
||||
let inherit (stdenv.lib) optional optionals; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.8.18";
|
||||
version = "1.10.1";
|
||||
name = "hdf5-${version}";
|
||||
src = fetchurl {
|
||||
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/${name}/src/${name}.tar.bz2";
|
||||
sha256 = "13542vrnl1p35n8vbq0wzk40vddmm33q5nh04j98c7r1yjnxxih1";
|
||||
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/${name}/src/${name}.tar.bz2";
|
||||
sha256 = "1wpbi15za7kbsvih88kfcxblw412pjndl16x88dgnqr47piy2p4w";
|
||||
};
|
||||
|
||||
passthru = {
|
||||
|
@ -59,8 +56,8 @@ stdenv.mkDerivation rec {
|
|||
description = "Data model, library, and file format for storing and managing data";
|
||||
longDescription = ''
|
||||
HDF5 supports an unlimited variety of datatypes, and is designed for flexible and efficient
|
||||
I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
|
||||
applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
|
||||
I/O and for high volume and complex data. HDF5 is portable and is extensible, allowing
|
||||
applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and
|
||||
applications for managing, manipulating, viewing, and analyzing data in the HDF5 format.
|
||||
'';
|
||||
license = stdenv.lib.licenses.free; # BSD-like
|
||||
|
|
39
pkgs/tools/system/minijail/default.nix
Normal file
39
pkgs/tools/system/minijail/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ stdenv, fetchgit, libcap }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
shortname = "minijail";
|
||||
name = "${shortname}-${version}";
|
||||
version = "android-8.0.0_r34";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://android.googlesource.com/platform/external/minijail";
|
||||
rev = version;
|
||||
sha256 = "1d0q08cgks6h6ffsw3zw8dz4rm9y2djj2pwwy3xi6flx7vwy0psf";
|
||||
};
|
||||
|
||||
buildInputs = [ libcap ];
|
||||
|
||||
makeFlags = [ "LIBDIR=$(out)/lib" ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace common.mk --replace /bin/echo echo
|
||||
sed -i '/#include <asm\/siginfo.h>/ d' signal_handler.c
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp -v *.so $out/lib
|
||||
mkdir -p $out/include
|
||||
cp -v libminijail.h $out/include
|
||||
mkdir -p $out/bin
|
||||
cp minijail0 $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = https://android.googlesource.com/platform/external/minijail/;
|
||||
description = "Sandboxing library and application using Linux namespaces and capabilities";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [pcarrier];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
|
@ -2590,6 +2590,12 @@ with pkgs;
|
|||
mpi = null;
|
||||
};
|
||||
|
||||
hdf5_1_8 = callPackage ../tools/misc/hdf5/1_8.nix {
|
||||
gfortran = null;
|
||||
szip = null;
|
||||
mpi = null;
|
||||
};
|
||||
|
||||
hdf5-mpi = appendToName "mpi" (hdf5.override {
|
||||
szip = null;
|
||||
mpi = pkgs.openmpi;
|
||||
|
@ -3376,6 +3382,8 @@ with pkgs;
|
|||
|
||||
miniball = callPackage ../development/libraries/miniball { };
|
||||
|
||||
minijail = callPackage ../tools/system/minijail { };
|
||||
|
||||
minixml = callPackage ../development/libraries/minixml { };
|
||||
|
||||
mir-qualia = callPackage ../tools/text/mir-qualia {
|
||||
|
@ -6595,6 +6603,7 @@ with pkgs;
|
|||
octaveFull = (lowPrio (callPackage ../development/interpreters/octave {
|
||||
qt = qt4;
|
||||
overridePlatforms = ["x86_64-linux" "x86_64-darwin"];
|
||||
openblas = if stdenv.isDarwin then openblasCompat else openblas;
|
||||
}));
|
||||
|
||||
ocropus = callPackage ../applications/misc/ocropus { };
|
||||
|
@ -18079,6 +18088,8 @@ with pkgs;
|
|||
|
||||
privateer = callPackage ../games/privateer { };
|
||||
|
||||
pysolfc = callPackage ../games/pysolfc { };
|
||||
|
||||
qweechat = callPackage ../applications/networking/irc/qweechat { };
|
||||
|
||||
qqwing = callPackage ../games/qqwing { };
|
||||
|
@ -19233,6 +19244,10 @@ with pkgs;
|
|||
# this driver ships with pre-compiled 32-bit binary libraries
|
||||
cnijfilter_2_80 = callPackage_i686 ../misc/cups/drivers/cnijfilter_2_80 { };
|
||||
|
||||
cnijfilter_4_00 = callPackage ../misc/cups/drivers/cnijfilter_4_00 {
|
||||
libusb = libusb1;
|
||||
};
|
||||
|
||||
cnijfilter2 = callPackage ../misc/cups/drivers/cnijfilter2 {
|
||||
libusb = libusb1;
|
||||
};
|
||||
|
|
|
@ -655,13 +655,13 @@ let
|
|||
|
||||
vicious = stdenv.mkDerivation rec {
|
||||
name = "vicious-${version}";
|
||||
version = "2.2.0";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Mic92";
|
||||
repo = "vicious";
|
||||
rev = "v${version}";
|
||||
sha256 = "0dhy0vklrhqrnmxb9pyqbfvkwwy86lwysk93pzg1j1zwprx366fj";
|
||||
sha256 = "1mrd8c46ljilag8dljvnagaxnjnab8bmg9mcbnwvrivgjzgf6a1k";
|
||||
};
|
||||
|
||||
buildInputs = [ lua ];
|
||||
|
|
Loading…
Reference in a new issue