commit
f0a4305e0a
|
@ -0,0 +1,86 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.environment.memoryAllocator; |
||||
|
||||
# The set of alternative malloc(3) providers. |
||||
providers = { |
||||
"graphene-hardened" = rec { |
||||
libPath = "${pkgs.graphene-hardened-malloc}/lib/libhardened_malloc.so"; |
||||
description = '' |
||||
An allocator designed to mitigate memory corruption attacks, such as |
||||
those caused by use-after-free bugs. |
||||
''; |
||||
}; |
||||
|
||||
"jemalloc" = { |
||||
libPath = "${pkgs.jemalloc}/lib/libjemalloc.so"; |
||||
description = '' |
||||
A general purpose allocator that emphasizes fragmentation avoidance |
||||
and scalable concurrency support. |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
providerConf = providers."${cfg.provider}"; |
||||
|
||||
# An output that contains only the shared library, to avoid |
||||
# needlessly bloating the system closure |
||||
mallocLib = pkgs.runCommand "malloc-provider-${cfg.provider}" |
||||
rec { |
||||
preferLocalBuild = true; |
||||
allowSubstitutes = false; |
||||
origLibPath = providerConf.libPath; |
||||
libName = baseNameOf origLibPath; |
||||
} |
||||
'' |
||||
mkdir -p $out/lib |
||||
cp -L $origLibPath $out/lib/$libName |
||||
''; |
||||
|
||||
# The full path to the selected provider shlib. |
||||
providerLibPath = "${mallocLib}/lib/${mallocLib.libName}"; |
||||
in |
||||
|
||||
{ |
||||
meta = { |
||||
maintainers = [ maintainers.joachifm ]; |
||||
}; |
||||
|
||||
options = { |
||||
environment.memoryAllocator.provider = mkOption { |
||||
type = types.enum ([ "libc" ] ++ attrNames providers); |
||||
default = "libc"; |
||||
description = '' |
||||
The system-wide memory allocator. |
||||
|
||||
Briefly, the system-wide memory allocator providers are: |
||||
<itemizedlist> |
||||
<listitem><para><literal>libc</literal>: the standard allocator provided by libc</para></listitem> |
||||
${toString (mapAttrsToList |
||||
(name: value: "<listitem><para><literal>${name}</literal>: ${value.description}</para></listitem>") |
||||
providers)} |
||||
</itemizedlist> |
||||
|
||||
<warning> |
||||
<para> |
||||
Selecting an alternative allocator (i.e., anything other than |
||||
<literal>libc</literal>) may result in instability, data loss, |
||||
and/or service failure. |
||||
</para> |
||||
</warning> |
||||
|
||||
<note> |
||||
<para> |
||||
Changing this option does not affect the current session. |
||||
</para> |
||||
</note> |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf (cfg.provider != "libc") { |
||||
environment.variables.LD_PRELOAD = providerLibPath; |
||||
}; |
||||
} |
@ -0,0 +1,18 @@ |
||||
{ pkgs, config, lib, ... }: |
||||
|
||||
with lib; |
||||
|
||||
let |
||||
cfg = config.programs.zmap; |
||||
in { |
||||
options.programs.zmap = { |
||||
enable = mkEnableOption "ZMap"; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
environment.systemPackages = [ pkgs.zmap ]; |
||||
|
||||
environment.etc."zmap/blacklist.conf".source = "${pkgs.zmap}/etc/zmap/blacklist.conf"; |
||||
environment.etc."zmap/zmap.conf".source = "${pkgs.zmap}/etc/zmap.conf"; |
||||
}; |
||||
} |
@ -0,0 +1,185 @@ |
||||
{ config, pkgs, lib, ... }: |
||||
|
||||
with lib; |
||||
let |
||||
cfg = config.services.paperless; |
||||
|
||||
defaultUser = "paperless"; |
||||
|
||||
manage = cfg.package.withConfig { |
||||
config = { |
||||
PAPERLESS_CONSUMPTION_DIR = cfg.consumptionDir; |
||||
PAPERLESS_INLINE_DOC = "true"; |
||||
PAPERLESS_DISABLE_LOGIN = "true"; |
||||
} // cfg.extraConfig; |
||||
inherit (cfg) dataDir ocrLanguages; |
||||
paperlessPkg = cfg.package; |
||||
}; |
||||
in |
||||
{ |
||||
options.services.paperless = { |
||||
enable = mkOption { |
||||
type = lib.types.bool; |
||||
default = false; |
||||
description = '' |
||||
Enable Paperless. |
||||
|
||||
When started, the Paperless database is automatically created if it doesn't |
||||
exist and updated if the Paperless package has changed. |
||||
Both tasks are achieved by running a Django migration. |
||||
''; |
||||
}; |
||||
|
||||
dataDir = mkOption { |
||||
type = types.str; |
||||
default = "/var/lib/paperless"; |
||||
description = "Directory to store the Paperless data."; |
||||
}; |
||||
|
||||
consumptionDir = mkOption { |
||||
type = types.str; |
||||
default = "${cfg.dataDir}/consume"; |
||||
defaultText = "\${dataDir}/consume"; |
||||
description = "Directory from which new documents are imported."; |
||||
}; |
||||
|
||||
consumptionDirIsPublic = mkOption { |
||||
type = types.bool; |
||||
default = false; |
||||
description = "Whether all users can write to the consumption dir."; |
||||
}; |
||||
|
||||
ocrLanguages = mkOption { |
||||
type = with types; nullOr (listOf string); |
||||
default = null; |
||||
description = '' |
||||
Languages available for OCR via Tesseract, specified as |
||||
<literal>ISO 639-2/T</literal> language codes. |
||||
If unset, defaults to all available languages. |
||||
''; |
||||
example = [ "eng" "spa" "jpn" ]; |
||||
}; |
||||
|
||||
address = mkOption { |
||||
type = types.str; |
||||
default = "localhost"; |
||||
description = "Server listening address."; |
||||
}; |
||||
|
||||
port = mkOption { |
||||
type = types.int; |
||||
default = 28981; |
||||
description = "Server port to listen on."; |
||||
}; |
||||
|
||||
extraConfig = mkOption { |
||||
type = types.attrs; |
||||
default = {}; |
||||
description = '' |
||||
Extra paperless config options. |
||||
|
||||
The config values are evaluated as double-quoted Bash string literals. |
||||
|
||||
See <literal>paperless-src/paperless.conf.example</literal> for available options. |
||||
|
||||
To enable user authentication, set <literal>PAPERLESS_DISABLE_LOGIN = "false"</literal> |
||||
and run the shell command <literal>$dataDir/paperless-manage createsuperuser</literal>. |
||||
|
||||
To define secret options without storing them in /nix/store, use the following pattern: |
||||
<literal>PAPERLESS_PASSPHRASE = "$(< /etc/my_passphrase_file)"</literal> |
||||
''; |
||||
example = literalExample '' |
||||
{ |
||||
PAPERLESS_OCR_LANGUAGE = "deu"; |
||||
} |
||||
''; |
||||
}; |
||||
|
||||
user = mkOption { |
||||
type = types.str; |
||||
default = defaultUser; |
||||
description = "User under which Paperless runs."; |
||||
}; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.paperless; |
||||
defaultText = "pkgs.paperless"; |
||||
description = "The Paperless package to use."; |
||||
}; |
||||
|
||||
manage = mkOption { |
||||
type = types.package; |
||||
readOnly = true; |
||||
default = manage; |
||||
description = '' |
||||
A script to manage the Paperless instance. |
||||
It wraps Django's manage.py and is also available at |
||||
<literal>$dataDir/manage-paperless</literal> |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
config = mkIf cfg.enable { |
||||
|
||||
systemd.tmpfiles.rules = [ |
||||
"d '${cfg.dataDir}' - ${cfg.user} ${cfg.user} - -" |
||||
] ++ (optional cfg.consumptionDirIsPublic |
||||
"d '${cfg.consumptionDir}' 777 ${cfg.user} ${cfg.user} - -" |
||||
# If the consumption dir is not created here, it's automatically created by |
||||
# 'manage' with the default permissions. |
||||
); |
||||
|
||||
systemd.services.paperless-consumer = { |
||||
description = "Paperless document consumer"; |
||||
serviceConfig = { |
||||
User = cfg.user; |
||||
ExecStart = "${manage} document_consumer"; |
||||
Restart = "always"; |
||||
}; |
||||
after = [ "systemd-tmpfiles-setup.service" ]; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
preStart = '' |
||||
if [[ $(readlink ${cfg.dataDir}/paperless-manage) != ${manage} ]]; then |
||||
ln -sf ${manage} ${cfg.dataDir}/paperless-manage |
||||
fi |
||||
|
||||
${manage.setupEnv} |
||||
# Auto-migrate on first run or if the package has changed |
||||
versionFile="$PAPERLESS_DBDIR/src-version" |
||||
if [[ $(cat "$versionFile" 2>/dev/null) != ${cfg.package} ]]; then |
||||
python $paperlessSrc/manage.py migrate |
||||
echo ${cfg.package} > "$versionFile" |
||||
fi |
||||
''; |
||||
}; |
||||
|
||||
systemd.services.paperless-server = { |
||||
description = "Paperless document server"; |
||||
serviceConfig = { |
||||
User = cfg.user; |
||||
ExecStart = "${manage} runserver --noreload ${cfg.address}:${toString cfg.port}"; |
||||
Restart = "always"; |
||||
}; |
||||
# Bind to `paperless-consumer` so that the server never runs |
||||
# during migrations |
||||
bindsTo = [ "paperless-consumer.service" ]; |
||||
after = [ "paperless-consumer.service" ]; |
||||
wantedBy = [ "multi-user.target" ]; |
||||
}; |
||||
|
||||
users = optionalAttrs (cfg.user == defaultUser) { |
||||
users = [{ |
||||
name = defaultUser; |
||||
group = defaultUser; |
||||
uid = config.ids.uids.paperless; |
||||
home = cfg.dataDir; |
||||
}]; |
||||
|
||||
groups = [{ |
||||
name = defaultUser; |
||||
gid = config.ids.gids.paperless; |
||||
}]; |
||||
}; |
||||
}; |
||||
} |
@ -0,0 +1,29 @@ |
||||
import ./make-test.nix ({ lib, ... } : { |
||||
name = "paperless"; |
||||
meta = with lib.maintainers; { |
||||
maintainers = [ earvstedt ]; |
||||
}; |
||||
|
||||
machine = { pkgs, ... }: { |
||||
environment.systemPackages = with pkgs; [ imagemagick jq ]; |
||||
services.paperless = { |
||||
enable = true; |
||||
ocrLanguages = [ "eng" ]; |
||||
}; |
||||
}; |
||||
|
||||
testScript = '' |
||||
$machine->waitForUnit("paperless-consumer.service"); |
||||
# Create test doc |
||||
$machine->succeed('convert -size 400x40 xc:white -font "DejaVu-Sans" -pointsize 20 -fill black \ |
||||
-annotate +5+20 "hello world 16-10-2005" /var/lib/paperless/consume/doc.png'); |
||||
|
||||
$machine->waitForUnit("paperless-server.service"); |
||||
# Wait until server accepts connections |
||||
$machine->waitUntilSucceeds("curl -s localhost:28981"); |
||||
# Wait until document is consumed |
||||
$machine->waitUntilSucceeds('(($(curl -s localhost:28981/api/documents/ | jq .count) == 1))'); |
||||
$machine->succeed("curl -s localhost:28981/api/documents/ | jq '.results | .[0] | .created'") |
||||
=~ /2005-10-16/ or die; |
||||
''; |
||||
}) |
@ -1,40 +0,0 @@ |
||||
--- code-r100/configure.ac 2014-09-25 23:44:41.059174904 +0200
|
||||
+++ code-r100.new/configure.ac 2014-09-26 01:37:18.507017390 +0200
|
||||
@@ -44,6 +44,8 @@
|
||||
[AC_MSG_ERROR(CONFIG: You need libxml2-dev installed.
|
||||
http://www.xmlsoft.org/)])
|
||||
|
||||
+PKG_CHECK_MODULES([libxml], [libxml-2.0])
|
||||
+
|
||||
AC_CHECK_LIB([m], [sqrt], , [AC_MSG_ERROR(CORE: You need libm installed)])
|
||||
AC_CHECK_LIB([pthread], [pthread_self], , [AC_MSG_ERROR(CORE: You need libpthread installed)])
|
||||
|
||||
@@ -79,12 +81,12 @@
|
||||
echo "--- Enabling USB LCD display --";
|
||||
fi
|
||||
|
||||
-#SDL_VERSION=1.2.4
|
||||
-#AM_PATH_SDL($SDL_VERSION,
|
||||
-# :,
|
||||
-# AC_MSG_ERROR([VIDEO: *** SDL version $SDL_VERSION not found!
|
||||
-# http://www.libsdl.org/])
|
||||
-#)
|
||||
+SDL_VERSION=1.2.4
|
||||
+AM_PATH_SDL($SDL_VERSION,
|
||||
+ :,
|
||||
+ AC_MSG_ERROR([VIDEO: *** SDL version $SDL_VERSION not found!
|
||||
+ http://www.libsdl.org/])
|
||||
+)
|
||||
|
||||
AC_CHECK_LIB([vorbis], [main], ,
|
||||
[AC_MSG_ERROR(AUDIO: You need libvorbis-dev installed.
|
||||
@@ -95,6 +97,9 @@
|
||||
AC_CHECK_LIB([vorbisenc], [main], ,
|
||||
[AC_MSG_ERROR(AUDIO: You need libvorbis-dev installed.
|
||||
http://www.xiph.org/ogg/vorbis/)])
|
||||
+AC_CHECK_LIB([ogg], [main], ,
|
||||
+ [AC_MSG_ERROR(AUDIO: You need libogg-dev installed.
|
||||
+ http://www.xiph.org/ogg/)])
|
||||
|
||||
AC_CHECK_LIB([sndfile], [main], ,
|
||||
[AC_MSG_ERROR(AUDIO: you need libsndfile installed.
|
@ -1,13 +0,0 @@ |
||||
--- code-r100/src/Makefile.am 2014-09-25 23:44:41.043174832 +0200
|
||||
+++ code-r100.new/src/Makefile.am 2014-09-26 01:21:03.750015888 +0200
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
fweelindir = $(datadir)/fweelin
|
||||
|
||||
-FWEELIN_CFLAGS = -I. -g -Wall -Wno-write-strings -Wno-non-virtual-dtor -D_REENTRANT -DPTHREADS -DNDEBUG -DVERSION=\"$(VERSION)\" -DFWEELIN_DATADIR=\"$(fweelindir)\" -DADDON_DIR=\"/usr/local/lib/jack\" -I/usr/include/freetype2 -I/usr/include/libxml2 -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -falign-loops=2 -falign-jumps=2 -falign-functions=2 -O9
|
||||
+XML_CFLAGS = `xml2-config --cflags`
|
||||
+FWEELIN_CFLAGS = -I. -g -Wall -Wno-write-strings -Wno-non-virtual-dtor -D_REENTRANT -DPTHREADS -DNDEBUG -DVERSION=\"$(VERSION)\" -DFWEELIN_DATADIR=\"$(fweelindir)\" -DADDON_DIR=\"/usr/local/lib/jack\" -I/usr/include/freetype2 $(XML_CFLAGS) -funroll-loops -finline-functions -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -falign-loops=2 -falign-jumps=2 -falign-functions=2 -O9
|
||||
|
||||
AM_CFLAGS = $(CFLAGS) $(FWEELIN_CFLAGS)
|
||||
-AM_CXXFLAGS = $(CFLAGS) $(CXXFLAGS) $(FWEELIN_CFLAGS)
|
||||
+AM_CXXFLAGS = $(CFLAGS) $(CXXFLAGS) $(FWEELIN_CFLAGS) ${libxml2_CFLAGS}
|
@ -1,15 +0,0 @@ |
||||
diff --git a/src/cpp/desktop/CMakeLists.txt b/src/cpp/desktop/CMakeLists.txt
|
||||
index f5701bf735..27af4148ff 100644
|
||||
--- a/src/cpp/desktop/CMakeLists.txt
|
||||
+++ b/src/cpp/desktop/CMakeLists.txt
|
||||
@@ -112,6 +112,7 @@ find_package(Qt5WebEngine REQUIRED)
|
||||
find_package(Qt5WebEngineWidgets REQUIRED)
|
||||
find_package(Qt5PrintSupport REQUIRED)
|
||||
find_package(Qt5Quick REQUIRED)
|
||||
+find_package(Qt5QuickWidgets REQUIRED)
|
||||
find_package(Qt5Positioning REQUIRED)
|
||||
find_package(Qt5Sensors REQUIRED)
|
||||
find_package(Qt5Svg REQUIRED)
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,45 @@ |
||||
{ stdenv, fetchFromGitHub, cairo, cmake, libxkbcommon |
||||
, pango, fribidi, harfbuzz, pcre, pkgconfig |
||||
, ncursesSupport ? true, ncurses ? null |
||||
, waylandSupport ? true, wayland ? null |
||||
, x11Support ? true, xlibs ? null, xorg ? null |
||||
}: |
||||
|
||||
assert ncursesSupport -> ncurses != null; |
||||
assert waylandSupport -> wayland != null; |
||||
assert x11Support -> xlibs != null && xorg != null; |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "bemenu"; |
||||
version = "0.1.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "Cloudef"; |
||||
repo = "bemenu"; |
||||
rev = "33e540a2b04ce78f5c7ab4a60b899c67f586cc32"; |
||||
sha256 = "11h55m9dx6ai12pqij52ydjm36dvrcc856pa834njihrp626pl4w"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig pcre ]; |
||||
|
||||
buildInputs = with stdenv.lib; [ |
||||
cairo |
||||
fribidi |
||||
harfbuzz |
||||
libxkbcommon |
||||
pango |
||||
] ++ optionals ncursesSupport [ ncurses ] |
||||
++ optionals waylandSupport [ wayland ] |
||||
++ optionals x11Support [ |
||||
xlibs.libX11 xlibs.libXinerama xlibs.libXft |
||||
xorg.libXdmcp xorg.libpthreadstubs xorg.libxcb |
||||
]; |
||||
|
||||
meta = with stdenv.lib; { |
||||
homepage = "https://github.com/Cloudef/bemenu"; |
||||
description = "Dynamic menu library and client program inspired by dmenu"; |
||||
license = licenses.gpl3Plus; |
||||
maintainers = with maintainers; [ thiagokokada ]; |
||||
platforms = with platforms; linux; |
||||
}; |
||||
} |
@ -0,0 +1,21 @@ |
||||
{ lib, python3Packages }: |
||||
|
||||
python3Packages.buildPythonApplication rec { |
||||
pname = "gallery_dl"; |
||||
version = "1.8.3"; |
||||
|
||||
src = python3Packages.fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "671ee6ff7baa3d63393d9856686313b4e0146f875dd937326942dd2fff605a72"; |
||||
}; |
||||
|
||||
doCheck = false; |
||||
propagatedBuildInputs = with python3Packages; [ requests ]; |
||||
|
||||
meta = { |
||||
description = "Command-line program to download image-galleries and -collections from several image hosting sites"; |
||||
homepage = https://github.com/mikf/gallery-dl; |
||||
license = lib.licenses.gpl2; |
||||
maintainers = with lib.maintainers; [ dawidsowa ]; |
||||
}; |
||||
} |
@ -1,22 +0,0 @@ |
||||
diff --git a/bushnell.cc b/bushnell.cc
|
||||
index 8fa844d..40707c4 100644
|
||||
--- a/bushnell.cc
|
||||
+++ b/bushnell.cc
|
||||
@@ -135,7 +135,7 @@ bushnell_get_icon_from_name(QString name)
|
||||
name = "Waypoint";
|
||||
}
|
||||
|
||||
- for (t = bushnell_icons; t->icon > 0; t++) {
|
||||
+ for (t = bushnell_icons; t->icon != 0; t++) {
|
||||
if (0 == name.compare(t->icon, Qt::CaseInsensitive)) {
|
||||
return t->symbol;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ static const char*
|
||||
bushnell_get_name_from_symbol(signed int s)
|
||||
{
|
||||
icon_mapping_t* t;
|
||||
- for (t = bushnell_icons; t->icon > 0; t++) {
|
||||
+ for (t = bushnell_icons; t->icon != 0; t++) {
|
||||
if (s == t->symbol) {
|
||||
return t->icon;
|
||||
}
|
@ -0,0 +1,5 @@ |
||||
{ |
||||
"url": "https://hubstaff-production.s3.amazonaws.com/downloads/HubstaffClient/Builds/Release/1.4.5-c5b459ea/Hubstaff-1.4.5-c5b459ea.sh", |
||||
"version": "1.4.5-c5b459ea", |
||||
"sha256": "180qglbj175wln0kh8d5czhjvy7z503zxn4w6522hkz4ddz201nz" |
||||
} |
@ -0,0 +1,18 @@ |
||||
#!/usr/bin/env nix-shell |
||||
#!nix-shell -i bash -p nix-prefetch-git curl |
||||
|
||||
SCRIPT_DIR=$(dirname "$(readlink -f "$BASH_SOURCE")") |
||||
|
||||
installation_script_url=$(curl --fail --head --location --silent --output /dev/null --write-out %{url_effective} https://app.hubstaff.com/download/linux) |
||||
|
||||
version=$(echo "$installation_script_url" | sed -r 's/^https:\/\/hubstaff\-production\.s3\.amazonaws\.com\/downloads\/HubstaffClient\/Builds\/Release\/([^\/]+)\/Hubstaff.+$/\1/') |
||||
|
||||
sha256=$(nix-prefetch-url "$installation_script_url") |
||||
|
||||
cat <<EOT > $SCRIPT_DIR/revision.json |
||||
{ |
||||
"url": "$installation_script_url", |
||||
"version": "$version", |
||||
"sha256": "$sha256" |
||||
} |
||||
EOT |
@ -0,0 +1,95 @@ |
||||
--- a/src/allheaders.h
|
||||
+++ b/src/allheaders.h
|
||||
@@ -2600,6 +2600,7 @@
|
||||
LEPT_DLL extern char * stringReverse ( const char *src );
|
||||
LEPT_DLL extern char * strtokSafe ( char *cstr, const char *seps, char **psaveptr );
|
||||
LEPT_DLL extern l_int32 stringSplitOnToken ( char *cstr, const char *seps, char **phead, char **ptail );
|
||||
+LEPT_DLL extern l_int32 stringCheckForChars ( const char *src, const char *chars, l_int32 *pfound );
|
||||
LEPT_DLL extern char * stringRemoveChars ( const char *src, const char *remchars );
|
||||
LEPT_DLL extern l_int32 stringFindSubstr ( const char *src, const char *sub, l_int32 *ploc );
|
||||
LEPT_DLL extern char * stringReplaceSubstr ( const char *src, const char *sub1, const char *sub2, l_int32 *pfound, l_int32 *ploc );
|
||||
--- a/src/gplot.c
|
||||
+++ b/src/gplot.c
|
||||
@@ -141,9 +141,10 @@
|
||||
const char *xlabel,
|
||||
const char *ylabel)
|
||||
{
|
||||
-char *newroot;
|
||||
-char buf[L_BUF_SIZE];
|
||||
-GPLOT *gplot;
|
||||
+char *newroot;
|
||||
+char buf[L_BUF_SIZE];
|
||||
+l_int32 badchar;
|
||||
+GPLOT *gplot;
|
||||
|
||||
PROCNAME("gplotCreate");
|
||||
|
||||
@@ -152,6 +153,9 @@
|
||||
if (outformat != GPLOT_PNG && outformat != GPLOT_PS &&
|
||||
outformat != GPLOT_EPS && outformat != GPLOT_LATEX)
|
||||
return (GPLOT *)ERROR_PTR("outformat invalid", procName, NULL);
|
||||
+ stringCheckForChars(rootname, "`;&|><\"?*", &badchar);
|
||||
+ if (badchar) /* danger of command injection */
|
||||
+ return (GPLOT *)ERROR_PTR("invalid rootname", procName, NULL);
|
||||
|
||||
if ((gplot = (GPLOT *)LEPT_CALLOC(1, sizeof(GPLOT))) == NULL)
|
||||
return (GPLOT *)ERROR_PTR("gplot not made", procName, NULL);
|
||||
--- a/src/utils2.c
|
||||
+++ b/src/utils2.c
|
||||
@@ -42,6 +42,7 @@
|
||||
* l_int32 stringSplitOnToken()
|
||||
*
|
||||
* Find and replace string and array procs
|
||||
+ * l_int32 stringCheckForChars()
|
||||
* char *stringRemoveChars()
|
||||
* l_int32 stringFindSubstr()
|
||||
* char *stringReplaceSubstr()
|
||||
@@ -701,6 +702,48 @@
|
||||
/*--------------------------------------------------------------------*
|
||||
* Find and replace procs *
|
||||
*--------------------------------------------------------------------*/
|
||||
+/*!
|
||||
+ * \brief stringCheckForChars()
|
||||
+ *
|
||||
+ * \param[in] src input string; can be of zero length
|
||||
+ * \param[in] chars string of chars to be searched for in %src
|
||||
+ * \param[out] pfound 1 if any characters are found; 0 otherwise
|
||||
+ * \return 0 if OK, 1 on error
|
||||
+ *
|
||||
+ * <pre>
|
||||
+ * Notes:
|
||||
+ * (1) This can be used to sanitize an operation by checking for
|
||||
+ * special characters that don't belong in a string.
|
||||
+ * </pre>
|
||||
+ */
|
||||
+l_int32
|
||||
+stringCheckForChars(const char *src,
|
||||
+ const char *chars,
|
||||
+ l_int32 *pfound)
|
||||
+{
|
||||
+char ch;
|
||||
+l_int32 i, n;
|
||||
+
|
||||
+ PROCNAME("stringCheckForChars");
|
||||
+
|
||||
+ if (!pfound)
|
||||
+ return ERROR_INT("&found not defined", procName, 1);
|
||||
+ *pfound = FALSE;
|
||||
+ if (!src || !chars)
|
||||
+ return ERROR_INT("src and chars not both defined", procName, 1);
|
||||
+
|
||||
+ n = strlen(src);
|
||||
+ for (i = 0; i < n; i++) {
|
||||
+ ch = src[i];
|
||||
+ if (strchr(chars, ch)) {
|
||||
+ *pfound = TRUE;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*!
|
||||
* \brief stringRemoveChars()
|
||||
*
|
@ -1,25 +0,0 @@ |
||||
{ stdenv, fetchurl }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
name = "pstree-2.39"; |
||||
|
||||
src = fetchurl { |
||||
urls = [ |
||||
"http://www.sfr-fresh.com/unix/misc/${name}.tar.gz" |
||||
"https://distfiles.macports.org/pstree/${name}.tar.gz" |
||||
]; |
||||
sha256 = "17s7v15c4gryjpi11y1xq75022nkg4ggzvjlq2dkmyg67ssc76vw"; |
||||
}; |
||||
|
||||
unpackPhase = "unpackFile \$src; sourceRoot=."; |
||||
|
||||
buildPhase = "pwd; $CC -o pstree pstree.c"; |
||||
installPhase = "mkdir -p \$out/bin; cp pstree \$out/bin"; |
||||
|
||||
meta = { |
||||
description = "Show the set of running processes as a tree"; |
||||
license = "GPL"; |
||||
maintainers = [ ]; |
||||
platforms = stdenv.lib.platforms.unix; |
||||
}; |
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,77 +0,0 @@ |
||||
|
||||
# HG changeset patch
|
||||
# User Michelangelo De Simone <mdesimone@mozilla.com>
|
||||
# Date 1479198095 28800
|
||||
# Node ID fde6e9ccfc72fbc0fcd93af7a40436b216e7ea1a
|
||||
# Parent 687eac6845a77d2cac5505da9c8912885c2a9e57
|
||||
Bug 1013882 - TestInterfaceJS should be packaged only if it's available. r=glandium, a=jcristau
|
||||
|
||||
MozReview-Commit-ID: IEHesdoU4Sz
|
||||
|
||||
diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in
|
||||
--- a/b2g/installer/package-manifest.in
|
||||
+++ b/b2g/installer/package-manifest.in
|
||||
@@ -570,17 +570,17 @@
|
||||
@RESPATH@/components/InputMethod.manifest
|
||||
#ifdef MOZ_B2G
|
||||
@RESPATH@/components/inputmethod.xpt
|
||||
#endif
|
||||
|
||||
@RESPATH@/components/SystemUpdate.manifest
|
||||
@RESPATH@/components/SystemUpdateManager.js
|
||||
|
||||
-#ifdef MOZ_DEBUG
|
||||
+#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
|
||||
@RESPATH@/components/TestInterfaceJS.js
|
||||
@RESPATH@/components/TestInterfaceJS.manifest
|
||||
@RESPATH@/components/TestInterfaceJSMaplike.js
|
||||
#endif
|
||||
|
||||
; Modules
|
||||
@RESPATH@/modules/*
|
||||
|
||||
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
||||
--- a/browser/installer/package-manifest.in
|
||||
+++ b/browser/installer/package-manifest.in
|
||||
@@ -554,17 +554,17 @@
|
||||
@RESPATH@/components/PresentationControlService.js
|
||||
@RESPATH@/components/PresentationDataChannelSessionTransport.js
|
||||
@RESPATH@/components/PresentationDataChannelSessionTransport.manifest
|
||||
|
||||
; InputMethod API
|
||||
@RESPATH@/components/MozKeyboard.js
|
||||
@RESPATH@/components/InputMethod.manifest
|
||||
|
||||
-#ifdef MOZ_DEBUG
|
||||
+#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
|
||||
@RESPATH@/components/TestInterfaceJS.js
|
||||
@RESPATH@/components/TestInterfaceJS.manifest
|
||||
@RESPATH@/components/TestInterfaceJSMaplike.js
|
||||
#endif
|
||||
|
||||
; [Extensions]
|
||||
@RESPATH@/components/extensions-toolkit.manifest
|
||||
@RESPATH@/browser/components/extensions-browser.manifest
|
||||
diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in
|
||||
--- a/mobile/android/installer/package-manifest.in
|
||||
+++ b/mobile/android/installer/package-manifest.in
|
||||
@@ -381,17 +381,17 @@
|
||||
|
||||
@BINPATH@/components/CaptivePortalDetectComponents.manifest
|
||||
@BINPATH@/components/captivedetect.js
|
||||
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
@BINPATH@/components/dom_webspeechsynth.xpt
|
||||
#endif
|
||||
|
||||
-#ifdef MOZ_DEBUG
|
||||
+#if defined(ENABLE_TESTS) && defined(MOZ_DEBUG)
|
||||
@BINPATH@/components/TestInterfaceJS.js
|
||||
@BINPATH@/components/TestInterfaceJS.manifest
|
||||
@BINPATH@/components/TestInterfaceJSMaplike.js
|
||||
#endif
|
||||
|
||||
@BINPATH@/components/nsAsyncShutdown.manifest
|
||||
@BINPATH@/components/nsAsyncShutdown.js
|
||||
|
||||
|
@ -0,0 +1,28 @@ |
||||
{ stdenv, pkgconfig, fetchFromGitHub, qtbase, qtsvg, qtmultimedia, qmake, boost, openssl }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "chatterino2"; |
||||
version = "unstable-2019-05-11"; |
||||
src = fetchFromGitHub { |
||||
owner = "fourtf"; |
||||
repo = pname; |
||||
rev = "8c46cbf571dc8fd77287bf3186445ff52b1d1aaf"; |
||||
sha256 = "0i2385hamhd9i7jdy906cfrd81cybw524j92l87c8pzrkxphignk"; |
||||
fetchSubmodules = true; |
||||
}; |
||||
nativeBuildInputs = [ qmake pkgconfig ]; |
||||
buildInputs = [ qtbase qtsvg qtmultimedia boost openssl ]; |
||||
meta = with stdenv.lib; { |
||||
description = "A chat client for Twitch chat"; |
||||
longDescription = '' |
||||
Chatterino is a chat client for Twitch chat. It aims to be an |
||||
improved/extended version of the Twitch web chat. Chatterino 2 is |
||||
the second installment of the Twitch chat client series |
||||
"Chatterino". |
||||
''; |
||||
homepage = "https://github.com/fourtf/chatterino2"; |
||||
license = licenses.mit; |
||||
platforms = platforms.unix; |
||||
maintainers = with maintainers; [ rexim ]; |
||||
}; |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue