Merge branch 'master' into staging
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "virtualgl-lib-${version}";
|
||||
version = "2.5.1";
|
||||
version = "2.5.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
|
||||
sha256 = "0n9ngwji9k0hqy81ridndf7z4lwq5dzmqw66r6vxfz15aw0jwd6s";
|
||||
sha256 = "0f1jp7r4vajiksbiq08hkxd5bjj0jxlw7dy5750s52djg1v3hhsg";
|
||||
};
|
||||
|
||||
cmakeFlags = [ "-DVGL_SYSTEMFLTK=1" "-DTJPEG_LIBRARY=${libjpeg_turbo.out}/lib/libturbojpeg.so" ];
|
||||
|
||||
15
pkgs/tools/X11/xkbvalidate/default.nix
Normal file
15
pkgs/tools/X11/xkbvalidate/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ lib, runCommandCC, libxkbcommon }:
|
||||
|
||||
runCommandCC "xkbvalidate" {
|
||||
buildInputs = [ libxkbcommon ];
|
||||
meta = {
|
||||
description = "NixOS tool to validate X keyboard configuration";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.aszlig ];
|
||||
};
|
||||
} ''
|
||||
mkdir -p "$out/bin"
|
||||
gcc -std=gnu11 -Wall -pedantic -lxkbcommon ${./xkbvalidate.c} \
|
||||
-o "$out/bin/validate"
|
||||
''
|
||||
135
pkgs/tools/X11/xkbvalidate/xkbvalidate.c
Normal file
135
pkgs/tools/X11/xkbvalidate/xkbvalidate.c
Normal file
@@ -0,0 +1,135 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
static char **log_buffer = NULL;
|
||||
static int log_buffer_size = 0;
|
||||
static bool log_alloc_success = true;
|
||||
|
||||
static void add_log(struct xkb_context *ctx, enum xkb_log_level level,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
log_buffer_size++;
|
||||
|
||||
if (log_buffer == NULL)
|
||||
log_buffer = malloc(sizeof(char *));
|
||||
else
|
||||
log_buffer = realloc(log_buffer, sizeof(char *) * log_buffer_size);
|
||||
|
||||
if (log_buffer == NULL) {
|
||||
perror("buffer alloc");
|
||||
log_alloc_success = false;
|
||||
log_buffer_size--;
|
||||
return;
|
||||
}
|
||||
|
||||
if (vasprintf(&log_buffer[log_buffer_size - 1], fmt, args) == -1) {
|
||||
perror("log line alloc");
|
||||
log_alloc_success = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static void print_logs(void)
|
||||
{
|
||||
for (int i = 0; i < log_buffer_size; ++i)
|
||||
fprintf(stderr, " %s", log_buffer[i]);
|
||||
}
|
||||
|
||||
static void free_logs(void)
|
||||
{
|
||||
if (log_buffer == NULL)
|
||||
return;
|
||||
for (int i = 0; i < log_buffer_size; ++i)
|
||||
free(log_buffer[i]);
|
||||
free(log_buffer);
|
||||
log_buffer = NULL;
|
||||
log_buffer_size = 0;
|
||||
}
|
||||
|
||||
static bool try_keymap(struct xkb_context *ctx, struct xkb_rule_names *rdef)
|
||||
{
|
||||
struct xkb_keymap *keymap;
|
||||
bool result = true;
|
||||
|
||||
if ((keymap = xkb_keymap_new_from_names(ctx, rdef, 0)) == NULL)
|
||||
result = false;
|
||||
else
|
||||
xkb_keymap_unref(keymap);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void print_error(const char *name, const char *value,
|
||||
const char *nixos_option)
|
||||
{
|
||||
fprintf(stderr, "\nThe value `%s' for keyboard %s is invalid.\n\n"
|
||||
"Please check the definition in `services.xserver.%s'.\n",
|
||||
value, name, nixos_option);
|
||||
fputs("\nDetailed XKB compiler errors:\n\n", stderr);
|
||||
print_logs();
|
||||
putc('\n', stderr);
|
||||
}
|
||||
|
||||
#define TRY_KEYMAP(name, value, nixos_option) \
|
||||
*rdef = (struct xkb_rule_names) {0}; \
|
||||
free_logs(); \
|
||||
rdef->name = value; \
|
||||
result = try_keymap(ctx, rdef); \
|
||||
if (!log_alloc_success) \
|
||||
goto out; \
|
||||
if (!result) { \
|
||||
print_error(#name, value, nixos_option); \
|
||||
exit_code = EXIT_FAILURE; \
|
||||
goto out; \
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int exit_code = EXIT_SUCCESS;
|
||||
bool result;
|
||||
struct xkb_context *ctx;
|
||||
struct xkb_rule_names *rdef;
|
||||
|
||||
if (argc != 5) {
|
||||
fprintf(stderr, "Usage: %s model layout variant options\n", argv[0]);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
ctx = xkb_context_new(XKB_CONTEXT_NO_ENVIRONMENT_NAMES);
|
||||
xkb_context_set_log_fn(ctx, add_log);
|
||||
|
||||
rdef = malloc(sizeof(struct xkb_rule_names));
|
||||
|
||||
TRY_KEYMAP(model, argv[1], "xkbModel");
|
||||
TRY_KEYMAP(layout, argv[2], "layout");
|
||||
TRY_KEYMAP(variant, argv[3], "xkbVariant");
|
||||
TRY_KEYMAP(options, argv[4], "xkbOptions");
|
||||
|
||||
free_logs();
|
||||
rdef->model = argv[1];
|
||||
rdef->layout = argv[2];
|
||||
rdef->variant = argv[3];
|
||||
rdef->options = argv[4];
|
||||
|
||||
result = try_keymap(ctx, rdef);
|
||||
if (!log_alloc_success)
|
||||
goto out;
|
||||
|
||||
if (!result) {
|
||||
fputs("The XKB keyboard definition failed to compile:\n", stderr);
|
||||
print_logs();
|
||||
exit_code = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
out:
|
||||
free_logs();
|
||||
free(rdef);
|
||||
xkb_context_unref(ctx);
|
||||
return exit_code;
|
||||
}
|
||||
31
pkgs/tools/admin/aws-auth/default.nix
Normal file
31
pkgs/tools/admin/aws-auth/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper, jq, awscli }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "unstable-2017-07-24";
|
||||
name = "aws-auth-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alphagov";
|
||||
repo = "aws-auth";
|
||||
rev = "5a4c9673f9f00ebaa4bb538827e1c2f277c475e1";
|
||||
sha256 = "095j9zqxra8hi2iyz0y4azs9yigy5f6alqkfmv180pm75nbc031g";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
# copy script and set $PATH
|
||||
installPhase = ''
|
||||
install -D $src/aws-auth.sh $out/bin/aws-auth
|
||||
wrapProgram $out/bin/aws-auth \
|
||||
--prefix PATH : ${stdenv.lib.makeBinPath [ awscli jq ]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = https://github.com/alphagov/aws-auth;
|
||||
description = "AWS authentication wrapper to handle MFA and IAM roles";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = with stdenv.lib.maintainers; [ ris ];
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/admin/bubblewrap/default.nix
Normal file
20
pkgs/tools/admin/bubblewrap/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ stdenv, fetchurl, libxslt, docbook_xsl, libcap }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "bubblewrap-${version}";
|
||||
version = "0.1.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/projectatomic/bubblewrap/releases/download/v${version}/${name}.tar.xz";
|
||||
sha256 = "1gyy7paqwdrfgxamxya991588ryj9q9c3rhdh31qldqyh9qpy72c";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ libcap libxslt docbook_xsl ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Unprivileged sandboxing tool";
|
||||
homepage = "https://github.com/projectatomic/bubblewrap";
|
||||
license = licenses.lgpl2Plus;
|
||||
maintainers = with maintainers; [ konimex ];
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, fetchFromGitHub, ucl, zlib, perl}:
|
||||
{ stdenv, fetchurl, fetchFromGitHub, ucl, zlib, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "upx-${version}";
|
||||
@@ -8,21 +8,25 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1";
|
||||
};
|
||||
|
||||
CXXFLAGS = "-Wno-unused-command-line-argument";
|
||||
|
||||
buildInputs = [ ucl zlib perl ];
|
||||
|
||||
preConfigure = "
|
||||
preConfigure = ''
|
||||
export UPX_UCLDIR=${ucl}
|
||||
cd src
|
||||
";
|
||||
'';
|
||||
|
||||
makeFlags = [ "CHECK_WHITESPACE=true" ];
|
||||
makeFlags = [ "-C" "src" "CHECK_WHITESPACE=true" ];
|
||||
|
||||
installPhase = "mkdir -p $out/bin ; cp upx.out $out/bin/upx";
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp src/upx.out $out/bin/upx
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://upx.github.io/;
|
||||
description = "The Ultimate Packer for eXecutables";
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ stdenv.mkDerivation rec {
|
||||
description = "G'MIC is an open and full-featured framework for image processing";
|
||||
homepage = http://gmic.eu/;
|
||||
license = licenses.cecill20;
|
||||
maintainers = [ maintainers.rycee ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "mimeo-${version}";
|
||||
version = "2017.2.9";
|
||||
version = "2017.6.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://xyne.archlinux.ca/projects/mimeo/src/${name}.tar.xz";
|
||||
sha256 = "1xbhz08aanix4bibz5jla58cmi6rnf946pf64wb0ka3s8jx0l5a0";
|
||||
sha256 = "126g3frks6zn6yc1r005qpmxg1pvvvf06ivpyvd9xribn2mwki2z";
|
||||
};
|
||||
|
||||
buildInputs = [ file desktop_file_utils ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, acl, attr, autoconf, automake, bash, bc, coreutils, e2fsprogs, fetchgit, fio, gawk
|
||||
{ stdenv, acl, attr, autoconf, automake, bash, bc, coreutils, e2fsprogs, fetchgit, fio, gawk, keyutils
|
||||
, lib, libaio, libcap, libtool, libuuid, libxfs, lvm2, openssl, perl, procps, psmisc, quota, su
|
||||
, time, utillinux, which, writeScript, xfsprogs }:
|
||||
|
||||
@@ -86,7 +86,7 @@ stdenv.mkDerivation {
|
||||
ln -s @out@/lib/xfstests/$f $f
|
||||
done
|
||||
|
||||
export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk libcap lvm2 perl procps psmisc quota utillinux which xfsprogs]}:$PATH
|
||||
export PATH=${lib.makeBinPath [acl attr bc e2fsprogs fio gawk keyutils libcap lvm2 perl procps psmisc quota utillinux which xfsprogs]}:$PATH
|
||||
exec ./check "$@"
|
||||
'';
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dropbear-2016.74";
|
||||
name = "dropbear-2017.75";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://matt.ucc.asn.au/dropbear/releases/${name}.tar.bz2";
|
||||
sha256 = "14c8f4gzixf0j9fkx68jgl85q7b05852kk0vf09gi6h0xmafl817";
|
||||
sha256 = "1309cm2aw62n9m3h38prvgsqr8bj85hfasgnvwkd42cp3k5ivg3c";
|
||||
};
|
||||
|
||||
dontDisableStatic = enableStatic;
|
||||
|
||||
@@ -4,13 +4,13 @@ let
|
||||
binPath = lib.makeBinPath [ coreutils openresolv systemd ];
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "update-resolv-conf-2016-09-30";
|
||||
name = "update-resolv-conf-2017-06-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "masterkorp";
|
||||
repo = "openvpn-update-resolv-conf";
|
||||
rev = "09cb5ab5a50dfd6e77e852749d80bef52d7a6b34";
|
||||
sha256 = "0s5cilph0p0wiixj7nlc7f3hqmr1mhvbfyapd0060n3y6xgps9y9";
|
||||
rev = "43093c2f970bf84cd374e18ec05ac6d9cae444b8";
|
||||
sha256 = "1lf66bsgv2w6nzg1iqf25zpjf4ckcr45adkpgdq9gvhkfnvlp8av";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchgit, autoreconfHook, texinfo, ncurses, readline, zlib, lzo, openssl }:
|
||||
{ stdenv, fetchgit, fetchpatch, autoreconfHook, texinfo, ncurses, readline, zlib, lzo, openssl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "tinc-${version}";
|
||||
@@ -19,6 +19,14 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace configure.ac --replace UNKNOWN ${version}
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Avoid infinite loop with "Error while reading from Linux tun/tap device (tun mode) /dev/net/tun: File descriptor in bad state" on network restart
|
||||
(fetchpatch {
|
||||
url = https://github.com/gsliepen/tinc/compare/acefa66...e4544db.patch;
|
||||
sha256 = "1jz7anqqzk7j96l5ifggc2knp14fmbsjdzfrbncxx0qhb6ihdcvn";
|
||||
})
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
rm $out/bin/tinc-gui
|
||||
'';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, pkgconfig, glib, libxml2, libxslt, getopt, nixUnstable, dysnomia, libintlOrEmpty, libiconv }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "disnix-0.7.1";
|
||||
name = "disnix-0.7.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = https://github.com/svanderburg/disnix/releases/download/disnix-0.7.1/disnix-0.7.1.tar.gz;
|
||||
sha256 = "0wxik73bk3hh4xjjj8jcgrwv1722m7cqgpiiwjsgxs346jvhrv2s";
|
||||
url = https://github.com/svanderburg/disnix/releases/download/disnix-0.7.2/disnix-0.7.2.tar.gz;
|
||||
sha256 = "1cgf7hgqrwsqgyc77sis0hr7cwgk3vx8cd4msgq11qbwywi3b6id";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig glib libxml2 libxslt getopt nixUnstable libintlOrEmpty libiconv dysnomia ];
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
version = "3.12.2.1206";
|
||||
version = "3.12.5.1233";
|
||||
name = "qesteidutil-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://installer.id.ee/media/ubuntu/pool/main/q/qesteidutil/qesteidutil_3.12.2.1206.orig.tar.xz";
|
||||
sha256 = "1v1i0jlycjjdg6wi4cpm1il5v1zn8dfj82mrfvsjy6j9rfzinkda";
|
||||
url = "https://installer.id.ee/media/ubuntu/pool/main/q/qesteidutil/qesteidutil_${version}.orig.tar.xz";
|
||||
sha256 = "b5f0361af1891cfab6f9113d6b2fab677cc4772fc18b62df7d6e997f13b97857";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
|
||||
41
pkgs/tools/text/nawk/default.nix
Normal file
41
pkgs/tools/text/nawk/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ stdenv, fetchurl, yacc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nawk-20121220";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz";
|
||||
sha256 = "10wvdn7xwc5bbp5h7l0b9fxby3bds21n8a34z54i8kjsbhb95h4d";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ yacc ];
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir build
|
||||
cd build
|
||||
tar xvf ${src}
|
||||
'';
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace ./makefile \
|
||||
--replace "YACC = yacc -d -S" ""
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 a.out "$out/bin/nawk"
|
||||
install -Dm644 awk.1 "$out/share/man/man1/nawk.1"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "The one, true implementation of AWK";
|
||||
longDescription = ''
|
||||
This is the version of awk described in "The AWK Programming
|
||||
Language", by Al Aho, Brian Kernighan, and Peter Weinberger
|
||||
(Addison-Wesley, 1988, ISBN 0-201-07981-X).
|
||||
'';
|
||||
homepage = https://www.cs.princeton.edu/~bwk/btl.mirror/;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = [ stdenv.lib.maintainers.konimex ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user