Merge remote-tracking branch 'upstream/master' into hardened-stdenv

This commit is contained in:
Robin Gloster 2016-08-02 13:46:36 +00:00
commit 1be4907ca2
107 changed files with 1440 additions and 785 deletions

View File

@ -44,12 +44,12 @@ rec {
packedRefsName = toString path + "/packed-refs"; packedRefsName = toString path + "/packed-refs";
in if lib.pathExists fileName in if lib.pathExists fileName
then then
let fileContent = readFile fileName; let fileContent = lib.fileContents fileName;
# Sometimes git stores the commitId directly in the file but # Sometimes git stores the commitId directly in the file but
# sometimes it stores something like: «ref: refs/heads/branch-name» # sometimes it stores something like: «ref: refs/heads/branch-name»
matchRef = match "^ref: (.*)\n$" fileContent; matchRef = match "^ref: (.*)$" fileContent;
in if isNull matchRef in if isNull matchRef
then lib.removeSuffix "\n" fileContent then fileContent
else readCommitFromFile path (lib.head matchRef) else readCommitFromFile path (lib.head matchRef)
# Sometimes, the file isn't there at all and has been packed away in the # Sometimes, the file isn't there at all and has been packed away in the
# packed-refs file, so we have to grep through it: # packed-refs file, so we have to grep through it:

View File

@ -479,4 +479,14 @@ rec {
absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths; absolutePaths = builtins.map (path: builtins.toPath (root + "/" + path)) relativePaths;
in in
absolutePaths; absolutePaths;
/* Read the contents of a file removing the trailing \n
Example:
$ echo "1.0" > ./version
fileContents ./version
=> "1.0"
*/
fileContents = file: removeSuffix "\n" (builtins.readFile file);
} }

View File

@ -62,11 +62,13 @@ rec {
isInt add sub lessThan isInt add sub lessThan
seq deepSeq genericClosure; seq deepSeq genericClosure;
inherit (import ./strings.nix) fileContents;
# Return the Nixpkgs version number. # Return the Nixpkgs version number.
nixpkgsVersion = nixpkgsVersion =
let suffixFile = ../.version-suffix; in let suffixFile = ../.version-suffix; in
readFile ../.version fileContents ../.version
+ (if pathExists suffixFile then readFile suffixFile else "pre-git"); + (if pathExists suffixFile then fileContents suffixFile else "pre-git");
# Whether we're being called by nix-shell. # Whether we're being called by nix-shell.
inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1"; inNixShell = builtins.getEnv "IN_NIX_SHELL" == "1";

View File

@ -122,7 +122,7 @@ let
<targetset> <targetset>
<targetsetinfo> <targetsetinfo>
Allows for cross-referencing olinks between the manpages Allows for cross-referencing olinks between the manpages
and the HTML/PDF manuals. and manual.
</targetsetinfo> </targetsetinfo>
<document targetdoc="manual">&manualtargets;</document> <document targetdoc="manual">&manualtargets;</document>
@ -221,34 +221,14 @@ in rec {
mkdir -p $dst/epub/OEBPS/images/callouts mkdir -p $dst/epub/OEBPS/images/callouts
cp -r ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/epub/OEBPS/images/callouts cp -r ${docbook5_xsl}/xml/xsl/docbook/images/callouts/*.gif $dst/epub/OEBPS/images/callouts
echo "application/epub+zip" > mimetype echo "application/epub+zip" > mimetype
zip -0Xq "$dst/NixOS Manual - NixOS community.epub" mimetype manual="$dst/nixos-manual.epub"
zip -Xr9D "$dst/NixOS Manual - NixOS community.epub" $dst/epub/* zip -0Xq "$manual" mimetype
cd $dst/epub && zip -Xr9D "$manual" *
rm -rf $dst/epub
mkdir -p $out/nix-support mkdir -p $out/nix-support
echo "doc-epub manual $dst/NixOS Manual - NixOS community.epub" >> $out/nix-support/hydra-build-products echo "doc-epub manual $manual" >> $out/nix-support/hydra-build-products
'';
};
manualPDF = stdenv.mkDerivation {
name = "nixos-manual-pdf";
inherit sources;
buildInputs = [ libxml2 libxslt dblatex dblatex.tex ];
buildCommand = ''
${copySources}
dst=$out/share/doc/nixos
mkdir -p $dst
xmllint --xinclude manual.xml | dblatex -o $dst/manual.pdf - \
-P target.database.document="${olinkDB}/olinkdb.xml" \
-P doc.collab.show=0 \
-P latex.output.revhistory=0
mkdir -p $out/nix-support
echo "doc-pdf manual $dst/manual.pdf" >> $out/nix-support/hydra-build-products
''; '';
}; };

View File

@ -33,12 +33,19 @@ has the following highlights: </para>
following incompatible changes:</para> following incompatible changes:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Shell aliases for systemd sub-commands <para>Shell aliases for systemd sub-commands
<link xlink:href="https://github.com/NixOS/nixpkgs/pull/15598">were dropped</link>: <link xlink:href="https://github.com/NixOS/nixpkgs/pull/15598">were dropped</link>:
<command>start</command>, <command>stop</command>, <command>start</command>, <command>stop</command>,
<command>restart</command>, <command>status</command>.</para> <command>restart</command>, <command>status</command>.</para>
</listitem> </listitem>
<listitem>
<para>Redis now binds to 127.0.0.1 only instead of listening to all network interfaces. This is the default
behavior of Redis 3.2</para>
</listitem>
</itemizedlist> </itemizedlist>

View File

@ -35,57 +35,42 @@ in
nixosLabel = mkOption { nixosLabel = mkOption {
type = types.str; type = types.str;
description = '' description = ''
NixOS version name to be used in the names of generated Label to be used in the names of generated outputs and boot
outputs and boot labels. labels.
If you ever wanted to influence the labels in your GRUB menu,
this is option is for you.
Can be set directly or with <envar>NIXOS_LABEL</envar>
environment variable for <command>nixos-rebuild</command>,
e.g.:
<screen>
#!/bin/sh
today=`date +%Y%m%d`
branch=`(cd nixpkgs ; git branch 2>/dev/null | sed -n '/^\* / { s|^\* ||; p; }')`
revision=`(cd nixpkgs ; git rev-parse HEAD)`
export NIXOS_LABEL="$today.$branch-''${revision:0:7}"
nixos-rebuild switch</screen>
''; '';
}; };
nixosVersion = mkOption { nixosVersion = mkOption {
internal = true; internal = true;
type = types.str; type = types.str;
description = "NixOS version."; description = "The full NixOS version (e.g. <literal>16.03.1160.f2d4ee1</literal>).";
}; };
nixosRelease = mkOption { nixosRelease = mkOption {
readOnly = true; readOnly = true;
type = types.str; type = types.str;
default = readFile releaseFile; default = fileContents releaseFile;
description = "NixOS release."; description = "The NixOS release (e.g. <literal>16.03</literal>).";
}; };
nixosVersionSuffix = mkOption { nixosVersionSuffix = mkOption {
internal = true; internal = true;
type = types.str; type = types.str;
default = if pathExists suffixFile then readFile suffixFile else "pre-git"; default = if pathExists suffixFile then fileContents suffixFile else "pre-git";
description = "NixOS version suffix."; description = "The NixOS version suffix (e.g. <literal>1160.f2d4ee1</literal>).";
}; };
nixosRevision = mkOption { nixosRevision = mkOption {
internal = true; internal = true;
type = types.str; type = types.str;
default = if pathExists revisionFile then readFile revisionFile else "master"; default = if pathExists revisionFile then fileContents revisionFile else "master";
description = "NixOS Git revision hash."; description = "The Git revision from which this NixOS configuration was built.";
}; };
nixosCodeName = mkOption { nixosCodeName = mkOption {
readOnly = true; readOnly = true;
type = types.str; type = types.str;
description = "NixOS release code name."; description = "The NixOS release code name (e.g. <literal>Emu</literal>).";
}; };
defaultChannel = mkOption { defaultChannel = mkOption {
@ -102,8 +87,8 @@ in
system = { system = {
# These defaults are set here rather than up there so that # These defaults are set here rather than up there so that
# changing them would not rebuild the manual # changing them would not rebuild the manual
nixosLabel = mkDefault (maybeEnv "NIXOS_LABEL" cfg.nixosVersion); nixosLabel = mkDefault cfg.nixosVersion;
nixosVersion = mkDefault (maybeEnv "NIXOS_VERSION" (cfg.nixosRelease + cfg.nixosVersionSuffix)); nixosVersion = mkDefault (cfg.nixosRelease + cfg.nixosVersionSuffix);
nixosRevision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId); nixosRevision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId);
nixosVersionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId)); nixosVersionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId));

View File

@ -97,7 +97,7 @@ in
# Configure system tunables # Configure system tunables
boot.kernel.sysctl = { boot.kernel.sysctl = {
# Removed under grsecurity # Read-only under grsecurity
"kernel.kptr_restrict" = mkForce null; "kernel.kptr_restrict" = mkForce null;
} // optionalAttrs config.nix.useSandbox { } // optionalAttrs config.nix.useSandbox {
# chroot(2) restrictions that conflict with sandboxed Nix builds # chroot(2) restrictions that conflict with sandboxed Nix builds

View File

@ -11,12 +11,6 @@ let
cfg = config.services.nixosManual; cfg = config.services.nixosManual;
versionModule =
{ system.nixosVersionSuffix = config.system.nixosVersionSuffix;
system.nixosRevision = config.system.nixosRevision;
nixpkgs.system = config.nixpkgs.system;
};
/* For the purpose of generating docs, evaluate options with each derivation /* For the purpose of generating docs, evaluate options with each derivation
in `pkgs` (recursively) replaced by a fake with path "\${pkgs.attribute.path}". in `pkgs` (recursively) replaced by a fake with path "\${pkgs.attribute.path}".
It isn't perfect, but it seems to cover a vast majority of use cases. It isn't perfect, but it seems to cover a vast majority of use cases.
@ -24,12 +18,12 @@ let
the path above will be shown and not e.g. `${config.services.foo.package}`. */ the path above will be shown and not e.g. `${config.services.foo.package}`. */
manual = import ../../../doc/manual { manual = import ../../../doc/manual {
inherit pkgs; inherit pkgs;
version = config.system.nixosVersion; version = config.system.nixosRelease;
revision = config.system.nixosRevision; revision = "release-${config.system.nixosRelease}";
options = options =
let let
scrubbedEval = evalModules { scrubbedEval = evalModules {
modules = [ versionModule ] ++ baseModules; modules = [ { nixpkgs.system = config.nixpkgs.system; } ] ++ baseModules;
args = (config._module.args) // { modules = [ ]; }; args = (config._module.args) // { modules = [ ]; };
specialArgs = { pkgs = scrubDerivations "pkgs" pkgs; }; specialArgs = { pkgs = scrubDerivations "pkgs" pkgs; };
}; };

View File

@ -55,7 +55,7 @@ in
''; }; ''; };
localAddress = mkOption { localAddress = mkOption {
default = "127.0.0.1"; default = "127.0.0.1";
type = types.string; type = types.str;
description = '' description = ''
Listen for DNS queries to relay on this address. The only reason to Listen for DNS queries to relay on this address. The only reason to
change this from its default value is to proxy queries on behalf change this from its default value is to proxy queries on behalf
@ -74,7 +74,7 @@ in
}; };
resolverName = mkOption { resolverName = mkOption {
default = "dnscrypt.eu-nl"; default = "dnscrypt.eu-nl";
type = types.nullOr types.string; type = types.nullOr types.str;
description = '' description = ''
The name of the upstream DNSCrypt resolver to use, taken from the The name of the upstream DNSCrypt resolver to use, taken from the
list named in the <literal>resolverList</literal> option. list named in the <literal>resolverList</literal> option.
@ -90,7 +90,7 @@ in
example = literalExample "${pkgs.dnscrypt-proxy}/share/dnscrypt-proxy/dnscrypt-resolvers.csv"; example = literalExample "${pkgs.dnscrypt-proxy}/share/dnscrypt-proxy/dnscrypt-resolvers.csv";
default = pkgs.fetchurl { default = pkgs.fetchurl {
url = https://raw.githubusercontent.com/jedisct1/dnscrypt-proxy/master/dnscrypt-resolvers.csv; url = https://raw.githubusercontent.com/jedisct1/dnscrypt-proxy/master/dnscrypt-resolvers.csv;
sha256 = "171zvdqcqqvcw3zr7wl9h1wmdmk6m3h55xr4gq2z1j7a0x0ba2in"; sha256 = "1i9wzw4zl052h5nyp28bwl8d66cgj0awvjhw5wgwz0warkjl1g8g";
}; };
defaultText = "pkgs.fetchurl { url = ...; sha256 = ...; }"; defaultText = "pkgs.fetchurl { url = ...; sha256 = ...; }";
}; };

View File

@ -4,31 +4,222 @@ with lib;
let let
cfg = config.services.nginx; cfg = config.services.nginx;
nginx = cfg.package; virtualHosts = mapAttrs (vhostName: vhostConfig:
vhostConfig // (optionalAttrs vhostConfig.enableACME {
sslCertificate = "/var/lib/acme/${vhostName}/fullchain.pem";
sslCertificateKey = "/var/lib/acme/${vhostName}/key.pem";
})
) cfg.virtualHosts;
configFile = pkgs.writeText "nginx.conf" '' configFile = pkgs.writeText "nginx.conf" ''
user ${cfg.user} ${cfg.group}; user ${cfg.user} ${cfg.group};
error_log stderr;
daemon off; daemon off;
${cfg.config} ${cfg.config}
${optionalString (cfg.httpConfig == "") ''
http {
include ${cfg.package}/conf/mime.types;
include ${cfg.package}/conf/fastcgi.conf;
${optionalString (cfg.recommendedOptimisation) ''
# optimisation
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
''}
ssl_protocols ${cfg.sslProtocols};
ssl_ciphers ${cfg.sslCiphers};
${optionalString (cfg.sslDhparam != null) "ssl_dhparam ${cfg.sslDhparam};"}
${optionalString (cfg.recommendedTlsSettings) ''
ssl_session_cache shared:SSL:42m;
ssl_session_timeout 23m;
ssl_ecdh_curve secp384r1;
ssl_prefer_server_ciphers on;
ssl_stapling on;
ssl_stapling_verify on;
''}
${optionalString (cfg.recommendedGzipSettings) ''
gzip on;
gzip_disable "msie6";
gzip_proxied any;
gzip_comp_level 9;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
''}
${optionalString (cfg.recommendedProxySettings) ''
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header Accept-Encoding "";
proxy_redirect off;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_http_version 1.0;
''}
client_max_body_size ${cfg.clientMaxBodySize};
server_tokens ${if cfg.serverTokens then "on" else "off"};
${vhosts}
${optionalString cfg.statusPage ''
server {
listen 80;
listen [::]:80;
server_name localhost;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
allow ::1;
deny all;
}
}
''}
${cfg.appendHttpConfig}
}''}
${optionalString (cfg.httpConfig != "") '' ${optionalString (cfg.httpConfig != "") ''
http { http {
include ${cfg.package}/conf/mime.types; include ${cfg.package}/conf/mime.types;
include ${cfg.package}/conf/fastcgi.conf;
${cfg.httpConfig} ${cfg.httpConfig}
} }''}
''}
${cfg.appendConfig} ${cfg.appendConfig}
''; '';
vhosts = concatStringsSep "\n" (mapAttrsToList (serverName: vhost:
let
ssl = vhost.enableSSL || vhost.forceSSL;
port = if vhost.port != null then vhost.port else (if ssl then 443 else 80);
listenString = toString port + optionalString ssl " ssl http2"
+ optionalString vhost.default " default";
acmeLocation = optionalString vhost.enableACME ''
location /.well-known/acme-challenge {
try_files $uri @acme-fallback;
root ${vhost.acmeRoot};
auth_basic off;
}
location @acme-fallback {
auth_basic off;
proxy_pass http://${vhost.acmeFallbackHost};
}
'';
in ''
${optionalString vhost.forceSSL ''
server {
listen 80 ${optionalString vhost.default "default"};
listen [::]:80 ${optionalString vhost.default "default"};
server_name ${serverName} ${concatStringsSep " " vhost.serverAliases};
${acmeLocation}
location / {
return 301 https://$host${optionalString (port != 443) ":${port}"}$request_uri;
}
}
''}
server {
listen ${listenString};
listen [::]:${listenString};
server_name ${serverName} ${concatStringsSep " " vhost.serverAliases};
${acmeLocation}
${optionalString (vhost.root != null) "root ${vhost.root};"}
${optionalString (vhost.globalRedirect != null) ''
return 301 http${optionalString ssl "s"}://${vhost.globalRedirect}$request_uri;
''}
${optionalString ssl ''
ssl_certificate ${vhost.sslCertificate};
ssl_certificate_key ${vhost.sslCertificateKey};
''}
${optionalString (vhost.basicAuth != {}) (mkBasicAuth serverName vhost.basicAuth)}
${mkLocations vhost.locations}
${vhost.extraConfig}
}
''
) virtualHosts);
mkLocations = locations: concatStringsSep "\n" (mapAttrsToList (location: config: ''
location ${location} {
${optionalString (config.proxyPass != null) "proxy_pass ${config.proxyPass};"}
${optionalString (config.root != null) "root ${config.root};"}
${config.extraConfig}
}
'') locations);
mkBasicAuth = serverName: authDef: let
htpasswdFile = pkgs.writeText "${serverName}.htpasswd" (
concatStringsSep "\n" (mapAttrsToList (user: password: ''
${user}:{PLAIN}${password}
'') authDef)
);
in ''
auth_basic secured;
auth_basic_user_file ${htpasswdFile};
'';
in in
{ {
options = { options = {
services.nginx = { services.nginx = {
enable = mkOption { enable = mkEnableOption "Nginx Web Server";
statusPage = mkOption {
default = false; default = false;
type = types.bool; type = types.bool;
description = " description = "
Enable the nginx Web Server. Enable status page reachable from localhost on http://127.0.0.1/nginx_status.
";
};
recommendedTlsSettings = mkOption {
default = false;
type = types.bool;
description = "
Enable recommended TLS settings.
";
};
recommendedOptimisation = mkOption {
default = false;
type = types.bool;
description = "
Enable recommended optimisation settings.
";
};
recommendedGzipSettings = mkOption {
default = false;
type = types.bool;
description = "
Enable recommended gzip settings.
";
};
recommendedProxySettings = mkOption {
default = false;
type = types.bool;
description = "
Enable recommended proxy settings.
"; ";
}; };
@ -64,7 +255,22 @@ in
httpConfig = mkOption { httpConfig = mkOption {
type = types.lines; type = types.lines;
default = ""; default = "";
description = "Configuration lines to be appended inside of the http {} block."; description = "
Configuration lines to be set inside the http block.
This is mutually exclusive with the structured configuration
via virtualHosts and the recommendedXyzSettings configuration
options. See appendHttpConfig for appending to the generated http block.
";
};
appendHttpConfig = mkOption {
type = types.lines;
default = "";
description = "
Configuration lines to be appended to the generated http block.
This is mutually exclusive with using httpConfig for specifying the whole
http block verbatim.
";
}; };
stateDir = mkOption { stateDir = mkOption {
@ -86,8 +292,59 @@ in
description = "Group account under which nginx runs."; description = "Group account under which nginx runs.";
}; };
}; serverTokens = mkOption {
type = types.bool;
default = false;
description = "Show nginx version in headers and error pages.";
};
clientMaxBodySize = mkOption {
type = types.string;
default = "10m";
description = "Set nginx global client_max_body_size.";
};
sslCiphers = mkOption {
type = types.str;
default = "EECDH+aRSA+AESGCM:EDH+aRSA:EECDH+aRSA:+AES256:+AES128:+SHA1:!CAMELLIA:!SEED:!3DES:!DES:!RC4:!eNULL";
description = "Ciphers to choose from when negotiating tls handshakes.";
};
sslProtocols = mkOption {
type = types.str;
default = "TLSv1.2";
example = "TLSv1 TLSv1.1 TLSv1.2";
description = "Allowed TLS protocol versions.";
};
sslDhparam = mkOption {
type = types.nullOr types.path;
default = null;
example = "/path/to/dhparams.pem";
description = "Path to DH parameters file.";
};
virtualHosts = mkOption {
type = types.attrsOf (types.submodule (import ./vhost-options.nix {
inherit lib;
}));
default = {
localhost = {};
};
example = literalExample ''
{
"hydra.example.com" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3000";
};
};
};
'';
description = "Declarative vhost config";
};
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -97,7 +354,6 @@ in
description = "Nginx Web Server"; description = "Nginx Web Server";
after = [ "network.target" ]; after = [ "network.target" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ nginx ];
preStart = preStart =
'' ''
mkdir -p ${cfg.stateDir}/logs mkdir -p ${cfg.stateDir}/logs
@ -105,14 +361,23 @@ in
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir} chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
''; '';
serviceConfig = { serviceConfig = {
ExecStart = "${nginx}/bin/nginx -c ${configFile} -p ${cfg.stateDir}"; ExecStart = "${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
Restart = "on-failure"; Restart = "always";
RestartSec = "10s"; RestartSec = "10s";
StartLimitInterval = "1min"; StartLimitInterval = "1min";
}; };
}; };
security.acme.certs = filterAttrs (n: v: v != {}) (
mapAttrs (vhostName: vhostConfig:
optionalAttrs vhostConfig.enableACME {
webroot = vhostConfig.acmeRoot;
extraDomains = genAttrs vhostConfig.serverAliases (alias: null);
}
) virtualHosts
);
users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton users.extraUsers = optionalAttrs (cfg.user == "nginx") (singleton
{ name = "nginx"; { name = "nginx";
group = cfg.group; group = cfg.group;

View File

@ -0,0 +1,40 @@
# This file defines the options that can be used both for the Apache
# main server configuration, and for the virtual hosts. (The latter
# has additional options that affect the web server as a whole, like
# the user/group to run under.)
{ lib }:
with lib;
{
options = {
proxyPass = mkOption {
type = types.nullOr types.str;
default = null;
example = "http://www.example.org/";
description = ''
Adds proxy_pass directive and sets default proxy headers Host, X-Real-Ip
and X-Forwarded-For.
'';
};
root = mkOption {
type = types.nullOr types.path;
default = null;
example = "/your/root/directory";
description = ''
Root directory for requests.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
These lines go to the end of the location verbatim.
'';
};
};
}

View File

@ -0,0 +1,140 @@
# This file defines the options that can be used both for the Apache
# main server configuration, and for the virtual hosts. (The latter
# has additional options that affect the web server as a whole, like
# the user/group to run under.)
{ lib }:
with lib;
{
options = {
serverAliases = mkOption {
type = types.listOf types.str;
default = [];
example = ["www.example.org" "example.org"];
description = ''
Additional names of virtual hosts served by this virtual host configuration.
'';
};
port = mkOption {
type = types.nullOr types.int;
default = null;
description = ''
Port for the server. Defaults to 80 for http
and 443 for https (i.e. when enableSSL is set).
'';
};
enableACME = mkOption {
type = types.bool;
default = false;
description = "Whether to ask Let's Encrypt to sign a certificate for this vhost.";
};
acmeRoot = mkOption {
type = types.str;
default = "/var/lib/acme/acme-challenge";
description = "Directory to store certificates and keys managed by the ACME service.";
};
acmeFallbackHost = mkOption {
type = types.str;
default = "0.0.0.0";
description = ''
Host which to proxy requests to if acme challenge is not found. Useful
if you want multiple hosts to be able to verify the same domain name.
'';
};
enableSSL = mkOption {
type = types.bool;
default = false;
description = "Whether to enable SSL (https) support.";
};
forceSSL = mkOption {
type = types.bool;
default = false;
description = "Whether to always redirect to https.";
};
sslCertificate = mkOption {
type = types.path;
example = "/var/host.cert";
description = "Path to server SSL certificate.";
};
sslCertificateKey = mkOption {
type = types.path;
example = "/var/host.key";
description = "Path to server SSL certificate key.";
};
root = mkOption {
type = types.nullOr types.path;
default = null;
example = "/data/webserver/docs";
description = ''
The path of the web root directory.
'';
};
default = mkOption {
type = types.bool;
default = false;
description = ''
Makes this vhost the default.
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
These lines go to the end of the vhost verbatim.
'';
};
globalRedirect = mkOption {
type = types.nullOr types.str;
default = null;
example = http://newserver.example.org/;
description = ''
If set, all requests for this host are redirected permanently to
the given URL.
'';
};
basicAuth = mkOption {
type = types.attrsOf types.str;
default = {};
example = literalExample ''
{
user = "password";
};
'';
description = ''
Basic Auth protection for a vhost.
WARNING: This is implemented to store the password in plain text in the
nix store.
'';
};
locations = mkOption {
type = types.attrsOf (types.submodule (import ./location-options.nix {
inherit lib;
}));
default = {};
example = literalExample ''
{
"/" = {
proxyPass = "http://localhost:3000";
};
};
'';
description = "Declarative location config";
};
};
}

View File

@ -7,7 +7,7 @@ with import ../lib;
let let
version = builtins.readFile ../.version; version = fileContents ../.version;
versionSuffix = versionSuffix =
(if stableBranch then "." else "pre") + "${toString nixpkgs.revCount}.${nixpkgs.shortRev}"; (if stableBranch then "." else "pre") + "${toString nixpkgs.revCount}.${nixpkgs.shortRev}";
@ -96,7 +96,6 @@ in rec {
manual = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manual); manual = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manual);
manualEpub = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualEpub)); manualEpub = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualEpub));
manualPDF = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manualPDF)).x86_64-linux;
manpages = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manpages); manpages = buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.manpages);
options = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux; options = (buildFromConfig ({ pkgs, ... }: { }) (config: config.system.build.manual.optionsJSON)).x86_64-linux;

View File

@ -22,7 +22,7 @@ pythonPackages.buildPythonApplication rec {
]; ];
propagatedBuildInputs = with pythonPackages; [ propagatedBuildInputs = with pythonPackages; [
gst-python pygobject3 pykka tornado requests2 gst-python pygobject3 pykka tornado requests2 dbus
]; ];
# There are no tests # There are no tests

View File

@ -2,20 +2,19 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "zam-plugins-${version}"; name = "zam-plugins-${version}";
version = "3.6"; version = "3.7";
src = fetchgit { src = fetchgit {
url = "https://github.com/zamaudio/zam-plugins.git"; url = "https://github.com/zamaudio/zam-plugins.git";
deepClone = true; deepClone = true;
rev = "91fe56931a3e57b80f18c740d2dde6b44f962aee"; rev = "932046905a57f698406318765a60807a1f81257d";
sha256 = "1ldrqh6nk0m1axb553wjp1gfznw8b6b3k0v0z1jdwy425sl6g07d"; sha256 = "0zgkmq3jgysrsb6cm6sfbgqpgfpwv8nxlgkqm29zzvb97j56bm7z";
}; };
buildInputs = [ boost libX11 mesa liblo libjack2 ladspaH lv2 pkgconfig rubberband libsndfile ]; buildInputs = [ boost libX11 mesa liblo libjack2 ladspaH lv2 pkgconfig rubberband libsndfile ];
patchPhase = '' patchPhase = ''
patchShebangs ./dpf/utils/generate-ttl.sh patchShebangs ./dpf/utils/generate-ttl.sh
substituteInPlace Makefile --replace "ZaMaximX2" "ZaMaximX2 ZamPiano ZamChild670"
''; '';
makeFlags = [ makeFlags = [

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "atom-${version}"; name = "atom-${version}";
version = "1.8.0"; version = "1.9.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb"; url = "https://github.com/atom/atom/releases/download/v${version}/atom-amd64.deb";
sha256 = "0x73n64y3jfwbwg6s9pmsajryrjrrx1a0dzf3ff6dbi5gvv950xi"; sha256 = "0hhv1yfs2h5x86pjbkbdg1mn15afdd3baddwpf3p0fl8x2gv9z7m";
name = "${name}.deb"; name = "${name}.deb";
}; };

View File

@ -1,9 +1,9 @@
{ stdenv { kdeDerivation
, lib , lib
, fetchgit , fetchgit
, extra-cmake-modules , ecm
, kdoctools , kdoctools
, makeQtWrapper , kdeWrapper
, qtscript , qtscript
, kconfig , kconfig
, kcrash , kcrash
@ -13,54 +13,55 @@
, kiconthemes , kiconthemes
, kinit , kinit
, khtml , khtml
, konsole
, kparts , kparts
, ktexteditor , ktexteditor
, kwindowsystem , kwindowsystem
, poppler , poppler
}: }:
stdenv.mkDerivation rec { let
name = "kile-${version}"; unwrapped =
version = "2016-07-02"; kdeDerivation rec {
name = "kile-${version}";
version = "2016-07-02";
src = fetchgit { src = fetchgit {
url = git://anongit.kde.org/kile.git; url = git://anongit.kde.org/kile.git;
rev = "d38bc7069667119cc891b351188484ca6fb88973"; rev = "d38bc7069667119cc891b351188484ca6fb88973";
sha256 = "1nha71i16fs7nq2812b5565nbmbsbs3ak5czas6xg1dg5bsvdqh8"; sha256 = "1nha71i16fs7nq2812b5565nbmbsbs3ak5czas6xg1dg5bsvdqh8";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ ecm kdoctools ];
extra-cmake-modules
kdoctools
makeQtWrapper
];
buildInputs = [ buildInputs = [
qtscript kconfig
kconfig kcrash
kcrash kdbusaddons
kdbusaddons kdelibs4support
kdelibs4support kdoctools
kdoctools kguiaddons
kguiaddons kiconthemes
kiconthemes kinit
kinit khtml
khtml kparts
kparts ktexteditor
ktexteditor kwindowsystem
kwindowsystem poppler
poppler qtscript
]; ];
postInstall = '' meta = {
wrapQtProgram "$out/bin/kile" description = "Kile is a user friendly TeX/LaTeX authoring tool for the KDE desktop environment";
''; homepage = https://www.kde.org/applications/office/kile/;
maintainers = with lib.maintainers; [ fridh ];
meta = { license = lib.licenses.gpl2Plus;
description = "Kile is a user friendly TeX/LaTeX authoring tool for the KDE desktop environment"; };
homepage = https://www.kde.org/applications/office/kile/; };
maintainers = with lib.maintainers; [ fridh ]; in
license = lib.licenses.gpl2Plus; kdeWrapper unwrapped
}; {
targets = [ "bin/kile" ];
paths = [ konsole.unwrapped ];
} }

View File

@ -1,15 +1,16 @@
{ stdenv, fetchurl, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl { stdenv, fetchurl, gdal, cmake, qt4, flex, bison, proj, geos, xlibsWrapper, sqlite, gsl
, qwt, fcgi, pythonPackages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper , qwt, fcgi, pythonPackages, libspatialindex, libspatialite, qscintilla, postgresql, makeWrapper
, qjson, qca2, txt2tags
, withGrass ? false, grass , withGrass ? false, grass
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "qgis-2.10.1"; name = "qgis-2.16.1";
buildInputs = [ gdal qt4 flex bison proj geos xlibsWrapper sqlite gsl qwt qscintilla buildInputs = [ gdal qt4 flex bison proj geos xlibsWrapper sqlite gsl qwt qscintilla
fcgi libspatialindex libspatialite postgresql ] ++ fcgi libspatialindex libspatialite postgresql qjson qca2 txt2tags ] ++
(stdenv.lib.optional withGrass grass) ++ (stdenv.lib.optional withGrass grass) ++
(with pythonPackages; [ numpy psycopg2 ]) ++ [ pythonPackages.qscintilla ]; (with pythonPackages; [ numpy psycopg2 requests2 ]) ++ [ pythonPackages.qscintilla ];
nativeBuildInputs = [ cmake makeWrapper ]; nativeBuildInputs = [ cmake makeWrapper ];
@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "http://qgis.org/downloads/${name}.tar.bz2"; url = "http://qgis.org/downloads/${name}.tar.bz2";
sha256 = "79119b54642edaffe3cda513531eb7b81913e013954a49c6d3b21c8b00143307"; sha256 = "4a526cd8ae76fc06bb2b6a158e86db5dc0c94545137a8233cd465ef867acdc8b";
}; };
cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}"; cmakeFlags = stdenv.lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}";

View File

@ -0,0 +1,34 @@
{ stdenv, fetchgit, cmake, perl
, alsaLib, libevdev, libopus, libudev, SDL2
, ffmpeg, pkgconfig, xorg, libvdpau, libpulseaudio, libcec
, curl, expat, avahi, enet, libuuid
}:
stdenv.mkDerivation rec {
name = "moonlight-embedded-${version}";
version = "2.2.1";
# fetchgit used to ensure submodules are available
src = fetchgit {
url = "git://github.com/irtimmer/moonlight-embedded";
rev = "refs/tags/v${version}";
sha256 = "0m1114dsz44rvq402b4v5ib2cwj2vbasir0l8vi0q5iymwmsvxj4";
};
outputs = [ "out" "doc" ];
nativeBuildInputs = [ cmake perl ];
buildInputs = [
alsaLib libevdev libopus libudev SDL2
ffmpeg pkgconfig xorg.libxcb libvdpau libpulseaudio libcec
xorg.libpthreadstubs curl expat avahi enet libuuid
];
meta = with stdenv.lib; {
description = "Open source implementation of NVIDIA's GameStream";
homepage = https://github.com/irtimmer/moonlight-embedded;
license = licenses.gpl3;
maintainers = [ maintainers.globin ];
platforms = platforms.linux;
};
}

View File

@ -1,8 +1,9 @@
{ stdenv { kdeDerivation
, lib , lib
, fetchurl , fetchurl
, cmake , kdoctools
, extra-cmake-modules , kdeWrapper
, ecm
, karchive , karchive
, kcrash , kcrash
, kdbusaddons , kdbusaddons
@ -14,53 +15,49 @@
, konsole , konsole
, kparts , kparts
, kwindowsystem , kwindowsystem
, makeQtWrapper
}: }:
let let
pname = "yakuake"; unwrapped = let
version = "3.0.2"; pname = "yakuake";
version = "3.0.2";
in kdeDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "http://download.kde.org/stable/${pname}/${version}/src/${name}.tar.xz";
sha256 = "0vcdji1k8d3pz7k6lkw8ighkj94zff2l2cf9v1avf83f4hjyfhg5";
};
buildInputs = [
karchive
kcrash
kdbusaddons
ki18n
kiconthemes
knewstuff
knotifications
knotifyconfig
kparts
kwindowsystem
];
nativeBuildInputs = [
ecm kdoctools
];
meta = {
homepage = https://yakuake.kde.org;
description = "Quad-style terminal emulator for KDE";
maintainers = with lib.maintainers; [ fridh ];
};
};
in in
stdenv.mkDerivation rec { kdeWrapper unwrapped
name = "${pname}-${version}"; {
targets = [ "bin/yakuake" ];
src = fetchurl { paths = [ konsole.unwrapped ];
url = "http://download.kde.org/stable/${pname}/${version}/src/${name}.tar.xz";
sha256 = "0vcdji1k8d3pz7k6lkw8ighkj94zff2l2cf9v1avf83f4hjyfhg5";
};
buildInputs = [
cmake
extra-cmake-modules
karchive
kcrash
kdbusaddons
ki18n
kiconthemes
knewstuff
knotifications
knotifyconfig
kparts
kwindowsystem
];
nativeBuildInputs = [
extra-cmake-modules
makeQtWrapper
];
propagatedUserEnvPkgs = [
konsole
];
postInstall = ''
wrapQtProgram "$out/bin/yakuake"
'';
meta = {
homepage = https://yakuake.kde.org;
description = "Quad-style terminal emulator for KDE";
maintainers = with lib.maintainers; [ fridh ];
};
} }

View File

@ -1,14 +1,14 @@
{ stdenv { kdeDerivation
, lib , lib
, fetchurl , fetchurl
, cmake , ecm
, extra-cmake-modules
, kbookmarks , kbookmarks
, karchive , karchive
, kconfig , kconfig
, kconfigwidgets , kconfigwidgets
, kcoreaddons , kcoreaddons
, kdbusaddons , kdbusaddons
, kdeWrapper
, kdoctools , kdoctools
, kemoticons , kemoticons
, kglobalaccel , kglobalaccel
@ -24,61 +24,58 @@
, makeQtWrapper , makeQtWrapper
, solid , solid
, sonnet , sonnet
, phonon}: , phonon
}:
let let
pn = "konversation"; unwrapped = let
v = "1.6"; pname = "konversation";
in version = "1.6.1";
in kdeDerivation rec {
name = "${pname}-${version}";
stdenv.mkDerivation rec { src = fetchurl {
name = "${pn}-${v}"; url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
sha256 = "28346d6629261a5328c43ffa09c12e37743b3ef4f4bc4c411d39bc19f7bf06c6";
};
src = fetchurl { buildInputs = [
url = "mirror://kde/stable/${pn}/${v}/src/${name}.tar.xz"; kbookmarks
sha256 = "789fd75644bf54606778971310433dbe2bc01ac0917b34bc4e8cac88e204d5b6"; karchive
}; kconfig
kconfigwidgets
buildInputs = [ kcoreaddons
cmake kdbusaddons
extra-cmake-modules kdoctools
kbookmarks kemoticons
karchive kglobalaccel
kconfig ki18n
kconfigwidgets kiconthemes
kcoreaddons kidletime
kdbusaddons kitemviews
kdoctools knotifications
kemoticons knotifyconfig
kglobalaccel kio
ki18n kparts
kiconthemes kwallet
kidletime solid
kitemviews sonnet
knotifications phonon
knotifyconfig ];
kio
kparts nativeBuildInputs = [
kwallet ecm
solid kdoctools
sonnet ];
phonon
]; meta = {
description = "Integrated IRC client for KDE";
nativeBuildInputs = [ license = with lib.licenses; [ gpl2 ];
extra-cmake-modules maintainers = with lib.maintainers; [ fridh ];
kdoctools homepage = https://konversation.kde.org;
makeQtWrapper };
];
postInstall = ''
wrapQtProgram "$out/bin/konversation"
'';
meta = {
description = "Integrated IRC client for KDE";
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ fridh ];
homepage = https://konversation.kde.org;
}; };
in kdeWrapper unwrapped {
targets = [ "bin/konversation" ];
} }

View File

@ -5,10 +5,12 @@
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "notmuch-0.22"; version = "0.22";
name = "notmuch-${version}";
passthru = { passthru = {
pythonSourceRoot = "${name}/bindings/python"; pythonSourceRoot = "${name}/bindings/python";
inherit version;
}; };
src = fetchurl { src = fetchurl {

View File

@ -0,0 +1,46 @@
{ stdenv, lib, perl, perlPackages, makeWrapper, coreutils, notmuch }:
stdenv.mkDerivation rec {
name = "notmuch-mutt-${version}";
version = notmuch.version;
outputs = [ "out" ];
dontStrip = true;
buildInputs = [
perl
makeWrapper
] ++ (with perlPackages; [
FileRemove
DigestSHA1
Later
MailBox
MailMaildir
MailTools
StringShellQuote
TermReadLineGnu
]);
src = notmuch.src;
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
installPhase = ''
${coreutils}/bin/install -Dm755 \
./contrib/notmuch-mutt/notmuch-mutt \
$out/bin/notmuch-mutt
wrapProgram $out/bin/notmuch-mutt \
--prefix PERL5LIB : $PERL5LIB
'';
meta = with lib; {
inherit version;
description = "Mutt support for notmuch";
homepage = http://notmuchmua.org/;
license = with licenses; mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

View File

@ -76,7 +76,9 @@ in stdenv.mkDerivation rec {
# For some reason librdf_redland sometimes refers to rasqal.h instead # For some reason librdf_redland sometimes refers to rasqal.h instead
# of rasqal/rasqal.h # of rasqal/rasqal.h
NIX_CFLAGS_COMPILE="-I${librdf_rasqal}/include/rasqal"; # curl upgrade to 7.50.0 (#17152) changes the libcurl headers slightly and
# therefore requires the -fpermissive flag until this package gets updated
NIX_CFLAGS_COMPILE="-I${librdf_rasqal}/include/rasqal -fpermissive";
# If we call 'configure', 'make' will then call configure again without parameters. # If we call 'configure', 'make' will then call configure again without parameters.
# It's their system. # It's their system.

View File

@ -76,7 +76,9 @@ in stdenv.mkDerivation rec {
# For some reason librdf_redland sometimes refers to rasqal.h instead # For some reason librdf_redland sometimes refers to rasqal.h instead
# of rasqal/rasqal.h # of rasqal/rasqal.h
NIX_CFLAGS_COMPILE="-I${librdf_rasqal}/include/rasqal"; # curl upgrade to 7.50.0 (#17152) changes the libcurl headers slightly and
# therefore requires the -fpermissive flag until this package gets updated
NIX_CFLAGS_COMPILE="-I${librdf_rasqal}/include/rasqal -fpermissive";
# If we call 'configure', 'make' will then call configure again without parameters. # If we call 'configure', 'make' will then call configure again without parameters.
# It's their system. # It's their system.

View File

@ -2,7 +2,7 @@
, kernel ? pkgs.linux , kernel ? pkgs.linux
, img ? "bzImage" , img ? "bzImage"
, rootModules ? , rootModules ?
[ "virtio_pci" "virtio_blk" "virtio_balloon" "ext4" "unix" "9p" "9pnet_virtio" "rtc_cmos" ] [ "virtio_pci" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "rtc_cmos" ]
}: }:
with pkgs; with pkgs;
@ -218,6 +218,7 @@ rec {
${qemuProg} \ ${qemuProg} \
${lib.optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \ ${lib.optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \
-nographic -no-reboot \ -nographic -no-reboot \
-device virtio-rng-pci \
-virtfs local,path=/nix/store,security_model=none,mount_tag=store \ -virtfs local,path=/nix/store,security_model=none,mount_tag=store \
-virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \ -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
-drive file=$diskImage,if=virtio,cache=unsafe,werror=report \ -drive file=$diskImage,if=virtio,cache=unsafe,werror=report \

View File

@ -4,7 +4,7 @@
baloo, baloo-widgets, dolphin-plugins, kactivities, kbookmarks, kcmutils, baloo, baloo-widgets, dolphin-plugins, kactivities, kbookmarks, kcmutils,
kcompletion, kconfig, kcoreaddons, kdelibs4support, kdbusaddons, kcompletion, kconfig, kcoreaddons, kdelibs4support, kdbusaddons,
kfilemetadata, ki18n, kiconthemes, kinit, kio, knewstuff, knotifications, kfilemetadata, ki18n, kiconthemes, kinit, kio, knewstuff, knotifications,
kparts, ktexteditor, kwindowsystem, phonon, solid konsole, kparts, ktexteditor, kwindowsystem, phonon, solid
}: }:
let let
@ -27,5 +27,5 @@ in
kdeWrapper unwrapped kdeWrapper unwrapped
{ {
targets = [ "bin/dolphin" ]; targets = [ "bin/dolphin" ];
paths = [ dolphin-plugins ]; paths = [ dolphin-plugins konsole.unwrapped ];
} }

View File

@ -1,10 +1,10 @@
{ {
kdeApp, lib, kdeWrapper, kdeApp, lib, kdeWrapper,
ecm, kdoctools, ecm, kdoctools,
kactivities, kconfig, kcrash, kguiaddons, kiconthemes, ki18n, kinit, kactivities, kconfig, kcrash, kdbusaddons, kguiaddons, kiconthemes, ki18n,
kjobwidgets, kio, kparts, ktexteditor, kwindowsystem, kxmlgui, kdbusaddons, kinit, kio, kitemmodels, kjobwidgets, knewstuff, knotifications, konsole,
kwallet, plasma-framework, kitemmodels, knotifications, qtscript, kparts, ktexteditor, kwindowsystem, kwallet, kxmlgui, libgit2,
threadweaver, knewstuff, libgit2 plasma-framework, qtscript, threadweaver
}: }:
let let
@ -24,4 +24,8 @@ let
]; ];
}; };
in in
kdeWrapper unwrapped { targets = [ "bin/kate" "bin/kwrite" ]; } kdeWrapper unwrapped
{
targets = [ "bin/kate" "bin/kwrite" ];
paths = [ konsole.unwrapped ];
}

View File

@ -1,29 +1,35 @@
{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2 }: {stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2, coreutils }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "ponyc-0.2.1"; name = "ponyc-2016-07-26";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CausalityLtd"; owner = "ponylang";
repo = "ponyc"; repo = "ponyc";
rev = "0.2.1"; rev = "4eec8a9b0d9936b2a0249bd17fd7a2caac6aaa9c";
sha256 = "1wmvqrj9v2kjqha9fcs10vfnhdxhc3rf67wpn36ldhs1hq0k25jy"; sha256 = "184x2jivp7826i60rf0dpx0a9dg5rsj56dv0cll28as4nyqfmna2";
}; };
buildInputs = [ llvm makeWrapper ]; buildInputs = [ llvm makeWrapper ];
makeFlags = [ "config=release" ]; # Disable problematic networking tests
doCheck = true; patches = [ ./disable-tests.patch ];
checkTarget = "test";
patchPhase = ''
sed 's|/usr/lib/x86_64-linux-gnu/|${glibc.out}/lib/|g' -i src/libponyc/codegen/genexe.c
sed 's|/lib/x86_64-linux-gnu/|${stdenv.cc.cc.lib}/lib/|g' -i src/libponyc/codegen/genexe.c
'';
preBuild = '' preBuild = ''
export LLVM_CONFIG=${llvm}/bin/llvm-config # Fix tests
''; substituteInPlace packages/process/_test.pony \
--replace "/bin/cat" "${coreutils}/bin/cat"
export LLVM_CONFIG=${llvm}/bin/llvm-config
'';
makeFlags = [ "config=release" ];
enableParallelBuilding = true;
doCheck = true;
checkTarget = "test";
preCheck = '' preCheck = ''
export LIBRARY_PATH="$out/lib:${openssl.out}/lib:${pcre2}/lib" export LIBRARY_PATH="$out/lib:${openssl.out}/lib:${pcre2}/lib"

View File

@ -0,0 +1,16 @@
diff --git a/packages/net/_test.pony b/packages/net/_test.pony
index d6c3e56..dc37dd9 100644
--- a/packages/net/_test.pony
+++ b/packages/net/_test.pony
@@ -7,11 +7,6 @@ actor Main is TestList
fun tag tests(test: PonyTest) =>
test(_TestReadBuffer)
test(_TestWriteBuffer)
- test(_TestBroadcast)
- ifdef not windows then
- test(_TestTCPExpect)
- test(_TestTCPWritev)
- end
class iso _TestReadBuffer is UnitTest
"""

View File

@ -99,8 +99,8 @@ let
inherit zlibSupport; inherit zlibSupport;
isPy2 = true; isPy2 = true;
isPy26 = true; isPy26 = true;
buildEnv = callPackage ../wrapper.nix { python = self; }; buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python26Packages; }; withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python26Packages; };
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = libPrefix; executable = libPrefix;
sitePackages = "lib/${libPrefix}/site-packages"; sitePackages = "lib/${libPrefix}/site-packages";

View File

@ -160,8 +160,8 @@ let
inherit zlibSupport; inherit zlibSupport;
isPy2 = true; isPy2 = true;
isPy27 = true; isPy27 = true;
buildEnv = callPackage ../wrapper.nix { python = self; }; buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python27Packages; }; withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python27Packages; };
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = libPrefix; executable = libPrefix;
sitePackages = "lib/${libPrefix}/site-packages"; sitePackages = "lib/${libPrefix}/site-packages";

View File

@ -88,8 +88,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = "python3.3m"; executable = "python3.3m";
buildEnv = callPackage ../wrapper.nix { python = self; }; buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python33Packages; }; withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python33Packages; };
isPy3 = true; isPy3 = true;
isPy33 = true; isPy33 = true;
is_py3k = true; # deprecated is_py3k = true; # deprecated

View File

@ -111,8 +111,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = "python3.4m"; executable = "python3.4m";
buildEnv = callPackage ../wrapper.nix { python = self; }; buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python34Packages; }; withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python34Packages; };
isPy3 = true; isPy3 = true;
isPy34 = true; isPy34 = true;
is_py3k = true; # deprecated is_py3k = true; # deprecated

View File

@ -111,8 +111,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = "python${majorVersion}m"; executable = "python${majorVersion}m";
buildEnv = callPackage ../wrapper.nix { python = self; }; buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python35Packages; }; withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python35Packages; };
isPy3 = true; isPy3 = true;
isPy35 = true; isPy35 = true;
is_py3k = true; # deprecated is_py3k = true; # deprecated

View File

@ -115,8 +115,8 @@ stdenv.mkDerivation {
tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null); tkSupport = (tk != null) && (tcl != null) && (libX11 != null) && (xproto != null);
libPrefix = "python${majorVersion}"; libPrefix = "python${majorVersion}";
executable = "python${majorVersion}m"; executable = "python${majorVersion}m";
buildEnv = callPackage ../wrapper.nix { python = self; }; buildEnv = callPackage ../../wrapper.nix { python = self; };
withPackages = import ../with-packages.nix { inherit buildEnv; pythonPackages = python36Packages; }; withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = python36Packages; };
isPy3 = true; isPy3 = true;
isPy35 = true; isPy35 = true;
is_py3k = true; # deprecated is_py3k = true; # deprecated

View File

@ -117,10 +117,10 @@ let
inherit zlibSupport libPrefix; inherit zlibSupport libPrefix;
executable = "pypy"; executable = "pypy";
isPypy = true; isPypy = true;
buildEnv = callPackage ../python/wrapper.nix { python = self; }; buildEnv = callPackage ../../wrapper.nix { python = self; };
interpreter = "${self}/bin/${executable}"; interpreter = "${self}/bin/${executable}";
sitePackages = "site-packages"; sitePackages = "site-packages";
withPackages = import ../python/with-packages.nix { inherit buildEnv; pythonPackages = pypyPackages; }; withPackages = import ../../with-packages.nix { inherit buildEnv; pythonPackages = pypyPackages; };
}; };
enableParallelBuilding = true; # almost no parallelization without STM enableParallelBuilding = true; # almost no parallelization without STM

View File

@ -6,12 +6,12 @@
}: }:
composableDerivation.composableDerivation {} (fixed: rec { composableDerivation.composableDerivation {} (fixed: rec {
version = "2.0.2"; version = "2.1.1";
name = "gdal-${version}"; name = "gdal-${version}";
src = fetchurl { src = fetchurl {
url = "http://download.osgeo.org/gdal/${version}/${name}.tar.gz"; url = "http://download.osgeo.org/gdal/${version}/${name}.tar.gz";
sha256 = "db7722caf8d9dd798ec18012b9cacf40a518918466126a88b9fd277bd7d40cc4"; sha256 = "55fc6ffbe76e9d2e7e6cf637010e5d4bba6a966d065f40194ff798544198236b";
}; };
buildInputs = [ unzip libjpeg libtiff libpng proj openssl ] buildInputs = [ unzip libjpeg libtiff libpng proj openssl ]
@ -20,12 +20,6 @@ composableDerivation.composableDerivation {} (fixed: rec {
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];
patches = [
# This ensures that the python package is installed into gdal's prefix,
# rather than trying to install into python's prefix.
./python.patch
];
# Don't use optimization for gcc >= 4.3. That's said to be causing segfaults. # Don't use optimization for gcc >= 4.3. That's said to be causing segfaults.
# Unset CC and CXX as they confuse libtool. # Unset CC and CXX as they confuse libtool.
preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX"; preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";

View File

@ -13,6 +13,10 @@ stdenv.mkDerivation rec {
buildInputs = [ boost cmake curl ]; buildInputs = [ boost cmake curl ];
# curl upgrade to 7.50.0 (#17152) broke the curl mock tests, disabling for now
# upstream bug raised https://tickets.puppetlabs.com/browse/LTH-108
cmakeFlags = [ "-DLEATHERMAN_MOCK_CURL=OFF" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/puppetlabs/leatherman/; homepage = https://github.com/puppetlabs/leatherman/;
description = "A collection of C++ and CMake utility libraries"; description = "A collection of C++ and CMake utility libraries";

View File

@ -1,6 +1,8 @@
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty { stdenv, lib, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg , zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
, minimal ? false, qt4Support ? false, qt4 ? null, qt5Support ? false, qtbase ? null , minimal ? false
, qt4Support ? false, qt4 ? null
, qt5Support ? false, qtbase ? null
, utils ? false, suffix ? "glib" , utils ? false, suffix ? "glib"
}: }:
@ -31,6 +33,9 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ]; NIX_CFLAGS_COMPILE = [ "-DQT_NO_DEBUG" ];
# Any package depending on Qt >= 5.7 must build using the C++11 standard.
CXXFLAGS = lib.optional qt5Support "-std=c++11";
configureFlags = with lib; configureFlags = with lib;
[ [
"--enable-xpdf-headers" "--enable-xpdf-headers"

View File

@ -28,5 +28,6 @@ stdenv.mkDerivation rec {
homepage = http://pypi.python.org/pypi/setuptools; homepage = http://pypi.python.org/pypi/setuptools;
license = with lib.licenses; [ psfl zpt20 ]; license = with lib.licenses; [ psfl zpt20 ];
platforms = platforms.all; platforms = platforms.all;
priority = 10;
}; };
} }

View File

@ -1,29 +1,25 @@
{ stdenv, fetchurl, builderDefs, libX11, zlib, xproto, mesa ? null, freeglut ? null }: { stdenv, fetchurl, libX11, zlib, xproto, mesa ? null, freeglut ? null }:
let localDefs = builderDefs.passthru.function {
src = /* put a fetchurl here */
fetchurl {
url = http://savannah.nongnu.org/download/construo/construo-0.2.2.tar.gz;
sha256 = "0c661rjasax4ykw77dgqj39jhb4qi48m0bhhdy42vd5a4rfdrcck";
};
buildInputs = [ libX11 zlib xproto ]
++ stdenv.lib.optional (mesa != null) mesa
++ stdenv.lib.optional (freeglut != null) freeglut;
preConfigure = builderDefs.stringsWithDeps.fullDepEntry (''
sed -e 's/math[.]h/cmath/' -i vector.cxx
sed -e 's/games/bin/' -i Makefile.in
sed -e '1i\#include <stdlib.h>' -i construo_main.cxx -i command_line.cxx -i config.hxx
sed -e '1i\#include <string.h>' -i command_line.cxx -i lisp_reader.cxx -i unix_system.cxx \
-i world.cxx construo_main.cxx
'') ["doUnpack" "minInit"];
};
in with localDefs;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "construo-0.2.2"; name = "construo-${version}";
builder = writeScript (name + "-builder") version = "0.2.3";
(textClosure localDefs ["preConfigure" "doConfigure" "doMakeInstall" "doForceShare" "doPropagate"]);
meta = { src = fetchurl {
description = "Masses and springs simulation game"; url = "https://github.com/Construo/construo/releases/download/v${version}/${name}.tar.gz";
}; sha256 = "1wmj527hbj1qv44cdsj6ahfjrnrjwg2dp8gdick8nd07vm062qxa";
};
buildInputs = [ libX11 zlib xproto ]
++ stdenv.lib.optional (mesa != null) mesa
++ stdenv.lib.optional (freeglut != null) freeglut;
preConfigure = ''
substituteInPlace src/Makefile.in \
--replace games bin
'';
meta = {
description = "Masses and springs simulation game";
homepage = http://fs.fsf.org/construo/;
};
} }

View File

@ -0,0 +1,38 @@
{ stdenv, fetchurl, cmake, SDL, qt4 }:
let mirror = "http://download.holdingnuts.net";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "holdingnuts";
version = "0.0.5";
src = fetchurl {
url = "${mirror}/release/${version}/${name}.tar.bz2";
sha256 = "0iw25jmnqzscg34v66d4zz70lvgjp4l7gi16nna6491xnqha5a8g";
};
patches = [
(fetchurl {
url = "${mirror}/patches/holdingnuts-0.0.5-wheel.patch";
sha256 = "0hap5anxgc19s5qi64mjpi3wpgphy4dqdxqw34q19dw3gwxw5g8n";
})
(fetchurl {
url = "${mirror}/patches/holdingnuts-qpixmapcache-workaround.patch";
sha256 = "15cf9j9mdm85f0h7w5f5852ic7xpim0243yywkd2qrfp37mi93pd";
})
];
postPatch = ''
substituteInPlace src/system/SysAccess.c --replace /usr/share $out/share
'';
buildInputs = [ cmake SDL qt4 ];
meta = with stdenv.lib; {
homepage = http://www.holdingnuts.net/;
description = "Open Source Poker client and server";
license = licenses.gpl3;
maintainers = with maintainers; [ obadz ];
platforms = platforms.all;
};
}

View File

@ -0,0 +1,13 @@
{ runCommand, fetchurl, rpm, cpio }: let
version = "1.3-1";
src = fetchurl {
url = "http://downloads.dell.com/printer/Dell-5130cdn-Color-Laser-${version}.noarch.rpm";
md5 = "7fb7122e67e40b99deb9665d88df62d1";
};
in runCommand "Dell-5130cdn-Color-Laser-1.3-1" {} ''
mkdir -p usr/share/cups/model
${rpm}/bin/rpm2cpio ${src} | ${cpio}/bin/cpio -i
mkdir -p $out/share/ppd
mv usr/share/cups/model/Dell $out/share/ppd
''

View File

@ -1,43 +1,47 @@
{ stdenv, fetchurl, kernel }: { stdenv, fetchurl, kernel }:
let let
version = "6.30.223.248"; version = "6.30.223.271";
hashes = {
i686-linux = "1kaqa2dw3nb8k23ffvx46g8jj3wdhz8xa6jp1v3wb35cjfr712sg";
x86_64-linux = "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz";
};
arch = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "_64";
tarballVersion = stdenv.lib.replaceStrings ["."] ["_"] version;
tarball = "hybrid-v35${arch}-nodebug-pcoem-${tarballVersion}.tar.gz";
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "broadcom-sta-${version}-${kernel.version}"; name = "broadcom-sta-${version}-${kernel.version}";
src = if stdenv.system == "i686-linux" then ( src = fetchurl {
fetchurl { url = "http://www.broadcom.com/docs/linux_sta/${tarball}";
url = http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_248.tar.gz; sha256 = hashes.${stdenv.system};
sha256 = "1bd13pq5hj4yzp32rx71sg1i5wkzdsg1s32xsywb48lw88x595mi"; };
} ) else (
fetchurl {
url = http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_248.tar.gz;
sha256 = "08ihbhwnqpnazskw9rlrk0alanp4x70kl8bsy2vg962iq334r69x";
}
);
patches = [ patches = [
./i686-build-failure.patch
./license.patch ./license.patch
./linux-recent.patch ./linux-4.7.patch
./null-pointer-fix.patch
./gcc.patch ./gcc.patch
]; ];
makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}"; makeFlags = "KBASE=${kernel.dev}/lib/modules/${kernel.modDirVersion}";
unpackPhase = '' unpackPhase = ''
sourceRoot=broadcom-sta sourceRoot=broadcom-sta
mkdir "$sourceRoot" mkdir "$sourceRoot"
tar xvf "$src" -C "$sourceRoot" tar xvf "$src" -C "$sourceRoot"
''; '';
installPhase = installPhase = ''
'' binDir="$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/"
binDir="$out/lib/modules/${kernel.modDirVersion}/kernel/net/wireless/" docDir="$out/share/doc/broadcom-sta/"
docDir="$out/share/doc/broadcom-sta/" mkdir -p "$binDir" "$docDir"
mkdir -p "$binDir" "$docDir" cp wl.ko "$binDir"
cp wl.ko "$binDir" cp lib/LICENSE.txt "$docDir"
cp lib/LICENSE.txt "$docDir" '';
'';
meta = { meta = {
description = "Kernel module driver for some Broadcom's wireless cards"; description = "Kernel module driver for some Broadcom's wireless cards";

View File

@ -0,0 +1,18 @@
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c
--- a/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300
+++ b/src/shared/linux_osl.c 2015-11-21 15:20:30.585902518 +0200
@@ -932,7 +932,11 @@
uint cycles;
#if defined(__i386__)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
+ cycles = (u32)rdtsc();
+#else
rdtscl(cycles);
+#endif
#else
cycles = 0;
#endif

View File

@ -0,0 +1,109 @@
Since Linux 4.7, the enum ieee80211_band is no longer used
This shall cause no problem's since both enums ieee80211_band
and nl80211_band were added in the same commit:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
Reference:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:57:36.159340297 -0500
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:58:18.442323435 -0500
@@ -236,7 +236,7 @@
#endif
#define CHAN2G(_channel, _freq, _flags) { \
- .band = IEEE80211_BAND_2GHZ, \
+ .band = NL80211_BAND_2GHZ, \
.center_freq = (_freq), \
.hw_value = (_channel), \
.flags = (_flags), \
@@ -245,7 +245,7 @@
}
#define CHAN5G(_channel, _flags) { \
- .band = IEEE80211_BAND_5GHZ, \
+ .band = NL80211_BAND_5GHZ, \
.center_freq = 5000 + (5 * (_channel)), \
.hw_value = (_channel), \
.flags = (_flags), \
@@ -379,7 +379,7 @@
};
static struct ieee80211_supported_band __wl_band_2ghz = {
- .band = IEEE80211_BAND_2GHZ,
+ .band = NL80211_BAND_2GHZ,
.channels = __wl_2ghz_channels,
.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
.bitrates = wl_g_rates,
@@ -387,7 +387,7 @@
};
static struct ieee80211_supported_band __wl_band_5ghz_a = {
- .band = IEEE80211_BAND_5GHZ,
+ .band = NL80211_BAND_5GHZ,
.channels = __wl_5ghz_a_channels,
.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
.bitrates = wl_a_rates,
@@ -395,7 +395,7 @@
};
static struct ieee80211_supported_band __wl_band_5ghz_n = {
- .band = IEEE80211_BAND_5GHZ,
+ .band = NL80211_BAND_5GHZ,
.channels = __wl_5ghz_n_channels,
.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
.bitrates = wl_a_rates,
@@ -1876,8 +1876,8 @@
wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
#endif
wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
- wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
- wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
wdev->wiphy->cipher_suites = __wl_cipher_suites;
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
@@ -2000,7 +2000,7 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
#else
freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
#endif
@@ -2116,7 +2116,7 @@
return err;
}
chan = wf_chspec_ctlchan(chanspec);
- band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
+ band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
freq = ieee80211_channel_to_frequency(chan, band);
channel = ieee80211_get_channel(wiphy, freq);
cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
@@ -2250,10 +2250,10 @@
join_params->params.chanspec_list[0] =
ieee80211_frequency_to_channel(chan->center_freq);
- if (chan->band == IEEE80211_BAND_2GHZ) {
+ if (chan->band == NL80211_BAND_2GHZ) {
chanspec |= WL_CHANSPEC_BAND_2G;
}
- else if (chan->band == IEEE80211_BAND_5GHZ) {
+ else if (chan->band == NL80211_BAND_5GHZ) {
chanspec |= WL_CHANSPEC_BAND_5G;
}
else {
@@ -2885,7 +2885,7 @@
if (phy == 'n' || phy == 'a' || phy == 'v') {
wiphy = wl_to_wiphy(wl);
- wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
+ wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
}
return err;

View File

@ -1,386 +0,0 @@
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2014-06-26 12:42:08.000000000 +0200
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2015-04-13 13:20:08.140013177 +0200
@@ -63,8 +63,13 @@
static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params);
static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
struct net_device *dev, u8 *mac, struct station_info *sinfo);
+#else
+static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
+ struct net_device *dev, const u8 *mac, struct station_info *sinfo);
+#endif
static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
struct net_device *dev, bool enabled, s32 timeout);
static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
@@ -1387,7 +1392,7 @@
key_endian_to_host(&key);
params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len);
- memcpy(params.key, key.data, params.key_len);
+ memcpy((char *)params.key, key.data, params.key_len);
if ((err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)))) {
return err;
@@ -1421,9 +1426,15 @@
return err;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
static s32
wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac, struct station_info *sinfo)
+#else
+static s32
+wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+ const u8 *mac, struct station_info *sinfo)
+#endif
{
struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
scb_val_t scb_val;
@@ -1441,7 +1452,11 @@
WL_DBG(("Could not get rate (%d)\n", err));
} else {
rate = dtoh32(rate);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
sinfo->filled |= STATION_INFO_TX_BITRATE;
+#else
+ sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+#endif
sinfo->txrate.legacy = rate * 5;
WL_DBG(("Rate %d Mbps\n", (rate / 2)));
}
@@ -1454,7 +1469,11 @@
return err;
}
rssi = dtoh32(scb_val.val);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
sinfo->filled |= STATION_INFO_SIGNAL;
+#else
+ sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+#endif
sinfo->signal = rssi;
WL_DBG(("RSSI %d dBm\n", rssi));
}
@@ -2010,9 +2029,15 @@
notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
notify_ielen = le32_to_cpu(bi->ie_length);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+#else
+ cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
+ 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+#endif
if (unlikely(!cbss))
return -ENOMEM;
@@ -2047,7 +2072,11 @@
}
else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) ||
event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+ cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL);
+#else
cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL);
+#endif
clear_bit(WL_STATUS_CONNECTED, &wl->status);
wl_link_down(wl);
wl_init_prof(wl->profile);
@@ -2071,7 +2100,26 @@
wl_get_assoc_ies(wl);
memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
wl_update_bss_info(wl);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
+ {
+ struct wl_bss_info *bi;
+ u16 bss_info_channel;
+ struct ieee80211_channel *channel;
+ u32 freq;
+
+ bi = (struct wl_bss_info *)(wl->extra_buf + 4);
+ bss_info_channel = bi->ctl_ch ? bi->ctl_ch : CHSPEC_CHANNEL(bi->chanspec);
+
+ freq = ieee80211_channel_to_frequency(bss_info_channel,
+ (bss_info_channel <= CH_MAX_2G_CHANNEL) ?
+ IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
+
+ channel = ieee80211_get_channel(wl_to_wiphy(wl), freq);
+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
+ }
+#else
cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
+#endif
set_bit(WL_STATUS_CONNECTED, &wl->status);
wl->profile->active = true;
}
@@ -2629,7 +2677,15 @@
void wl_cfg80211_detach(struct net_device *ndev)
{
- struct wl_cfg80211_priv *wl = ndev_to_wl(ndev);
+ struct wl_cfg80211_priv *wl;
+ struct wireless_dev *wdev;
+
+ wdev = ndev->ieee80211_ptr;
+ if (wdev == NULL) {
+ printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev);
+ return;
+ }
+ wl = ndev_to_wl(ndev);
wl_deinit_cfg80211_priv(wl);
wl_free_wdev(wl);
--- a/src/wl/sys/wl_dbg.h 2014-06-26 12:42:08.000000000 +0200
+++ b/src/wl/sys/wl_dbg.h 2015-04-13 13:19:52.443345832 +0200
@@ -55,10 +55,12 @@
#define WL_NONE(args)
+#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */
+
#ifdef BCMDBG_ERR
#define WL_ERROR(args) WL_PRINT(args)
#else
-#define WL_ERROR(args)
+#define WL_ERROR(args) FORCE_TRACE_LEVEL args
#endif
#define WL_TRACE(args)
#define WL_APSTA_UPDN(args)
--- a/src/wl/sys/wl_linux.c 2014-06-26 12:42:08.000000000 +0200
+++ b/src/wl/sys/wl_linux.c 2015-04-13 13:19:52.443345832 +0200
@@ -878,7 +878,7 @@
static SIMPLE_DEV_PM_OPS(wl_pm_ops, wl_suspend, wl_resume);
#endif
-static struct pci_driver wl_pci_driver = {
+static struct pci_driver wl_pci_driver __refdata = {
.name = "wl",
.probe = wl_pci_probe,
.remove = __devexit_p(wl_remove),
@@ -1270,6 +1270,7 @@
MFREE(wl->osh, wlif->dev, sizeof(struct net_device));
#else
free_netdev(wlif->dev);
+ wlif->dev = NULL;
#endif
}
@@ -1307,7 +1308,12 @@
dev->priv = priv_link;
#else
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
+#else
+ dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN,
+ ether_setup);
+#endif
if (!dev) {
WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
(wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
@@ -1651,11 +1657,7 @@
}
WL_LOCK(wl);
- if (!capable(CAP_NET_ADMIN)) {
- bcmerror = BCME_EPERM;
- } else {
- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
- }
+ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif);
WL_UNLOCK(wl);
done1:
@@ -2157,8 +2159,8 @@
wlif = WL_DEV_IF(dev);
wl = WL_INFO(dev);
+ skb->prev = NULL;
if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
- skb->prev = NULL;
TXQ_LOCK(wl);
@@ -2455,8 +2457,10 @@
p80211msg_t *phdr;
len = sizeof(p80211msg_t) + oskb->len - D11_PHY_HDR_LEN;
- if ((skb = dev_alloc_skb(len)) == NULL)
+ if ((skb = dev_alloc_skb(len)) == NULL) {
+ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
return;
+ }
skb_put(skb, len);
phdr = (p80211msg_t*)skb->data;
@@ -2535,8 +2539,10 @@
rtap_len = sizeof(wl_radiotap_ht_brcm_2_t);
len = rtap_len + (oskb->len - D11_PHY_HDR_LEN);
- if ((skb = dev_alloc_skb(len)) == NULL)
+ if ((skb = dev_alloc_skb(len)) == NULL) {
+ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
return;
+ }
skb_put(skb, len);
@@ -2664,8 +2670,10 @@
len += amsdu_len;
}
- if ((skb = dev_alloc_skb(len)) == NULL)
+ if ((skb = dev_alloc_skb(len)) == NULL) {
+ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
return;
+ }
skb_put(skb, len);
@@ -2990,7 +2998,7 @@
}
void
-wl_set_monitor(wl_info_t *wl, int val)
+wl_set_monitor(wl_info_t *wl, int val) /* public => is called by wlc_hybrid.o_shipped */
{
const char *devname;
wl_if_t *wlif;
@@ -3224,42 +3232,75 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
static int
wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
+{
+ wl_info_t * wl = (wl_info_t *)data;
#else
static ssize_t
-wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *data)
-#endif
+wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
{
- wl_info_t * wl = (wl_info_t *)data;
- int to_user;
- int len;
+ wl_info_t * wl = PDE_DATA(file_inode(filp));
+#endif
+ int bcmerror, len;
+ int to_user = 0;
+ char tmp[8];
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
if (offset > 0) {
*eof = 1;
return 0;
}
+#else
+ if (*offp > 0) { /* for example, stop: cat /proc/brcm_monitor0 */
+ return 0; /* 0 <=> EOF */
+ }
#endif
- if (!length) {
- WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
- return 0;
- }
WL_LOCK(wl);
- wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
- len = sprintf(buffer, "%d\n", to_user);
- WL_UNLOCK(wl);
- return len;
+ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
+ WL_UNLOCK(wl);
+
+ if (bcmerror != BCME_OK) {
+ WL_ERROR(("%s: GET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
+ return -EIO;
+ }
+
+ len = snprintf(tmp, ARRAY_SIZE(tmp), "%d\n", to_user);
+ tmp[ARRAY_SIZE(tmp) - 1] = '\0';
+ if (len >= ARRAY_SIZE(tmp)) {
+ printk(KERN_ERR "%s:%d [%s()] output would be truncated (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len);
+ return -ERANGE;
+ }
+ else if (len < 0) {
+ printk(KERN_ERR "%s:%d [%s()] unable to convert value (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len);
+ return len;
+ }
+ if (length < len) {
+ printk(KERN_ERR "%s:%d [%s()] user buffer is too small (at least=%d ; user=%d)!", __FILE__, __LINE__, __FUNCTION__, len, (int)length);
+ return -EMSGSIZE;
+ }
+ if (copy_to_user(buffer, tmp, len) != 0) {
+ printk(KERN_ERR "%s:%d [%s()] unable to copy data!", __FILE__, __LINE__, __FUNCTION__);
+ return -EFAULT;
+ }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+ *offp += len;
+#endif
+
+ return len;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
static int
wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
+{
+ wl_info_t * wl = (wl_info_t *)data;
#else
static ssize_t
-wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *data)
-#endif
+wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
{
- wl_info_t * wl = (wl_info_t *)data;
+ wl_info_t * wl = PDE_DATA(file_inode(filp));
+#endif
int from_user = 0;
int bcmerror;
@@ -3270,7 +3311,11 @@
}
if (copy_from_user(&from_user, buff, 1)) {
WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
- return -EIO;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ return -EIO;
+#else
+ return -EFAULT;
+#endif
}
if (from_user >= 0x30)
@@ -3280,10 +3325,15 @@
bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL);
WL_UNLOCK(wl);
- if (bcmerror < 0) {
+ if (bcmerror != BCME_OK) {
WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
return -EIO;
}
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && 0 /* no need to update offset because this file should only trigger action... */
+ *offp += length;
+#endif
+
return length;
}
@@ -3304,8 +3354,8 @@
if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
#else
- if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
- WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
+ if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
+ WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp));
#endif
ASSERT(0);
return -1;

View File

@ -0,0 +1,13 @@
diff -urN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
--- a/src/wl/sys/wl_linux.c 2015-01-06 12:33:42.981659618 +0100
+++ b/src/wl/sys/wl_linux.c 2015-01-06 12:34:05.647395418 +0100
@@ -2157,8 +2157,8 @@
wlif = WL_DEV_IF(dev);
wl = WL_INFO(dev);
+ skb->prev = NULL;
if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
- skb->prev = NULL;
TXQ_LOCK(wl);

View File

@ -94,8 +94,8 @@ rec {
grsecurity_testing = grsecPatch grsecurity_testing = grsecPatch
{ kver = "4.6.5"; { kver = "4.6.5";
grrev = "201607272152"; grrev = "201607312210";
sha256 = "120rj3cpvbchihj3w3i9j2fxvap3270kfxjfznw2ljglzf7pi8zc"; sha256 = "17dnp6w092kvqxqxbdgjpl4mrsn2wkb7z8q5d8ck7dfanpmqap0w";
}; };
# This patch relaxes grsec constraints on the location of usermode helpers, # This patch relaxes grsec constraints on the location of usermode helpers,

View File

@ -0,0 +1,40 @@
diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c
--- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:07:06.595038290 -0400
+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-fb.c 2016-07-31 19:09:18.532197060 -0400
@@ -114,7 +114,7 @@
* We don't support any planar format, pick up first buffer only.
*/
- gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
+ gem = drm_gem_object_lookup(file, cmd->handles[0]);
if (gem == NULL)
{
diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c
--- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:07:06.595038290 -0400
+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-drm/nvidia-drm-gem.c 2016-07-31 19:08:56.187492736 -0400
@@ -408,7 +408,7 @@
mutex_lock(&dev->struct_mutex);
- gem = drm_gem_object_lookup(dev, file, handle);
+ gem = drm_gem_object_lookup(file, handle);
if (gem == NULL)
{
diff -Naur NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h
--- NVIDIA-Linux-x86_64-367.35-no-compat32-upstream/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:07:06.600038448 -0400
+++ NVIDIA-Linux-x86_64-367.35-no-compat32/kernel/nvidia-uvm/uvm_linux.h 2016-07-31 19:08:06.506926763 -0400
@@ -554,12 +554,6 @@
INIT_RADIX_TREE(tree, GFP_NOWAIT);
}
-static bool radix_tree_empty(struct radix_tree_root *tree)
-{
- void *dummy;
- return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
-}
-
#if !defined(NV_USLEEP_RANGE_PRESENT)
static void __sched usleep_range(unsigned long min, unsigned long max)

View File

@ -12,7 +12,7 @@ assert (!libsOnly) -> kernel != null;
let let
versionNumber = "361.45.11"; versionNumber = "367.35";
# Policy: use the highest stable version as the default (on our master). # Policy: use the highest stable version as the default (on our master).
inherit (stdenv.lib) makeLibraryPath; inherit (stdenv.lib) makeLibraryPath;
@ -28,12 +28,12 @@ stdenv.mkDerivation {
if stdenv.system == "i686-linux" then if stdenv.system == "i686-linux" then
fetchurl { fetchurl {
url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run"; url = "http://download.nvidia.com/XFree86/Linux-x86/${versionNumber}/NVIDIA-Linux-x86-${versionNumber}.run";
sha256 = "036v7bzh9zy7zvaz2wf7zsamrynbg1yr1dll7sf1l928w059i6pb"; sha256 = "05g36bxcfk21ab8b0ay3zy21k5nd71468p9y1nbflx7ghpx25jrq";
} }
else if stdenv.system == "x86_64-linux" then else if stdenv.system == "x86_64-linux" then
fetchurl { fetchurl {
url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run"; url = "http://download.nvidia.com/XFree86/Linux-x86_64/${versionNumber}/NVIDIA-Linux-x86_64-${versionNumber}-no-compat32.run";
sha256 = "1f8bxmf8cr3cgzxgap5ccb1yrqyrrdig19dp282y6z9xjq27l074"; sha256 = "0m4k8f0212l63h22wk6hgi8fbfsgxqih5mizsw4ixqqmjd75av4a";
} }
else throw "nvidia-x11 does not support platform ${stdenv.system}"; else throw "nvidia-x11 does not support platform ${stdenv.system}";
@ -53,6 +53,8 @@ stdenv.mkDerivation {
[ gtk atk pango glib gdk_pixbuf cairo ] ); [ gtk atk pango glib gdk_pixbuf cairo ] );
programPath = makeLibraryPath [ xorg.libXv ]; programPath = makeLibraryPath [ xorg.libXv ];
patches = if versionAtLeast kernel.version "4.7" then [ ./365.35-kernel-4.7.patch ] else [];
buildInputs = [ perl nukeReferences ]; buildInputs = [ perl nukeReferences ];
hardeningDisable = [ "pic" "format" ]; hardeningDisable = [ "pic" "format" ];

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, lua }: { stdenv, fetchurl, lua }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "3.0.7"; version = "3.2.2";
name = "redis-${version}"; name = "redis-${version}";
src = fetchurl { src = fetchurl {
url = "http://download.redis.io/releases/${name}.tar.gz"; url = "http://download.redis.io/releases/${name}.tar.gz";
sha256 = "08vzfdr67gp3lvk770qpax2c5g2sx8hn6p64jn3jddrvxb2939xj"; sha256 = "05cf63502b2248b5d39588962100bfa4fcb47dabd56931a8cb60b301b1d8daea";
}; };
buildInputs = [ lua ]; buildInputs = [ lua ];

View File

@ -6,7 +6,6 @@
, enableBadfiles ? true, flac ? null, mp3val ? null , enableBadfiles ? true, flac ? null, mp3val ? null
, enableConvert ? true, ffmpeg ? null , enableConvert ? true, ffmpeg ? null
, enableDiscogs ? true , enableDiscogs ? true
, enableEchonest ? true
, enableEmbyupdate ? true , enableEmbyupdate ? true
, enableFetchart ? true , enableFetchart ? true
, enableLastfm ? true , enableLastfm ? true
@ -25,7 +24,6 @@ assert enableAcoustid -> pythonPackages.pyacoustid != null;
assert enableBadfiles -> flac != null && mp3val != null; assert enableBadfiles -> flac != null && mp3val != null;
assert enableConvert -> ffmpeg != null; assert enableConvert -> ffmpeg != null;
assert enableDiscogs -> pythonPackages.discogs_client != null; assert enableDiscogs -> pythonPackages.discogs_client != null;
assert enableEchonest -> pythonPackages.pyechonest != null;
assert enableFetchart -> pythonPackages.responses != null; assert enableFetchart -> pythonPackages.responses != null;
assert enableLastfm -> pythonPackages.pylast != null; assert enableLastfm -> pythonPackages.pylast != null;
assert enableMpd -> pythonPackages.mpd != null; assert enableMpd -> pythonPackages.mpd != null;
@ -42,7 +40,6 @@ let
chroma = enableAcoustid; chroma = enableAcoustid;
convert = enableConvert; convert = enableConvert;
discogs = enableDiscogs; discogs = enableDiscogs;
echonest = enableEchonest;
embyupdate = enableEmbyupdate; embyupdate = enableEmbyupdate;
fetchart = enableFetchart; fetchart = enableFetchart;
lastgenre = enableLastfm; lastgenre = enableLastfm;
@ -55,8 +52,8 @@ let
}; };
pluginsWithoutDeps = [ pluginsWithoutDeps = [
"bench" "bpd" "bpm" "bucket" "cue" "duplicates" "edit" "embedart" "beatport" "bench" "bpd" "bpm" "bucket" "cue" "duplicates" "edit" "embedart"
"filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy" "ihate" "export" "filefilter" "freedesktop" "fromfilename" "ftintitle" "fuzzy" "hook" "ihate"
"importadded" "importfeeds" "info" "inline" "ipfs" "keyfinder" "lyrics" "importadded" "importfeeds" "info" "inline" "ipfs" "keyfinder" "lyrics"
"mbcollection" "mbsubmit" "mbsync" "metasync" "missing" "permissions" "play" "mbcollection" "mbsubmit" "mbsync" "metasync" "missing" "permissions" "play"
"plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the" "plexupdate" "random" "rewrite" "scrub" "smartplaylist" "spotify" "the"
@ -73,14 +70,14 @@ let
in buildPythonApplication rec { in buildPythonApplication rec {
name = "beets-${version}"; name = "beets-${version}";
version = "1.3.17"; version = "1.3.19";
namePrefix = ""; namePrefix = "";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sampsyo"; owner = "sampsyo";
repo = "beets"; repo = "beets";
rev = "v${version}"; rev = "v${version}";
sha256 = "1fskxx5xxjqf4xmfjrinh7idjiq6qncb24hiyccv09l47fr1yipc"; sha256 = "0f2v1924ryx5xijpv1jycanl4471vcd7c5lld58lm0viyvh5k28x";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -101,7 +98,6 @@ in buildPythonApplication rec {
pythonPackages.requests2 pythonPackages.requests2
++ optional enableConvert ffmpeg ++ optional enableConvert ffmpeg
++ optional enableDiscogs pythonPackages.discogs_client ++ optional enableDiscogs pythonPackages.discogs_client
++ optional enableEchonest pythonPackages.pyechonest
++ optional enableLastfm pythonPackages.pylast ++ optional enableLastfm pythonPackages.pylast
++ optional enableMpd pythonPackages.mpd ++ optional enableMpd pythonPackages.mpd
++ optional enableThumbnails pythonPackages.pyxdg ++ optional enableThumbnails pythonPackages.pyxdg

View File

@ -0,0 +1,24 @@
{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, glib, pcre }:
stdenv.mkDerivation rec {
name = "rdup-${version}";
version = "1.1.15";
src = fetchFromGitHub {
owner = "miekg";
repo = "rdup";
rev = "d66e4320cd0bbcc83253baddafe87f9e0e83caa6";
sha256 = "0bzyv6qmnivxnv9nw7lnfn46k0m1dlxcjj53zcva6v8y8084l1iw";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ glib pcre ];
meta = {
description = "The only backup program that doesn't make backups";
homepage = "https://github.com/miekg/rdup";
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ lukasepple ];
};
}

View File

@ -2,8 +2,8 @@
, aesni ? true }: , aesni ? true }:
let let
rev = "977dad27e18627e5b723800f5f4201e385fe0d2e"; rev = "8393e03089c0abde61bd5d72aba8f926c3d6eca4";
date = "20140723"; date = "20160316";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "cpuminer-multi-${date}-${stdenv.lib.strings.substring 0 7 rev}"; name = "cpuminer-multi-${date}-${stdenv.lib.strings.substring 0 7 rev}";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
src = fetchgit { src = fetchgit {
inherit rev; inherit rev;
url = https://github.com/wolf9466/cpuminer-multi.git; url = https://github.com/wolf9466/cpuminer-multi.git;
sha256 = "1lzaiwy2wk9awpzpfnp3d6dymnb4bvgw1vg2433plfqhi9jfdrqj"; sha256 = "11dg4rra4dgfb9x6q85irn0hrkx2lkwyrdpgdh10pag09s3vhy4v";
}; };
buildInputs = [ autoconf automake curl jansson ]; buildInputs = [ autoconf automake curl jansson ];
@ -27,5 +27,6 @@ stdenv.mkDerivation rec {
homepage = https://github.com/wolf9466/cpuminer-multi; homepage = https://github.com/wolf9466/cpuminer-multi;
license = licenses.gpl2; license = licenses.gpl2;
maintainers = [ maintainers.ehmry ]; maintainers = [ maintainers.ehmry ];
platforms = platforms.linux;
}; };
} }

View File

@ -0,0 +1,25 @@
{ stdenv, fetchurl, pythonPackages }:
pythonPackages.buildPythonApplication rec {
name = "tmuxp-${version}";
version = "1.2.0";
namePrefix = "";
src = fetchurl {
url = "mirror://pypi/t/tmuxp/${name}.tar.gz";
sha256 = "05z5ssv9glsqmcy9fdq06bawy1274dnzqsqd3a4z4jd0w6j09smn";
};
propagatedBuildInputs = with pythonPackages; [
click colorama kaptan libtmux
];
meta = with stdenv.lib; {
description = "Manage tmux workspaces from JSON and YAML";
homepage = "http://tmuxp.readthedocs.io";
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ jgeerds ];
};
}

View File

@ -3,12 +3,12 @@
# Packaging documentation at: # Packaging documentation at:
# https://github.com/untitaker/vdirsyncer/blob/master/docs/packaging.rst # https://github.com/untitaker/vdirsyncer/blob/master/docs/packaging.rst
pythonPackages.buildPythonApplication rec { pythonPackages.buildPythonApplication rec {
version = "0.11.2"; version = "0.11.3";
name = "vdirsyncer-${version}"; name = "vdirsyncer-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://pypi/v/vdirsyncer/${name}.tar.gz"; url = "mirror://pypi/v/vdirsyncer/${name}.tar.gz";
sha256 = "15isw2jhjfxi213wdj9d8mwq2m58k8bwf831qnxrjcz7j7bwy7mj"; sha256 = "10majl58vdpxgbddjqgwblvl7akvvr4c2c8iaxnf3kgyh01jq6k9";
}; };
propagatedBuildInputs = with pythonPackages; [ propagatedBuildInputs = with pythonPackages; [

View File

@ -4,11 +4,11 @@ with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dnscrypt-proxy-${version}"; name = "dnscrypt-proxy-${version}";
version = "1.6.1"; version = "1.7.0";
src = fetchurl { src = fetchurl {
url = "https://download.dnscrypt.org/dnscrypt-proxy/${name}.tar.bz2"; url = "https://download.dnscrypt.org/dnscrypt-proxy/${name}.tar.bz2";
sha256 = "16lif3qhyfjpgg54vjlwpslxk90akmbhlpnn1szxm628bmpw6nl9"; sha256 = "1qw2nib0d5ia8581lbdnjxgn9c7pf2qw8vhpnnh1wjcjj3gpgbqx";
}; };
configureFlags = optional stdenv.isLinux "--with-systemd"; configureFlags = optional stdenv.isLinux "--with-systemd";

View File

@ -0,0 +1,65 @@
{ stdenv, fetchurl, openssl, expat, libevent, swig, pythonPackages }:
let
inherit (pythonPackages) python;
in stdenv.mkDerivation rec {
pname = "pyunbound";
name = "${pname}-${version}";
version = "1.5.9";
src = fetchurl {
url = "http://unbound.net/downloads/unbound-${version}.tar.gz";
sha256 = "01328cfac99ab5b8c47115151896a244979e442e284eb962c0ea84b7782b6990";
};
buildInputs = [ openssl expat libevent swig python ];
patchPhase = ''substituteInPlace Makefile.in \
--replace "\$(DESTDIR)\$(PYTHON_SITE_PKG)" "$out/${python.sitePackages}" \
--replace "\$(LIBTOOL) --mode=install cp _unbound.la" "cp _unbound.la"
'';
preConfigure = "export PYTHON_VERSION=${python.majorVersion}";
configureFlags = [
"--with-ssl=${openssl.dev}"
"--with-libexpat=${expat.dev}"
"--with-libevent=${libevent.dev}"
"--localstatedir=/var"
"--sysconfdir=/etc"
"--sbindir=\${out}/bin"
"--enable-pie"
"--enable-relro-now"
"--with-pyunbound"
"DESTDIR=$out PREFIX="
];
preInstall = ''
mkdir -p $out/${python.sitePackages} $out/etc/${pname}
cp .libs/_unbound.so .libs/libunbound.so* $out/${python.sitePackages}
substituteInPlace _unbound.la \
--replace "-L.libs $PWD/libunbound.la" "-L$out/${python.sitePackages}" \
--replace "libdir=\'$PWD/${python.sitePackages}\'" "libdir=\'$out/${python.sitePackages}\'"
'';
installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf pyunbound-install lib" ];
# All we want is the Unbound Python module
postInstall = ''
# Generate the built in root anchor and root key and store these in a logical place
# to be used by tools depending only on the Python module
$out/bin/unbound-anchor -l | head -1 > $out/etc/${pname}/root.anchor
$out/bin/unbound-anchor -l | tail --lines=+2 - > $out/etc/${pname}/root.key
# We don't need anything else
rm -fR $out/bin $out/share $out/include $out/etc/unbound
patchelf --replace-needed libunbound.so.2 $out/${python.sitePackages}/libunbound.so.2 $out/${python.sitePackages}/_unbound.so
'';
meta = with stdenv.lib; {
description = "Python library for Unbound, the validating, recursive, and caching DNS resolver";
license = licenses.bsd3;
homepage = http://www.unbound.net;
maintainers = with maintainers; [ leenaars ];
platforms = stdenv.lib.platforms.unix;
};
}

Some files were not shown because too many files have changed in this diff Show More