diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 50185280c5a..4f28823f0c2 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2973,6 +2973,11 @@ github = "phreedom"; name = "Evgeny Egorochkin"; }; + phryneas = { + email = "mail@lenzw.de"; + github = "phryneas"; + name = "Lenz Weber"; + }; phunehehe = { email = "phunehehe@gmail.com"; github = "phunehehe"; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index d6f2c85a810..da4c21296ff 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -514,6 +514,7 @@ ./services/networking/miniupnpd.nix ./services/networking/mosquitto.nix ./services/networking/monero.nix + ./services/networking/morty.nix ./services/networking/miredo.nix ./services/networking/mstpd.nix ./services/networking/murmur.nix diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 780448d8bad..8d2c303a69e 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -20,6 +20,7 @@ let exporterOpts = { blackbox = import ./exporters/blackbox.nix { inherit config lib pkgs; }; collectd = import ./exporters/collectd.nix { inherit config lib pkgs; }; + dnsmasq = import ./exporters/dnsmasq.nix { inherit config lib pkgs; }; dovecot = import ./exporters/dovecot.nix { inherit config lib pkgs; }; fritzbox = import ./exporters/fritzbox.nix { inherit config lib pkgs; }; json = import ./exporters/json.nix { inherit config lib pkgs; }; diff --git a/nixos/modules/services/monitoring/prometheus/exporters/dnsmasq.nix b/nixos/modules/services/monitoring/prometheus/exporters/dnsmasq.nix new file mode 100644 index 00000000000..b1fab85109a --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/dnsmasq.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.dnsmasq; +in +{ + port = 9153; + extraOpts = { + dnsmasqListenAddress = mkOption { + type = types.str; + default = "localhost:53"; + description = '' + Address on which dnsmasq listens. + ''; + }; + leasesPath = mkOption { + type = types.path; + default = "/var/lib/misc/dnsmasq.leases"; + example = "/var/lib/dnsmasq/dnsmasq.leases"; + description = '' + Path to the dnsmasq.leases file. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-dnsmasq-exporter}/bin/dnsmasq_exporter \ + --listen ${cfg.listenAddress}:${toString cfg.port} \ + --dnsmasq ${cfg.dnsmasqListenAddress} \ + --leases_path ${cfg.leasesPath} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/networking/morty.nix b/nixos/modules/services/networking/morty.nix new file mode 100644 index 00000000000..b31bec9a862 --- /dev/null +++ b/nixos/modules/services/networking/morty.nix @@ -0,0 +1,98 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.morty; + + configFile = cfg.configFile; + +in + +{ + + ###### interface + + options = { + + services.morty = { + + enable = mkEnableOption + "Morty proxy server. See https://github.com/asciimoo/morty"; + + ipv6 = mkOption { + type = types.bool; + default = true; + description = "Allow IPv6 HTTP requests?"; + defaultText = "Allow IPv6 HTTP requests."; + }; + + key = mkOption { + type = types.string; + default = ""; + description = "HMAC url validation key (hexadecimal encoded). + Leave blank to disable. Without validation key, anyone can + submit proxy requests. Leave blank to disable."; + defaultText = "No HMAC url validation. Generate with echo -n somevalue | openssl dgst -sha1 -hmac somekey"; + }; + + timeout = mkOption { + type = types.int; + default = 2; + description = "Request timeout in seconds."; + defaultText = "A resource now gets 2 seconds to respond."; + }; + + package = mkOption { + type = types.package; + default = pkgs.morty; + defaultText = "pkgs.morty"; + description = "morty package to use."; + }; + + port = mkOption { + type = types.int; + default = 3000; + description = "Listing port"; + }; + + listenAddress = mkOption { + type = types.string; + default = "127.0.0.1"; + description = "The address on which the service listens"; + defaultText = "127.0.0.1 (localhost)"; + }; + + }; + + }; + + ###### Service definition + + config = mkIf config.services.morty.enable { + + users.extraUsers.morty = + { description = "Morty user"; + createHome = true; + home = "/var/lib/morty"; + }; + + systemd.services.morty = + { + description = "Morty sanitizing proxy server."; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + User = "morty"; + ExecStart = ''${cfg.package}/bin/morty \ + -listen ${cfg.listenAddress}:${toString cfg.port} \ + ${optionalString cfg.ipv6 "-ipv6"} \ + ${optionalString (cfg.key != "") "-key " + cfg.key} \ + ''; + }; + }; + environment.systemPackages = [ cfg.package ]; + + }; +} diff --git a/nixos/modules/services/networking/openntpd.nix b/nixos/modules/services/networking/openntpd.nix index 4bb9da54fe0..241038ca12e 100644 --- a/nixos/modules/services/networking/openntpd.nix +++ b/nixos/modules/services/networking/openntpd.nix @@ -7,7 +7,7 @@ let package = pkgs.openntpd_nixos; - cfgFile = pkgs.writeText "openntpd.conf" '' + configFile = '' ${concatStringsSep "\n" (map (s: "server ${s}") cfg.servers)} ${cfg.extraConfig} ''; @@ -31,8 +31,8 @@ in type = with types; lines; default = ""; example = '' - listen on 127.0.0.1 - listen on ::1 + listen on 127.0.0.1 + listen on ::1 ''; description = '' Additional text appended to openntpd.conf. @@ -57,6 +57,8 @@ in # Add ntpctl to the environment for status checking environment.systemPackages = [ package ]; + environment.etc."ntpd.conf".text = configFile; + users.extraUsers = singleton { name = "ntp"; uid = config.ids.uids.ntp; @@ -71,7 +73,7 @@ in before = [ "time-sync.target" ]; after = [ "dnsmasq.service" "bind.service" "network-online.target" ]; serviceConfig = { - ExecStart = "${package}/sbin/ntpd -f ${cfgFile} -p ${pidFile} ${cfg.extraOptions}"; + ExecStart = "${package}/sbin/ntpd -p ${pidFile} ${cfg.extraOptions}"; Type = "forking"; PIDFile = pidFile; }; diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix index aab1203086c..902e759f3a3 100644 --- a/nixos/modules/services/networking/ssh/sshd.nix +++ b/nixos/modules/services/networking/ssh/sshd.nix @@ -272,6 +272,31 @@ in ''; }; + logLevel = mkOption { + type = types.enum [ "QUIET" "FATAL" "ERROR" "INFO" "VERBOSE" "DEBUG" "DEBUG1" "DEBUG2" "DEBUG3" ]; + default = "VERBOSE"; + description = '' + Gives the verbosity level that is used when logging messages from sshd(8). The possible values are: + QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, and DEBUG3. The default is VERBOSE. DEBUG and DEBUG1 + are equivalent. DEBUG2 and DEBUG3 each specify higher levels of debugging output. Logging with a DEBUG level + violates the privacy of users and is not recommended. + + LogLevel VERBOSE logs user's key fingerprint on login. + Needed to have a clear audit track of which key was used to log in. + ''; + }; + + useDns = mkOption { + type = types.bool; + default = false; + description = '' + Specifies whether sshd(8) should look up the remote host name, and to check that the resolved host name for + the remote IP address maps back to the very same IP address. + If this option is set to no (the default) then only addresses and not host names may be used in + ~/.ssh/authorized_keys from and sshd_config Match Host directives. + ''; + }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -426,9 +451,14 @@ in Ciphers ${concatStringsSep "," cfg.ciphers} MACs ${concatStringsSep "," cfg.macs} - # LogLevel VERBOSE logs user's key fingerprint on login. - # Needed to have a clear audit track of which key was used to log in. - LogLevel VERBOSE + LogLevel ${cfg.logLevel} + + ${if cfg.useDns then '' + UseDNS yes + '' else '' + UseDNS no + ''} + ''; assertions = [{ assertion = if cfg.forwardX11 then cfgc.setXAuthLocation else true; diff --git a/nixos/modules/services/scheduling/fcron.nix b/nixos/modules/services/scheduling/fcron.nix index e3b6b638f5a..0ea41f3c398 100644 --- a/nixos/modules/services/scheduling/fcron.nix +++ b/nixos/modules/services/scheduling/fcron.nix @@ -128,6 +128,7 @@ in owner = "fcron"; group = "fcron"; setgid = true; + setuid = true; }; fcrondyn = { source = "${pkgs.fcron}/bin/fcrondyn"; diff --git a/nixos/release.nix b/nixos/release.nix index 1e52c0f86a7..8777d85c5d4 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -408,6 +408,7 @@ in rec { tests.xss-lock = callTest tests/xss-lock.nix {}; tests.yabar = callTest tests/yabar.nix {}; tests.zookeeper = callTest tests/zookeeper.nix {}; + tests.morty = callTest tests/morty.nix { }; /* Build a bunch of typical closures so that Hydra can keep track of the evolution of closure sizes. */ diff --git a/nixos/tests/iftop.nix b/nixos/tests/iftop.nix index 21ff3cafed7..a4f524ceb27 100644 --- a/nixos/tests/iftop.nix +++ b/nixos/tests/iftop.nix @@ -9,22 +9,26 @@ with lib; nodes = { withIftop = { imports = [ ./common/user-account.nix ]; - programs.iftop.enable = true; }; withoutIftop = { imports = [ ./common/user-account.nix ]; + environment.systemPackages = [ pkgs.iftop ]; }; }; testScript = '' subtest "machine with iftop enabled", sub { - $withIftop->start; - $withIftop->succeed("su -l alice -c 'iftop -t -s 1'"); + $withIftop->waitForUnit("default.target"); + # limit to eth1 (eth0 is the test driver's control interface) + # and don't try name lookups + $withIftop->succeed("su -l alice -c 'iftop -t -s 1 -n -i eth1'"); }; subtest "machine without iftop", sub { - $withoutIftop->start; - $withoutIftop->mustFail("su -l alice -c 'iftop -t -s 1'"); + $withoutIftop->waitForUnit("default.target"); + # check that iftop is there but user alice lacks capabilities + $withoutIftop->succeed("iftop -t -s 1 -n -i eth1"); + $withoutIftop->fail("su -l alice -c 'iftop -t -s 1 -n -i eth1'"); }; ''; }) diff --git a/nixos/tests/morty.nix b/nixos/tests/morty.nix new file mode 100644 index 00000000000..e052ee98806 --- /dev/null +++ b/nixos/tests/morty.nix @@ -0,0 +1,32 @@ +import ./make-test.nix ({ pkgs, ... }: + +{ + name = "morty"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ leenaars ]; + }; + + nodes = + { mortyProxyWithKey = + + { config, pkgs, ... }: + { services.morty = { + enable = true; + key = "78a9cd0cfee20c672f78427efb2a2a96036027f0"; + port = 3001; + }; + }; + + }; + + testScript = + { nodes , ... }: + '' + startAll; + + $mortyProxyWithKey->waitForUnit("morty"); + $mortyProxyWithKey->succeed("curl -L 127.0.0.1:3001 | grep MortyProxy"); + + ''; + +}) diff --git a/pkgs/applications/altcoins/aeon/default.nix b/pkgs/applications/altcoins/aeon/default.nix index cfbb1f24b19..0489c8b649f 100644 --- a/pkgs/applications/altcoins/aeon/default.nix +++ b/pkgs/applications/altcoins/aeon/default.nix @@ -1,7 +1,10 @@ -{ stdenv, fetchFromGitHub, cmake, boost, miniupnpc, openssl, pkgconfig, unbound }: +{ stdenv, fetchFromGitHub, cmake, pkgconfig, git, doxygen, graphviz +, boost, miniupnpc, openssl, unbound, cppzmq +, zeromq, pcsclite, readline +}: let - version = "0.9.14.0"; + version = "0.12.0.0"; in stdenv.mkDerivation { name = "aeon-${version}"; @@ -10,19 +13,24 @@ stdenv.mkDerivation { owner = "aeonix"; repo = "aeon"; rev = "v${version}"; - sha256 = "0pl9nfhihj0wsdgvvpv5f14k4m2ikk8s3xw6nd8ymbnpxfzyxynr"; + fetchSubmodules = true; + sha256 = "1schzlscslhqq7zcd68b1smqlaf7k789x1rwpplm7qi5iz9a8cfr"; }; - nativeBuildInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig git doxygen graphviz ]; - buildInputs = [ boost miniupnpc openssl unbound ]; + buildInputs = [ + boost miniupnpc openssl unbound + cppzmq zeromq pcsclite readline + ]; - installPhase = '' - install -D src/aeond "$out/bin/aeond" - install src/simpleminer "$out/bin/aeon-simpleminer" - install src/simplewallet "$out/bin/aeon-simplewallet" - install src/connectivity_tool "$out/bin/aeon-connectivity-tool" - ''; + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DBUILD_GUI_DEPS=ON" + "-DReadline_ROOT_DIR=${readline.dev}" + ]; + + hardeningDisable = [ "fortify" ]; meta = with stdenv.lib; { description = "Private, secure, untraceable currency"; diff --git a/pkgs/applications/misc/barrier/default.nix b/pkgs/applications/misc/barrier/default.nix new file mode 100644 index 00000000000..0bc12e269c0 --- /dev/null +++ b/pkgs/applications/misc/barrier/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, cmake, curl, xorg, avahi, qt5, + avahiWithLibdnssdCompat ? avahi.override { withLibdnssdCompat = true; } +}: + +stdenv.mkDerivation rec { + name = "barrier-${version}"; + version = "2.1.1"; + src = fetchurl { + url = "https://github.com/debauchee/barrier/archive/v${version}.tar.gz"; + sha256 = "0x17as5ikfx2r5hawr368a9risvcavyc8zv5g724s709nr6m0pbp"; + }; + + buildInputs = [ cmake curl xorg.libX11 xorg.libXext xorg.libXtst avahiWithLibdnssdCompat ]; + propagatedBuildInputs = with qt5; [ qtbase ]; + + postFixup = '' + substituteInPlace "$out/share/applications/barrier.desktop" --replace "Exec=barrier" "Exec=$out/bin/barrier" + ''; + + meta = { + description = "Open-source KVM software"; + longDescription = '' + Barrier is KVM software forked from Symless's synergy 1.9 codebase. + Synergy was a commercialized reimplementation of the original + CosmoSynergy written by Chris Schoeneman. + ''; + homepage = https://github.com/debauchee/barrier; + downloadPage = https://github.com/debauchee/barrier/releases; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.phryneas ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/misc/cura/default.nix b/pkgs/applications/misc/cura/default.nix index edb10a0f667..10f6837761b 100644 --- a/pkgs/applications/misc/cura/default.nix +++ b/pkgs/applications/misc/cura/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchFromGitHub, cmake, python3, qtbase, qtquickcontrols, curaengine }: +{ mkDerivation, lib, fetchFromGitHub, cmake, python3, qtbase, qtquickcontrols2, curaengine }: mkDerivation rec { name = "cura-${version}"; @@ -11,7 +11,14 @@ mkDerivation rec { sha256 = "0yaya0ww92qjm7g31q85m5f95nwdapldjx1kdf1ar4yzwh4r15rp"; }; - buildInputs = [ qtbase qtquickcontrols ]; + materials = fetchFromGitHub { + owner = "Ultimaker"; + repo = "fdm_materials"; + rev = "3.2.1"; + sha256 = "1kr9ga727x0kazw2ypac9bi6g6lddbsx80qw8fbn0514kg2mr9n3"; + }; + + buildInputs = [ qtbase qtquickcontrols2 ]; propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial numpy-stl ]; nativeBuildInputs = [ cmake python3.pkgs.wrapPython ]; @@ -22,6 +29,11 @@ mkDerivation rec { sed -i 's, executable_name = .*, executable_name = "${curaengine}/bin/CuraEngine",' plugins/CuraEngineBackend/CuraEngineBackend.py ''; + postInstall = '' + mkdir -p $out/share/cura/resources/materials + cp ${materials}/*.fdm_material $out/share/cura/resources/materials/ + ''; + postFixup = '' wrapPythonPrograms ''; diff --git a/pkgs/applications/misc/wsjtx/default.nix b/pkgs/applications/misc/wsjtx/default.nix index 8a23134e3ed..311983e8f52 100644 --- a/pkgs/applications/misc/wsjtx/default.nix +++ b/pkgs/applications/misc/wsjtx/default.nix @@ -4,12 +4,12 @@ stdenv.mkDerivation rec { name = "wsjtx-${version}"; - version = "1.8.0"; + version = "1.9.0"; # This is a composite source tarball containing both wsjtx and a hamlib fork src = fetchurl { url = "http://physics.princeton.edu/pulsar/K1JT/wsjtx-${version}.tgz"; - sha256 = "21603ad4d5f43cd9c79a6e8cf468bde88c554654012b2c6c1ef9144cfbf668ce"; + sha256 = "1qxwiylnykh37kw780hh9xfphzbj8ndpfqz4xazld16v3qx2g0jc"; }; # Hamlib builds with autotools, wsjtx builds with cmake diff --git a/pkgs/applications/networking/browsers/qutebrowser/default.nix b/pkgs/applications/networking/browsers/qutebrowser/default.nix index 0cebdd62140..38aaf811516 100644 --- a/pkgs/applications/networking/browsers/qutebrowser/default.nix +++ b/pkgs/applications/networking/browsers/qutebrowser/default.nix @@ -29,13 +29,13 @@ let in python3Packages.buildPythonApplication rec { name = "qutebrowser-${version}${versionPostfix}"; namePrefix = ""; - version = "1.3.0"; + version = "1.3.1"; versionPostfix = ""; # the release tarballs are different from the git checkout! src = fetchurl { url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${name}.tar.gz"; - sha256 = "159h669x60pfla71zx28wnrik8rvsrw5i8kbd3xccynk6klm3kw3"; + sha256 = "121fz549vlxdasw0lcx6v394x8g34nadvrfs4svw3b65n0shv1ky"; }; # Needs tox diff --git a/pkgs/applications/networking/cluster/hadoop/default.nix b/pkgs/applications/networking/cluster/hadoop/default.nix index 9af4cf3f0ed..a9e7325d181 100644 --- a/pkgs/applications/networking/cluster/hadoop/default.nix +++ b/pkgs/applications/networking/cluster/hadoop/default.nix @@ -1,51 +1,76 @@ { stdenv, fetchurl, makeWrapper, which, jre, bash }: -stdenv.mkDerivation rec { +let + hadoopDerivation = { version, sha256 }: stdenv.mkDerivation rec { - name = "hadoop-2.2.0"; + name = "hadoop-${version}"; - src = fetchurl { - url = "mirror://apache/hadoop/common/${name}/${name}.tar.gz"; - sha256 = "0r0kx8arsrvmcfy0693hpv4cz3i0razvk1xa3yhlf3ybb80a8106"; - }; + src = fetchurl { + url = "mirror://apache/hadoop/common/${name}/${name}.tar.gz"; + sha256 = "${sha256}"; + }; - buildInputs = [ makeWrapper ]; + buildInputs = [ makeWrapper ]; - buildPhase = '' - for n in "bin/"* "sbin/"*; do + buildPhase = '' + for n in bin/{hadoop,hdfs,mapred,yarn} sbin/*.sh; do sed -i $n -e "s|#!/usr/bin/env bash|#! ${bash}/bin/bash|" - done - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" bin/container-executor; - ''; - - installPhase = '' - mkdir -p $out - mv *.txt share/doc/hadoop/ - mv * $out - - for n in $out/{bin,sbin}"/"*; do - wrapProgram $n --prefix PATH : "${stdenv.lib.makeBinPath [ which jre bash ]}" --set JAVA_HOME "${jre}" --set HADOOP_PREFIX "$out" - done - ''; - - meta = { - homepage = http://hadoop.apache.org/; - description = "Framework for distributed processing of large data sets across clusters of computers"; - license = stdenv.lib.licenses.asl20; - - longDescription = '' - The Apache Hadoop software library is a framework that allows for - the distributed processing of large data sets across clusters of - computers using a simple programming model. It is designed to - scale up from single servers to thousands of machines, each - offering local computation and storage. Rather than rely on - hardware to deliver high-avaiability, the library itself is - designed to detect and handle failures at the application layer, - so delivering a highly-availabile service on top of a cluster of - computers, each of which may be prone to failures. + done + '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" bin/container-executor; + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" bin/test-container-executor; ''; - platforms = stdenv.lib.platforms.linux; + installPhase = '' + mkdir -p $out + mv *.txt share/doc/hadoop/ + mv * $out + + for n in $out/bin/{hadoop,hdfs,mapred,yarn} $out/sbin/*.sh; do + wrapProgram $n --prefix PATH : "${stdenv.lib.makeBinPath [ which jre bash ]}" --set JAVA_HOME "${jre}" --set HADOOP_HOME "$out" + done + ''; + + meta = { + homepage = http://hadoop.apache.org/; + description = "Framework for distributed processing of large data sets across clusters of computers"; + license = stdenv.lib.licenses.asl20; + + longDescription = '' + The Apache Hadoop software library is a framework that allows for + the distributed processing of large data sets across clusters of + computers using a simple programming model. It is designed to + scale up from single servers to thousands of machines, each + offering local computation and storage. Rather than rely on + hardware to deliver high-avaiability, the library itself is + designed to detect and handle failures at the application layer, + so delivering a highly-availabile service on top of a cluster of + computers, each of which may be prone to failures. + ''; + + platforms = stdenv.lib.platforms.linux; + }; + }; +in +{ + hadoop_2_7 = hadoopDerivation { + version = "2.7.6"; + sha256 = "0sanwam0k2m40pfsf9l5zxvklv8rvq78xvhd2pbsbiab7ylpwcpj"; + }; + hadoop_2_8 = hadoopDerivation { + version = "2.8.4"; + sha256 = "05dik4qnazhf5aldwkljf610cwncsg5y3hyvgj476cfpzmr5jm3b"; + }; + hadoop_2_9 = hadoopDerivation { + version = "2.9.1"; + sha256 = "1z22v46mmq9hfjc229x61ws332sa1rvmib3v4jsd6i1n29d03mpf"; + }; + hadoop_3_0 = hadoopDerivation { + version = "3.0.2"; + sha256 = "10ig3rrcaizvs5bnni15fvm942mr5hfc2hr355g6ich722kpll0d"; + }; + hadoop_3_1 = hadoopDerivation { + version = "3.1.0"; + sha256 = "1rs3a752is1y2vgxjlqmmln00iwzncwlwg59l6gjv92zb7njq3b7"; }; } diff --git a/pkgs/applications/networking/errbot/default.nix b/pkgs/applications/networking/errbot/default.nix index feb6a0ab126..f89b8206dbe 100644 --- a/pkgs/applications/networking/errbot/default.nix +++ b/pkgs/applications/networking/errbot/default.nix @@ -2,11 +2,11 @@ pythonPackages.buildPythonApplication rec { name = "errbot-${version}"; - version = "5.1.3"; + version = "5.2.0"; src = fetchurl { url = "mirror://pypi/e/errbot/${name}.tar.gz"; - sha256 = "0nkfq6fx87g7kvxrb5lp8gkb75658cmyffnacpy8jq3a16py3jrr"; + sha256 = "0q5fg113s3gnym38d4y5mlnxw6vrm388zw5mlapf7b2zgx34r053"; }; disabled = !pythonPackages.isPy3k; diff --git a/pkgs/applications/networking/ipfs/default.nix b/pkgs/applications/networking/ipfs/default.nix index 4153d527b9f..56dc9fc4d5a 100644 --- a/pkgs/applications/networking/ipfs/default.nix +++ b/pkgs/applications/networking/ipfs/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { name = "ipfs-${version}"; - version = "0.4.14"; + version = "0.4.15"; rev = "v${version}"; goPackagePath = "github.com/ipfs/go-ipfs"; @@ -10,7 +10,7 @@ buildGoPackage rec { extraSrcPaths = [ (fetchgx { inherit name src; - sha256 = "0gad5y5clkrk5jsjj9gmrlnx8kbn2vg50vka1b8jg7b55hdvvlcg"; + sha256 = "0bysfh2hd040i8lnyzhy96frflls4kdnlw748cl51ngqg3rwbhgz"; }) ]; @@ -18,7 +18,7 @@ buildGoPackage rec { owner = "ipfs"; repo = "go-ipfs"; inherit rev; - sha256 = "0wvjw8jziwhvfwhksg26qlj2irznl5bs2yll9jkv335pnwb5qi3v"; + sha256 = "1ry4a4pq26dbwy2b9cwi3xjaiyq6sng9lxnb1n30zxhp4w7rla2h"; }; meta = with stdenv.lib; { diff --git a/pkgs/applications/networking/p2p/zeronet/default.nix b/pkgs/applications/networking/p2p/zeronet/default.nix new file mode 100644 index 00000000000..8a8d1b33ca7 --- /dev/null +++ b/pkgs/applications/networking/p2p/zeronet/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub, python2Packages }: + +python2Packages.buildPythonApplication rec { + pname = "zeronet"; + version = "0.6.2"; + + src = fetchFromGitHub { + owner = "HelloZeroNet"; + repo = "ZeroNet"; + rev = "v${version}"; + sha256 = "0v19jjirkyv8hj2yfdj0c40zwynn51h2bj4issn5blr95vhfm8s7"; + }; + + propagatedBuildInputs = with python2Packages; [ msgpack gevent ]; + + format = "other"; + + buildPhase = "${python2Packages.python.interpreter} -O -m compileall ."; + + installPhase = '' + mkdir -p $out/share + cp -r plugins src tools *.py $out/share/ + ''; + + # Wrap the main executable and set the log and data dir to something out of + # the store + postFixup = '' + makeWrapper "$out/share/zeronet.py" "$out/bin/zeronet" \ + --set PYTHONPATH "$PYTHONPATH" \ + --set PATH ${python2Packages.python}/bin \ + --add-flags "--log_dir \$HOME/.local/share/zeronet/logs" \ + --add-flags "--data_dir \$HOME/.local/share/zeronet" + ''; + + meta = with stdenv.lib; { + description = "Decentralized websites using Bitcoin crypto and BitTorrent network"; + homepage = "https://zeronet.io/"; + license = licenses.gpl2; + maintainers = with maintainers; [ fgaz ]; + }; +} diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 6b8ef7b88e8..8cbfe1ec161 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -5,9 +5,9 @@ , perlBindings ? false , javahlBindings ? false , saslSupport ? false -, stdenv, fetchurl, apr, aprutil, zlib, sqlite +, stdenv, fetchurl, apr, aprutil, zlib, sqlite, openssl, lz4, utf8proc , apacheHttpd ? null, expat, swig ? null, jdk ? null, python ? null, perl ? null -, sasl ? null, serf ? null, openssl +, sasl ? null, serf ? null }: assert bdbSupport -> aprutil.bdbSupport; @@ -17,7 +17,7 @@ assert javahlBindings -> jdk != null && perl != null; let - common = { version, sha256 }: stdenv.mkDerivation (rec { + common = { version, sha256, extraBuildInputs ? [ ] }: stdenv.mkDerivation (rec { inherit version; name = "subversion-${version}"; @@ -30,6 +30,7 @@ let outputs = [ "out" "dev" "man" ]; buildInputs = [ zlib apr aprutil sqlite openssl ] + ++ extraBuildInputs ++ stdenv.lib.optional httpSupport serf ++ stdenv.lib.optional pythonBindings python ++ stdenv.lib.optional perlBindings perl @@ -114,4 +115,10 @@ in { version = "1.9.7"; sha256 = "08qn94zaqcclam2spb4h742lvhxw8w5bnrlya0fm0bp17hriicf3"; }; + + subversion_1_10 = common { + version = "1.10.0"; + sha256 = "115mlvmf663w16mc3xyypnaizq401vbypc56hl2ylzc3pcx3zwic"; + extraBuildInputs = [ lz4 utf8proc ]; + }; } diff --git a/pkgs/applications/video/mapmap/default.nix b/pkgs/applications/video/mapmap/default.nix new file mode 100644 index 00000000000..6569caad6c5 --- /dev/null +++ b/pkgs/applications/video/mapmap/default.nix @@ -0,0 +1,63 @@ +{ stdenv +, fetchFromGitHub +, qttools +, qtbase +, qtmultimedia +, liblo +, gst_all_1 +, qmake +, pkgconfig +}: + +with stdenv; + +mkDerivation rec { + + version = "0.6.1"; + name = "mapmap-${version}"; + + src = fetchFromGitHub { + owner = "mapmapteam"; + repo = "mapmap"; + rev = version; + sha256 = "15km6xmfkxhrflq4sl9m9r85zi4shrr4k5h15x17v7x0qkc3xgsh"; + }; + + nativeBuildInputs = [ + qmake + pkgconfig + ]; + + buildInputs = [ + qttools + qtmultimedia + liblo + gst_all_1.gstreamer + gst_all_1.gstreamermm + gst_all_1.gst-libav + gst_all_1.gst-vaapi + ]; + + installPhase = '' + mkdir -p $out/bin + cp mapmap $out/bin/mapmap + mkdir -p $out/share/applications/ + sed 's|Icon=/usr/share/icons/hicolor/scalable/apps/mapmap.svg|Icon=mapmap|g' resources/texts/mapmap.desktop > $out/share/applications/mapmap.desktop + mkdir -p $out/share/icons/hicolor/scalable/apps/ + cp resources/images/logo/mapmap.* $out/share/icons/hicolor/scalable/apps/ + ''; + + # RPATH in /tmp hack + # preFixup = '' + # rm -r $NIX_BUILD_TOP/__nix_qt5__ + # ''; + + meta = with stdenv.lib; { + description = "Open source video mapping software"; + homepage = https://github.com/mapmapteam/mapmap; + license = licenses.gpl3; + maintainers = [ maintainers.erictapen ]; + platforms = platforms.linux; + }; + +} diff --git a/pkgs/data/misc/cacert/default.nix b/pkgs/data/misc/cacert/default.nix index 638a342e8eb..e867d0fbb4b 100644 --- a/pkgs/data/misc/cacert/default.nix +++ b/pkgs/data/misc/cacert/default.nix @@ -9,7 +9,7 @@ let certdata2pem = fetchurl { name = "certdata2pem.py"; - url = "https://anonscm.debian.org/cgit/collab-maint/ca-certificates.git/plain/mozilla/certdata2pem.py?h=debian/20170717"; + url = "https://salsa.debian.org/debian/ca-certificates/raw/debian/20170717/mozilla/certdata2pem.py"; sha256 = "1d4q27j1gss0186a5m8bs5dk786w07ccyq0qi6xmd2zr1a8q16wy"; }; diff --git a/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix b/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix index caf06753239..b40cb98cbef 100644 --- a/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix +++ b/pkgs/desktops/gnome-2/desktop/gtksourceview/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchpatch, fetchurl, autoreconfHook, pkgconfig, atk, cairo, glib , gnome-common, gtk, pango -, libxml2Python, perl, intltool, gettext, gtk-mac-integration }: +, libxml2Python, perl, intltool, gettext, gtk-mac-integration-gtk2 }: with stdenv.lib; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { pango libxml2Python perl intltool gettext ] ++ optionals stdenv.isDarwin [ - autoreconfHook gnome-common gtk-mac-integration + autoreconfHook gnome-common gtk-mac-integration-gtk2 ]; preConfigure = optionalString stdenv.isDarwin '' diff --git a/pkgs/development/compilers/adobe-flex-sdk/default.nix b/pkgs/development/compilers/adobe-flex-sdk/default.nix deleted file mode 100644 index 1512ef39655..00000000000 --- a/pkgs/development/compilers/adobe-flex-sdk/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ stdenv, fetchurl, unzip }: - -stdenv.mkDerivation rec { - name = "adobe-flex-sdk-4.0.0.14159"; - - src = fetchurl { - # This is the open source distribution - url = http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4/flex_sdk_4.0.0.14159_mpl.zip; - sha256 = "1x12sji6g42bm1h7jndkda5vpah6vnkpc13qwq0c4xvbsh8757v5"; - }; - - phases = "installPhase"; - - buildInputs = [ unzip ]; - - # Why do shell scripts have \r\n ?? - # moving to /opt because jdk has lib/xercesImpl.jar as well - installPhase = '' - unzip ${src} - t=$out/opt/flex-sdk - mkdir -p $t $out/bin - mv * $t - rm $t/bin/*.exe $t/bin/*.bat - sed 's/ $//' -i $t/bin/* - for i in $t/bin/*; do - b="$(basename "$i")"; - cat > "$out/bin/$b" << EOF - #!/bin/sh - exec $t/bin/$b "\$@" - EOF - chmod +x $out/bin/$b $t/bin/$b - done - ''; - - meta = { - description = "Flex SDK for Adobe Flash / ActionScript"; - homepage = "https://www.adobe.com/products/flex.html"; - license = stdenv.lib.licenses.mpl11; - platforms = stdenv.lib.platforms.unix; - }; -} diff --git a/pkgs/development/compilers/apache-flex-sdk/default.nix b/pkgs/development/compilers/apache-flex-sdk/default.nix new file mode 100644 index 00000000000..e8759ec073b --- /dev/null +++ b/pkgs/development/compilers/apache-flex-sdk/default.nix @@ -0,0 +1,56 @@ +{ stdenv, fetchurl, makeWrapper, jre }: + +let + playerglobal_ver = "27.0"; + playerglobal = fetchurl { + url = "https://fpdownload.macromedia.com/get/flashplayer/updaters/27/playerglobal27_0.swc"; + sha256 = "0qw2bgls8qsmp80j8vpd4c7s0c8anlrk0ac8z42w89bajcdbwk2f"; + }; +in stdenv.mkDerivation rec { + name = "apache-flex-sdk-${version}"; + version = "4.16.1"; + + src = fetchurl { + url = "https://www.apache.org/dist/flex/${version}/binaries/${name}-bin.tar.gz"; + sha256 = "13iq16dqvgcpb0p35x66hzxsq5pkbr2lbwr766nnqiryinnagz8p"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ jre ]; + + buildPhase = ":"; + + postPatch = '' + shopt -s extglob + for i in bin/!(aasdoc|acompc|amxmlc); do + substituteInPlace $i --replace "java " "${jre}/bin/java " + done + ''; + + installPhase = '' + t=$out/opt/apache-flex-sdk + mkdir -p $t $out/bin + mv * $t + rm $t/bin/*.bat + ln -s $t/bin/* $out/bin/ + + for i in $out/bin/!(aasdoc|acompc|amxmlc); do + wrapProgram $i \ + --set FLEX_HOME $t \ + --set PLAYERGLOBAL_HOME $t/frameworks/libs/player/ + done + + mkdir -p $t/frameworks/libs/player/${playerglobal_ver}/ + cp ${playerglobal} $t/frameworks/libs/player/${playerglobal_ver}/playerglobal.swc + ''; + + fixupPhase = ":"; + + meta = with stdenv.lib; { + description = "Flex SDK for Adobe Flash / ActionScript"; + homepage = "https://flex.apache.org/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ dywedir ]; + }; +} diff --git a/pkgs/development/compilers/mint/crystal2nix.cr b/pkgs/development/compilers/mint/crystal2nix.cr new file mode 100644 index 00000000000..017ebe62b49 --- /dev/null +++ b/pkgs/development/compilers/mint/crystal2nix.cr @@ -0,0 +1,35 @@ +require "yaml" +require "json" + +class PrefetchJSON + JSON.mapping(sha256: String) +end + +File.open "shards.nix", "w+" do |file| + file.puts %({) + yaml = YAML.parse(File.read("shard.lock")) + yaml["shards"].each do |key, value| + owner, repo = value["github"].as_s.split("/") + url = "https://github.com/#{value["github"]}" + rev = if value["version"]? + "v#{value["version"]}" + else + value["commit"].as_s + end + + sha256 = "" + args = ["--url", url, "--rev", rev] + Process.run("nix-prefetch-git", args: args) do |x| + x.error.each_line { |e| puts e } + sha256 = PrefetchJSON.from_json(x.output).sha256 + end + + file.puts %( #{key} = {) + file.puts %( owner = "#{owner}";) + file.puts %( repo = "#{repo}";) + file.puts %( rev = "#{rev}";) + file.puts %( sha256 = "#{sha256}";) + file.puts %( };) + end + file.puts %(}) +end diff --git a/pkgs/development/compilers/mint/default.nix b/pkgs/development/compilers/mint/default.nix new file mode 100644 index 00000000000..619170d4a48 --- /dev/null +++ b/pkgs/development/compilers/mint/default.nix @@ -0,0 +1,61 @@ +{stdenv, lib, fetchFromGitHub, crystal, zlib, openssl, duktape}: +let + crystalPackages = lib.mapAttrs (name: src: + stdenv.mkDerivation { + name = lib.replaceStrings ["/"] ["-"] name; + src = fetchFromGitHub src; + phases = "installPhase"; + installPhase = ''cp -r $src $out''; + passthru = { libName = name; }; + } + ) (import ./shards.nix); + + crystalLib = stdenv.mkDerivation { + name = "crystal-lib"; + src = lib.attrValues crystalPackages; + libNames = lib.mapAttrsToList (k: v: [k v]) crystalPackages; + phases = "buildPhase"; + buildPhase = '' + mkdir -p $out + linkup () { + while [ "$#" -gt 0 ]; do + ln -s $2 $out/$1 + shift; shift + done + } + linkup $libNames + ''; + }; +in +stdenv.mkDerivation rec { + version = "2018-05-27"; + name = "mint-${version}"; + src = fetchFromGitHub { + owner = "mint-lang"; + repo = "mint"; + rev = "a3f0c86f54b8b3a18dda5c39c2089bdb1d774b4f"; + sha256 = "1bgs6jkwfc2ksq4gj55cl3h2l5g25f5bwlsjryiw9cbx5k4bp1kz"; + }; + + buildInputs = [ crystal zlib openssl duktape ]; + + buildPhase = '' + mkdir -p $out/bin + + mkdir tmp + cd tmp + ln -s ${crystalLib} lib + cp -r $src/* . + crystal build src/mint.cr -o $out/bin/mint --verbose --progress --release --no-debug + ''; + + installPhase = ''true''; + + meta = { + description = "A refreshing language for the front-end web"; + homepage = https://mint-lang.com/; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ manveru ]; + platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + }; +} diff --git a/pkgs/development/compilers/mint/shards.nix b/pkgs/development/compilers/mint/shards.nix new file mode 100644 index 00000000000..dcf7454b4ca --- /dev/null +++ b/pkgs/development/compilers/mint/shards.nix @@ -0,0 +1,62 @@ +{ + admiral = { + owner = "jwaldrip"; + repo = "admiral.cr"; + rev = "v1.6.1"; + sha256 = "0y30b9b9rkz43afd3b9l24hs0r170qyc07r05kvydbv89376c53i"; + }; + ameba = { + owner = "veelenga"; + repo = "ameba"; + rev = "v0.6.0"; + sha256 = "16jfyrkfc909h16si513lw944qp3dyapymczcqc2ic0jaal0af5b"; + }; + baked_file_system = { + owner = "schovi"; + repo = "baked_file_system"; + rev = "v0.9.6"; + sha256 = "06cpriaizp5pcqwdq3jl2lm4sz9b2gcxg3a9q3lh0fqk2acajzmx"; + }; + duktape = { + owner = "jessedoyle"; + repo = "duktape.cr"; + rev = "v0.13.0"; + sha256 = "0v0nckprgr7idmsx97g98as1a7z4hmlmwl924dbbaqvyslv5ls6w"; + }; + kemal = { + owner = "kemalcr"; + repo = "kemal"; + rev = "v0.22.0"; + sha256 = "0gq3c27grgh90fykbj9fdsz507lwd41gk686qfnig6npndqv1v10"; + }; + kilt = { + owner = "jeromegn"; + repo = "kilt"; + rev = "v0.4.0"; + sha256 = "1w9ib6j4xhwxdxx58nzc06gw7ci7vga03vgj1z1bnklamb0b0l0k"; + }; + radix = { + owner = "luislavena"; + repo = "radix"; + rev = "v0.3.8"; + sha256 = "1kn2xxj8a8j6f6g1dr0s9mkrj1xqnpzw9wnbq24mbv8ach9a1hva"; + }; + string_inflection = { + owner = "mosop"; + repo = "string_inflection"; + rev = "v0.2.1"; + sha256 = "10vkr28h7n53ijjv57ldxhh473086qg313lzs55a7wsh0zgc104m"; + }; + time_format = { + owner = "vladfaust"; + repo = "time_format.cr"; + rev = "v0.1.0"; + sha256 = "1f3rssdlcw2a5f74qa8bzlf1rh5dzvyg1d32w9qlisf2cc4lkh9g"; + }; + tree_template = { + owner = "anykeyh"; + repo = "tree_template"; + rev = "3fcb71ee6852040077dd1a2c8c55c67f4a95ba4e"; + sha256 = "04w89wpnkna4ipyy3pxshqqwgk965hz1d31vqp0mrb0ilmpsywdk"; + }; +} diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix index 998d7cd90de..a074c3d3a36 100644 --- a/pkgs/development/compilers/ponyc/default.nix +++ b/pkgs/development/compilers/ponyc/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation ( rec { name = "ponyc-${version}"; - version = "0.22.2"; + version = "0.22.3"; src = fetchFromGitHub { owner = "ponylang"; repo = "ponyc"; rev = version; - sha256 = "1sw038mci4174zn8n3b4p511bdwjb3hwrv5gyzbv477nna1y9lvn"; + sha256 = "0av664n3k73psn00bd36pibkyc5b530aqqiqpg4mw2ks060dm40v"; }; buildInputs = [ llvm makeWrapper which ]; diff --git a/pkgs/development/compilers/urn/default.nix b/pkgs/development/compilers/urn/default.nix new file mode 100644 index 00000000000..5add2ae4cc5 --- /dev/null +++ b/pkgs/development/compilers/urn/default.nix @@ -0,0 +1,61 @@ +{ stdenv, fetchFromGitLab, buildEnv, makeWrapper, lua, luajit, readline +, useLuaJit ? false +, extraLibraries ? [] +}: + +let + version = "0.7.1"; + # Build a sort of "union package" with all the native dependencies we + # have: Lua (or LuaJIT), readline, etc. Then, we can depend on this + # and refer to ${urn-rt} instead of ${lua}, ${readline}, etc. + urn-rt = buildEnv { + name = "urn-rt-${version}"; + ignoreCollisions = true; + paths = if useLuaJit then + [ luajit readline ] + else + [ lua ]; + }; + + inherit (stdenv.lib) optionalString concatMapStringsSep; +in + +stdenv.mkDerivation rec { + name = "urn-${optionalString (extraLibraries != []) "with-libraries-"}${version}"; + + src = fetchFromGitLab { + owner = "urn"; + repo = "urn"; + rev = "v${version}"; + sha256 = "1vw0sljrczbwl7fl5d3frbpklb0larzyp7s7mwwprkb07b027sd5"; + }; + + buildInputs = [ makeWrapper ]; + # Any packages that depend on the compiler have a transitive + # dependency on the Urn runtime support. + propagatedBuildInputs = [ urn-rt ]; + + makeFlags = ["-B"]; + + installPhase = '' + mkdir -p $out/bin $out/lib + install -m 0755 bin/urn.lua $out/bin/urn + cp -r lib $out/lib/urn + wrapProgram $out/bin/urn \ + --add-flags "-i $out/lib/urn --prelude $out/lib/urn/prelude.lisp" \ + --add-flags "${concatMapStringsSep " " (x: "-i ${x.libraryPath}") extraLibraries}" \ + --prefix PATH : ${urn-rt}/bin/ \ + --prefix LD_LIBRARY_PATH : ${urn-rt}/lib/ + ''; + + meta = with stdenv.lib; { + homepage = https://urn-lang.com; + description = "Yet another Lisp variant which compiles to Lua"; + license = licenses.bsd3; + maintainers = with maintainers; [ CrazedProgrammer ]; + }; + + passthru = { + inherit urn-rt; + }; +} diff --git a/pkgs/development/libraries/aws-sdk-cpp/default.nix b/pkgs/development/libraries/aws-sdk-cpp/default.nix index 18aeef04a77..46e6a73433d 100644 --- a/pkgs/development/libraries/aws-sdk-cpp/default.nix +++ b/pkgs/development/libraries/aws-sdk-cpp/default.nix @@ -15,13 +15,13 @@ let else throw "Unsupported system!"; in stdenv.mkDerivation rec { name = "aws-sdk-cpp-${version}"; - version = "1.4.40"; + version = "1.4.50"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-sdk-cpp"; rev = version; - sha256 = "16n5p29pf062mfsn7q8q8hw0ppxb02a0kkakd0vjrybqflpgf42j"; + sha256 = "1qly5zn7w9j8w6a9pjw25xnr01sfq8dn8g5zrz6xyjgz590fj2x7"; }; # FIXME: might be nice to put different APIs in different outputs diff --git a/pkgs/development/libraries/bulletml/default.nix b/pkgs/development/libraries/bulletml/default.nix index 240cc057a82..b61ac1dcb09 100644 --- a/pkgs/development/libraries/bulletml/default.nix +++ b/pkgs/development/libraries/bulletml/default.nix @@ -38,6 +38,7 @@ in stdenv.mkDerivation { "-C src" ]; nativeBuildInputs = [ bison perl ]; + hardeningDisable = [ "format" ]; installPhase = '' install -D -m 644 src/bulletml.d "$out"/include/d/bulletml.d diff --git a/pkgs/development/libraries/cfitsio/darwin-curl-config.patch b/pkgs/development/libraries/cfitsio/darwin-curl-config.patch new file mode 100644 index 00000000000..77d8f719d77 --- /dev/null +++ b/pkgs/development/libraries/cfitsio/darwin-curl-config.patch @@ -0,0 +1,25 @@ +diff -ruN cfitsio/configure cfitsio-curl-config/configure +--- cfitsio/configure 2018-05-09 21:16:00.000000000 +0200 ++++ cfitsio-curl-config/configure 2018-05-30 13:28:58.000000000 +0200 +@@ -4783,13 +4783,6 @@ + CURL_LIB="" + CURL_INC="" + # Use curl-config to get compiler & linker flags, if available. +-# On Macs, prefer XCode curl-config, and reject MacPorts version +-# until further notice to prevent build errors: +-if test "x$EXT" = xdarwin -a -x /usr/bin/curl-config; then +- CURLCONFIG="/usr/bin/curl-config" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking for curl-config... choosing /usr/bin/curl-config on Mac" >&5 +-$as_echo "checking for curl-config... choosing /usr/bin/curl-config on Mac" >&6; } +-else + # Extract the first word of "curl-config", so it can be a program name with args. + set dummy curl-config; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +@@ -4833,7 +4826,6 @@ + fi + fi + fi +-fi + CURLCONFIG=$ac_cv_prog_CURLCONFIG + if test -n "$CURLCONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURLCONFIG" >&5 diff --git a/pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch b/pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch new file mode 100644 index 00000000000..af38abf329e --- /dev/null +++ b/pkgs/development/libraries/cfitsio/darwin-rpath-universal.patch @@ -0,0 +1,21 @@ +diff -ruN cfitsio/configure cfitsio-rpath-universal/configure +--- cfitsio/configure 2018-05-09 21:16:00.000000000 +0200 ++++ cfitsio-rpath-universal/configure 2018-05-31 12:02:25.000000000 +0200 +@@ -4727,16 +4727,7 @@ + SHLIB_SUFFIX=".dylib" + CFITSIO_SHLIB="lib\${PACKAGE}.\${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}\${SHLIB_SUFFIX}" + CFITSIO_SHLIB_SONAME="lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX}" +- case $host in +- *darwin[56789]*) +- SHLIB_LD="$CC -dynamiclib -install_name lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" +- ;; +- *) +- # Build 'Universal' binaries (i386 & x86_64 architectures) and +- # use rpath token on Darwin 10.x or newer: +- SHLIB_LD="$CC -dynamiclib $C_UNIV_SWITCH -headerpad_max_install_names -install_name @rpath/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" +- ;; +- esac ++ SHLIB_LD="$CC -dynamiclib -install_name ${out}/lib/lib\${PACKAGE}.\${CFITSIO_SONAME}\${SHLIB_SUFFIX} -compatibility_version \${CFITSIO_SONAME} -current_version \${CFITSIO_SONAME}.\${CFITSIO_MAJOR}.\${CFITSIO_MINOR}" + + lhea_shlib_cflags="-fPIC -fno-common" + ;; diff --git a/pkgs/development/libraries/cfitsio/default.nix b/pkgs/development/libraries/cfitsio/default.nix index ecf5fb1f02f..a21158723be 100644 --- a/pkgs/development/libraries/cfitsio/default.nix +++ b/pkgs/development/libraries/cfitsio/default.nix @@ -8,9 +8,11 @@ sha256 = "07fghxh5fl8nqk3q0dh8rvc83npnm0hisxzcj16a6r7gj5pmp40l"; }; + patches = [ ./darwin-curl-config.patch ./darwin-rpath-universal.patch ]; + # Shared-only build buildFlags = "shared"; - patchPhase = '' sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in + postPatch = '' sed -e '/^install:/s/libcfitsio.a //' -e 's@/bin/@@g' -i Makefile.in ''; meta = with stdenv.lib; { @@ -27,6 +29,6 @@ ''; # Permissive BSD-style license. license = "permissive"; - platforms = platforms.linux; + platforms = with platforms; linux ++ darwin; }; } diff --git a/pkgs/development/lua-modules/generic/default.nix b/pkgs/development/lua-modules/generic/default.nix index 091ae06ab91..5669eae96c5 100644 --- a/pkgs/development/lua-modules/generic/default.nix +++ b/pkgs/development/lua-modules/generic/default.nix @@ -29,9 +29,9 @@ else if [[ $LUA_PATH = *"$package_path"* ]]; then return; fi if [[ -z $LUA_PATH ]]; then - export LUA_PATH="$package_path/?.lua" + export LUA_PATH="$package_path/?.lua;$package_path/?/init.lua" else - export LUA_PATH="$LUA_PATH;$package_path/?.lua" + export LUA_PATH="$LUA_PATH;$package_path/?.lua;$package_path/?/init.lua" fi } diff --git a/pkgs/development/mobile/androidenv/androidndk.nix b/pkgs/development/mobile/androidenv/androidndk.nix index 78e278be237..a0a15bf184d 100644 --- a/pkgs/development/mobile/androidenv/androidndk.nix +++ b/pkgs/development/mobile/androidenv/androidndk.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, zlib, ncurses, p7zip, lib, makeWrapper +{ stdenv, fetchurl, zlib, ncurses5, p7zip, lib, makeWrapper , coreutils, file, findutils, gawk, gnugrep, gnused, jdk, which -, platformTools, python3, version, sha256 +, platformTools, python3, libcxx, version, sha256 }: stdenv.mkDerivation rec { @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { phases = "buildPhase"; - nativeBuildInputs = [ p7zip makeWrapper ]; + nativeBuildInputs = [ p7zip makeWrapper file ]; buildCommand = let bin_path = "$out/bin"; @@ -33,9 +33,14 @@ stdenv.mkDerivation rec { in '' set -x mkdir -pv $out/libexec + mkdir -pv $out/lib64 + ln -s ${ncurses5.out}/lib/libncursesw.so.5 $out/lib64/libtinfo.so.5 + ln -s ${ncurses5.out}/lib/libncurses.so.5 $out/lib64/libncurses.so.5 cd $out/libexec 7z x $src + patchShebangs ${pkg_path} + # so that it doesn't fail because of read-only permissions set cd - ${if (version == "10e") then @@ -46,8 +51,6 @@ stdenv.mkDerivation rec { '' else '' - patchShebangs ${pkg_path}/build/tools/make-standalone-toolchain.sh - patch -p1 \ --no-backup-if-mismatch \ -d $out/libexec/${name} < ${ ./. + builtins.toPath ("/make_standalone_toolchain.py_" + "${version}" + ".patch") } @@ -60,17 +63,13 @@ stdenv.mkDerivation rec { \( -type f -a -name "*.so*" \) -o \ \( -type f -a -perm -0100 \) \ \) -exec patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-*so.? \ - --set-rpath ${stdenv.lib.makeLibraryPath [ zlib.out ncurses ]} {} \; + --set-rpath $out/lib64:${stdenv.lib.makeLibraryPath [ libcxx.out zlib.out ncurses5 ]} {} \; # fix ineffective PROGDIR / MYNDKDIR determination for i in ndk-build ${lib.optionalString (version == "10e") "ndk-gdb ndk-gdb-py"} do sed -i -e ${sed_script_1} $i done - ${lib.optionalString (version == "10e") '' - sed -i -e ${sed_script_2} ndk-which - # a bash script - patchShebangs ndk-which - ''} + # wrap for i in ndk-build ${lib.optionalString (version == "10e") "ndk-gdb ndk-gdb-py ndk-which"} do diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix index 3978ae1aeb7..5846e4fb6de 100644 --- a/pkgs/development/mobile/androidenv/default.nix +++ b/pkgs/development/mobile/androidenv/default.nix @@ -219,7 +219,7 @@ rec { inherit (buildPackages) p7zip makeWrapper; inherit (pkgs) - stdenv fetchurl zlib ncurses lib python3 + stdenv fetchurl zlib ncurses5 lib python3 libcxx coreutils file findutils gawk gnugrep gnused jdk which; inherit platformTools; version = "10e"; @@ -230,7 +230,7 @@ rec { inherit (buildPackages) p7zip makeWrapper; inherit (pkgs) - stdenv fetchurl zlib ncurses lib python3 + stdenv fetchurl zlib ncurses5 lib python3 libcxx coreutils file findutils gawk gnugrep gnused jdk which; inherit platformTools; version = "16b"; @@ -241,7 +241,7 @@ rec { inherit (buildPackages) p7zip makeWrapper; inherit (pkgs) - stdenv fetchurl zlib ncurses lib python3 + stdenv fetchurl zlib ncurses5 lib python3 libcxx coreutils file findutils gawk gnugrep gnused jdk which; inherit platformTools; version = "17"; diff --git a/pkgs/development/tools/dep2nix/default.nix b/pkgs/development/tools/dep2nix/default.nix new file mode 100644 index 00000000000..6367f6be298 --- /dev/null +++ b/pkgs/development/tools/dep2nix/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub, buildGoPackage +, makeWrapper, nix-prefetch-git }: + +buildGoPackage rec { + name = "dep2nix-${version}"; + version = "0.0.1"; + + goPackagePath = "github.com/nixcloud/dep2nix"; + + src = fetchFromGitHub { + owner = "nixcloud"; + repo = "dep2nix"; + rev = version; + sha256 = "05b06wgcy88fb5ccqwq3mfhrhcblr1akpxgsf44kgbdwf5nzz87g"; + }; + + nativeBuildInputs = [ + makeWrapper + ]; + + postFixup = '' + wrapProgram $bin/bin/dep2nix \ + --prefix PATH : ${nix-prefetch-git}/bin + ''; + + goDeps = ./deps.nix; + + meta = with stdenv.lib; { + description = "Convert `Gopkg.lock` files from golang dep into `deps.nix`"; + license = licenses.bsd3; + homepage = https://github.com/nixcloud/dep2nix; + maintainers = [ maintainers.mic92 ]; + }; +} diff --git a/pkgs/development/tools/dep2nix/deps.nix b/pkgs/development/tools/dep2nix/deps.nix new file mode 100644 index 00000000000..fc9280e9df5 --- /dev/null +++ b/pkgs/development/tools/dep2nix/deps.nix @@ -0,0 +1,145 @@ + + # file automatically generated from Gopkg.lock with https://github.com/nixcloud/dep2nix (golang dep) + [ + + { + goPackagePath = "github.com/Masterminds/semver"; + fetch = { + type = "git"; + url = "https://github.com/Masterminds/semver"; + rev = "a93e51b5a57ef416dac8bb02d11407b6f55d8929"; + sha256 = "1rd3p135r7iw0lvaa6vk7afxna87chq61a7a0wqnxd3xgpnpa9ik"; + }; + } + + { + goPackagePath = "github.com/Masterminds/vcs"; + fetch = { + type = "git"; + url = "https://github.com/Masterminds/vcs"; + rev = "6f1c6d150500e452704e9863f68c2559f58616bf"; + sha256 = "02bpyzccazw9lwqchcz349al4vlxnz4m5gzwigk02zg2qpa1j53j"; + }; + } + + { + goPackagePath = "github.com/armon/go-radix"; + fetch = { + type = "git"; + url = "https://github.com/armon/go-radix"; + rev = "1fca145dffbcaa8fe914309b1ec0cfc67500fe61"; + sha256 = "19jws9ngncpbhghzcy7biyb4r8jh14mzknyk67cvq6ln7kh1qyic"; + }; + } + + { + goPackagePath = "github.com/boltdb/bolt"; + fetch = { + type = "git"; + url = "https://github.com/boltdb/bolt"; + rev = "2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8"; + sha256 = "0z7j06lijfi4y30ggf2znak2zf2srv2m6c68ar712wd2ys44qb3r"; + }; + } + + { + goPackagePath = "github.com/golang/dep"; + fetch = { + type = "git"; + url = "https://github.com/CrushedPixel/dep"; + rev = "fa9f32339c8855ebe7e7bc66e549036a7e06d37a"; + sha256 = "1knaxs1ji1b0b68393f24r8qzvahxz9x7rqwc8jsjlshvpz0hlm6"; + }; + } + + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "bbd03ef6da3a115852eaf24c8a1c46aeb39aa175"; + sha256 = "1pyli3dcagi7jzpiazph4fhkz7a3z4bhd25nwbb7g0iy69b8z1g4"; + }; + } + + { + goPackagePath = "github.com/jmank88/nuts"; + fetch = { + type = "git"; + url = "https://github.com/jmank88/nuts"; + rev = "8b28145dffc87104e66d074f62ea8080edfad7c8"; + sha256 = "1d0xj1dj1lfalq3pg15h0c645n84lf122xx3zkm7hawq9zri6n5k"; + }; + } + + { + goPackagePath = "github.com/nightlyone/lockfile"; + fetch = { + type = "git"; + url = "https://github.com/nightlyone/lockfile"; + rev = "6a197d5ea61168f2ac821de2b7f011b250904900"; + sha256 = "03znnf6rzyyi4h4qj81py1xpfs3pnfm39j4bfc9qzakz5j9y1gdl"; + }; + } + + { + goPackagePath = "github.com/pelletier/go-toml"; + fetch = { + type = "git"; + url = "https://github.com/pelletier/go-toml"; + rev = "acdc4509485b587f5e675510c4f2c63e90ff68a8"; + sha256 = "1y5m9pngxhsfzcnxh8ma5nsllx74wn0jr47p2n6i3inrjqxr12xh"; + }; + } + + { + goPackagePath = "github.com/pkg/errors"; + fetch = { + type = "git"; + url = "https://github.com/pkg/errors"; + rev = "645ef00459ed84a119197bfb8d8205042c6df63d"; + sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5"; + }; + } + + { + goPackagePath = "github.com/sdboyer/constext"; + fetch = { + type = "git"; + url = "https://github.com/sdboyer/constext"; + rev = "836a144573533ea4da4e6929c235fd348aed1c80"; + sha256 = "0055yw73di4spa1wwpa2pyb708wmh9r3xd8dcv8pn81dba94if1w"; + }; + } + + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "dc948dff8834a7fe1ca525f8d04e261c2b56e70d"; + sha256 = "0gkw1am63agb1rgpxr2qhns9npr99mzwrxg7px88qq8h93zzd4kg"; + }; + } + + { + goPackagePath = "golang.org/x/sync"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sync"; + rev = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5"; + sha256 = "12lzldlj1cqc1babp1hkkn76fglzn5abkqvmbpr4f2j95mf9x836"; + }; + } + + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "37707fdb30a5b38865cfb95e5aab41707daec7fd"; + sha256 = "1abrr2507a737hdqv4q7pw7hv6ls9pdiq9crhdi52r3gcz6hvizg"; + }; + } + +] diff --git a/pkgs/development/tools/gllvm/default.nix b/pkgs/development/tools/gllvm/default.nix index 6cf36e44dd1..cae6d2255bf 100644 --- a/pkgs/development/tools/gllvm/default.nix +++ b/pkgs/development/tools/gllvm/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { name = "gllvm-${version}"; - version = "1.2.1"; + version = "1.2.2"; goPackagePath = "github.com/SRI-CSL/gllvm"; @@ -10,7 +10,7 @@ buildGoPackage rec { owner = "SRI-CSL"; repo = "gllvm"; rev = "v${version}"; - sha256 = "1rbvn7qhzb7xxqv0wrkwxq4sm657vsl6q7nwrfq2zwb21573811z"; + sha256 = "1k6081frnc6i6h3fa8d796cirhbf5kkshw7qyarz5wi3fcgijn4s"; }; meta = with stdenv.lib; { @@ -18,5 +18,6 @@ buildGoPackage rec { description = "Whole Program LLVM: wllvm ported to go"; license = licenses.bsd3; maintainers = with maintainers; [ dtzWill ]; + platforms = platforms.all; }; } diff --git a/pkgs/development/tools/ocaml/opaline/default.nix b/pkgs/development/tools/ocaml/opaline/default.nix new file mode 100644 index 00000000000..10088cce491 --- /dev/null +++ b/pkgs/development/tools/ocaml/opaline/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, ocamlPackages }: + +stdenv.mkDerivation rec { + version = "0.3.1"; + name = "opaline-${version}"; + + src = fetchFromGitHub { + owner = "jaapb"; + repo = "opaline"; + rev = "v${version}"; + sha256 = "0vd5xaf272hk4iqfj347jvbppy7my5p5gz8yqpkvl1d1i6lzh08v"; + }; + + buildInputs = with ocamlPackages; [ ocaml findlib ocamlbuild opam-file-format ]; + + preInstall = "mkdir -p $out/bin"; + + installFlags = [ "PREFIX=$(out)" ]; + + meta = { + description = "OPAm Light INstaller Engine"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + inherit (src.meta) homepage; + inherit (ocamlPackages.ocaml.meta) platforms; + }; +} diff --git a/pkgs/development/tools/wllvm/default.nix b/pkgs/development/tools/wllvm/default.nix index 8fa7574f311..18d7be93258 100644 --- a/pkgs/development/tools/wllvm/default.nix +++ b/pkgs/development/tools/wllvm/default.nix @@ -1,13 +1,13 @@ { stdenv, python3Packages }: python3Packages.buildPythonApplication rec { - version = "1.2.1"; + version = "1.2.2"; pname = "wllvm"; name = "${pname}-${version}"; src = python3Packages.fetchPypi { inherit pname version; - sha256 = "1yr0gijhgbxx1sl5a8dygr3a8g5wfkh9rk4v789r2aplvcbanv5a"; + sha256 = "1zrjcabv41105mmv632gp488kmhya37n0jwgwxhadps4z3jv2qxb"; }; meta = with stdenv.lib; { diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 817241fbe0f..c55fbbb0b8a 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -13,9 +13,9 @@ let fetchurl = args@{url, sha256, ...}: in rec { stable = fetchurl rec { - version = "3.0"; + version = "3.0.1"; url = "https://dl.winehq.org/wine/source/3.0/wine-${version}.tar.xz"; - sha256 = "1v7vq9iinkscbq6wg85fb0d2137660fg2nk5iabxkl2wr850asil"; + sha256 = "1wr63n70pli83p3rmclr2j4lxzs4ll1cwlpdlaajfrf6v9yhvl5s"; ## see http://wiki.winehq.org/Gecko gecko32 = fetchurl rec { @@ -39,16 +39,16 @@ in rec { unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "3.7"; + version = "3.9"; url = "https://dl.winehq.org/wine/source/3.x/wine-${version}.tar.xz"; - sha256 = "1drbzk3y0m14lkq3vzwwkvain5shykgcbmyzh6gcb5r4sxh3givn"; + sha256 = "0ddphvlp9lsjyqc6zckinc36bggpkg925v0x2vqr8nkdjs0w5bfc"; inherit (stable) mono gecko32 gecko64; }; staging = fetchFromGitHub rec { # https://github.com/wine-compholio/wine-staging/releases inherit (unstable) version; - sha256 = "0kam73jqhah7bzji5csxxhhfdp6byhzpcph6xnzjqz2aic5xk7xi"; + sha256 = "022hzh9i0pc063vcdy7ilb1lxlxpzgr4llcb52y2j3gz1psrcyqs"; owner = "wine-staging"; repo = "wine-staging"; rev = "v${version}"; @@ -56,8 +56,8 @@ in rec { winetricks = fetchFromGitHub rec { # https://github.com/Winetricks/winetricks/releases - version = "20180217"; - sha256 = "0k3vlsqjbzys5dfbxwgw76al8gh44jsjqkc06va103frkrgjxvc5"; + version = "20180513"; + sha256 = "0ijjqvx2110mfcfyj3rvw53phqbay91vsp5ncv40szx0d259jbw4"; owner = "Winetricks"; repo = "winetricks"; rev = version; diff --git a/pkgs/misc/themes/adapta-kde/default.nix b/pkgs/misc/themes/adapta-kde/default.nix new file mode 100644 index 00000000000..875973c9d3f --- /dev/null +++ b/pkgs/misc/themes/adapta-kde/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + name = "adapta-kde-theme-${version}"; + version = "20180512"; + + src = fetchFromGitHub { + owner = "PapirusDevelopmentTeam"; + repo = "adapta-kde"; + rev = version; + sha256 = "1lgpkylhzbayk892inql16sjyy9d3v126f9i1v7qgha1203rwcji"; + }; + + makeFlags = ["PREFIX=$(out)" ]; + + # Make this a fixed-output derivation + outputHashMode = "recursive"; + outputHashAlgo = "sha256"; + ouputHash = "0rxhk8sp81vb2mngqr7kn9vlqyliq9aqj2d25igcr01v5axbxbzb"; + + meta = { + description = "A port of the Adapta theme for Plasma"; + homepage = https://git.io/adapta-kde; + license = stdenv.lib.licenses.gpl3; + maintainers = [ stdenv.lib.maintainers.tadfisher ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/os-specific/linux/nftables/default.nix b/pkgs/os-specific/linux/nftables/default.nix index be52cbc2029..63d389fdb1f 100644 --- a/pkgs/os-specific/linux/nftables/default.nix +++ b/pkgs/os-specific/linux/nftables/default.nix @@ -2,12 +2,12 @@ , flex, bison, libmnl, libnftnl, gmp, readline }: stdenv.mkDerivation rec { - version = "0.8.3"; + version = "0.8.5"; name = "nftables-${version}"; src = fetchurl { url = "http://netfilter.org/projects/nftables/files/${name}.tar.bz2"; - sha256 = "0f2yv7as1ybkfvn75f72x0z9y1ydibw4s3hbzhlmvsc8vgsy2syi"; + sha256 = "08z3xaxdryi0i9gcfifs77c96xs8ljynkr2hbfgf3w67l60az6wf"; }; configureFlags = [ diff --git a/pkgs/servers/dns/pdns-recursor/default.nix b/pkgs/servers/dns/pdns-recursor/default.nix index 76f1bd91e33..286447352fc 100644 --- a/pkgs/servers/dns/pdns-recursor/default.nix +++ b/pkgs/servers/dns/pdns-recursor/default.nix @@ -8,11 +8,11 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "pdns-recursor-${version}"; - version = "4.1.2"; + version = "4.1.3"; src = fetchurl { url = "https://downloads.powerdns.com/releases/pdns-recursor-${version}.tar.bz2"; - sha256 = "0xpd8k7ahwrwabz05zbjmg54dmd4hm5hkbfn8m1ws6y4f7qm4inv"; + sha256 = "12x8gm6771wh2xaqad3p5y08p5pimp6k9h830s0487mwg9glacy1"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/servers/dns/powerdns/default.nix b/pkgs/servers/dns/powerdns/default.nix index 0ef24a97f88..20c9eecb0d5 100644 --- a/pkgs/servers/dns/powerdns/default.nix +++ b/pkgs/servers/dns/powerdns/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { name = "powerdns-${version}"; - version = "4.1.2"; + version = "4.1.3"; src = fetchurl { url = "http://downloads.powerdns.com/releases/pdns-${version}.tar.bz2"; - sha256 = "15anf9x4h3acf7rhvaim4595v2hrz7mn4va9qv18bfnif40vxn46"; + sha256 = "1bh1qdgw415ax542123b6isri1jh4mbf2i9i1yffkfk0xmyv79cs"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/servers/monitoring/prometheus/dnsmasq-exporter-deps.nix b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter-deps.nix new file mode 100644 index 00000000000..1acf859e81a --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter-deps.nix @@ -0,0 +1,93 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/beorn7/perks"; + fetch = { + type = "git"; + url = "https://github.com/beorn7/perks"; + rev = "3a771d992973f24aa725d07868b467d1ddfceafb"; + sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3"; + }; + } + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "b4deda0973fb4c70b50d226b1af49f3da59f5265"; + sha256 = "0ya4ha7m20bw048m1159ppqzlvda4x0vdprlbk5sdgmy74h3xcdq"; + }; + } + { + goPackagePath = "github.com/matttproud/golang_protobuf_extensions"; + fetch = { + type = "git"; + url = "https://github.com/matttproud/golang_protobuf_extensions"; + rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c"; + sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"; + }; + } + { + goPackagePath = "github.com/miekg/dns"; + fetch = { + type = "git"; + url = "https://github.com/miekg/dns"; + rev = "9c76f9827e170bfcd354c2cb02a6fd428faf81a6"; + sha256 = "0yym4jr15cqwlppnqfsp92i7p1ir12ys695wffb3in7gnnm0d38n"; + }; + } + { + goPackagePath = "github.com/prometheus/client_golang"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_golang"; + rev = "82f5ff156b29e276022b1a958f7d385870fb9814"; + sha256 = "111j329yrlgvh73dm80gawwxsh9dgjkw74254kyj5c2rfmra7znz"; + }; + } + { + goPackagePath = "github.com/prometheus/client_model"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/client_model"; + rev = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c"; + sha256 = "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"; + }; + } + { + goPackagePath = "github.com/prometheus/common"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/common"; + rev = "d811d2e9bf898806ecfb6ef6296774b13ffc314c"; + sha256 = "0r4067r4ysmljksqw3awcxx5qplqhykahc5igdzgkky7i4bvaik1"; + }; + } + { + goPackagePath = "github.com/prometheus/procfs"; + fetch = { + type = "git"; + url = "https://github.com/prometheus/procfs"; + rev = "8b1c2da0d56deffdbb9e48d4414b4e674bd8083e"; + sha256 = "0x128p15h35mgwqxkigfkk1lfrcz9g697ahl8v6xp9kwvcqvjrrf"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "640f4622ab692b87c2f3a94265e6f579fe38263d"; + sha256 = "097m4qhcljhp180171j5fjhq4740iirfkkajfd7yrxqhp4s9hljx"; + }; + } + { + goPackagePath = "golang.org/x/sync"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sync"; + rev = "1d60e4601c6fd243af51cc01ddf169918a5407ca"; + sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6"; + }; + } +] diff --git a/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix new file mode 100644 index 00000000000..bcfc82adf47 --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/dnsmasq-exporter.nix @@ -0,0 +1,23 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "dnsmasq_exporter-unstable-2018-05-05"; + + goPackagePath = "github.com/google/dnsmasq_exporter"; + + src = fetchFromGitHub { + owner = "google"; + repo = "dnsmasq_exporter"; + sha256 = "1kzq4h7z28xadx425nbgxadk62yiz6279d300fyiyi83hwq0ay8c"; + rev = "e1f281b435bbefbb2d17fc57c051ede0ab973c59"; + }; + + goDeps = ./dnsmasq-exporter-deps.nix; + + meta = with stdenv.lib; { + inherit (src.meta) homepage; + description = "A dnsmasq exporter for Prometheus"; + license = licenses.asl20; + maintainers = with maintainers; [ willibutz ]; + }; +} diff --git a/pkgs/servers/web-apps/morty/default.nix b/pkgs/servers/web-apps/morty/default.nix new file mode 100644 index 00000000000..eeb19f81c54 --- /dev/null +++ b/pkgs/servers/web-apps/morty/default.nix @@ -0,0 +1,41 @@ +{ stdenv, buildGoPackage, fetchgit }: + +buildGoPackage rec { + name = "morty-${version}"; + version = "0.2.0"; + + goPackagePath = "github.com/asciimoo/morty"; + + src = fetchgit { + rev = "v${version}"; + url = "https://github.com/asciimoo/morty"; + sha256 = "1wvrdlwbpzizfg7wrcfyf1x6qllp3aw425n88z516wc9jalfqrrm"; + }; + + goDeps = ./deps.nix; + + meta = with stdenv.lib; { + homepage = "https://github.com/asciimoo/morty"; + maintainers = with maintainers; [ leenaars ]; + description = "Privacy aware web content sanitizer proxy as a service"; + longDescription = '' + Morty is a web content sanitizer proxy as a service. It rewrites web + pages to exclude malicious HTML tags and attributes. It also replaces + external resource references to prevent third party information leaks. + + The main goal of morty is to provide a result proxy for searx, but it + can be used as a standalone sanitizer service too. + + Features: + + * HTML sanitization + * Rewrites HTML/CSS external references to locals + * JavaScript blocking + * No Cookies forwarded + * No Referrers + * No Caching/Etag + * Supports GET/POST forms and IFrames + * Optional HMAC URL verifier key to prevent service abuse +''; + }; +} diff --git a/pkgs/servers/web-apps/morty/deps.nix b/pkgs/servers/web-apps/morty/deps.nix new file mode 100644 index 00000000000..643fc5bb763 --- /dev/null +++ b/pkgs/servers/web-apps/morty/deps.nix @@ -0,0 +1,57 @@ +# This file was generated by https://github.com/kamilchm/go2nix v1.2.1 +[ + { + goPackagePath = "github.com/klauspost/compress"; + fetch = { + type = "git"; + url = "https://github.com/klauspost/compress"; + rev = "5698df94daded084fa836b7df2ffbf6cbd3dd63a"; + sha256 = "1jligmzsyv08dysdaih3r95ki0dqnay9wlzganl4r0mamwhq22wz"; + }; + } + { + goPackagePath = "github.com/klauspost/cpuid"; + fetch = { + type = "git"; + url = "https://github.com/klauspost/cpuid"; + rev = "ae832f27941af41db13bd6d8efd2493e3b22415a"; + sha256 = "1h46y0lbzx0zjdnwbh0znf2ghgbvpzk1p269kkn7v8645xk3apk9"; + }; + } + { + goPackagePath = "github.com/valyala/bytebufferpool"; + fetch = { + type = "git"; + url = "https://github.com/valyala/bytebufferpool"; + rev = "e746df99fe4a3986f4d4f79e13c1e0117ce9c2f7"; + sha256 = "01lqzjddq6kz9v41nkky7wbgk7f1cw036sa7ldz10d82g5klzl93"; + }; + } + { + goPackagePath = "github.com/valyala/fasthttp"; + fetch = { + type = "git"; + url = "https://github.com/valyala/fasthttp"; + rev = "e5f51c11919d4f66400334047b897ef0a94c6f3c"; + sha256 = "0g24gys7xk449jd9ja89vr33i3amcb12jnmhsrmd5r2q8byv3l09"; + }; + } + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "f5dfe339be1d06f81b22525fe34671ee7d2c8904"; + sha256 = "01y9j7pjnnld4ipmzjvs0hls0hh698f2sga8cxaw5y6r5j7igaah"; + }; + } + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "4e4a3210bb54bb31f6ab2cdca2edcc0b50c420c1"; + sha256 = "10505r4xw1njnr2ns1s5r62s4pwif0kfaa30xxpgpz6qxrrmw15s"; + }; + } +] diff --git a/pkgs/tools/filesystems/squashfs/darwin.patch b/pkgs/tools/filesystems/squashfs/darwin.patch new file mode 100644 index 00000000000..6022e65be47 --- /dev/null +++ b/pkgs/tools/filesystems/squashfs/darwin.patch @@ -0,0 +1,431 @@ +diff --git a/squashfs-tools/action.c b/squashfs-tools/action.c +index 4b06ccb..26365e7 100644 +--- a/squashfs-tools/action.c ++++ b/squashfs-tools/action.c +@@ -38,6 +38,10 @@ + #include + #include + ++#ifndef FNM_EXTMATCH /* glibc extension */ ++ #define FNM_EXTMATCH 0 ++#endif ++ + #include "squashfs_fs.h" + #include "mksquashfs.h" + #include "action.h" +@@ -2284,9 +2288,12 @@ static char *get_start(char *s, int n) + + static int subpathname_fn(struct atom *atom, struct action_data *action_data) + { +- return fnmatch(atom->argv[0], get_start(strdupa(action_data->subpath), ++ char *path = strdup(action_data->subpath); ++ int is_match = fnmatch(atom->argv[0], get_start(path, + count_components(atom->argv[0])), + FNM_PATHNAME|FNM_PERIOD|FNM_EXTMATCH) == 0; ++ free(path); ++ return is_match; + } + + /* +diff --git a/squashfs-tools/info.c b/squashfs-tools/info.c +index 7968c77..c8e4c52 100644 +--- a/squashfs-tools/info.c ++++ b/squashfs-tools/info.c +@@ -134,31 +134,22 @@ void dump_state() + void *info_thrd(void *arg) + { + sigset_t sigmask; +- struct timespec timespec = { .tv_sec = 1, .tv_nsec = 0 }; +- int sig, waiting = 0; ++ int sig, err, waiting = 0; + + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGQUIT); + sigaddset(&sigmask, SIGHUP); ++ sigaddset(&sigmask, SIGALRM); + + while(1) { +- if(waiting) +- sig = sigtimedwait(&sigmask, NULL, ×pec); +- else +- sig = sigwaitinfo(&sigmask, NULL); ++ err = sigwait(&sigmask, &sig); + +- if(sig == -1) { ++ if(err == -1) { + switch(errno) { +- case EAGAIN: +- /* interval timed out */ +- waiting = 0; +- /* FALLTHROUGH */ + case EINTR: +- /* if waiting, the wait will be longer, but +- that's OK */ + continue; + default: +- BAD_ERROR("sigtimedwait/sigwaitinfo failed " ++ BAD_ERROR("sigwaitfailed " + "because %s\n", strerror(errno)); + } + } +@@ -169,8 +160,12 @@ void *info_thrd(void *arg) + /* set one second interval period, if ^\ received + within then, dump queue and cache status */ + waiting = 1; +- } else ++ alarm(1); ++ } else if (sig == SIGQUIT) { + dump_state(); ++ } else if (sig == SIGALRM) { ++ waiting = 0; ++ } + } + } + +diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c +index d696a51..c86d1b3 100644 +--- a/squashfs-tools/mksquashfs.c ++++ b/squashfs-tools/mksquashfs.c +@@ -50,6 +50,10 @@ + #include + #include + ++#ifndef FNM_EXTMATCH /* glibc extension */ ++ #define FNM_EXTMATCH 0 ++#endif ++ + #ifndef linux + #define __BYTE_ORDER BYTE_ORDER + #define __BIG_ENDIAN BIG_ENDIAN +@@ -831,13 +835,13 @@ char *subpathname(struct dir_ent *dir_ent) + } + + +-inline unsigned int get_inode_no(struct inode_info *inode) ++static inline unsigned int get_inode_no(struct inode_info *inode) + { + return inode->inode_number; + } + + +-inline unsigned int get_parent_no(struct dir_info *dir) ++static inline unsigned int get_parent_no(struct dir_info *dir) + { + return dir->depth ? get_inode_no(dir->dir_ent->inode) : inode_no; + } +@@ -2030,7 +2034,7 @@ struct file_info *duplicate(long long file_size, long long bytes, + } + + +-inline int is_fragment(struct inode_info *inode) ++static inline int is_fragment(struct inode_info *inode) + { + off_t file_size = inode->buf.st_size; + +@@ -2999,13 +3003,13 @@ struct inode_info *lookup_inode2(struct stat *buf, int pseudo, int id) + } + + +-inline struct inode_info *lookup_inode(struct stat *buf) ++static inline struct inode_info *lookup_inode(struct stat *buf) + { + return lookup_inode2(buf, 0, 0); + } + + +-inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this) ++static inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this) + { + if (inode->inode_number == 0) { + inode->inode_number = use_this ? : inode_no ++; +@@ -3016,7 +3020,7 @@ inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this) + } + + +-inline struct dir_ent *create_dir_entry(char *name, char *source_name, ++static inline struct dir_ent *create_dir_entry(char *name, char *source_name, + char *nonstandard_pathname, struct dir_info *dir) + { + struct dir_ent *dir_ent = malloc(sizeof(struct dir_ent)); +@@ -3034,7 +3038,7 @@ inline struct dir_ent *create_dir_entry(char *name, char *source_name, + } + + +-inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir, ++static inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir, + struct inode_info *inode_info) + { + struct dir_info *dir = dir_ent->our_dir; +@@ -3050,7 +3054,7 @@ inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir, + } + + +-inline void add_dir_entry2(char *name, char *source_name, ++static inline void add_dir_entry2(char *name, char *source_name, + char *nonstandard_pathname, struct dir_info *sub_dir, + struct inode_info *inode_info, struct dir_info *dir) + { +@@ -3062,7 +3066,7 @@ inline void add_dir_entry2(char *name, char *source_name, + } + + +-inline void free_dir_entry(struct dir_ent *dir_ent) ++static inline void free_dir_entry(struct dir_ent *dir_ent) + { + if(dir_ent->name) + free(dir_ent->name); +@@ -3083,7 +3087,7 @@ inline void free_dir_entry(struct dir_ent *dir_ent) + } + + +-inline void add_excluded(struct dir_info *dir) ++static inline void add_excluded(struct dir_info *dir) + { + dir->excluded ++; + } +@@ -4200,6 +4204,7 @@ void initialise_threads(int readq, int fragq, int bwriteq, int fwriteq, + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGQUIT); + sigaddset(&sigmask, SIGHUP); ++ sigaddset(&sigmask, SIGALRM); + if(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == -1) + BAD_ERROR("Failed to set signal mask in intialise_threads\n"); + +@@ -4987,6 +4992,36 @@ int parse_num(char *arg, int *res) + + int get_physical_memory() + { ++ int phys_mem; ++#ifndef linux ++ #ifdef HW_MEMSIZE ++ #define SYSCTL_PHYSMEM HW_MEMSIZE ++ #elif defined(HW_PHYSMEM64) ++ #define SYSCTL_PHYSMEM HW_PHYSMEM64 ++ #else ++ #define SYSCTL_PHYSMEM HW_PHYSMEM ++ #endif ++ ++ int mib[2]; ++ uint64_t sysctl_physmem = 0; ++ size_t sysctl_len = sizeof(sysctl_physmem); ++ ++ mib[0] = CTL_HW; ++ mib[1] = SYSCTL_PHYSMEM; ++ ++ if(sysctl(mib, 2, &sysctl_physmem, &sysctl_len, NULL, 0) == 0) { ++ /* some systems use 32-bit values, work with what we're given */ ++ if (sysctl_len == 4) ++ sysctl_physmem = *(uint32_t*)&sysctl_physmem; ++ phys_mem = sysctl_physmem >> 20; ++ } else { ++ ERROR_START("Failed to get amount of available " ++ "memory."); ++ ERROR_EXIT(" Defaulting to least viable amount\n"); ++ phys_mem = SQUASHFS_LOWMEM; ++ } ++ #undef SYSCTL_PHYSMEM ++#else + /* + * Long longs are used here because with PAE, a 32-bit + * machine can have more than 4GB of physical memory +@@ -4996,10 +5031,11 @@ int get_physical_memory() + */ + long long num_pages = sysconf(_SC_PHYS_PAGES); + long long page_size = sysconf(_SC_PAGESIZE); +- int phys_mem = num_pages * page_size >> 20; ++ phys_mem = num_pages * page_size >> 20; + + if(num_pages == -1 || page_size == -1) + return 0; ++#endif + + if(phys_mem < SQUASHFS_LOWMEM) + BAD_ERROR("Mksquashfs requires more physical memory than is " +diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h +index 55708a3..d44d1fd 100644 +--- a/squashfs-tools/mksquashfs.h ++++ b/squashfs-tools/mksquashfs.h +@@ -24,6 +24,7 @@ + * mksquashfs.h + * + */ ++#include + + struct dir_info { + char *pathname; +diff --git a/squashfs-tools/pseudo.c b/squashfs-tools/pseudo.c +index cb74cf6..fe2b4bc 100644 +--- a/squashfs-tools/pseudo.c ++++ b/squashfs-tools/pseudo.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/squashfs-tools/read_xattrs.c b/squashfs-tools/read_xattrs.c +index 42106f5..837d3fb 100644 +--- a/squashfs-tools/read_xattrs.c ++++ b/squashfs-tools/read_xattrs.c +@@ -39,13 +39,13 @@ + #include + #endif + ++#include ++ + #include "squashfs_fs.h" + #include "squashfs_swap.h" + #include "xattr.h" + #include "error.h" + +-#include +- + extern int read_fs_bytes(int, long long, int, void *); + extern int read_block(int, long long, long long *, int, void *); + +diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c +index f190e96..927e441 100644 +--- a/squashfs-tools/unsquashfs.c ++++ b/squashfs-tools/unsquashfs.c +@@ -32,7 +32,12 @@ + #include "stdarg.h" + #include "fnmatch_compat.h" + ++#ifndef linux ++#include ++#else + #include ++#endif ++ + #include + #include + #include +@@ -2185,6 +2190,7 @@ void initialise_threads(int fragment_buffer_size, int data_buffer_size) + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGQUIT); + sigaddset(&sigmask, SIGHUP); ++ sigaddset(&sigmask, SIGALRM); + if(pthread_sigmask(SIG_BLOCK, &sigmask, NULL) == -1) + EXIT_UNSQUASH("Failed to set signal mask in initialise_threads" + "\n"); +diff --git a/squashfs-tools/unsquashfs.h b/squashfs-tools/unsquashfs.h +index 0edbd25..cea9caa 100644 +--- a/squashfs-tools/unsquashfs.h ++++ b/squashfs-tools/unsquashfs.h +@@ -46,6 +46,10 @@ + #include + #include + ++#ifndef FNM_EXTMATCH /* glibc extension */ ++ #define FNM_EXTMATCH 0 ++#endif ++ + #ifndef linux + #define __BYTE_ORDER BYTE_ORDER + #define __BIG_ENDIAN BIG_ENDIAN +diff --git a/squashfs-tools/unsquashfs_info.c b/squashfs-tools/unsquashfs_info.c +index c8e2b9b..7d4f7af 100644 +--- a/squashfs-tools/unsquashfs_info.c ++++ b/squashfs-tools/unsquashfs_info.c +@@ -97,31 +97,22 @@ void dump_state() + void *info_thrd(void *arg) + { + sigset_t sigmask; +- struct timespec timespec = { .tv_sec = 1, .tv_nsec = 0 }; +- int sig, waiting = 0; ++ int sig, err, waiting = 0; + + sigemptyset(&sigmask); + sigaddset(&sigmask, SIGQUIT); + sigaddset(&sigmask, SIGHUP); ++ sigaddset(&sigmask, SIGALRM); + + while(1) { +- if(waiting) +- sig = sigtimedwait(&sigmask, NULL, ×pec); +- else +- sig = sigwaitinfo(&sigmask, NULL); ++ err = sigwait(&sigmask, &sig); + +- if(sig == -1) { ++ if(err == -1) { + switch(errno) { +- case EAGAIN: +- /* interval timed out */ +- waiting = 0; +- /* FALLTHROUGH */ + case EINTR: +- /* if waiting, the wait will be longer, but +- that's OK */ + continue; + default: +- BAD_ERROR("sigtimedwait/sigwaitinfo failed " ++ BAD_ERROR("sigwait failed " + "because %s\n", strerror(errno)); + } + } +@@ -133,8 +124,12 @@ void *info_thrd(void *arg) + /* set one second interval period, if ^\ received + within then, dump queue and cache status */ + waiting = 1; +- } else ++ alarm(1); ++ } else if (sig == SIGQUIT) { + dump_state(); ++ } else if (sig == SIGALRM) { ++ waiting = 0; ++ } + } + } + +diff --git a/squashfs-tools/unsquashfs_xattr.c b/squashfs-tools/unsquashfs_xattr.c +index 59f4aae..13f0e35 100644 +--- a/squashfs-tools/unsquashfs_xattr.c ++++ b/squashfs-tools/unsquashfs_xattr.c +@@ -27,6 +27,11 @@ + + #include + ++#ifdef XATTR_NOFOLLOW /* Apple's xattrs */ ++ #define lsetxattr(path_, name_, val_, sz_, flags_) \ ++ setxattr(path_, name_, val_, sz_, 0, flags_ | XATTR_NOFOLLOW) ++#endif ++ + #define NOSPACE_MAX 10 + + extern int root_process; +diff --git a/squashfs-tools/xattr.c b/squashfs-tools/xattr.c +index b46550c..5b32eca 100644 +--- a/squashfs-tools/xattr.c ++++ b/squashfs-tools/xattr.c +@@ -22,6 +22,14 @@ + * xattr.c + */ + ++#ifndef linux ++#define __BYTE_ORDER BYTE_ORDER ++#define __BIG_ENDIAN BIG_ENDIAN ++#define __LITTLE_ENDIAN LITTLE_ENDIAN ++#else ++#include ++#endif ++ + #define TRUE 1 + #define FALSE 0 + +@@ -36,6 +44,13 @@ + #include + #include + ++#ifdef XATTR_NOFOLLOW /* Apple's xattrs */ ++ #define llistxattr(path_, buf_, sz_) \ ++ listxattr(path_, buf_, sz_, XATTR_NOFOLLOW) ++ #define lgetxattr(path_, name_, val_, sz_) \ ++ getxattr(path_, name_, val_, sz_, 0, XATTR_NOFOLLOW) ++#endif ++ + #include "squashfs_fs.h" + #include "squashfs_swap.h" + #include "mksquashfs.h" diff --git a/pkgs/tools/filesystems/squashfs/default.nix b/pkgs/tools/filesystems/squashfs/default.nix index a7f4e85eb34..d5bcd912c95 100644 --- a/pkgs/tools/filesystems/squashfs/default.nix +++ b/pkgs/tools/filesystems/squashfs/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { ./0001-If-SOURCE_DATE_EPOCH-is-set-override-timestamps-with.patch ./0002-If-SOURCE_DATE_EPOCH-is-set-also-clamp-content-times.patch ./0003-remove-frag-deflator-thread.patch - ]; + ] ++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch; buildInputs = [ zlib xz ] ++ stdenv.lib.optional lz4Support lz4; @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { meta = { homepage = http://squashfs.sourceforge.net/; description = "Tool for creating and unpacking squashfs filesystems"; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; license = stdenv.lib.licenses.gpl2Plus; maintainers = with stdenv.lib.maintainers; [ ruuda ]; }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 458250acce6..f310fd156c3 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -37,6 +37,7 @@ mapAliases (rec { QmidiNet = qmidinet; # added 2016-05-22 accounts-qt = libsForQt5.accounts-qt; # added 2015-12-19 adobeReader = adobe-reader; # added 2013-11-04 + adobe_flex_sdk = apache-flex-sdk; # added 2018-06-01 ag = silver-searcher; # added 2018-04-25 aircrackng = aircrack-ng; # added 2016-01-14 ammonite-repl = ammonite; # added 2017-05-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 606b912c75e..5a561d6ff0c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -738,6 +738,8 @@ with pkgs; adapta-gtk-theme = callPackage ../misc/themes/adapta { }; + adapta-kde-theme = callPackage ../misc/themes/adapta-kde { }; + aria2 = callPackage ../tools/networking/aria2 { inherit (darwin.apple_sdk.frameworks) Security; }; @@ -6119,7 +6121,7 @@ with pkgs; elmPackages = recurseIntoAttrs (callPackage ../development/compilers/elm { }); - adobe_flex_sdk = callPackage ../development/compilers/adobe-flex-sdk { }; + apache-flex-sdk = callPackage ../development/compilers/apache-flex-sdk { }; fpc = callPackage ../development/compilers/fpc { }; @@ -6782,6 +6784,8 @@ with pkgs; microscheme = callPackage ../development/compilers/microscheme { }; + mint = callPackage ../development/compilers/mint { }; + mitscheme = callPackage ../development/compilers/mit-scheme { texLive = texlive.combine { inherit (texlive) scheme-small; }; texinfo = texinfo5; @@ -6873,6 +6877,8 @@ with pkgs; ocamlPackages = ocamlPackages_4_02; }; + opaline = callPackage ../development/tools/ocaml/opaline { }; + opam = callPackage ../development/tools/ocaml/opam { }; picat = callPackage ../development/compilers/picat { @@ -7004,6 +7010,8 @@ with pkgs; bupc = callPackage ../development/compilers/bupc { }; + urn = callPackage ../development/compilers/urn { }; + urweb = callPackage ../development/compilers/urweb { }; inherit (callPackage ../development/compilers/vala { }) @@ -7134,7 +7142,13 @@ with pkgs; guile = guile_2_2; - hadoop = callPackage ../applications/networking/cluster/hadoop { }; + inherit (callPackage ../applications/networking/cluster/hadoop { }) + hadoop_2_7 + hadoop_2_8 + hadoop_2_9 + hadoop_3_0 + hadoop_3_1; + hadoop = hadoop_2_7; io = callPackage ../development/interpreters/io { }; @@ -12597,6 +12611,8 @@ with pkgs; mlmmj = callPackage ../servers/mail/mlmmj { }; + morty = callPackage ../servers/web-apps/morty { }; + myserver = callPackage ../servers/http/myserver { }; nas = callPackage ../servers/nas { }; @@ -12840,6 +12856,7 @@ with pkgs; prometheus-blackbox-exporter = callPackage ../servers/monitoring/prometheus/blackbox-exporter.nix { }; prometheus-collectd-exporter = callPackage ../servers/monitoring/prometheus/collectd-exporter.nix { }; prometheus-consul-exporter = callPackage ../servers/monitoring/prometheus/consul-exporter.nix { }; + prometheus-dnsmasq-exporter = callPackage ../servers/monitoring/prometheus/dnsmasq-exporter.nix { }; prometheus-dovecot-exporter = callPackage ../servers/monitoring/prometheus/dovecot-exporter.nix { }; prometheus-fritzbox-exporter = callPackage ../servers/monitoring/prometheus/fritzbox-exporter.nix { }; prometheus-haproxy-exporter = callPackage ../servers/monitoring/prometheus/haproxy-exporter.nix { }; @@ -13868,6 +13885,8 @@ with pkgs; dep = callPackage ../development/tools/dep { }; + dep2nix = callPackage ../development/tools/dep2nix { }; + easyjson = callPackage ../development/tools/easyjson { }; go-bindata = callPackage ../development/tools/go-bindata { }; @@ -14946,6 +14965,8 @@ with pkgs; ffmpeg = ffmpeg_1; }; + barrier = callPackage ../applications/misc/barrier {}; + banshee = callPackage ../applications/audio/banshee { gconf = pkgs.gnome2.GConf; libgpod = pkgs.libgpod.override { monoSupport = true; }; @@ -16770,6 +16791,8 @@ with pkgs; makeself = callPackage ../applications/misc/makeself { }; + mapmap = libsForQt5.callPackage ../applications/video/mapmap { }; + marathon = callPackage ../applications/networking/cluster/marathon { }; marathonctl = callPackage ../tools/virtualization/marathonctl { } ; @@ -18006,7 +18029,7 @@ with pkgs; saslSupport = false; sasl = cyrus_sasl; }) - subversion18 subversion19; + subversion18 subversion19 subversion_1_10; subversion = pkgs.subversion19; @@ -18917,6 +18940,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + zeronet = callPackage ../applications/networking/p2p/zeronet { }; + zexy = callPackage ../applications/audio/pd-plugins/zexy { }; zgrviewer = callPackage ../applications/graphics/zgrviewer {};