From c3bd75c75255c993fb1ec61c590a23ac31169744 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Wed, 21 Apr 2021 10:02:36 +0200 Subject: [PATCH 01/28] ceph: 15.2.10 -> 16.2.1 --- pkgs/tools/filesystems/ceph/default.nix | 23 +++++++++++++++++++---- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/filesystems/ceph/default.nix b/pkgs/tools/filesystems/ceph/default.nix index e923bb6132e..d13d4915e1e 100644 --- a/pkgs/tools/filesystems/ceph/default.nix +++ b/pkgs/tools/filesystems/ceph/default.nix @@ -1,5 +1,4 @@ { lib, stdenv, runCommand, fetchurl -, fetchpatch , ensureNewerSourcesHook , cmake, pkg-config , which, git @@ -14,6 +13,15 @@ , libnl, libcap_ng , rdkafka , nixosTests +, cryptsetup +, sqlite +, lua +, icu +, bzip2 +, doxygen +, graphviz +, fmt +, python3 # Optional Dependencies , yasm ? null, fcgi ? null, expat ? null @@ -123,10 +131,10 @@ let ]); sitePackages = ceph-python-env.python.sitePackages; - version = "15.2.10"; + version = "16.2.1"; src = fetchurl { url = "http://download.ceph.com/tarballs/ceph-${version}.tar.gz"; - sha256 = "1xfijynfb56gydpwh6h4q781xymwxih6nx26idnkcjqih48nsn01"; + sha256 = "1qqvfhnc94vfrq1ddizf6habjlcp77abry4v18zlq6rnhwr99zrh"; }; in rec { ceph = stdenv.mkDerivation { @@ -142,12 +150,18 @@ in rec { pkg-config which git python3Packages.wrapPython makeWrapper python3Packages.python # for the toPythonPath function (ensureNewerSourcesHook { year = "1980"; }) + python3 + fmt + # for building docs/man-pages presumably + doxygen + graphviz ]; buildInputs = cryptoLibsMap.${cryptoStr} ++ [ boost ceph-python-env libxml2 optYasm optLibatomic_ops optLibs3 malloc zlib openldap lttng-ust babeltrace gperf gtest cunit snappy lz4 oathToolkit leveldb libnl libcap_ng rdkafka + cryptsetup sqlite lua icu bzip2 ] ++ lib.optionals stdenv.isLinux [ linuxHeaders util-linux libuuid udev keyutils optLibaio optLibxfs optZfs # ceph 14 @@ -171,7 +185,6 @@ in rec { ''; cmakeFlags = [ - "-DWITH_PYTHON3=ON" "-DWITH_SYSTEM_ROCKSDB=OFF" # breaks Bluestore "-DCMAKE_INSTALL_DATADIR=${placeholder "lib"}/lib" @@ -182,6 +195,8 @@ in rec { "-DWITH_TESTS=OFF" # TODO breaks with sandbox, tries to download stuff with npm "-DWITH_MGR_DASHBOARD_FRONTEND=OFF" + # WITH_XFS has been set default ON from Ceph 16, keeping it optional in nixpkgs for now + ''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}'' ]; postFixup = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71a063a4393..e825afd6691 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3313,7 +3313,8 @@ in libceph = ceph.lib; inherit (callPackages ../tools/filesystems/ceph { - boost = boost172.override { enablePython = true; python = python38; }; + boost = boost17x.override { enablePython = true; python = python3; }; + lua = lua5_4; }) ceph ceph-client; From 8a6e130c71ed25f4eae8eadd62ef48450ccf8750 Mon Sep 17 00:00:00 2001 From: Johan Thomsen Date: Wed, 21 Apr 2021 16:19:00 +0200 Subject: [PATCH 02/28] nixos/ceph: fix tests - 512 -> 1024MB vm memory (had sporadic oom-failures with the lower setting) - set "auth_allow_insecure_global_id_reclaim=false" as described here: https://docs.ceph.com/en/latest/security/CVE-2021-20288/ --- nixos/tests/ceph-multi-node.nix | 3 ++- nixos/tests/ceph-single-node-bluestore.nix | 3 ++- nixos/tests/ceph-single-node.nix | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix index 4e6d644f96c..33736e27b98 100644 --- a/nixos/tests/ceph-multi-node.nix +++ b/nixos/tests/ceph-multi-node.nix @@ -37,7 +37,7 @@ let generateHost = { pkgs, cephConfig, networkConfig, ... }: { virtualisation = { - memorySize = 512; + memorySize = 1024; emptyDiskImages = [ 20480 ]; vlans = [ 1 ]; }; @@ -120,6 +120,7 @@ let ) monA.wait_for_unit("ceph-mon-${cfg.monA.name}") monA.succeed("ceph mon enable-msgr2") + monA.succeed("ceph config set mon auth_allow_insecure_global_id_reclaim false") # Can't check ceph status until a mon is up monA.succeed("ceph -s | grep 'mon: 1 daemons'") diff --git a/nixos/tests/ceph-single-node-bluestore.nix b/nixos/tests/ceph-single-node-bluestore.nix index cc873e8aee5..f706d4d56fc 100644 --- a/nixos/tests/ceph-single-node-bluestore.nix +++ b/nixos/tests/ceph-single-node-bluestore.nix @@ -34,7 +34,7 @@ let generateHost = { pkgs, cephConfig, networkConfig, ... }: { virtualisation = { - memorySize = 512; + memorySize = 1024; emptyDiskImages = [ 20480 20480 20480 ]; vlans = [ 1 ]; }; @@ -95,6 +95,7 @@ let ) monA.wait_for_unit("ceph-mon-${cfg.monA.name}") monA.succeed("ceph mon enable-msgr2") + monA.succeed("ceph config set mon auth_allow_insecure_global_id_reclaim false") # Can't check ceph status until a mon is up monA.succeed("ceph -s | grep 'mon: 1 daemons'") diff --git a/nixos/tests/ceph-single-node.nix b/nixos/tests/ceph-single-node.nix index 19919371a3c..d1d56ea6708 100644 --- a/nixos/tests/ceph-single-node.nix +++ b/nixos/tests/ceph-single-node.nix @@ -34,7 +34,7 @@ let generateHost = { pkgs, cephConfig, networkConfig, ... }: { virtualisation = { - memorySize = 512; + memorySize = 1024; emptyDiskImages = [ 20480 20480 20480 ]; vlans = [ 1 ]; }; @@ -95,6 +95,7 @@ let ) monA.wait_for_unit("ceph-mon-${cfg.monA.name}") monA.succeed("ceph mon enable-msgr2") + monA.succeed("ceph config set mon auth_allow_insecure_global_id_reclaim false") # Can't check ceph status until a mon is up monA.succeed("ceph -s | grep 'mon: 1 daemons'") From f812b261e2e39db31bcac09732054abf8f847108 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 27 Apr 2021 03:46:57 +0200 Subject: [PATCH 03/28] python3Packages.python-gitlab: 2.6.0 -> 2.7.1 Fixes the build, disable tests, as they rely on a local GitLab instance running on docker. Adds pythonImportsCheck. --- .../python-modules/python-gitlab/default.nix | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/python-gitlab/default.nix b/pkgs/development/python-modules/python-gitlab/default.nix index 4dc3cfb5693..b3cb9aaff63 100644 --- a/pkgs/development/python-modules/python-gitlab/default.nix +++ b/pkgs/development/python-modules/python-gitlab/default.nix @@ -1,19 +1,36 @@ -{ lib, buildPythonPackage, fetchPypi, requests, mock, httmock, pythonOlder, pytest, responses }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, argcomplete +, requests +, requests-toolbelt +, pyyaml +}: buildPythonPackage rec { pname = "python-gitlab"; - version = "2.6.0"; + version = "2.7.1"; + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "a862c6874524ab585b725a17b2cd2950fc09d6d74205f40a11be2a4e8f2dcaa1"; + sha256 = "0z4amj5xhx5zc3h2m0zrkardm3z5ba9qpjx5n6dczyz77r527yg1"; }; - propagatedBuildInputs = [ requests ]; + propagatedBuildInputs = [ + argcomplete + pyyaml + requests + requests-toolbelt + ]; - checkInputs = [ mock httmock pytest responses ]; + # tests rely on a gitlab instance on a local docker setup + doCheck = false; - disabled = pythonOlder "3.6"; + pythonImportsCheck = [ + "gitlab" + ]; meta = with lib; { description = "Interact with GitLab API"; From accee089d97e4164ade95e96cd72ee47e813b8cb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Apr 2021 10:00:24 +0200 Subject: [PATCH 04/28] python3Packages.PyGithub: 1.54.1 -> 1.55 --- pkgs/development/python-modules/pyGithub/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyGithub/default.nix b/pkgs/development/python-modules/pyGithub/default.nix index c214b375ff3..0fbd26c4a44 100644 --- a/pkgs/development/python-modules/pyGithub/default.nix +++ b/pkgs/development/python-modules/pyGithub/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "PyGithub"; - version = "1.54.1"; + version = "1.55"; disabled = !isPy3k; src = fetchFromGitHub { owner = "PyGithub"; repo = "PyGithub"; rev = "v${version}"; - sha256 = "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"; + sha256 = "sha256-PuGCBFSbM91NtSzuyf0EQUr3LiuHDq90OwkSf53rSyA="; }; checkInputs = [ httpretty parameterized pytestCheckHook ]; From b95fc98718677420566f69e432352877e35d7f96 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Apr 2021 13:18:05 +0200 Subject: [PATCH 05/28] python3Packages.PyGithub: cleanup --- .../python-modules/pyGithub/default.nix | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pyGithub/default.nix b/pkgs/development/python-modules/pyGithub/default.nix index 0fbd26c4a44..02656968d68 100644 --- a/pkgs/development/python-modules/pyGithub/default.nix +++ b/pkgs/development/python-modules/pyGithub/default.nix @@ -3,17 +3,16 @@ , cryptography , deprecated , fetchFromGitHub -, httpretty -, isPy3k -, parameterized +, pynacl , pyjwt -, pytestCheckHook -, requests }: +, pythonOlder +, requests +}: buildPythonPackage rec { pname = "PyGithub"; version = "1.55"; - disabled = !isPy3k; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "PyGithub"; @@ -22,17 +21,23 @@ buildPythonPackage rec { sha256 = "sha256-PuGCBFSbM91NtSzuyf0EQUr3LiuHDq90OwkSf53rSyA="; }; - checkInputs = [ httpretty parameterized pytestCheckHook ]; - propagatedBuildInputs = [ cryptography deprecated pyjwt requests ]; + propagatedBuildInputs = [ + cryptography + deprecated + pynacl + pyjwt + requests + ]; # Test suite makes REST calls against github.com doCheck = false; + pythonImportsCheck = [ "github" ]; meta = with lib; { + description = "Python library to access the GitHub API v3"; homepage = "https://github.com/PyGithub/PyGithub"; - description = "A Python (2 and 3) library to access the GitHub API v3"; platforms = platforms.all; - license = licenses.gpl3; + license = licenses.lgpl3Plus; maintainers = with maintainers; [ jhhuh ]; }; } From 45995d8d9e4c9b1149c8a00137f0cb03ce876a3e Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 27 Apr 2021 17:45:54 +0000 Subject: [PATCH 06/28] cargo-outdated: 0.9.14 -> 0.9.15 --- pkgs/tools/package-management/cargo-outdated/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/cargo-outdated/default.nix b/pkgs/tools/package-management/cargo-outdated/default.nix index 80c69d74abf..fe8f743c71c 100644 --- a/pkgs/tools/package-management/cargo-outdated/default.nix +++ b/pkgs/tools/package-management/cargo-outdated/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-outdated"; - version = "0.9.14"; + version = "0.9.15"; src = fetchFromGitHub { owner = "kbknapp"; repo = pname; rev = "v${version}"; - sha256 = "sha256-80H0yblEcxP6TTil0dJPZhvMivDLuyvoV0Rmcrykgjs="; + sha256 = "sha256-Cd0QWFeAAHSkeCVQvb+Fsg5nBoutV1k1kQpMkWpci2E="; }; - cargoSha256 = "sha256-RACdzaCWfm5rrIX0wrvKSmhLQt1a+2MQqrjTx+etpGo="; + cargoSha256 = "sha256-VngJMDVKIV8+ODHia2U2gKKPKskyKiuKhSnO6NJsJHI="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] From a0b0f9945806b6a0d1840b193f4eb2a5a633540a Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sun, 28 Mar 2021 12:34:29 +0000 Subject: [PATCH 07/28] julia: drop julia_13 as it lacks support upstream Closes #82008. --- pkgs/development/compilers/julia/1.3.nix | 161 ----------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 5 - 3 files changed, 1 insertion(+), 166 deletions(-) delete mode 100644 pkgs/development/compilers/julia/1.3.nix diff --git a/pkgs/development/compilers/julia/1.3.nix b/pkgs/development/compilers/julia/1.3.nix deleted file mode 100644 index 5e431a55233..00000000000 --- a/pkgs/development/compilers/julia/1.3.nix +++ /dev/null @@ -1,161 +0,0 @@ -{ lib, stdenv, fetchurl, fetchzip, fetchFromGitHub -# build tools -, gfortran, m4, makeWrapper, patchelf, perl, which, python2 -, cmake -# libjulia dependencies -, libunwind, readline, utf8proc, zlib -# standard library dependencies -, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2 -# linear algebra -, blas, lapack, arpack -# Darwin frameworks -, CoreServices, ApplicationServices -}: - -assert (!blas.isILP64) && (!lapack.isILP64); - -with lib; - -let - majorVersion = "1"; - minorVersion = "3"; - maintenanceVersion = "1"; - src_sha256 = "0q9a7yc3b235psrwl5ghyxgwly25lf8n818l8h6bkf2ymdbsv5p6"; - version = "${majorVersion}.${minorVersion}.${maintenanceVersion}"; -in - -stdenv.mkDerivation rec { - pname = "julia"; - inherit version; - - src = fetchzip { - url = "https://github.com/JuliaLang/julia/releases/download/v${majorVersion}.${minorVersion}.${maintenanceVersion}/julia-${majorVersion}.${minorVersion}.${maintenanceVersion}-full.tar.gz"; - sha256 = src_sha256; - }; - - prePatch = '' - export PATH=$PATH:${cmake}/bin - ''; - - patches = [ - ./use-system-utf8proc-julia-1.3.patch - - # Julia recompiles a precompiled file if the mtime stored *in* the - # .ji file differs from the mtime of the .ji file. This - # doesn't work in Nix because Nix changes the mtime of files in - # the Nix store to 1. So patch Julia to accept mtimes of 1. - ./allow_nix_mtime.patch - ]; - - postPatch = '' - patchShebangs . contrib - for i in backtrace cmdlineargs; do - mv test/$i.jl{,.off} - touch test/$i.jl - done - rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl - rm stdlib/Distributed/test/runtests.jl && touch stdlib/Distributed/test/runtests.jl - sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl - sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl - ''; - - buildInputs = [ - arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr - pcre2.dev blas lapack openlibm openspecfun readline utf8proc - zlib - ] - ++ lib.optionals stdenv.isDarwin [CoreServices ApplicationServices] - ; - - nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ]; - - makeFlags = - let - arch = head (splitString "-" stdenv.system); - march = { - x86_64 = stdenv.hostPlatform.gcc.arch or "x86-64"; - i686 = "pentium4"; - aarch64 = "armv8-a"; - }.${arch} - or (throw "unsupported architecture: ${arch}"); - # Julia requires Pentium 4 (SSE2) or better - cpuTarget = { x86_64 = "x86-64"; i686 = "pentium4"; aarch64 = "generic"; }.${arch} - or (throw "unsupported architecture: ${arch}"); - in [ - "ARCH=${arch}" - "MARCH=${march}" - "JULIA_CPU_TARGET=${cpuTarget}" - "PREFIX=$(out)" - "prefix=$(out)" - "SHELL=${stdenv.shell}" - - (lib.optionalString (!stdenv.isDarwin) "USE_SYSTEM_BLAS=1") - "USE_BLAS64=${if blas.isILP64 then "1" else "0"}" - - "USE_SYSTEM_LAPACK=1" - - "USE_SYSTEM_ARPACK=1" - "USE_SYSTEM_FFTW=1" - "USE_SYSTEM_GMP=1" - "USE_SYSTEM_LIBGIT2=1" - "USE_SYSTEM_LIBUNWIND=1" - - "USE_SYSTEM_MPFR=1" - "USE_SYSTEM_OPENLIBM=1" - "USE_SYSTEM_OPENSPECFUN=1" - "USE_SYSTEM_PATCHELF=1" - "USE_SYSTEM_PCRE=1" - "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config" - "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h" - "USE_SYSTEM_READLINE=1" - "USE_SYSTEM_UTF8PROC=1" - "USE_SYSTEM_ZLIB=1" - - "USE_BINARYBUILDER=0" - ]; - - LD_LIBRARY_PATH = makeLibraryPath [ - arpack fftw fftwSinglePrec gmp libgit2 mpfr blas openlibm - openspecfun pcre2 lapack - ]; - - # Other versions of Julia pass the tests, but we are not sure why these fail. - doCheck = false; - checkTarget = "testall"; - # Julia's tests require read/write access to $HOME - preCheck = '' - export HOME="$NIX_BUILD_TOP" - ''; - - preBuild = '' - sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile - sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} - ''; - - postInstall = '' - # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, - # as using a wrapper with LD_LIBRARY_PATH causes segmentation - # faults when program returns an error: - # $ julia -e 'throw(Error())' - find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do - if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then - ln -sv $lib $out/lib/julia/$(basename $lib) - fi - done - ''; - - passthru = { - inherit majorVersion minorVersion maintenanceVersion; - site = "share/julia/site/v${majorVersion}.${minorVersion}"; - }; - - meta = { - description = "High-level performance-oriented dynamical language for technical computing"; - homepage = "https://julialang.org/"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [ raskin rob garrison ]; - platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; - broken = stdenv.isi686; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 8f2ff5cc4f7..ccce9a3efc8 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -339,6 +339,7 @@ mapAliases ({ jellyfin_10_5 = throw "Jellyfin 10.5 is no longer supported and contains a security vulnerability. Please upgrade to a newer version."; # added 2021-04-26 julia_07 = throw "julia_07 is deprecated in favor of julia_10 LTS"; # added 2020-09-15 julia_11 = throw "julia_11 is deprecated in favor of latest Julia version"; # added 2020-09-15 + julia_13 = throw "julia_13 is deprecated in favor of the latest stable version"; # added 2021-03-13 kdeconnect = plasma5Packages.kdeconnect-kde; # added 2020-10-28 kdiff3-qt5 = kdiff3; # added 2017-02-18 keepass-keefox = keepass-keepassrpc; # backwards compatibility alias, added 2018-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bb8e38fb489..37200d26f12 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10985,11 +10985,6 @@ in libgit2 = libgit2_0_27; }; - julia_13 = callPackage ../development/compilers/julia/1.3.nix { - gmp = gmp6; - inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; - }; - julia_15 = callPackage ../development/compilers/julia/1.5.nix { inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; }; From 2632a33605976c3da6d849a5a14d98f286433e2c Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Fri, 12 Mar 2021 16:02:53 +0000 Subject: [PATCH 08/28] julia: clean up grammar for deprecated aliases --- pkgs/top-level/aliases.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index ccce9a3efc8..d171f0d5e05 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -338,8 +338,8 @@ mapAliases ({ kodiPlainWayland = kodi-wayland; jellyfin_10_5 = throw "Jellyfin 10.5 is no longer supported and contains a security vulnerability. Please upgrade to a newer version."; # added 2021-04-26 julia_07 = throw "julia_07 is deprecated in favor of julia_10 LTS"; # added 2020-09-15 - julia_11 = throw "julia_11 is deprecated in favor of latest Julia version"; # added 2020-09-15 - julia_13 = throw "julia_13 is deprecated in favor of the latest stable version"; # added 2021-03-13 + julia_11 = throw "julia_11 has been deprecated in favor of the latest stable version"; # added 2020-09-15 + julia_13 = throw "julia_13 has been deprecated in favor of the latest stable version"; # added 2021-03-13 kdeconnect = plasma5Packages.kdeconnect-kde; # added 2020-10-28 kdiff3-qt5 = kdiff3; # added 2017-02-18 keepass-keefox = keepass-keepassrpc; # backwards compatibility alias, added 2018-02 From fc3c17c5acc1e29825c7a8e918747033db6b60f4 Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Fri, 12 Mar 2021 16:07:29 +0000 Subject: [PATCH 09/28] julia: introduce LTS and stable aliases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to the Julia release process [1] there will only ever be two supported release branches at any given time: stable and LTS. Once a new version of either is released, support for the previous release will be dropped upstream. Introducing aliases for these branches allows our users to easily track either depending on their need for stability. [1]: https://julialang.org/blog/2019/08/release-process/#long_term_support --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 37200d26f12..c6e0b67e587 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10989,8 +10989,10 @@ in inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; }; - julia_1 = julia_10; julia = julia_15; + julia-lts = julia_10; + julia-stable = julia_15; + julia_1 = julia_10; jwasm = callPackage ../development/compilers/jwasm { }; From 0f3096d03925f3e17d9f30ccebd78bef71e40b0a Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Fri, 12 Mar 2021 16:14:11 +0000 Subject: [PATCH 10/28] julia: deprecate julia_1 alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is potentially controversial, but it is unclear to me whether julia_1 should refer to either the latest stable or LTS release of 1.x. We may want to revisit this when/if we get 2.x, but as it stands the Julia release process [1] makes it clear that there will only ever be a single supported stable and LTS release at any given time which should speak in favour of using the julia-stable and julia-lts aliases instead. [1]: https://julialang.org/blog/2019/08/release-process/#long_term_support --- pkgs/top-level/aliases.nix | 3 ++- pkgs/top-level/all-packages.nix | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d171f0d5e05..e48652ab555 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -337,7 +337,8 @@ mapAliases ({ kodiPlain = kodi; kodiPlainWayland = kodi-wayland; jellyfin_10_5 = throw "Jellyfin 10.5 is no longer supported and contains a security vulnerability. Please upgrade to a newer version."; # added 2021-04-26 - julia_07 = throw "julia_07 is deprecated in favor of julia_10 LTS"; # added 2020-09-15 + julia_07 = throw "julia_07 has been deprecated in favor of the latest LTS version"; # added 2020-09-15 + julia_1 = throw "julia_1 has been deprecated in favor of julia_10 as it was ambiguous"; # added 2021-03-13 julia_11 = throw "julia_11 has been deprecated in favor of the latest stable version"; # added 2020-09-15 julia_13 = throw "julia_13 has been deprecated in favor of the latest stable version"; # added 2021-03-13 kdeconnect = plasma5Packages.kdeconnect-kde; # added 2020-10-28 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6e0b67e587..69b917d05ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10992,7 +10992,6 @@ in julia = julia_15; julia-lts = julia_10; julia-stable = julia_15; - julia_1 = julia_10; jwasm = callPackage ../development/compilers/jwasm { }; From a4f2b97a24d5788778eb73d80ca8256cd0d6ff0b Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sat, 13 Mar 2021 05:55:49 +0000 Subject: [PATCH 11/28] julia: enable parallel building Erroneously disabled by 3ae5e6ce03f9dbf3f0a0a3e3161c83e28c1b45af as it mistook Julia for using CMake (it is used by some of the vendored dependencies). --- pkgs/development/compilers/julia/1.0.nix | 2 ++ pkgs/development/compilers/julia/1.5.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix index 5b1a4674a88..d68f56faf2e 100644 --- a/pkgs/development/compilers/julia/1.0.nix +++ b/pkgs/development/compilers/julia/1.0.nix @@ -184,6 +184,8 @@ stdenv.mkDerivation rec { export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ''; + enableParallelBuilding = true; + postInstall = '' # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, # as using a wrapper with LD_LIBRARY_PATH causes segmentation diff --git a/pkgs/development/compilers/julia/1.5.nix b/pkgs/development/compilers/julia/1.5.nix index b4c33faa44c..f32c55bf1e2 100644 --- a/pkgs/development/compilers/julia/1.5.nix +++ b/pkgs/development/compilers/julia/1.5.nix @@ -129,6 +129,8 @@ stdenv.mkDerivation rec { export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ''; + enableParallelBuilding = true; + postInstall = '' # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, # as using a wrapper with LD_LIBRARY_PATH causes segmentation From d51713378b62d32bd63466023308e6615cb5bedc Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sun, 28 Mar 2021 09:37:02 +0000 Subject: [PATCH 12/28] julia: make the LTS release the default version Reverts the non-syntax part of 1e4c335a94b2df4e74a1e447d2f7074a09ada478. --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 69b917d05ad..34146884862 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10989,9 +10989,9 @@ in inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; }; - julia = julia_15; julia-lts = julia_10; julia-stable = julia_15; + julia = julia-lts; jwasm = callPackage ../development/compilers/jwasm { }; From 4c97cf823f025cfee3f8c2fc028ca0c0ab3369f2 Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sun, 28 Mar 2021 09:43:31 +0000 Subject: [PATCH 13/28] julia: remove redundant Nix-specific mtime patch As far as I can tell this patch is redundant as all pre-compiled code generated at build time is baked into the Julia system image and will thus never get invalidated: Note that for both julia_10 and julia_15 there are no `.ji` files produced in the derivations. --- pkgs/development/compilers/julia/1.0.nix | 5 ---- pkgs/development/compilers/julia/1.5.nix | 6 ----- .../compilers/julia/allow_nix_mtime.patch | 25 ------------------- 3 files changed, 36 deletions(-) delete mode 100644 pkgs/development/compilers/julia/allow_nix_mtime.patch diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix index d68f56faf2e..445e079502e 100644 --- a/pkgs/development/compilers/julia/1.0.nix +++ b/pkgs/development/compilers/julia/1.0.nix @@ -88,11 +88,6 @@ stdenv.mkDerivation rec { ; patches = [ - # Julia recompiles a precompiled file if the mtime stored *in* the - # .ji file differs from the mtime of the .ji file. This - # doesn't work in Nix because Nix changes the mtime of files in - # the Nix store to 1. So patch Julia to accept mtimes of 1. - ./allow_nix_mtime.patch ./diagonal-test.patch ./use-system-utf8proc-julia-1.0.patch ]; diff --git a/pkgs/development/compilers/julia/1.5.nix b/pkgs/development/compilers/julia/1.5.nix index f32c55bf1e2..be8200a0ded 100644 --- a/pkgs/development/compilers/julia/1.5.nix +++ b/pkgs/development/compilers/julia/1.5.nix @@ -34,12 +34,6 @@ stdenv.mkDerivation rec { patches = [ ./use-system-utf8proc-julia-1.3.patch - - # Julia recompiles a precompiled file if the mtime stored *in* the - # .ji file differs from the mtime of the .ji file. This - # doesn't work in Nix because Nix changes the mtime of files in - # the Nix store to 1. So patch Julia to accept mtimes of 1. - ./allow_nix_mtime.patch ]; postPatch = '' diff --git a/pkgs/development/compilers/julia/allow_nix_mtime.patch b/pkgs/development/compilers/julia/allow_nix_mtime.patch deleted file mode 100644 index e4a164cfa1a..00000000000 --- a/pkgs/development/compilers/julia/allow_nix_mtime.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f79775378a9eeec5b99f18cc95735b12d172aba3 Mon Sep 17 00:00:00 2001 -From: Tom McLaughlin -Date: Wed, 12 Dec 2018 13:01:32 -0800 -Subject: [PATCH] Patch to make work better with nix - ---- - base/loading.jl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/base/loading.jl b/base/loading.jl -index 51201b98b6..b40c0690f6 100644 ---- a/base/loading.jl -+++ b/base/loading.jl -@@ -1384,7 +1384,7 @@ function stale_cachefile(modpath::String, cachefile::String) - # Issue #13606: compensate for Docker images rounding mtimes - # Issue #20837: compensate for GlusterFS truncating mtimes to microseconds - ftime = mtime(f) -- if ftime != ftime_req && ftime != floor(ftime_req) && ftime != trunc(ftime_req, digits=6) -+ if ftime != ftime_req && ftime != floor(ftime_req) && ftime != trunc(ftime_req, digits=6) && ftime != 1.0 - @debug "Rejecting stale cache file $cachefile (mtime $ftime_req) because file $f (mtime $ftime) has changed" - return true - end --- -2.17.1 - From 5926635765ccab3c2710ab4df117fce1c1b3d2a1 Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sun, 28 Mar 2021 09:54:37 +0000 Subject: [PATCH 14/28] julia: remove redundant diagonal test patch Fix merged upstream and backported to Julia 1.0.5: https://github.com/JuliaLang/julia/pull/31443 --- pkgs/development/compilers/julia/1.0.nix | 1 - .../compilers/julia/diagonal-test.patch | 27 ------------------- 2 files changed, 28 deletions(-) delete mode 100644 pkgs/development/compilers/julia/diagonal-test.patch diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix index 445e079502e..a7f6be6a167 100644 --- a/pkgs/development/compilers/julia/1.0.nix +++ b/pkgs/development/compilers/julia/1.0.nix @@ -88,7 +88,6 @@ stdenv.mkDerivation rec { ; patches = [ - ./diagonal-test.patch ./use-system-utf8proc-julia-1.0.patch ]; diff --git a/pkgs/development/compilers/julia/diagonal-test.patch b/pkgs/development/compilers/julia/diagonal-test.patch deleted file mode 100644 index dd31e67e9d3..00000000000 --- a/pkgs/development/compilers/julia/diagonal-test.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 9eb180c523b877a53b9e1cf53a4d5e6dad3d7bfe Mon Sep 17 00:00:00 2001 -From: Lars Jellema -Date: Sat, 19 Sep 2020 13:52:20 +0200 -Subject: [PATCH] Use approximate comparisons for diagonal tests - ---- - stdlib/LinearAlgebra/test/diagonal.jl | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/stdlib/LinearAlgebra/test/diagonal.jl b/stdlib/LinearAlgebra/test/diagonal.jl -index e420d5bc6d..7f1b5d0aec 100644 ---- a/stdlib/LinearAlgebra/test/diagonal.jl -+++ b/stdlib/LinearAlgebra/test/diagonal.jl -@@ -450,8 +450,8 @@ end - M = randn(T, 5, 5) - MM = [randn(T, 2, 2) for _ in 1:2, _ in 1:2] - for transform in (identity, adjoint, transpose, Adjoint, Transpose) -- @test lmul!(transform(D), copy(M)) == *(transform(Matrix(D)), M) -- @test rmul!(copy(M), transform(D)) == *(M, transform(Matrix(D))) -+ @test lmul!(transform(D), copy(M)) ≈ *(transform(Matrix(D)), M) -+ @test rmul!(copy(M), transform(D)) ≈ *(M, transform(Matrix(D))) - @test lmul!(transform(DD), copy(MM)) == *(transform(fullDD), MM) - @test rmul!(copy(MM), transform(DD)) == *(MM, transform(fullDD)) - end --- -2.28.0 - From 75a93dfecc6c77ed7c35cc7f906175aca93facb4 Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Tue, 13 Apr 2021 14:42:31 +0000 Subject: [PATCH 15/28] julia: move patches into separate directories Makes the top-level directory organisation easier with an increasing number of patches. --- pkgs/development/compilers/julia/1.0.nix | 2 +- pkgs/development/compilers/julia/1.5.nix | 2 +- .../julia/{ => patches/1.0}/use-system-utf8proc-julia-1.0.patch | 0 .../julia/{ => patches/1.5}/use-system-utf8proc-julia-1.3.patch | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename pkgs/development/compilers/julia/{ => patches/1.0}/use-system-utf8proc-julia-1.0.patch (100%) rename pkgs/development/compilers/julia/{ => patches/1.5}/use-system-utf8proc-julia-1.3.patch (100%) diff --git a/pkgs/development/compilers/julia/1.0.nix b/pkgs/development/compilers/julia/1.0.nix index a7f6be6a167..4f05329f595 100644 --- a/pkgs/development/compilers/julia/1.0.nix +++ b/pkgs/development/compilers/julia/1.0.nix @@ -88,7 +88,7 @@ stdenv.mkDerivation rec { ; patches = [ - ./use-system-utf8proc-julia-1.0.patch + ./patches/1.0/use-system-utf8proc-julia-1.0.patch ]; postPatch = '' diff --git a/pkgs/development/compilers/julia/1.5.nix b/pkgs/development/compilers/julia/1.5.nix index be8200a0ded..271ea64a094 100644 --- a/pkgs/development/compilers/julia/1.5.nix +++ b/pkgs/development/compilers/julia/1.5.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { }; patches = [ - ./use-system-utf8proc-julia-1.3.patch + ./patches/1.5/use-system-utf8proc-julia-1.3.patch ]; postPatch = '' diff --git a/pkgs/development/compilers/julia/use-system-utf8proc-julia-1.0.patch b/pkgs/development/compilers/julia/patches/1.0/use-system-utf8proc-julia-1.0.patch similarity index 100% rename from pkgs/development/compilers/julia/use-system-utf8proc-julia-1.0.patch rename to pkgs/development/compilers/julia/patches/1.0/use-system-utf8proc-julia-1.0.patch diff --git a/pkgs/development/compilers/julia/use-system-utf8proc-julia-1.3.patch b/pkgs/development/compilers/julia/patches/1.5/use-system-utf8proc-julia-1.3.patch similarity index 100% rename from pkgs/development/compilers/julia/use-system-utf8proc-julia-1.3.patch rename to pkgs/development/compilers/julia/patches/1.5/use-system-utf8proc-julia-1.3.patch From e633d97cb382f237e33e98f2a9efd3b86cfabd8a Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sun, 11 Apr 2021 13:59:38 +0000 Subject: [PATCH 16/28] julia: remove julia_15 update script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provides very little comfort compared what is outlined in the manual [1], only supports a single version, and would probably be better to implement as a general Nixpkg tool. [1]: https://nixos.org/manual/nixpkgs/stable/#sec-source-hashes --- .../development/compilers/julia/update-1.5.py | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100755 pkgs/development/compilers/julia/update-1.5.py diff --git a/pkgs/development/compilers/julia/update-1.5.py b/pkgs/development/compilers/julia/update-1.5.py deleted file mode 100755 index e37f37d456b..00000000000 --- a/pkgs/development/compilers/julia/update-1.5.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -i python3 -p python3 python3Packages.requests - -import os -import re -import requests -import subprocess - -latest = requests.get("https://api.github.com/repos/JuliaLang/julia/releases/latest").json()["tag_name"] -assert latest[0] == "v" -major, minor, patch = latest[1:].split(".") -assert major == "1" -# When a new minor version comes out we'll have to refactor/copy this update script. -assert minor == "5" - -sha256 = subprocess.check_output(["nix-prefetch-url", "--unpack", f"https://github.com/JuliaLang/julia/releases/download/v{major}.{minor}.{patch}/julia-{major}.{minor}.{patch}-full.tar.gz"], text=True).strip() - -nix_path = os.path.join(os.path.dirname(__file__), "1.5.nix") -nix0 = open(nix_path, "r").read() -nix1 = re.sub("maintenanceVersion = \".*\";", f"maintenanceVersion = \"{patch}\";", nix0) -nix2 = re.sub("src_sha256 = \".*\";", f"src_sha256 = \"{sha256}\";", nix1) -open(nix_path, "w").write(nix2) From 5167e0347c5a79f1c0073a90087d68b5a148fa7c Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Sun, 11 Apr 2021 14:04:03 +0000 Subject: [PATCH 17/28] julia: sort arguments in top-level package collection No change in semantics, but makes it consistent with the expressions. This is a fairly pedantic thing to do to be honest. --- pkgs/top-level/all-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 34146884862..739090b7696 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10981,12 +10981,12 @@ in julia_10 = callPackage ../development/compilers/julia/1.0.nix { gmp = gmp6; - inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; + inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreServices; libgit2 = libgit2_0_27; }; julia_15 = callPackage ../development/compilers/julia/1.5.nix { - inherit (darwin.apple_sdk.frameworks) CoreServices ApplicationServices; + inherit (darwin.apple_sdk.frameworks) ApplicationServices CoreServices; }; julia-lts = julia_10; From dd88dcee620ebefe9afe9c4326defe92976891f2 Mon Sep 17 00:00:00 2001 From: Pontus Stenetorp Date: Mon, 19 Apr 2021 06:22:51 +0000 Subject: [PATCH 18/28] julia: add README Provides a few hopefully helpful pointers that would not work well as inline comments in the expressions themselves. Most likely the README will need to be expanded upon over time to cover how we handle the Julia release process, but I hope this is a good starting point. --- pkgs/development/compilers/julia/README.md | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pkgs/development/compilers/julia/README.md diff --git a/pkgs/development/compilers/julia/README.md b/pkgs/development/compilers/julia/README.md new file mode 100644 index 00000000000..d37c01bc8ce --- /dev/null +++ b/pkgs/development/compilers/julia/README.md @@ -0,0 +1,24 @@ +Julia +===== + +[Julia][julia], as a full-fledged programming language with an extensive +standard library that covers numerical computing, can be somewhat challenging to +package. This file aims to provide pointers which could not easily be included +as comments in the expressions themselves. + +[julia]: https://julialang.org + +For Nixpkgs, the manual is as always your primary reference, and for the Julia +side of things you probably want to familiarise yourself with the [README +][readme], [build instructions][build], and [release process][release_process]. +Remember that these can change between Julia releases, especially if the LTS and +release branches have deviated greatly. A lot of the build process is +underdocumented and thus there is no substitute for digging into the code that +controls the build process. You are very likely to need to use the test suite to +locate and address issues and in the end passing it, while only disabling a +minimal set of broken or incompatible tests you think you have a good reason to +disable, is your best bet at arriving at a solid derivation. + +[readme]: https://github.com/JuliaLang/julia/blob/master/README.md +[build]: https://github.com/JuliaLang/julia/blob/master/doc/build/build.md +[release_process]: https://julialang.org/blog/2019/08/release-process From 1a58aec6a2c9c191d7429c7cfb5d717f630831b3 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 28 Apr 2021 17:02:10 +0000 Subject: [PATCH 19/28] haproxy: 2.3.7 -> 2.3.10 --- pkgs/tools/networking/haproxy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/haproxy/default.nix b/pkgs/tools/networking/haproxy/default.nix index 41f55e19abf..eefa49acb93 100644 --- a/pkgs/tools/networking/haproxy/default.nix +++ b/pkgs/tools/networking/haproxy/default.nix @@ -11,11 +11,11 @@ assert usePcre -> pcre != null; stdenv.mkDerivation rec { pname = "haproxy"; - version = "2.3.7"; + version = "2.3.10"; src = fetchurl { url = "https://www.haproxy.org/download/${lib.versions.majorMinor version}/src/${pname}-${version}.tar.gz"; - sha256 = "sha256-Mbp6zQ14NnxxtW5Kh8nxHNI1/FYCvFuEaQd5Eg4KMFs="; + sha256 = "sha256-mUbgz8g/KQcrNDHjckYiHPnUqdKKFYwHVxTTRSZvTzU="; }; buildInputs = [ openssl zlib ] From dba77f4fd00750eaf1780b1d18072cc97b96f0d8 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 27 Jul 2020 17:00:37 +0200 Subject: [PATCH 20/28] maintainers: add V --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ee12b1a24db..91e8c9591fb 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10305,6 +10305,12 @@ githubId = 2212422; name = "uwap"; }; + V = { + name = "V"; + email = "v@anomalous.eu"; + github = "deviant"; + githubId = 68829907; + }; va1entin = { email = "github@valentinsblog.com"; github = "va1entin"; From dab2173285c58113c153b5bab332972b8bb534b0 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 26 Apr 2021 13:26:08 +0200 Subject: [PATCH 21/28] last-resort: init at 13.001 Last Resort is a fallback font that covers every Unicode codepoint. --- pkgs/data/fonts/last-resort/default.nix | 24 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/data/fonts/last-resort/default.nix diff --git a/pkgs/data/fonts/last-resort/default.nix b/pkgs/data/fonts/last-resort/default.nix new file mode 100644 index 00000000000..31fb300e591 --- /dev/null +++ b/pkgs/data/fonts/last-resort/default.nix @@ -0,0 +1,24 @@ +{ lib, fetchurl }: + +let + version = "13.001"; +in fetchurl { + name = "last-resort-${version}"; + + url = "https://github.com/unicode-org/last-resort-font/releases/download/${version}/LastResortHE-Regular.ttf"; + downloadToTemp = true; + + postFetch = '' + install -D -m 0644 $downloadedFile $out/share/fonts/truetype/LastResortHE-Regular.ttf + ''; + + recursiveHash = true; + sha256 = "08mi65j46fv6a3y3pqnglqdjxjnbzg25v25f7c1zyk3c285m14hq"; + + meta = with lib; { + description = "Fallback font of last resort"; + homepage = "https://github.com/unicode-org/last-resort-font"; + license = licenses.ofl; + maintainers = with maintainers; [ V ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a8616e41e6f..94630b99540 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5966,6 +5966,8 @@ in lalezar-fonts = callPackage ../data/fonts/lalezar-fonts { }; + last-resort = callPackage ../data/fonts/last-resort {}; + ldc = callPackage ../development/compilers/ldc { }; ldgallery = callPackage ../tools/graphics/ldgallery { }; From de5a69c9187bf2a89f649dc7a9b4deb3ccb2d0d4 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 28 Apr 2021 21:02:11 +0200 Subject: [PATCH 22/28] nixos/promtail: Set TimeoutStopSec=10 On reboots and shutdowns promtail blocks for at least 90 seconds, because it would still try to deliver log messages for loki, which isn't possible when the network has already gone down. Upstreams example unit also uses a ten seconds timeout, something which has worked pretty well for me as well. --- nixos/modules/services/logging/promtail.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/logging/promtail.nix b/nixos/modules/services/logging/promtail.nix index 19b12daa415..34211687dc1 100644 --- a/nixos/modules/services/logging/promtail.nix +++ b/nixos/modules/services/logging/promtail.nix @@ -40,6 +40,7 @@ in { serviceConfig = { Restart = "on-failure"; + TimeoutStopSec = 10; ExecStart = "${pkgs.grafana-loki}/bin/promtail -config.file=${prettyJSON cfg.configuration} ${escapeShellArgs cfg.extraFlags}"; From 111ab7f7b6dec8199d0c685e64d8044a7e92dd19 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 28 Apr 2021 21:33:09 +0000 Subject: [PATCH 23/28] ffuf: 1.3.0 -> 1.3.1 --- pkgs/tools/security/ffuf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/ffuf/default.nix b/pkgs/tools/security/ffuf/default.nix index 9c8beeab3d9..076fd78d713 100644 --- a/pkgs/tools/security/ffuf/default.nix +++ b/pkgs/tools/security/ffuf/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "ffuf"; - version = "1.3.0"; + version = "1.3.1"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-0ckpEiXxen2E9IzrsmKoEKagoJ5maAbH1tHKgQjoCjo="; + sha256 = "sha256-NkRf36wFmzqFv13P0DxpzEOGyBGbSXMLjWE7URzRXGY="; }; vendorSha256 = "sha256-szT08rIozAuliOmge5RFX4NeVrJ2pCVyfotrHuvc0UU="; From 81e1e68eaf6c765147da964d356f704030734dd2 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 27 Apr 2021 10:56:51 +0000 Subject: [PATCH 24/28] lib.trivial.warnIf: init It's a common pattern in Nixpkgs to want to emit a warning in certain cases, but not actually change behaviours. This is often expressed as either if cond then lib.warn "Don't do that thing" x else x Or (if cond then lib.warn "Don't do that thing" else lib.id) x Neither of which really expresses the intent here, because it looks like 'x' is being chosen conditionally. To make this clearer, I introduce a "warnIf" function, which makes it clear that the only thing being affected by the condition is whether the warning is generated, not the value being returned. --- lib/default.nix | 5 +++-- lib/trivial.nix | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 50320669e28..ccae0bbc3ab 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -66,8 +66,9 @@ let stringLength sub substring tail trace; inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max - importJSON importTOML warn info showWarnings nixpkgsVersion version mod compare - splitByAndCompare functionArgs setFunctionArgs isFunction toHexString toBaseDigits; + importJSON importTOML warn warnIf info showWarnings nixpkgsVersion version + mod compare splitByAndCompare functionArgs setFunctionArgs isFunction + toHexString toBaseDigits; inherit (self.fixedPoints) fix fix' converge extends composeExtensions composeManyExtensions makeExtensible makeExtensibleWithCustomName; inherit (self.attrsets) attrByPath hasAttrByPath setAttrByPath diff --git a/lib/trivial.nix b/lib/trivial.nix index be6d0115f5b..f6f5da5998f 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -297,12 +297,15 @@ rec { # Usage: # { # foo = lib.warn "foo is deprecated" oldFoo; + # bar = lib.warnIf (bar == "") "Empty bar is deprecated" bar; # } # # TODO: figure out a clever way to integrate location information from # something like __unsafeGetAttrPos. warn = msg: builtins.trace "warning: ${msg}"; + warnIf = cond: msg: if cond then warn msg else id; + info = msg: builtins.trace "INFO: ${msg}"; showWarnings = warnings: res: lib.fold (w: x: warn w x) res warnings; From a8afbb45c12be27b9b93a802e9e276595899ed5a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 27 Apr 2021 13:52:15 +0000 Subject: [PATCH 25/28] treewide: use lib.warnIf where appropriate --- lib/modules.nix | 6 +++--- lib/strings.nix | 4 ++-- nixos/lib/testing-python.nix | 4 +--- pkgs/applications/networking/browsers/chromium/common.nix | 6 ++---- pkgs/development/perl-modules/generic/default.nix | 6 ++---- pkgs/servers/jellyfin/default.nix | 5 ++--- 6 files changed, 12 insertions(+), 19 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index d3f10944e70..d515ee24d16 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -37,7 +37,7 @@ let setAttrByPath toList types - warn + warnIf ; inherit (lib.options) isOption @@ -516,8 +516,8 @@ rec { value = if opt ? apply then opt.apply res.mergedValue else res.mergedValue; warnDeprecation = - if opt.type.deprecationMessage == null then id - else warn "The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}"; + warnIf (opt.type.deprecationMessage != null) + "The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}"; in warnDeprecation opt // { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value; diff --git a/lib/strings.nix b/lib/strings.nix index 5010d9159cb..0f23b6b9d41 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -644,8 +644,8 @@ rec { floatToString = float: let result = toString float; precise = float == fromJSON result; - in if precise then result - else lib.warn "Imprecise conversion from float to string ${result}" result; + in lib.warnIf (!precise) "Imprecise conversion from float to string ${result}" + result; /* Check whether a value can be coerced to a string */ isCoercibleToString = x: diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 6192be1cd05..c7e45f55ce1 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -131,10 +131,8 @@ rec { "it's currently ${toString testNameLen} characters long.") else "nixos-test-driver-${name}"; - - warn = if skipLint then lib.warn "Linting is disabled!" else lib.id; in - warn (runCommand testDriverName + lib.warnIf skipLint "Linting is disabled" (runCommand testDriverName { buildInputs = [ makeWrapper ]; testScript = testScript'; diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index b08ff1ac7c1..73ce022915c 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -112,10 +112,8 @@ let warnObsoleteVersionConditional = min-version: result: let ungoogled-version = (importJSON ./upstream-info.json).ungoogled-chromium.version; - in if versionAtLeast ungoogled-version min-version - then warn "chromium: ungoogled version ${ungoogled-version} is newer than a conditional bounded at ${min-version}. You can safely delete it." - result - else result; + in warnIf (versionAtLeast ungoogled-version min-version) "chromium: ungoogled version ${ungoogled-version} is newer than a conditional bounded at ${min-version}. You can safely delete it." + result; chromiumVersionAtLeast = min-version: let result = versionAtLeast upstream-info.version min-version; in warnObsoleteVersionConditional min-version result; diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index c7b57eae906..9beacd65a64 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -5,10 +5,8 @@ assert attrs?pname -> attrs?version; assert attrs?pname -> !(attrs?name); -(if attrs ? name then - lib.trivial.warn "builtPerlPackage: `name' (\"${attrs.name}\") is deprecated, use `pname' and `version' instead" - else - (x: x)) +lib.warnIf (attrs ? name) "builtPerlPackage: `name' (\"${attrs.name}\") is deprecated, use `pname' and `version' instead" + toPerlModule(stdenv.mkDerivation ( ( lib.recursiveUpdate diff --git a/pkgs/servers/jellyfin/default.nix b/pkgs/servers/jellyfin/default.nix index 2b00cb50073..77406c46415 100644 --- a/pkgs/servers/jellyfin/default.nix +++ b/pkgs/servers/jellyfin/default.nix @@ -11,9 +11,8 @@ let else if isAarch64 then "arm64" else lib.warn "Unsupported architecture, some image processing features might be unavailable" "unknown"; musl = lib.optionalString stdenv.hostPlatform.isMusl - (if (arch != "x64") - then lib.warn "Some image processing features might be unavailable for non x86-64 with Musl" "musl-" - else "musl-"); + (lib.warnIf (arch != "x64") "Some image processing features might be unavailable for non x86-64 with Musl" + "musl-"); runtimeDir = "${os}-${musl}${arch}"; in stdenv.mkDerivation rec { From 4c879a65576d4c2c53d99cdc6f349d08055b9be1 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 28 Apr 2021 22:03:49 +0000 Subject: [PATCH 26/28] gdu: 4.11.0 -> 4.11.1 --- pkgs/tools/system/gdu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/gdu/default.nix b/pkgs/tools/system/gdu/default.nix index 9e522f23203..03d52c100a8 100644 --- a/pkgs/tools/system/gdu/default.nix +++ b/pkgs/tools/system/gdu/default.nix @@ -6,13 +6,13 @@ buildGoModule rec { pname = "gdu"; - version = "4.11.0"; + version = "4.11.1"; src = fetchFromGitHub { owner = "dundee"; repo = pname; rev = "v${version}"; - sha256 = "sha256-E+/Ig6+J7pJ98O+YAntBGERml2ELzkji3gworBdcSVY="; + sha256 = "sha256-e9TYArmNWnK8XXcniAQCegrfWAUfTKKuClgdSTQep0U="; }; vendorSha256 = "sha256-QiO5p0x8kmIN6f0uYS0IR2MlWtRYTHeZpW6Nmupjias="; From f1e271714bf1c51bfacbec24f63137f83de8abfa Mon Sep 17 00:00:00 2001 From: happysalada Date: Thu, 29 Apr 2021 07:54:46 +0900 Subject: [PATCH 27/28] fishplugins.forgit-fish: rename fishplugins.forgit --- pkgs/shells/fish/plugins/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/shells/fish/plugins/default.nix b/pkgs/shells/fish/plugins/default.nix index 42252ccbe38..0ce172ec489 100644 --- a/pkgs/shells/fish/plugins/default.nix +++ b/pkgs/shells/fish/plugins/default.nix @@ -15,7 +15,7 @@ lib.makeScope newScope (self: with self; { foreign-env = callPackage ./foreign-env { }; - forgit-fish = callPackage ./forgit.nix { }; + forgit = callPackage ./forgit.nix { }; fzf-fish = callPackage ./fzf-fish.nix { }; From a946e4c558a34c2b3cef8cdd99f33c1f63623212 Mon Sep 17 00:00:00 2001 From: happysalada Date: Thu, 29 Apr 2021 07:58:10 +0900 Subject: [PATCH 28/28] fishplugins.forgit: fix dependency linking --- pkgs/shells/fish/plugins/forgit.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/shells/fish/plugins/forgit.nix b/pkgs/shells/fish/plugins/forgit.nix index b905b7a2589..5fc647c73ee 100644 --- a/pkgs/shells/fish/plugins/forgit.nix +++ b/pkgs/shells/fish/plugins/forgit.nix @@ -4,7 +4,11 @@ buildFishPlugin rec { pname = "forgit"; version = "unstable-2021-04-09"; - buildInputs = [ git fzf ]; + preFixup = '' + substituteInPlace $out/share/fish/vendor_conf.d/forgit.plugin.fish \ + --replace "fzf " "${fzf}/bin/fzf " \ + --replace "git " "${git}/bin/git " + ''; src = fetchFromGitHub { owner = "wfxr";