Merge master into staging

This commit is contained in:
Frederik Rietdijk 2018-04-10 19:23:42 +02:00
commit 6023849ba1
18 changed files with 258 additions and 27 deletions

View file

@ -1897,6 +1897,11 @@
email = "info+nix@chmist.com";
name = "karolchmist";
};
kazcw = {
email = "kaz@lambdaverse.org";
github = "kazcw";
name = "Kaz Wesley";
};
kentjames = {
email = "jameschristopherkent@gmail.com";
github = "kentjames";

View file

@ -295,6 +295,12 @@ in
'';
};
dataDir = mkOption {
type = types.string;
description = "Directory where Prosody stores its data";
default = "/var/lib/prosody";
};
allowRegistration = mkOption {
type = types.bool;
default = false;
@ -421,11 +427,11 @@ in
environment.etc."prosody/prosody.cfg.lua".text = ''
pidfile = "/var/lib/prosody/prosody.pid"
pidfile = "${cfg.dataDir}/prosody.pid"
log = "*syslog"
data_path = "/var/lib/prosody"
data_path = "${cfg.dataDir}"
plugin_paths = {
${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.extraPluginPaths) }
}
@ -474,7 +480,7 @@ in
description = "Prosody user";
createHome = true;
group = "prosody";
home = "/var/lib/prosody";
home = "${cfg.dataDir}";
};
users.extraGroups.prosody = {
@ -490,7 +496,7 @@ in
serviceConfig = {
User = "prosody";
Type = "forking";
PIDFile = "/var/lib/prosody/prosody.pid";
PIDFile = "${cfg.dataDir}/prosody.pid";
ExecStart = "${cfg.package}/bin/prosodyctl start";
};
};

View file

@ -104,8 +104,8 @@ in rec {
terraform_0_10-full = terraform_0_10.withPlugins lib.attrValues;
terraform_0_11 = pluggable (generic {
version = "0.11.5";
sha256 = "130ibb1pd60r2cycwpzs8qfwrz6knyc1a1849csxpipg5rs5q3jy";
version = "0.11.6";
sha256 = "17kd3ln1i40qb8fll5918rvgackzf1ibmr7li1p9vky4ki3iwr0l";
patches = [ ./provider-path.patch ];
passthru = { inherit plugins; };
});

View file

@ -0,0 +1,44 @@
{ stdenv, lib, pkgconfig, curl, openssl, zlib, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
name = "elan-${version}";
version = "0.1.0";
cargoSha256 = "04cxwklfgz4q28grva52ws3lslaiq67fwqf6pglbzdrfbgdjjwb6";
src = fetchFromGitHub {
owner = "kha";
repo = "elan";
rev = "v${version}";
sha256 = "065l9a1g974n8i44mz37sx88fl65h5hml611m4p81cy6av2x85sm";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ curl zlib openssl ];
cargoBuildFlags = [ "--features no-self-update" ];
postInstall = ''
pushd $out/bin
mv elan-init elan
for link in lean leanpkg; do
ln -s elan $link
done
popd
# tries to create .elan
export HOME=$(mktemp -d)
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
$out/bin/elan completions bash > "$out/share/bash-completion/completions/elan"
$out/bin/elan completions fish > "$out/share/fish/vendor_completions.d/elan.fish"
$out/bin/elan completions zsh > "$out/share/zsh/site-functions/_elan"
'';
meta = with stdenv.lib; {
description = "Small tool to manage your installations of the Lean theorem prover";
homepage = "https://github.com/Kha/elan";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ gebner ];
};
}

View file

@ -106,6 +106,10 @@ rec {
inherit (darwin) Security;
};
hubUnstable = callPackage ./hub/unstable.nix {
inherit (darwin) Security;
};
qgit = qt5.callPackage ./qgit { };
stgit = callPackage ./stgit {

View file

@ -0,0 +1,36 @@
{ stdenv, fetchgit, go, ronn, groff, utillinux, Security }:
stdenv.mkDerivation rec {
name = "hub-${version}";
version = "2.3.0-pre10";
src = fetchgit {
url = https://github.com/github/hub.git;
rev = "refs/tags/v${version}";
sha256 = "07sz1i6zxx2g36ayhjp1vjw523ckk5b0cr8b80s1qhar2d2hkibd";
};
buildInputs = [ go ronn groff utillinux ]
++ stdenv.lib.optional stdenv.isDarwin Security;
buildPhase = ''
mkdir bin
ln -s ${ronn}/bin/ronn bin/ronn
patchShebangs .
make all man-pages
'';
installPhase = ''
prefix=$out sh -x < script/install.sh
'';
meta = with stdenv.lib; {
description = "Command-line wrapper for git that makes you better at GitHub";
license = licenses.mit;
homepage = https://hub.github.com/;
maintainers = with maintainers; [ the-kenny ];
platforms = with platforms; unix;
};
}

View file

@ -3,7 +3,7 @@
, img ? pkgs.stdenv.platform.kernelTarget
, storeDir ? builtins.storeDir
, rootModules ?
[ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" ]
[ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ]
++ pkgs.lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "rtc_cmos"
}:

View file

@ -2,7 +2,7 @@
buildPythonPackage rec {
pname = "netdisco";
version = "1.3.1";
version = "1.4.0";
disabled = !isPy3k;
@ -11,7 +11,7 @@ buildPythonPackage rec {
owner = "home-assistant";
repo = pname;
rev = version;
sha256 = "082ihazpcmf7qh4671kgdr5kzglyj10gp9hyy52snh0c1rz468fd";
sha256 = "0q1cl76a0fwxm80lkk7cpd4p23r2bvf1a45nb7n61cgzrqcv43q1";
};
propagatedBuildInputs = [ requests zeroconf netifaces ];

View file

@ -0,0 +1,34 @@
{ stdenv, makeWrapper, requireFile, patchelf, gcc, unzip }:
assert stdenv.system == "x86_64-linux";
with stdenv.lib;
# v2.1: last version with NHM/WSM arch support
stdenv.mkDerivation {
name = "iaca-2.1";
src = requireFile {
name = "iaca-version-2.1-lin64.zip";
sha256 = "11s1134ijf66wrc77ksky9mnb0lq6ml6fzmr86a6p6r5xclzay2m";
url = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer-download";
};
unpackCmd = ''${unzip}/bin/unzip "$src" -x __MACOSX/ __MACOSX/iaca-lin64/ __MACOSX/iaca-lin64/._.DS_Store'';
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin $out/lib
cp bin/iaca $out/bin/
cp lib/* $out/lib
'';
preFixup = let libPath = makeLibraryPath [ stdenv.cc.cc.lib gcc ]; in ''
patchelf \
--set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
--set-rpath $out/lib:"${libPath}" \
$out/bin/iaca
'';
postFixup = ''wrapProgram $out/bin/iaca --set LD_LIBRARY_PATH $out/lib'';
meta = {
description = "Intel Architecture Code Analyzer";
homepage = https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/;
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ kazcw ];
};
}

View file

@ -0,0 +1,25 @@
{ stdenv, requireFile, patchelf, unzip }:
assert stdenv.system == "x86_64-linux";
with stdenv.lib;
stdenv.mkDerivation {
name = "iaca-3.0";
src = requireFile {
name = "iaca-version-v3.0-lin64.zip";
sha256 = "0qd81bxg269cwwvfmdp266kvhcl3sdvhrkfqdrbmanawk0w7lvp1";
url = "https://software.intel.com/en-us/articles/intel-architecture-code-analyzer-download";
};
unpackCmd = ''${unzip}/bin/unzip "$src"'';
installPhase = ''
mkdir -p $out/bin
cp iaca $out/bin
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/bin/iaca
'';
meta = {
description = "Intel Architecture Code Analyzer";
homepage = https://software.intel.com/en-us/articles/intel-architecture-code-analyzer/;
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ kazcw ];
};
}

View file

@ -0,0 +1,16 @@
{ stdenv, ocaml, findlib, jbuilder, js_of_ocaml-compiler, js_of_ocaml-ppx
, ocaml-migrate-parsetree, ppx_tools_versioned
, js_of_ocaml, ocaml_lwt
}:
stdenv.mkDerivation rec {
name = "js_of_ocaml-lwt-${version}";
inherit (js_of_ocaml-compiler) version src installPhase meta;
buildInputs = [ ocaml findlib jbuilder js_of_ocaml-ppx ocaml-migrate-parsetree ppx_tools_versioned ];
propagatedBuildInputs = [ js_of_ocaml ocaml_lwt ];
buildPhase = "jbuilder build -p js_of_ocaml-lwt";
}

View file

@ -5,7 +5,7 @@ let
in
buildNodejs {
inherit enableNpm;
version = "9.10.1";
sha256 = "1widvxbc8sp8p8vp7q38b3zy0w1nx4iaqmp81s6bvaqs08h7wfy9";
version = "9.11.1";
sha256 = "0k4xkcymf4y3k2bxjryb2lj97bxnng75x7a77i2wgx94749kvp13";
patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ];
}

View file

@ -12,7 +12,7 @@ assert versionAtLeast kernel.version "3.12";
stdenv.mkDerivation {
name = "perf-linux-${kernel.version}";
inherit (kernel) src makeFlags;
inherit (kernel) src;
preConfigure = ''
cd tools/perf
@ -24,17 +24,21 @@ stdenv.mkDerivation {
substituteInPlace $x --replace /usr/lib/debug /run/current-system/sw/lib/debug
done
[ -f bash_completion ] && sed -i 's,^have perf,_have perf,' bash_completion
export makeFlags="DESTDIR=$out WERROR=0 $makeFlags"
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -DTIPDIR=\"$out/share/doc/perf-tip\""
if [ -f bash_completion ]; then
sed -i 's,^have perf,_have perf,' bash_completion
fi
'';
makeFlags = ["prefix=$(out)" "WERROR=0"] ++ kernel.makeFlags;
# perf refers both to newt and slang
nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
flex bison libiberty libaudit makeWrapper pkgconfig python perl ];
buildInputs =
[ elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
] ++ stdenv.lib.optional withGtk gtk2;
nativeBuildInputs = [
asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
flex bison libiberty libaudit makeWrapper pkgconfig python perl
];
buildInputs = [
elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
] ++ stdenv.lib.optional withGtk gtk2;
# Note: we don't add elfutils to buildInputs, since it provides a
# bad `ld' and other stuff.
@ -50,7 +54,7 @@ stdenv.mkDerivation {
];
separateDebugInfo = true;
installFlags = "install install-man ASCIIDOC8=1";
installFlags = "install install-man ASCIIDOC8=1 prefix=$(out)";
preFixup = ''
wrapProgram $out/bin/perf \

View file

@ -50,8 +50,7 @@ stdenv.mkDerivation rec {
"--enable-static"
"--enable-debug"
"CFLAGS=-fstack-protector-strong"
# Fix cycle between outputs
"--disable-wrapper"
"--enable-wrapper=all"
];
outputs = [ "out" "dev" ];
@ -59,18 +58,25 @@ stdenv.mkDerivation rec {
dontDisableStatic = true;
separateDebugInfo = true;
postInstall =
''
postInstall = ''
# Not sure why, but link in all but scsi directory as that's what uclibc/glibc do.
# Apparently glibc provides scsi itself?
(cd $dev/include && ln -s $(ls -d ${linuxHeaders}/include/* | grep -v "scsi$") .)
'' + ''
# Strip debug out of the static library
$STRIP -S $out/lib/libc.a
'' + ''
mkdir -p $out/bin
# Create 'ldd' symlink, builtin
ln -s $out/lib/libc.so $out/bin/ldd
# (impure) cc wrapper around musl for interactive usuage
for i in musl-gcc musl-clang ld.musl-clang; do
moveToOutput bin/$i $dev
done
moveToOutput lib/musl-gcc.specs $dev
substituteInPlace $dev/bin/musl-gcc \
--replace $out/lib/musl-gcc.specs $dev/lib/musl-gcc.specs
'' + lib.optionalString useBSDCompatHeaders ''
install -D ${queue_h} $dev/include/sys/queue.h
install -D ${cdefs_h} $dev/include/sys/cdefs.h

View file

@ -0,0 +1,32 @@
{ lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "restic-rest-server-${version}";
version = "0.9.7";
goPackagePath = "github.com/restic/rest-server";
src = fetchFromGitHub {
owner = "restic";
repo = "rest-server";
rev = "v${version}";
sha256 = "1g47ly1pxwn0znbj3v5j6kqhn66d4wf0d5gjqzig75pzknapv8qj";
};
buildPhase = ''
cd go/src/${goPackagePath}
go run build.go
'';
installPhase = ''
install -Dt $bin/bin rest-server
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "A high performance HTTP server that implements restic's REST backend API";
platforms = platforms.unix;
license = licenses.bsd2;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -20,6 +20,16 @@ buildGoPackage rec {
gnupg
]);
postInstall = ''
mkdir -p \
$bin/share/bash-completion/completions \
$bin/share/zsh/site-functions \
$bin/share/fish/vendor_completions.d
$bin/bin/gopass completion bash > $bin/share/bash-completion/completions/_gopass
$bin/bin/gopass completion zsh > $bin/share/zsh/site-functions/_gopass
$bin/bin/gopass completion fish > $bin/share/fish/vendor_completions.d/gopass.fish
'';
postFixup = ''
wrapProgram $bin/bin/gopass \
--prefix PATH : "${wrapperPath}"

View file

@ -7877,6 +7877,10 @@ with pkgs;
hyenae = callPackage ../tools/networking/hyenae { };
iaca_2_1 = callPackage ../development/tools/iaca/2.1.nix { };
iaca_3_0 = callPackage ../development/tools/iaca/3.0.nix { };
iaca = iaca_3_0;
icestorm = callPackage ../development/tools/icestorm { };
icmake = callPackage ../development/tools/build-managers/icmake { };
@ -12702,6 +12706,8 @@ with pkgs;
restic = callPackage ../tools/backup/restic { };
restic-rest-server = callPackage ../tools/backup/restic/rest-server.nix { };
restya-board = callPackage ../servers/web-apps/restya-board { };
rethinkdb = callPackage ../servers/nosql/rethinkdb {
@ -19956,6 +19962,7 @@ with pkgs;
lean = callPackage ../applications/science/logic/lean {};
lean2 = callPackage ../applications/science/logic/lean2 {};
lean3 = lean;
elan = callPackage ../applications/science/logic/elan {};
leo2 = callPackage ../applications/science/logic/leo2 {
ocaml = ocamlPackages_4_01_0.ocaml;};

View file

@ -326,6 +326,8 @@ let
js_of_ocaml-compiler = callPackage ../development/tools/ocaml/js_of_ocaml/compiler.nix {};
js_of_ocaml-lwt = callPackage ../development/tools/ocaml/js_of_ocaml/lwt.nix {};
js_of_ocaml-ocamlbuild = callPackage ../development/tools/ocaml/js_of_ocaml/ocamlbuild.nix {};
js_of_ocaml-ppx = callPackage ../development/tools/ocaml/js_of_ocaml/ppx.nix {};