Skip to content

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
There were some conflicts in python modules, commented at #28314.
  • Loading branch information
vcunat committed Aug 29, 2017
2 parents 34b6bbe + e1f755e commit 2858c41
Show file tree
Hide file tree
Showing 300 changed files with 6,477 additions and 4,512 deletions.
354 changes: 180 additions & 174 deletions doc/languages-frameworks/python.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/maintainers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
canndrew = "Andrew Cann <shum@canndrew.org>";
carlsverre = "Carl Sverre <accounts@carlsverre.com>";
casey = "Casey Rodarmor <casey@rodarmor.net>";
caugner = "Claas Augner <nixos@caugner.de>";
cdepillabout = "Dennis Gosnell <cdep.illabout@gmail.com>";
cfouche = "Chaddaï Fouché <chaddai.fouche@gmail.com>";
changlinli = "Changlin Li <mail@changlinli.com>";
Expand Down Expand Up @@ -215,6 +216,7 @@
garrison = "Jim Garrison <jim@garrison.cc>";
gavin = "Gavin Rogers <gavin@praxeology.co.uk>";
gebner = "Gabriel Ebner <gebner@gebner.org>";
geistesk = "Alvar Penning <post@0x21.biz>";
georgewhewell = "George Whewell <georgerw@gmail.com>";
gilligan = "Tobias Pflug <tobias.pflug@gmail.com>";
giogadi = "Luis G. Torres <lgtorres42@gmail.com>";
Expand Down Expand Up @@ -578,6 +580,7 @@
thoughtpolice = "Austin Seipp <aseipp@pobox.com>";
timbertson = "Tim Cuthbertson <tim@gfxmonk.net>";
titanous = "Jonathan Rudenberg <jonathan@titanous.com>";
tnias = "Philipp Bartsch <phil@grmr.de>";
tohl = "Tomas Hlavaty <tom@logand.com>";
tokudan = "Daniel Frank <git@danielfrank.net>";
tomberek = "Thomas Bereknyei <tomberek@gmail.com>";
Expand Down
2 changes: 1 addition & 1 deletion lib/minver.nix
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Expose the minimum required version for evaluating Nixpkgs
"1.10"
"1.11"
27 changes: 15 additions & 12 deletions maintainers/scripts/hydra-eval-failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ def get_response_text(url):


def get_maintainers(attr_name):
nixname = attr_name.split('.')
meta_json = subprocess.check_output([
'nix-instantiate',
'--eval',
'--strict',
'-A',
'.'.join(nixname[1:]) + '.meta',
EVAL_FILE[nixname[0]],
'--json'])
meta = json.loads(meta_json)
if meta.get('maintainers'):
return [MAINTAINERS[name] for name in meta['maintainers'] if MAINTAINERS.get(name)]
try:
nixname = attr_name.split('.')
meta_json = subprocess.check_output([
'nix-instantiate',
'--eval',
'--strict',
'-A',
'.'.join(nixname[1:]) + '.meta',
EVAL_FILE[nixname[0]],
'--json'])
meta = json.loads(meta_json)
if meta.get('maintainers'):
return [MAINTAINERS[name] for name in meta['maintainers'] if MAINTAINERS.get(name)]
except:
return []


@click.command()
Expand Down
61 changes: 61 additions & 0 deletions nixos/modules/hardware/raid/hpsa.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{ config, lib, pkgs, ... }:

with lib;

let
hpssacli = pkgs.stdenv.mkDerivation rec {
name = "hpssacli-${version}";
version = "2.40-13.0";

src = pkgs.fetchurl {
url = "http://downloads.linux.hpe.com/SDR/downloads/MCP/Ubuntu/pool/non-free/${name}_amd64.deb";
sha256 = "11w7fwk93lmfw0yya4jpjwdmgjimqxx6412sqa166g1pz4jil4sw";
};

nativeBuildInputs = [ pkgs.dpkg ];

unpackPhase = "dpkg -x $src ./";

installPhase = ''
mkdir -p $out/bin $out/share/doc $out/share/man
mv opt/hp/hpssacli/bld/{hpssascripting,hprmstr,hpssacli} $out/bin/
mv opt/hp/hpssacli/bld/*.{license,txt} $out/share/doc/
mv usr/man $out/share/
for file in $out/bin/*; do
chmod +w $file
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${lib.makeLibraryPath [ pkgs.stdenv.cc.cc ]} \
$file
done
'';

dontStrip = true;

meta = with lib; {
description = "HP Smart Array CLI";
homepage = http://downloads.linux.hpe.com/SDR/downloads/MCP/Ubuntu/pool/non-free/;
license = licenses.unfreeRedistributable;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ volth ];
};
};
in {
###### interface

options = {
hardware.raid.HPSmartArray = {
enable = mkEnableOption "HP Smart Array kernel modules and CLI utility";
};
};

###### implementation

config = mkIf config.hardware.raid.HPSmartArray.enable {

boot.initrd.kernelModules = [ "sg" ]; /* hpssacli wants it */
boot.initrd.availableKernelModules = [ "hpsa" ];

environment.systemPackages = [ hpssacli ];
};
}
3 changes: 3 additions & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
./hardware/nitrokey.nix
./hardware/opengl.nix
./hardware/pcmcia.nix
./hardware/raid/hpsa.nix
./hardware/usb-wwan.nix
./hardware/video/amdgpu.nix
./hardware/video/amdgpu-pro.nix
Expand Down Expand Up @@ -269,6 +270,7 @@
./services/mail/rspamd.nix
./services/mail/rmilter.nix
./services/mail/nullmailer.nix
./services/misc/airsonic.nix
./services/misc/apache-kafka.nix
./services/misc/autofs.nix
./services/misc/autorandr.nix
Expand Down Expand Up @@ -562,6 +564,7 @@
./services/security/tor.nix
./services/security/torify.nix
./services/security/torsocks.nix
./services/security/usbguard.nix
./services/security/vault.nix
./services/system/cgmanager.nix
./services/system/cloud-init.nix
Expand Down
9 changes: 7 additions & 2 deletions nixos/modules/rename.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:

with lib;

Expand All @@ -14,11 +14,16 @@ with lib;
(mkRenamedOptionModule [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ])

(mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ])
(mkChangedOptionModule [ "services" "printing" "gutenprint" ] [ "services" "printing" "drivers" ]
(config:
let enabled = getAttrFromPath [ "services" "printing" "gutenprint" ] config;
in if enabled then [ pkgs.gutenprint ] else [ ]))
(mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ])
(mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ])
(mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ])
(mkRenamedOptionModule [ "services" "logstash" "address" ] [ "services" "logstash" "listenAddress" ])
(mkRenamedOptionModule [ "services" "i2pd" "extIp" ] [ "services" "i2pd" "address" ])
(mkRenamedOptionModule [ "services" "kibana" "host" ] [ "services" "kibana" "listenAddress" ])
(mkRenamedOptionModule [ "services" "logstash" "address" ] [ "services" "logstash" "listenAddress" ])
(mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ])
(mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ])
(mkRenamedOptionModule [ "services" "shout" "host" ] [ "services" "shout" "listenAddress" ])
Expand Down
117 changes: 117 additions & 0 deletions nixos/modules/services/misc/airsonic.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{ config, lib, pkgs, ... }:

with lib;

let
cfg = config.services.airsonic;
in {
options = {

services.airsonic = {
enable = mkEnableOption "Airsonic, the Free and Open Source media streaming server (fork of Subsonic and Libresonic)";

user = mkOption {
type = types.str;
default = "airsonic";
description = "User account under which airsonic runs.";
};

home = mkOption {
type = types.path;
default = "/var/lib/airsonic";
description = ''
The directory where Airsonic will create files.
Make sure it is writable.
'';
};

listenAddress = mkOption {
type = types.string;
default = "127.0.0.1";
description = ''
The host name or IP address on which to bind Airsonic.
Only relevant if you have multiple network interfaces and want
to make Airsonic available on only one of them. The default value
will bind Airsonic to all available network interfaces.
'';
};

port = mkOption {
type = types.int;
default = 4040;
description = ''
The port on which Airsonic will listen for
incoming HTTP traffic. Set to 0 to disable.
'';
};

contextPath = mkOption {
type = types.path;
default = "/";
description = ''
The context path, i.e., the last part of the Airsonic
URL. Typically '/' or '/airsonic'. Default '/'
'';
};

maxMemory = mkOption {
type = types.int;
default = 100;
description = ''
The memory limit (max Java heap size) in megabytes.
Default: 100
'';
};

transcoders = mkOption {
type = types.listOf types.path;
default = [ "${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
defaultText= [ "\${pkgs.ffmpeg.bin}/bin/ffmpeg" ];
description = ''
List of paths to transcoder executables that should be accessible
from Airsonic. Symlinks will be created to each executable inside
${cfg.home}/transcoders.
'';
};
};
};

config = mkIf cfg.enable {
systemd.services.airsonic = {
description = "Airsonic Media Server";
after = [ "local-fs.target" "network.target" ];
wantedBy = [ "multi-user.target" ];

preStart = ''
# Install transcoders.
rm -rf ${cfg.home}/transcode
mkdir -p ${cfg.home}/transcode
for exe in ${toString cfg.transcoders}; do
ln -sf "$exe" ${cfg.home}/transcode
done
'';
serviceConfig = {
ExecStart = ''
${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \
-Dairsonic.home=${cfg.home} \
-Dserver.address=${cfg.listenAddress} \
-Dserver.port=${toString cfg.port} \
-Dairsonic.contextPath=${cfg.contextPath} \
-Djava.awt.headless=true \
-verbose:gc \
-jar ${pkgs.airsonic}/webapps/airsonic.war
'';
Restart = "always";
User = "airsonic";
UMask = "0022";
};
};

users.extraUsers.airsonic = {
description = "Airsonic service user";
name = cfg.user;
home = cfg.home;
createHome = true;
};
};
}

0 comments on commit 2858c41

Please sign in to comment.