Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 25e8015fed29
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: aa364b90d4e3
Choose a head ref
  • 20 commits
  • 14 files changed
  • 10 contributors

Commits on May 9, 2020

  1. Copy the full SHA
    43d6898 View commit details
  2. Copy the full SHA
    1e0912d View commit details

Commits on May 25, 2020

  1. nixos/networking: Add the FQDN and hostname to /etc/hosts

    This fixes the output of "hostname --fqdn" (previously the domain name
    was not appended). Additionally it's now possible to use the FQDN.
    
    This works by unconditionally adding two entries to /etc/hosts:
    127.0.0.1 localhost
    ::1 localhost
    
    These are the first two entries and therefore gethostbyaddr() will
    always resolve "127.0.0.1" and "::1" back to "localhost" [0].
    This works because nscd (or rather the nss-files module) returns the
    first matching row from /etc/hosts (and ignores the rest).
    
    The FQDN and hostname entries are appended later to /etc/hosts, e.g.:
    127.0.0.2 nixos-unstable.test.tld nixos-unstable
    ::1 nixos-unstable.test.tld nixos-unstable
    Note: We use 127.0.0.2 here to follow nss-myhostname (systemd) as close
    as possible. This has the advantage that 127.0.0.2 can be resolved back
    to the FQDN but also the drawback that applications that only listen to
    127.0.0.1 (and not additionally ::1) cannot be reached via the FQDN.
    If you would like this to work you can use the following configuration:
    ```nix
    networking.hosts."127.0.0.1" = [
      "${config.networking.hostName}.${config.networking.domain}"
      config.networking.hostName
    ];
    ```
    
    Therefore gethostbyname() resolves "nixos-unstable" to the FQDN
    (canonical name): "nixos-unstable.test.tld".
    
    Advantages over the previous behaviour:
    - The FQDN will now also be resolved correctly (the entry was missing).
    - E.g. the command "hostname --fqdn" will now work as expected.
    Drawbacks:
    - Overrides entries form the DNS (an issue if e.g. $FQDN should resolve
      to the public IP address instead of 127.0.0.1)
      - Note: This was already partly an issue as there's an entry for
        $HOSTNAME (without the domain part) that resolves to
        127.0.1.1 (!= 127.0.0.1).
    - Unknown (could potentially cause other unexpected issues, but special
      care was taken).
    
    [0]: Some applications do apparently depend on this behaviour (see
    c578924) and this is typically the expected behaviour.
    
    Co-authored-by: Florian Klink <flokli@flokli.de>
    primeos and flokli committed May 25, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    234d95a View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    46a1352 View commit details
  3. flexget: 3.1.30 -> 3.1.56

    r-ryantm committed May 25, 2020
    Copy the full SHA
    3e7543a View commit details
  4. nixos/tests/hostname: init (check system's host name)

    NixOS currently has issues with setting the FQDN of a system in a way
    where standard tools work. In order to help with experimentation and
    avoid regressions, add a test that checks that the hostname is
    reported as the user wanted it to be.
    
    Co-authored-by: Michael Weiss <dev.primeos@gmail.com>
    blitz and primeos committed May 25, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    837ec31 View commit details
  5. nixos: Require networking.hostName to be a valid DNS label

    This also means that the hostname must not contain the domain name part
    anymore (i.e. must not be a FQDN).
    See RFC 1035 [0], "man 5 hostname", or the kernel documentation [1].
    Note: For legacy reasons we also allow underscores inside of the label
    but this is not recommended and intentionally left undocumented.
    
    [0]: https://tools.ietf.org/html/rfc1035
    [1]: https://www.kernel.org/doc/html/latest/admin-guide/sysctl/kernel.html#domainname-hostname
    
    Co-authored-by: zimbatm <zimbatm@zimbatm.com>
    primeos and zimbatm committed May 25, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    primeos Michael Weiss
    Copy the full SHA
    993baa5 View commit details
  6. gexiv2: 0.12.0 -> 0.12.1

    r-ryantm committed May 25, 2020
    Copy the full SHA
    27fbd43 View commit details
  7. Copy the full SHA
    a82b2dd View commit details
  8. miniflux: 2.0.19 -> 2.0.21

    mweinelt committed May 25, 2020

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    78e5bcf View commit details
  9. Merge pull request #76542 from primeos/etc-hosts-fqdn-fix

    nixos/networking: Add the FQDN and hostname to /etc/hosts
    flokli authored May 25, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    921a4ec View commit details
  10. miniflux: install manpage

    marsam committed May 25, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    marsam Mario Rodas
    Copy the full SHA
    fed9824 View commit details
  11. flexget: 3.1.56 -> 3.1.57

    marsam committed May 25, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    marsam Mario Rodas
    Copy the full SHA
    958ab0a View commit details
  12. Merge pull request #88879 from r-ryantm/auto-update/FlexGet

    flexget: 3.1.30 -> 3.1.56
    marsam authored May 25, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5dd85bf View commit details

Commits on May 26, 2020

  1. Merge pull request #77281 from bcdarwin/python-livelossplot

    python3Packages.livelossplot: init at v0.5.0
    bhipple authored May 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    77eb712 View commit details
  2. Merge pull request #88897 from mweinelt/miniflux

    miniflux: 2.0.19 -> 2.0.21
    marsam authored May 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    032e57d View commit details
  3. Merge pull request #87447 from bcdarwin/ocaml-torch

    ocamlPackages.torch: init at 0.8
    bhipple authored May 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5e22232 View commit details
  4. Merge pull request #88883 from r-ryantm/auto-update/gexiv2

    gexiv2: 0.12.0 -> 0.12.1
    jtojnar authored May 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1c0b497 View commit details
  5. Merge pull request #88890 from r-ryantm/auto-update/gnome-software

    gnome3.gnome-software: 3.36.0 -> 3.36.1
    jtojnar authored May 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8a25e3d View commit details
  6. Merge pull request #75237 from r-ryantm/auto-update/gmic

    gmic: 2.7.5 -> 2.8.0
    jtojnar authored May 26, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    aa364b9 View commit details
26 changes: 26 additions & 0 deletions nixos/doc/manual/release-notes/rl-2009.xml
Original file line number Diff line number Diff line change
@@ -415,6 +415,32 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
continue to work through Breezy.
</para>
</listitem>
<listitem>
<para>
In addition to the hostname, the fully qualified domain name (FQDN),
which consists of <literal>${cfg.hostName}</literal> and
<literal>${cfg.domain}</literal> is now added to
<literal>/etc/hosts</literal>, to allow local FQDN resolution, as used by the
<literal>hostname --fqdn</literal> command and other applications that
try to determine the FQDN. These new entries take precedence over entries
from the DNS which could cause regressions in some very specific setups.
Additionally the hostname is now resolved to <literal>127.0.0.2</literal>
instead of <literal>127.0.1.1</literal> to be consistent with what
<literal>nss-myhostname</literal> (from systemd) returns.
The old behaviour can e.g. be restored by using
<literal>networking.hosts = lib.mkForce { "127.0.1.1" = [ config.networking.hostName ]; };</literal>.
</para>
</listitem>
<listitem>
<para>
The hostname (<literal>networking.hostName</literal>) must now be a valid
DNS label (see RFC 1035) and as such must not contain the domain part.
This means that the hostname must start with a letter, end with a letter
or digit, and have as interior characters only letters, digits, and
hyphen. The maximum length is 63 characters. Additionally it is
recommended to only use lower-case characters.
</para>
</listitem>
</itemizedlist>
</section>

33 changes: 18 additions & 15 deletions nixos/modules/config/networking.nix
Original file line number Diff line number Diff line change
@@ -8,9 +8,6 @@ let

cfg = config.networking;

localhostMapped4 = cfg.hosts ? "127.0.0.1" && elem "localhost" cfg.hosts."127.0.0.1";
localhostMapped6 = cfg.hosts ? "::1" && elem "localhost" cfg.hosts."::1";

localhostMultiple = any (elem "localhost") (attrValues (removeAttrs cfg.hosts [ "127.0.0.1" "::1" ]));

in
@@ -147,12 +144,6 @@ in
config = {

assertions = [{
assertion = localhostMapped4;
message = ''`networking.hosts` doesn't map "127.0.0.1" to "localhost"'';
} {
assertion = !cfg.enableIPv6 || localhostMapped6;
message = ''`networking.hosts` doesn't map "::1" to "localhost"'';
} {
assertion = !localhostMultiple;
message = ''
`networking.hosts` maps "localhost" to something other than "127.0.0.1"
@@ -161,22 +152,34 @@ in
'';
}];

networking.hosts = {
"127.0.0.1" = [ "localhost" ];
} // optionalAttrs (cfg.hostName != "") {
"127.0.1.1" = [ cfg.hostName ];
# These entries are required for "hostname -f" and to resolve both the
# hostname and FQDN correctly:
networking.hosts = let
hostnames = # Note: The FQDN (canonical hostname) has to come first:
optional (cfg.hostName != "" && cfg.domain != null) "${cfg.hostName}.${cfg.domain}"
++ optional (cfg.hostName != "") cfg.hostName; # Then the hostname (without the domain)
in {
"127.0.0.2" = hostnames;
} // optionalAttrs cfg.enableIPv6 {
"::1" = [ "localhost" ];
"::1" = hostnames;
};

networking.hostFiles = let
# Note: localhostHosts has to appear first in /etc/hosts so that 127.0.0.1
# resolves back to "localhost" (as some applications assume) instead of
# the FQDN! By default "networking.hosts" also contains entries for the
# FQDN so that e.g. "hostname -f" works correctly.
localhostHosts = pkgs.writeText "localhost-hosts" ''
127.0.0.1 localhost
${optionalString cfg.enableIPv6 "::1 localhost"}
'';
stringHosts =
let
oneToString = set: ip: ip + " " + concatStringsSep " " set.${ip} + "\n";
allToString = set: concatMapStrings (oneToString set) (attrNames set);
in pkgs.writeText "string-hosts" (allToString (filterAttrs (_: v: v != []) cfg.hosts));
extraHosts = pkgs.writeText "extra-hosts" cfg.extraHosts;
in mkBefore [ stringHosts extraHosts ];
in mkBefore [ localhostHosts stringHosts extraHosts ];

environment.etc =
{ # /etc/services: TCP/UDP port assignments.
16 changes: 13 additions & 3 deletions nixos/modules/tasks/network-interfaces.nix
Original file line number Diff line number Diff line change
@@ -376,10 +376,20 @@ in

networking.hostName = mkOption {
default = "nixos";
type = types.str;
# Only allow hostnames without the domain name part (i.e. no FQDNs, see
# e.g. "man 5 hostname") and require valid DNS labels (recommended
# syntax). Note: We also allow underscores for compatibility/legacy
# reasons (as undocumented feature):
type = types.strMatching
"^[[:alpha:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$";
description = ''
The name of the machine. Leave it empty if you want to obtain
it from a DHCP server (if using DHCP).
The name of the machine. Leave it empty if you want to obtain it from a
DHCP server (if using DHCP). The hostname must be a valid DNS label (see
RFC 1035 section 2.3.1: "Preferred name syntax") and as such must not
contain the domain part. This means that the hostname must start with a
letter, end with a letter or digit, and have as interior characters only
letters, digits, and hyphen. The maximum length is 63 characters.
Additionally it is recommended to only use lower-case characters.
'';
};

1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -134,6 +134,7 @@ in
hitch = handleTest ./hitch {};
hocker-fetchdocker = handleTest ./hocker-fetchdocker {};
home-assistant = handleTest ./home-assistant.nix {};
hostname = handleTest ./hostname.nix {};
hound = handleTest ./hound.nix {};
hydra = handleTest ./hydra {};
hydra-db-migration = handleTest ./hydra/db-migration.nix {};
66 changes: 66 additions & 0 deletions nixos/tests/hostname.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{ system ? builtins.currentSystem,
config ? {},
pkgs ? import ../.. { inherit system config; }
}:

with import ../lib/testing-python.nix { inherit system pkgs; };
with pkgs.lib;

let
makeHostNameTest = hostName: domain:
let
fqdn = hostName + (optionalString (domain != null) ".${domain}");
in
makeTest {
name = "hostname-${fqdn}";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ primeos blitz ];
};

machine = { lib, ... }: {
networking.hostName = hostName;
networking.domain = domain;

environment.systemPackages = with pkgs; [
inetutils
];
};

testScript = ''
start_all()
machine = ${hostName}
machine.wait_for_unit("network-online.target")
# The FQDN, domain name, and hostname detection should work as expected:
assert "${fqdn}" == machine.succeed("hostname --fqdn").strip()
assert "${optionalString (domain != null) domain}" == machine.succeed("dnsdomainname").strip()
assert (
"${hostName}"
== machine.succeed(
'hostnamectl status | grep "Static hostname" | cut -d: -f2'
).strip()
)
# 127.0.0.1 and ::1 should resolve back to "localhost":
assert (
"localhost" == machine.succeed("getent hosts 127.0.0.1 | awk '{print $2}'").strip()
)
assert "localhost" == machine.succeed("getent hosts ::1 | awk '{print $2}'").strip()
# 127.0.0.2 should resolve back to the FQDN and hostname:
fqdn_and_host_name = "${optionalString (domain != null) "${hostName}.${domain} "}${hostName}"
assert (
fqdn_and_host_name
== machine.succeed("getent hosts 127.0.0.2 | awk '{print $2,$3}'").strip()
)
'';
};

in
{
noExplicitDomain = makeHostNameTest "ahost" null;

explicitDomain = makeHostNameTest "ahost" "adomain";
}
4 changes: 2 additions & 2 deletions pkgs/applications/networking/flexget/default.nix
Original file line number Diff line number Diff line change
@@ -2,11 +2,11 @@

python3Packages.buildPythonApplication rec {
pname = "FlexGet";
version = "3.1.30";
version = "3.1.57";

src = python3Packages.fetchPypi {
inherit pname version;
sha256 = "453992c6bf8a7b0f83abeddd0e8f989dc10fd59e407e3803b886072cff2576a7";
sha256 = "661663726f75b12ba2e67db1276a9abf586b41db1ff313488ca35a439ec5d721";
};

postPatch = ''
4 changes: 2 additions & 2 deletions pkgs/desktops/gnome-3/core/gnome-software/default.nix
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@ in

stdenv.mkDerivation rec {
pname = "gnome-software";
version = "3.36.0";
version = "3.36.1";

src = fetchurl {
url = "mirror://gnome/sources/gnome-software/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0b5b1k0a531c2jyf4g59dw7lblga8xrba38mzfdl57dnknbvbafs";
sha256 = "0vkgpy2afb33rrk94zqlm2q728xhzjj8s24n9wh9ylw00z3nckad";
};

patches = [
4 changes: 2 additions & 2 deletions pkgs/development/libraries/gexiv2/default.nix
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@

stdenv.mkDerivation rec {
pname = "gexiv2";
version = "0.12.0";
version = "0.12.1";

outputs = [ "out" "dev" "devdoc" ];

src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0slj5yj8c90l9pp5i3z74x5r3r4da0xfmbzkfq5k0dkg72q3kxaq";
sha256 = "0xxxq8xdkgkn146my307jgws4qgxx477h0ybg1mqza1ycmczvsla";
};

nativeBuildInputs = [ meson ninja pkgconfig gobject-introspection vala gtk-doc docbook_xsl docbook_xml_dtd_43 ];
56 changes: 56 additions & 0 deletions pkgs/development/ocaml-modules/torch/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{ stdenv
, buildDunePackage
, fetchFromGitHub
, cmdliner
, ctypes
, npy
, ocaml-compiler-libs
, ppx_custom_printf
, ppx_expect
, ppx_sexp_conv
, sexplib
, stdio
, pytorch
}:

buildDunePackage rec {
pname = "torch";
version = "0.8";

owner = "LaurentMazare";

minimumOCamlVersion = "4.07";

src = fetchFromGitHub {
inherit owner;
repo = "ocaml-${pname}";
rev = version;
sha256 = "19w31paj24pns2ahk9j9rgpkb5hpcd41kfaarxrlddww5dl6pxvi";
};

propagatedBuildInputs = [
cmdliner
ctypes
npy
ocaml-compiler-libs
pytorch
pytorch.dev
ppx_custom_printf
ppx_expect
ppx_sexp_conv
sexplib
stdio
];

preBuild = ''export LIBTORCH=${pytorch.dev}/'';

doCheck = true;
checkPhase = "dune runtest";

meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Ocaml bindings to Pytorch";
maintainers = [ maintainers.bcdarwin ];
license = licenses.asl20;
};
}
40 changes: 40 additions & 0 deletions pkgs/development/python-modules/livelossplot/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, isPy27
, pytest
, bokeh
, ipython
, matplotlib
, numpy
, nbconvert
, nbformat
}:

buildPythonPackage rec {
pname = "livelossplot";
version = "0.5.0";

disabled = isPy27;

src = fetchFromGitHub {
owner = "stared";
repo = pname;
rev = "v${version}";
sha256 = "164v65qglgyg38q9ajnas99rp14mvrk5hn8x76b8iy81vszmx1c0";
};

propagatedBuildInputs = [ bokeh ipython matplotlib numpy ];

checkInputs = [ pytest nbconvert nbformat ];
checkPhase = ''
pytest tests tests/external_test_examples.py
'';

meta = with stdenv.lib; {
description = "Live training loss plot in Jupyter for Keras, PyTorch, and others";
homepage = "https://github.com/stared/livelossplot";
license = licenses.mit;
maintainers = with maintainers; [ bcdarwin ];
};
}
11 changes: 7 additions & 4 deletions pkgs/servers/miniflux/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoPackage, fetchFromGitHub, installShellFiles }:

buildGoPackage rec {
pname = "miniflux";
version = "2.0.19";
version = "2.0.21";

src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "121qy1af1qbc09c3yfwhpk6r3hwmh3jg6gjx8ygfv3hfrss9yfll";
sha256 = "0yhzmfs35jfc7vq26r9c14v4lnv8sxj3pv23r2cx2rfx47b1zmk7";
};

goPackagePath = "miniflux.app";

nativeBuildInputs = [ installShellFiles ];

doCheck = true;

buildFlagsArray = ''
-ldflags=-X miniflux.app/version.Version=${version}
-ldflags=-s -w -X miniflux.app/version.Version=${version}
'';

postInstall = ''
mv $out/bin/miniflux.app $out/bin/miniflux
installManPage go/src/${goPackagePath}/miniflux.1
'';

meta = with stdenv.lib; {
11 changes: 6 additions & 5 deletions pkgs/tools/graphics/gmic/default.nix
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
, fetchurl
, cmake
, ninja
, pkgconfig
, pkg-config
, opencv3
, openexr
, graphicsmagick
@@ -15,19 +15,19 @@

stdenv.mkDerivation rec {
pname = "gmic";
version = "2.7.5";
version = "2.9.0";

outputs = [ "out" "lib" "dev" "man" ];

src = fetchurl {
url = "https://gmic.eu/files/source/gmic_${version}.tar.gz";
sha256 = "008lpjm3w5hzfccam6qf0rizdg3a9cqrizhr7vrpskmbr1j451d6";
sha256 = "YjNpX5snmZ3MfMOqdICw8ZK9RN6FIJCRo7S4plroxLU=";
};

nativeBuildInputs = [
cmake
ninja
pkgconfig
pkg-config
];

buildInputs = [
@@ -43,12 +43,13 @@ stdenv.mkDerivation rec {

cmakeFlags = [
"-DBUILD_LIB_STATIC=OFF"
"-DENABLE_CURL=OFF"
"-DENABLE_DYNAMIC_LINKING=ON"
];

meta = with stdenv.lib; {
description = "Open and full-featured framework for image processing";
homepage = "http://gmic.eu/";
homepage = "https://gmic.eu/";
license = licenses.cecill20;
platforms = platforms.unix;
};
4 changes: 4 additions & 0 deletions pkgs/top-level/ocaml-packages.nix
Original file line number Diff line number Diff line change
@@ -758,6 +758,10 @@ let

tls = callPackage ../development/ocaml-modules/tls { };

torch = callPackage ../development/ocaml-modules/torch {
inherit (pkgs.python3Packages) pytorch;
};

type_conv_108_08_00 = callPackage ../development/ocaml-modules/type_conv/108.08.00.nix { };
type_conv_109_60_01 = callPackage ../development/ocaml-modules/type_conv/109.60.01.nix { };
type_conv_112_01_01 = callPackage ../development/ocaml-modules/type_conv/112.01.01.nix { };
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -889,6 +889,8 @@ in {

limitlessled = callPackage ../development/python-modules/limitlessled { };

livelossplot = callPackage ../development/python-modules/livelossplot { };

lmtpd = callPackage ../development/python-modules/lmtpd { };

logster = callPackage ../development/python-modules/logster { };