From ed3b102d1e51fe69d73dac210719e3a75f69fa85 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 4 Jun 2023 14:20:51 +0200 Subject: [PATCH 01/19] treewide: use use lib.optionalAttrs instead of 'then {}' --- .../services/continuous-integration/buildkite-agents.nix | 2 +- nixos/modules/services/mail/rspamd.nix | 2 +- nixos/modules/services/web-apps/mattermost.nix | 3 +-- pkgs/development/coq-modules/tlc/default.nix | 4 +--- .../lisp-modules-obsolete/quicklisp-to-nix-overrides.nix | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/continuous-integration/buildkite-agents.nix b/nixos/modules/services/continuous-integration/buildkite-agents.nix index 7c8f77580ff6..a40b939a16c7 100644 --- a/nixos/modules/services/continuous-integration/buildkite-agents.nix +++ b/nixos/modules/services/continuous-integration/buildkite-agents.nix @@ -11,7 +11,7 @@ let default = null; description = lib.mdDoc description; type = types.nullOr types.lines; - } // (if example == null then {} else { inherit example; }); + } // (lib.optionalAttrs (example != null) { inherit example; }); }; mkHookOptions = hooks: listToAttrs (map mkHookOption hooks); diff --git a/nixos/modules/services/mail/rspamd.nix b/nixos/modules/services/mail/rspamd.nix index f9be9024dd4f..ca88d8122179 100644 --- a/nixos/modules/services/mail/rspamd.nix +++ b/nixos/modules/services/mail/rspamd.nix @@ -215,7 +215,7 @@ let text = v.extraConfig; }) (filterAttrs (n: v: v.extraConfig != "") cfg.workers)) - // (if cfg.extraConfig == "" then {} else { + // (lib.optionalAttrs (cfg.extraConfig != "") { "extra-config.inc".text = cfg.extraConfig; }); in diff --git a/nixos/modules/services/web-apps/mattermost.nix b/nixos/modules/services/web-apps/mattermost.nix index db5122e79f00..66e5f1695a15 100644 --- a/nixos/modules/services/web-apps/mattermost.nix +++ b/nixos/modules/services/web-apps/mattermost.nix @@ -86,8 +86,7 @@ let mattermostConf = recursiveUpdate mattermostConfWithoutPlugins ( - if mattermostPlugins == null then {} - else { + lib.optionalAttrs (mattermostPlugins != null) { PluginSettings = { Enable = true; }; diff --git a/pkgs/development/coq-modules/tlc/default.nix b/pkgs/development/coq-modules/tlc/default.nix index 8ded1abeb146..4fb67bede237 100644 --- a/pkgs/development/coq-modules/tlc/default.nix +++ b/pkgs/development/coq-modules/tlc/default.nix @@ -23,9 +23,7 @@ maintainers = [ maintainers.vbgl ]; }; }).overrideAttrs (x: - if lib.versionAtLeast x.version "20210316" - then {} - else { + lib.optionalAttrs (lib.versionOlder x.version "20210316") { installFlags = [ "CONTRIB=$(out)/lib/coq/${coq.coq-version}/user-contrib" ]; } ) diff --git a/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix b/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix index 6b0e72032126..50bf5bcc461b 100644 --- a/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix +++ b/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix @@ -4,8 +4,7 @@ let skipBuildPhase = x: { overrides = y: ((x.overrides y) // { buildPhase = "true"; }); }; - multiOverride = l: x: if l == [] then {} else - ((builtins.head l) x) // (multiOverride (builtins.tail l) x); + multiOverride = l: x: pkgs.lib.optionalAttrs (l != []) ((builtins.head l) x) // (multiOverride (builtins.tail l) x); lispName = (clwrapper.lisp.pname or (builtins.parseDrvName clwrapper.lisp.name).name); ifLispIn = l: f: if (pkgs.lib.elem lispName l) then f else (x: {}); ifLispNotIn = l: f: if ! (pkgs.lib.elem lispName l) then f else (x: {}); From e39994d2b9799aa773916f4329fca59a8e66342d Mon Sep 17 00:00:00 2001 From: Dee Anzorge Date: Tue, 13 Jun 2023 00:49:12 +0200 Subject: [PATCH 02/19] qtkeychain: 0.12.0 -> 0.14.1 Changes: https://github.com/frankosterfeld/qtkeychain/blob/0.14.1/ChangeLog --- .../qtkeychain/0002-Fix-install-name-Darwin.patch | 10 ---------- pkgs/development/libraries/qtkeychain/default.nix | 8 +++----- 2 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 pkgs/development/libraries/qtkeychain/0002-Fix-install-name-Darwin.patch diff --git a/pkgs/development/libraries/qtkeychain/0002-Fix-install-name-Darwin.patch b/pkgs/development/libraries/qtkeychain/0002-Fix-install-name-Darwin.patch deleted file mode 100644 index 30d93cd7bf8b..000000000000 --- a/pkgs/development/libraries/qtkeychain/0002-Fix-install-name-Darwin.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -215,7 +215,6 @@ - VERSION ${QTKEYCHAIN_VERSION} - SOVERSION ${QTKEYCHAIN_SOVERSION} - MACOSX_RPATH 1 -- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" - INSTALL_RPATH_USE_LINK_PATH TRUE - ) - diff --git a/pkgs/development/libraries/qtkeychain/default.nix b/pkgs/development/libraries/qtkeychain/default.nix index e06667540719..d87d98090966 100644 --- a/pkgs/development/libraries/qtkeychain/default.nix +++ b/pkgs/development/libraries/qtkeychain/default.nix @@ -12,19 +12,17 @@ stdenv.mkDerivation rec { pname = "qtkeychain"; - version = "0.12.0"; + version = "0.14.1"; src = fetchFromGitHub { owner = "frankosterfeld"; repo = "qtkeychain"; - rev = "v${version}"; - sha256 = "0gi1nx4bcc1vwfw41cif3xi2i59229vy0kc2r5959d8n6yv31kfr"; # v0.9.1 + rev = "${version}"; + sha256 = "sha256-LclYOuIYn+jYCvg69uHFlV3VcZ2KWdr8lFyCSBIB7Kw="; }; dontWrapQtApps = true; - patches = [ ./0002-Fix-install-name-Darwin.patch ]; - cmakeFlags = [ "-DBUILD_WITH_QT6=${if lib.versions.major qtbase.version == "6" then "ON" else "OFF"}" "-DQT_TRANSLATIONS_DIR=share/qt/translations" From b365e5c1a6c2f558ff5c0032ebe5b060a178d093 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Jun 2023 14:52:37 +0000 Subject: [PATCH 03/19] httplib: 0.12.5 -> 0.12.6 --- pkgs/development/libraries/httplib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/httplib/default.nix b/pkgs/development/libraries/httplib/default.nix index dca86affa633..71fafad0c3ba 100644 --- a/pkgs/development/libraries/httplib/default.nix +++ b/pkgs/development/libraries/httplib/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "httplib"; - version = "0.12.5"; + version = "0.12.6"; src = fetchFromGitHub { owner = "yhirose"; repo = "cpp-httplib"; rev = "v${version}"; - hash = "sha256-9qCquF6DXpgtrfXVd/hc8n1Eu1nOxf/Lm+R13QI0N9Q="; + hash = "sha256-7bH7bq6lsobf5ZEyxPXPqPopZyn9NKInlqmuNzmHkkM="; }; nativeBuildInputs = [ cmake ]; From 1f2bba0f531bcf6b3b74fd69e557d4b60c4f1f4a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Jun 2023 16:32:34 +0000 Subject: [PATCH 04/19] jfrog-cli: 2.38.5 -> 2.40.0 --- pkgs/tools/misc/jfrog-cli/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/jfrog-cli/default.nix b/pkgs/tools/misc/jfrog-cli/default.nix index edc2490702e4..59646ef72df3 100644 --- a/pkgs/tools/misc/jfrog-cli/default.nix +++ b/pkgs/tools/misc/jfrog-cli/default.nix @@ -6,16 +6,16 @@ buildGoModule rec { pname = "jfrog-cli"; - version = "2.38.5"; + version = "2.40.0"; src = fetchFromGitHub { owner = "jfrog"; repo = "jfrog-cli"; rev = "refs/tags/v${version}"; - hash = "sha256-fd5YJCaqT78TjhC3CkX7+iPTxW278U7GTiXLH46L2m4="; + hash = "sha256-Fhpg78IV+NEkKXWk0Xw58uE6G2qfaYhgKfhmTVAGvEo="; }; - vendorHash = "sha256-6sUifqqryPrlwOFYPKp1VrgGE+xF/ELz8s7eLrMJnr4="; + vendorHash = "sha256-zzqXl6i1ZrxIU9ePzTd+drOtPU76DcfLY8RDu/rVNzE="; postInstall = '' # Name the output the same way as the original build script does From 97cc99c5afb7ab2c57cfb855efdacc6c401d6a1d Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Tue, 13 Jun 2023 19:14:29 +0200 Subject: [PATCH 05/19] plex: 1.32.3.7162-b0a36929b -> 1.32.3.7192-7aa441827 --- pkgs/servers/plex/raw.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/plex/raw.nix b/pkgs/servers/plex/raw.nix index 6714d1d35b45..259e7f5b3140 100644 --- a/pkgs/servers/plex/raw.nix +++ b/pkgs/servers/plex/raw.nix @@ -12,16 +12,16 @@ # server, and the FHS userenv and corresponding NixOS module should # automatically pick up the changes. stdenv.mkDerivation rec { - version = "1.32.3.7162-b0a36929b"; + version = "1.32.3.7192-7aa441827"; pname = "plexmediaserver"; # Fetch the source src = if stdenv.hostPlatform.system == "aarch64-linux" then fetchurl { url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_arm64.deb"; - sha256 = "sha256-y1H1DmgMCYEzmhN01LgFHPzN/as2z457tZMdEJ0lgxk="; + sha256 = "sha256-sqlvJIMlyrRfvtQB+IpbmWwdQBA2lEGNPEc3zTfwr4s="; } else fetchurl { url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb"; - sha256 = "sha256-q95xyp+XJbDuT+SRP+EbcFDqqdcvRP4P1rnX8RO1egQ="; + sha256 = "sha256-F3djGd03yD64TtjnB/S8HWDNmY1kA3OgctpamGNxPZ0="; }; outputs = [ "out" "basedb" ]; From b753a7498bfadcbdea21f1f26a7574c3441cbed4 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 13 Jun 2023 20:27:12 +0200 Subject: [PATCH 06/19] bird-lg: 1.2.0 -> 1.3.0 (#232158) > - Fix BGPMAP showing wrong preferred protocol name (#75) > - Treat empty environment variables as valid settings (#77) > - Support setting port for WHOIS server on frontend > - Fix lgproxy handling of very long lines from BIRD daemon > - Make lgproxy parse allow IP list at startup https://github.com/xddxdd/bird-lg-go/releases/tag/v1.3.0 --- pkgs/servers/bird-lg/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/bird-lg/default.nix b/pkgs/servers/bird-lg/default.nix index 3bd0df7072b3..a7df747f6f66 100644 --- a/pkgs/servers/bird-lg/default.nix +++ b/pkgs/servers/bird-lg/default.nix @@ -3,13 +3,13 @@ let generic = { modRoot, vendorSha256 }: buildGoModule rec { pname = "bird-lg-${modRoot}"; - version = "1.2.0"; + version = "1.3.0"; src = fetchFromGitHub { owner = "xddxdd"; repo = "bird-lg-go"; rev = "v${version}"; - sha256 = "sha256-Ldp/c1UU5EFnKjlUqQ+Hh6rVEOYEX7kaDL36edr9pNA="; + hash = "sha256-VQJHrC9ag697QfCEre1KvwbotfMm8f1otJ6SPg5zRYM="; }; doDist = false; @@ -32,12 +32,12 @@ let bird-lg-frontend = generic { modRoot = "frontend"; - vendorSha256 = "sha256-lYOi3tfXYhsFaWgikDUoJYRm8sxFNFKiFQMlVx/8AkA="; + vendorSha256 = "sha256-4ajQp425SFciTi2DV3ITW4iQkq6kUJFK2BabTTb87Zo="; }; bird-lg-proxy = generic { modRoot = "proxy"; - vendorSha256 = "sha256-QHLq4RuQaCMjefs7Vl7zSVgjLMDXvIZcM8d6/B5ECZc="; + vendorSha256 = "sha256-o8F3uNGpz1fZr15HCY2PC7xRx9NakmvYrVQKe42ElOA="; }; in symlinkJoin { From e65a30f825fdf5eb59270dd16ae8c6905035150c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Jun 2023 19:00:52 +0000 Subject: [PATCH 07/19] cariddi: 1.3.1 -> 1.3.2 --- pkgs/tools/security/cariddi/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/cariddi/default.nix b/pkgs/tools/security/cariddi/default.nix index 8498cb01c57f..6a41ce214d1d 100644 --- a/pkgs/tools/security/cariddi/default.nix +++ b/pkgs/tools/security/cariddi/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "cariddi"; - version = "1.3.1"; + version = "1.3.2"; src = fetchFromGitHub { owner = "edoardottt"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-zz9p35Wk5jwp5Cn4+FgJCwG2KKgBuOQsH4lJeAVhpCM="; + hash = "sha256-oM4A4chSBTiCMr3bW0AvjAFlyuqvKKKY2Ji4PYRsUqA="; }; - vendorHash = "sha256-s6aEq3LzCj9xzieLD1aC69KV3aeav+bQ5VUZ3TbFetw="; + vendorHash = "sha256-EeoJssX/OkIJKltANfvMirvDVmVVIe9hDj+rThKpd10="; meta = with lib; { description = "Crawler for URLs and endpoints"; From de847f9917c0cab84a86e5e1e86ba0cfb7135ad9 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Tue, 13 Jun 2023 21:17:59 +0200 Subject: [PATCH 08/19] openttd: 13.1 -> 13.3 --- pkgs/games/openttd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix index e476f42380cd..3071142fc924 100644 --- a/pkgs/games/openttd/default.nix +++ b/pkgs/games/openttd/default.nix @@ -29,11 +29,11 @@ let in stdenv.mkDerivation rec { pname = "openttd"; - version = "13.1"; + version = "13.3"; src = fetchurl { url = "https://cdn.openttd.org/openttd-releases/${version}/${pname}-${version}-source.tar.xz"; - hash = "sha256-Xt8i03A1I4KF72cql9WeZCgL66sj5YR4CDTM1r4KWLs="; + hash = "sha256-qvoW0vtnFlE0xzqIj3n3pe19oXoEz26ez2csnLiecZI="; }; nativeBuildInputs = [ cmake makeWrapper ]; From 84b442b179d62d16ad26f467327beb852aa67efb Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Tue, 13 Jun 2023 21:18:12 +0200 Subject: [PATCH 09/19] openttd-jgrpp: 0.53.1 -> 0.54.1 --- pkgs/games/openttd/jgrpp.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/openttd/jgrpp.nix b/pkgs/games/openttd/jgrpp.nix index 5ceb318a67a0..46fe0ab60ac4 100644 --- a/pkgs/games/openttd/jgrpp.nix +++ b/pkgs/games/openttd/jgrpp.nix @@ -2,13 +2,13 @@ openttd.overrideAttrs (oldAttrs: rec { pname = "openttd-jgrpp"; - version = "0.53.1"; + version = "0.54.1"; src = fetchFromGitHub rec { owner = "JGRennison"; repo = "OpenTTD-patches"; rev = "jgrpp-${version}"; - hash = "sha256-+5AOsop3x1fkX5UfxMFLhrTLeSnt+E0PYoU5n31N3f4="; + hash = "sha256-MfYh2a3wjWB/5zgTE8AAIREI2OEhykqF0Rad7I+912U="; }; buildInputs = oldAttrs.buildInputs ++ [ zstd ]; From d1556ade024422dc546e7fa2f20c8a7a202adf9b Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 13 Jun 2023 21:23:16 +0200 Subject: [PATCH 10/19] code-server: use `finalAttrs` pattern - refactor code-style - add missing phases - remove cloud-agent --- pkgs/servers/code-server/default.nix | 125 ++++++++++++++++----------- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 77 insertions(+), 49 deletions(-) diff --git a/pkgs/servers/code-server/default.nix b/pkgs/servers/code-server/default.nix index 234542f7f7c6..8a07218ece48 100644 --- a/pkgs/servers/code-server/default.nix +++ b/pkgs/servers/code-server/default.nix @@ -1,12 +1,35 @@ -{ lib, stdenv, fetchFromGitHub, buildGoModule, makeWrapper -, cacert, moreutils, jq, git, rsync, pkg-config, yarn, python3 -, esbuild, nodejs_16, node-gyp, libsecret, xorg, ripgrep -, AppKit, Cocoa, CoreServices, Security, cctools, xcbuild, quilt, nixosTests }: +{ lib +, stdenv +, fetchFromGitHub +, buildGoModule +, makeWrapper +, cacert +, moreutils +, jq +, git +, rsync +, pkg-config +, yarn +, python3 +, esbuild +, nodejs +, node-gyp +, libsecret +, xorg +, ripgrep +, AppKit +, Cocoa +, CoreServices +, Security +, cctools +, xcbuild +, quilt +, nixosTests +}: let system = stdenv.hostPlatform.system; - nodejs = nodejs_16; python = python3; yarn' = yarn.override { inherit nodejs; }; defaultYarnOpts = [ ]; @@ -25,49 +48,31 @@ let }; # replaces esbuild's download script with a binary from nixpkgs - patchEsbuild = path : version : '' + patchEsbuild = path: version: '' mkdir -p ${path}/node_modules/esbuild/bin jq "del(.scripts.postinstall)" ${path}/node_modules/esbuild/package.json | sponge ${path}/node_modules/esbuild/package.json sed -i 's/${version}/${esbuild'.version}/g' ${path}/node_modules/esbuild/lib/main.js ln -s -f ${esbuild'}/bin/esbuild ${path}/node_modules/esbuild/bin/esbuild ''; - -in stdenv.mkDerivation rec { +in +stdenv.mkDerivation (finalAttrs: { pname = "code-server"; version = "4.12.0"; src = fetchFromGitHub { owner = "coder"; repo = "code-server"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; fetchSubmodules = true; hash = "sha256-PQp5dji2Ynp+LJRWBka41umwe1/IR76C+at/wyOWGcI="; }; - cloudAgent = buildGoModule rec { - pname = "cloud-agent"; - version = "0.2.6"; - - src = fetchFromGitHub { - owner = "coder"; - repo = "cloud-agent"; - rev = "v${version}"; - sha256 = "1s3jpgvzizc9skc27c3x35sya2p4ywhvdi3l73927z3j47wszy7f"; - }; - - vendorSha256 = "14xzlbmki8fk8mbcci62q8sklyd0nyga07ww1ap0vdrv7d1g31hn"; - - postPatch = '' - # the cloud-agent release tag has an empty version string, so add it back in - substituteInPlace internal/version/version.go \ - --replace 'var Version string' 'var Version string = "v${version}"' - ''; - }; - yarnCache = stdenv.mkDerivation { - name = "${pname}-${version}-${system}-yarn-cache"; - inherit src; + name = "${finalAttrs.pname}-${finalAttrs.version}-${system}-yarn-cache"; + inherit (finalAttrs) src; + nativeBuildInputs = [ yarn' git cacert ]; + buildPhase = '' export HOME=$PWD export GIT_SSL_CAINFO="${cacert}/etc/ssl/certs/ca-bundle.crt" @@ -84,21 +89,35 @@ in stdenv.mkDerivation rec { xargs -I {} yarn --cwd {} \ --ignore-scripts --ignore-engines ''; + outputHashMode = "recursive"; outputHashAlgo = "sha256"; - - # to get hash values use nix-build -A code-server.prefetchYarnCache outputHash = "sha256-4Vr9u3+W/IhbbTc39jyDyDNQODlmdF+M/N8oJn0Z4+w="; }; nativeBuildInputs = [ - nodejs yarn' python pkg-config makeWrapper git rsync jq moreutils quilt + nodejs + yarn' + python + pkg-config + makeWrapper + git + rsync + jq + moreutils + quilt ]; + buildInputs = lib.optionals (!stdenv.isDarwin) [ libsecret ] ++ (with xorg; [ libX11 libxkbfile ]) ++ lib.optionals stdenv.isDarwin [ - AppKit Cocoa CoreServices Security cctools xcbuild - ]; + AppKit + Cocoa + CoreServices + Security + cctools + xcbuild + ]; patches = [ # remove git calls from vscode build script @@ -116,6 +135,8 @@ in stdenv.mkDerivation rec { ''; configurePhase = '' + runHook preConfigure + # run yarn offline by default echo '--install.offline true' >> .yarnrc @@ -125,7 +146,7 @@ in stdenv.mkDerivation rec { '') defaultYarnOpts} # set offline mirror to yarn cache we created in previous steps - yarn --offline config set yarn-offline-mirror "${yarnCache}" + yarn --offline config set yarn-offline-mirror "${finalAttrs.yarnCache}" # skip unnecessary electron download export ELECTRON_SKIP_BINARY_DOWNLOAD=1 @@ -140,9 +161,13 @@ in stdenv.mkDerivation rec { # use updated node-gyp. fixes the following error on Darwin: # PermissionError: [Errno 1] Operation not permitted: '/usr/sbin/pkgutil' export npm_config_node_gyp=${node-gyp}/lib/node_modules/node-gyp/bin/node-gyp.js + + runHook postConfigure ''; buildPhase = '' + runHook preBuild + # install code-server dependencies yarn --offline --ignore-scripts @@ -191,7 +216,7 @@ in stdenv.mkDerivation rec { ${patchEsbuild "./lib/vscode/build" "0.12.6"} ${patchEsbuild "./lib/vscode/extensions" "0.11.23"} - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' # use prebuilt binary for @parcel/watcher, which requires macOS SDK 10.13+ # (see issue #101229) pushd ./lib/vscode/remote/node_modules/@parcel/watcher @@ -215,13 +240,17 @@ in stdenv.mkDerivation rec { yarn build # build vscode - VERSION=${version} yarn build:vscode + VERSION=${finalAttrs.version} yarn build:vscode # create release yarn release + + runHook postBuild ''; installPhase = '' + runHook preInstall + mkdir -p $out/libexec/code-server $out/bin # copy release to libexec path @@ -230,17 +259,15 @@ in stdenv.mkDerivation rec { # install only production dependencies yarn --offline --cwd "$out/libexec/code-server" --production - # link coder-cloud agent from nix store - mkdir -p $out/libexec/code-server/lib - ln -s "${cloudAgent}/bin/cloud-agent" $out/libexec/code-server/lib/coder-cloud-agent - # create wrapper - makeWrapper "${nodejs_16}/bin/node" "$out/bin/code-server" \ + makeWrapper "${nodejs}/bin/node" "$out/bin/code-server" \ --add-flags "$out/libexec/code-server/out/node/entry.js" + + runHook postInstall ''; passthru = { - prefetchYarnCache = lib.overrideDerivation yarnCache (d: { + prefetchYarnCache = lib.overrideDerivation finalAttrs.yarnCache (d: { outputHash = lib.fakeSha256; }); tests = { @@ -248,15 +275,15 @@ in stdenv.mkDerivation rec { }; }; - meta = with lib; { + meta = { description = "Run VS Code on a remote server"; longDescription = '' code-server is VS Code running on a remote server, accessible through the browser. ''; homepage = "https://github.com/coder/code-server"; - license = licenses.mit; - maintainers = with maintainers; [ offline henkery ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ offline henkery ]; platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1e6233ca454b..0d243d151e3b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35270,6 +35270,7 @@ with pkgs; }; code-server = callPackage ../servers/code-server { + nodejs = nodejs_16; inherit (darwin.apple_sdk.frameworks) AppKit Cocoa CoreServices Security; inherit (darwin) cctools; inherit (nodePackages) node-gyp; From 123283d1ad3bd9b8d13cf5dcaaefa632975030f7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Jun 2023 19:48:58 +0000 Subject: [PATCH 11/19] codespelunker: 1.0.0 -> 1.2.0 --- pkgs/development/tools/codespelunker/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/codespelunker/default.nix b/pkgs/development/tools/codespelunker/default.nix index 13258987eb36..2515fc7931a2 100644 --- a/pkgs/development/tools/codespelunker/default.nix +++ b/pkgs/development/tools/codespelunker/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "codespelunker"; - version = "1.0.0"; + version = "1.2.0"; src = fetchFromGitHub { owner = "boyter"; repo = "cs"; rev = "v${version}"; - hash = "sha256-NN/78paePdvYHQ4J2aQu56PvEciOXY8DxHd4ajfVCFU="; + hash = "sha256-kWKDr8KKD3M5MyRuEMMZXvTqflDidkMsu2fN9N0s50w="; }; vendorHash = null; From 20926278783ccacf3f3b84eed9af349b6004829c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Jun 2023 20:04:11 +0000 Subject: [PATCH 12/19] numix-icon-theme-circle: 23.05.15 -> 23.06.11 --- pkgs/data/icons/numix-icon-theme-circle/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/icons/numix-icon-theme-circle/default.nix b/pkgs/data/icons/numix-icon-theme-circle/default.nix index 8434937a395a..a63f28e92642 100644 --- a/pkgs/data/icons/numix-icon-theme-circle/default.nix +++ b/pkgs/data/icons/numix-icon-theme-circle/default.nix @@ -2,13 +2,13 @@ stdenvNoCC.mkDerivation rec { pname = "numix-icon-theme-circle"; - version = "23.05.15"; + version = "23.06.11"; src = fetchFromGitHub { owner = "numixproject"; repo = pname; rev = version; - sha256 = "sha256-jZ++x2xtwmCYqv1jdJuNM2sHpmvkv6gj8Xo4PN2Vjsk="; + sha256 = "sha256-bEUT6hBAKyilbUWSbyvGRuIwatooJ3k/mvVJg1PncjA="; }; nativeBuildInputs = [ gtk3 ]; From ae3504632697eb76852a623f44678b5e11118df3 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 13 Jun 2023 23:06:37 +0200 Subject: [PATCH 13/19] treewide: treewide: use lib.optionalAttrs instead of 'then {}' add missing parentheses. --- .../lisp-modules-obsolete/quicklisp-to-nix-overrides.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix b/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix index 50bf5bcc461b..00b094dc9fd9 100644 --- a/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix +++ b/pkgs/development/lisp-modules-obsolete/quicklisp-to-nix-overrides.nix @@ -4,7 +4,7 @@ let skipBuildPhase = x: { overrides = y: ((x.overrides y) // { buildPhase = "true"; }); }; - multiOverride = l: x: pkgs.lib.optionalAttrs (l != []) ((builtins.head l) x) // (multiOverride (builtins.tail l) x); + multiOverride = l: x: pkgs.lib.optionalAttrs (l != []) (((builtins.head l) x) // (multiOverride (builtins.tail l) x)); lispName = (clwrapper.lisp.pname or (builtins.parseDrvName clwrapper.lisp.name).name); ifLispIn = l: f: if (pkgs.lib.elem lispName l) then f else (x: {}); ifLispNotIn = l: f: if ! (pkgs.lib.elem lispName l) then f else (x: {}); From 28af3205bc11efef07a84e708729db1fa259c923 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 14 Jun 2023 00:18:09 +0300 Subject: [PATCH 14/19] gplates: drop python39 --- .../misc/gplates/boost-placeholders.patch | 75 +++++++++++++++++++ .../science/misc/gplates/default.nix | 4 + pkgs/top-level/all-packages.nix | 7 +- 3 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 pkgs/applications/science/misc/gplates/boost-placeholders.patch diff --git a/pkgs/applications/science/misc/gplates/boost-placeholders.patch b/pkgs/applications/science/misc/gplates/boost-placeholders.patch new file mode 100644 index 000000000000..7166b92f646a --- /dev/null +++ b/pkgs/applications/science/misc/gplates/boost-placeholders.patch @@ -0,0 +1,75 @@ +diff --unified --recursive a/src/gui/TopologyTools.cc b/src/gui/TopologyTools.cc +--- a/src/gui/TopologyTools.cc 2021-07-05 05:11:47.000000000 +0200 ++++ b/src/gui/TopologyTools.cc 2022-12-07 22:35:20.444054124 +0100 +@@ -3448,7 +3448,7 @@ + std::find_if( + d_visible_boundary_section_seq.begin(), + d_visible_boundary_section_seq.end(), +- boost::bind(&VisibleSection::d_section_info_index, _1) == ++ boost::bind(&VisibleSection::d_section_info_index, boost::placeholders::_1) == + boost::cref(section_index)); + + if (visible_section_iter == d_visible_boundary_section_seq.end()) +@@ -3467,7 +3467,7 @@ + std::find_if( + d_visible_interior_section_seq.begin(), + d_visible_interior_section_seq.end(), +- boost::bind(&VisibleSection::d_section_info_index, _1) == ++ boost::bind(&VisibleSection::d_section_info_index, boost::placeholders::_1) == + boost::cref(section_index)); + + if (visible_section_iter == d_visible_interior_section_seq.end()) +diff --unified --recursive a/src/presentation/ReconstructionGeometryRenderer.cc b/src/presentation/ReconstructionGeometryRenderer.cc +--- a/src/presentation/ReconstructionGeometryRenderer.cc 2021-07-05 05:11:50.000000000 +0200 ++++ b/src/presentation/ReconstructionGeometryRenderer.cc 2022-12-07 22:36:11.117884262 +0100 +@@ -274,7 +274,7 @@ + GPlatesPresentation::ReconstructionGeometryRenderer::RenderParamsPopulator::visit_reconstruct_visual_layer_params( + const ReconstructVisualLayerParams ¶ms) + { +- d_render_params.show_vgp = boost::bind(&ReconstructVisualLayerParams::show_vgp, ¶ms, _1, _2); ++ d_render_params.show_vgp = boost::bind(&ReconstructVisualLayerParams::show_vgp, ¶ms, boost::placeholders::_1, boost::placeholders::_2); + d_render_params.vgp_draw_circular_error = params.get_vgp_draw_circular_error(); + d_render_params.fill_polygons = params.get_fill_polygons(); + d_render_params.fill_polylines = params.get_fill_polylines(); +diff --unified --recursive a/src/presentation/VisualLayerRegistry.cc b/src/presentation/VisualLayerRegistry.cc +--- a/src/presentation/VisualLayerRegistry.cc 2021-07-05 05:11:50.000000000 +0200 ++++ b/src/presentation/VisualLayerRegistry.cc 2022-12-07 22:38:12.950877614 +0100 +@@ -448,7 +448,7 @@ + &GPlatesQtWidgets::ReconstructScalarCoverageLayerOptionsWidget::create, + boost::bind( + &ReconstructScalarCoverageVisualLayerParams::create, +- _1), ++ boost::placeholders::_1), + true); + + registry.register_visual_layer_type( +@@ -498,7 +498,7 @@ + // NOTE: We pass in ViewState and not the GlobeAndMapWidget, obtained from + // ViewportWindow, because ViewportWindow is not yet available (a reference to + // it not yet been initialised inside ViewState) so accessing it would crash... +- _1, boost::ref(view_state)), ++ boost::placeholders::_1, boost::ref(view_state)), + true); + + // DERIVED_DATA group. +@@ -549,7 +549,7 @@ + &GPlatesQtWidgets::VelocityFieldCalculatorLayerOptionsWidget::create, + boost::bind( + &VelocityFieldCalculatorVisualLayerParams::create, +- _1, boost::cref(view_state.get_rendered_geometry_parameters())), ++ boost::placeholders::_1, boost::cref(view_state.get_rendered_geometry_parameters())), + true); + + using namespace GPlatesUtils; +diff --unified --recursive a/src/qt-widgets/ViewportWindow.cc b/src/qt-widgets/ViewportWindow.cc +--- a/src/qt-widgets/ViewportWindow.cc 2021-08-05 05:44:01.000000000 +0200 ++++ b/src/qt-widgets/ViewportWindow.cc 2022-12-07 22:39:20.487981302 +0100 +@@ -326,7 +326,7 @@ + *d_geometry_operation_state_ptr, + *d_modify_geometry_state, + *d_measure_distance_state_ptr, +- boost::bind(&canvas_tool_status_message, boost::ref(*this), _1), ++ boost::bind(&canvas_tool_status_message, boost::ref(*this), boost::placeholders::_1), + get_view_state(), + *this); + diff --git a/pkgs/applications/science/misc/gplates/default.nix b/pkgs/applications/science/misc/gplates/default.nix index 7cbf37fcaf8a..e6cebbc53b73 100644 --- a/pkgs/applications/science/misc/gplates/default.nix +++ b/pkgs/applications/science/misc/gplates/default.nix @@ -40,6 +40,10 @@ in mkDerivation rec { sha256 = "0lrcmcxc924ixddii8cyglqlwwxvk7f00g4yzbss5i3fgcbh8n96"; }; + patches = [ + ./boost-placeholders.patch + ]; + nativeBuildInputs = [ cmake doxygen diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9bb2c80d05f2..4a7680411ccb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -38793,12 +38793,7 @@ with pkgs; gildas = callPackage ../applications/science/astronomy/gildas { }; - gplates = libsForQt5.callPackage ../applications/science/misc/gplates { - boost = boost175; - # build with Python 3.10 fails, because boost <= 1.78 can't find - # pythons with double digits in minor versions, like X.YZ - python3 = python39; - }; + gplates = libsForQt5.callPackage ../applications/science/misc/gplates { }; grap = callPackage ../tools/security/grap { }; From 904d6a0b6252b834927d9c82018d8f43f1e2e06a Mon Sep 17 00:00:00 2001 From: Ilan Joselevich Date: Wed, 14 Jun 2023 00:23:33 +0300 Subject: [PATCH 15/19] nextcloud-client: 3.8.2 -> 3.9.0 Diff: https://github.com/nextcloud/desktop/compare/v3.8.2...v3.9.0 --- pkgs/applications/networking/nextcloud-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix index 7a935a0876d1..322f97f48031 100644 --- a/pkgs/applications/networking/nextcloud-client/default.nix +++ b/pkgs/applications/networking/nextcloud-client/default.nix @@ -26,7 +26,7 @@ mkDerivation rec { pname = "nextcloud-client"; - version = "3.8.2"; + version = "3.9.0"; outputs = [ "out" "dev" ]; @@ -34,7 +34,7 @@ mkDerivation rec { owner = "nextcloud"; repo = "desktop"; rev = "v${version}"; - sha256 = "sha256-V5g6+Ci2MjBKnitY6IIaMY4gpoeMK+sd7HGZ1U87xL4="; + sha256 = "sha256-XcQYttd5dl2TCbBxOlRBg8/mEiHekoxayPi81ot7N7o="; }; patches = [ From 945e82bfb72a6f462dfb30a96ba249a55c5cae41 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 13 Jun 2023 21:36:48 +0000 Subject: [PATCH 16/19] numix-icon-theme-square: 23.05.15 -> 23.06.11 --- pkgs/data/icons/numix-icon-theme-square/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/icons/numix-icon-theme-square/default.nix b/pkgs/data/icons/numix-icon-theme-square/default.nix index c767d6b42240..04d907d4707a 100644 --- a/pkgs/data/icons/numix-icon-theme-square/default.nix +++ b/pkgs/data/icons/numix-icon-theme-square/default.nix @@ -2,13 +2,13 @@ stdenvNoCC.mkDerivation rec { pname = "numix-icon-theme-square"; - version = "23.05.15"; + version = "23.06.11"; src = fetchFromGitHub { owner = "numixproject"; repo = pname; rev = version; - sha256 = "sha256-tcEVwc3Ez0h9JwiHyYfMvdTfUaivy4sH3QJR9tP1LSk="; + sha256 = "sha256-pm3sEx3OJkS4sz+sg09HeTSdQZTdjyxJCsjYWCA4mN0="; }; nativeBuildInputs = [ gtk3 ]; From 12cab182ae8f8aceca060de7a56d51ebe8c86898 Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 9 Jun 2023 23:05:27 +0900 Subject: [PATCH 17/19] MACS2: 2.2.7.1 -> 2.2.8 Diff: https://github.com/macs3-project/MACS/compare/v2.2.7.1...v2.2.8 changelog: https://github.com/macs3-project/MACS/releases/tag/v2.2.8 --- .../science/biology/MACS2/default.nix | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/science/biology/MACS2/default.nix b/pkgs/applications/science/biology/MACS2/default.nix index 5663ffaf4486..45de439c9737 100644 --- a/pkgs/applications/science/biology/MACS2/default.nix +++ b/pkgs/applications/science/biology/MACS2/default.nix @@ -2,32 +2,43 @@ python3.pkgs.buildPythonPackage rec { pname = "MACS2"; - version = "2.2.7.1"; + version = "2.2.8"; + format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "1rcxj943kgzs746f5jrb72x1cp4v50rk3qmad0m99a02vndscb5d"; + hash = "sha256-KgpDasidj4yUoeQQaQA3dg5eN5Ka1xnFRpbnTvhKmOA="; }; postPatch = '' - # remove version check which breaks on 3.10 + # prevent setup.py from installing numpy substituteInPlace setup.py \ - --replace 'if float(sys.version[:3])<3.6:' 'if False:' + --replace "subprocess.call([sys.executable, \"-m\", 'pip', 'install', f'numpy{numpy_requires}'],cwd=cwd)" "0" ''; + nativeBuildInputs = with python3.pkgs; [ + cython + setuptools + ]; + propagatedBuildInputs = with python3.pkgs; [ numpy ]; - # To prevent ERROR: diffpeak_cmd (unittest.loader._FailedTest) for obsolete - # function (ImportError: Failed to import test module: diffpeak_cmd) - doCheck = false; + nativeCheckInputs = [ + python3.pkgs.unittestCheckHook + ]; + + unittestFlagsArray = [ + "-s" + "test" + ]; + pythonImportsCheck = [ "MACS2" ]; meta = with lib; { description = "Model-based Analysis for ChIP-Seq"; + homepage = "https://github.com/macs3-project/MACS/"; + changelog = "https://github.com/macs3-project/MACS/releases/tag/v${version}"; license = licenses.bsd3; maintainers = with maintainers; [ gschwartz ]; - platforms = platforms.linux; - # error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’? - broken = true; }; } From 3d1b9f0819990ed51ddde2a7f81755913935351d Mon Sep 17 00:00:00 2001 From: natsukium Date: Mon, 12 Jun 2023 23:19:17 +0900 Subject: [PATCH 18/19] macs2: rename from MACS2 --- .../science/biology/{MACS2 => macs2}/default.nix | 5 +++-- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) rename pkgs/applications/science/biology/{MACS2 => macs2}/default.nix (93%) diff --git a/pkgs/applications/science/biology/MACS2/default.nix b/pkgs/applications/science/biology/macs2/default.nix similarity index 93% rename from pkgs/applications/science/biology/MACS2/default.nix rename to pkgs/applications/science/biology/macs2/default.nix index 45de439c9737..934da2e8ab61 100644 --- a/pkgs/applications/science/biology/MACS2/default.nix +++ b/pkgs/applications/science/biology/macs2/default.nix @@ -1,12 +1,13 @@ { lib, python3, fetchPypi }: python3.pkgs.buildPythonPackage rec { - pname = "MACS2"; + pname = "macs2"; version = "2.2.8"; format = "pyproject"; src = fetchPypi { - inherit pname version; + pname = lib.toUpper pname; + inherit version; hash = "sha256-KgpDasidj4yUoeQQaQA3dg5eN5Ka1xnFRpbnTvhKmOA="; }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 196d493c7c34..0464d56cb351 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1023,6 +1023,7 @@ mapAliases ({ ### M ### m3d-linux = throw "'m3d-linux' has been renamed to/replaced by 'm33-linux'"; # Converted to throw 2022-02-22 + MACS2 = macs2; # Added 2023-06-12 mail-notification = throw "mail-notification has been removed from nixpkgs, as it's unmaintained and has dependencies on old gnome libraries we want to remove"; # Added 2021-08-21 mailpile = throw "mailpile was removed from nixpkgs, as it is stuck on python2"; # Added 2022-01-12 man_db = throw "'man_db' has been renamed to/replaced by 'man-db'"; # Converted to throw 2022-02-22 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0d243d151e3b..4f70fc70d9ae 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37858,7 +37858,7 @@ with pkgs; macse = callPackage ../applications/science/biology/macse { }; - MACS2 = callPackage ../applications/science/biology/MACS2 { }; + macs2 = callPackage ../applications/science/biology/macs2 { }; mafft = callPackage ../applications/science/biology/mafft { }; From d40add3bc57e399983d0f9c3cbab64668c005129 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 13 Jun 2023 22:25:02 +0000 Subject: [PATCH 19/19] sway: remove unused build inputs (#237625) None of these have been used since before Sway 1.0. --- pkgs/applications/window-managers/sway/default.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/window-managers/sway/default.nix b/pkgs/applications/window-managers/sway/default.nix index 01506b391dfa..d1192e700c50 100644 --- a/pkgs/applications/window-managers/sway/default.nix +++ b/pkgs/applications/window-managers/sway/default.nix @@ -1,23 +1,21 @@ { lib, stdenv, fetchFromGitHub, fetchpatch, substituteAll, swaybg , meson, ninja, pkg-config, wayland-scanner, scdoc , wayland, libxkbcommon, pcre2, json_c, libevdev -, pango, cairo, libinput, libcap, pam, gdk-pixbuf, librsvg +, pango, cairo, libinput, gdk-pixbuf, librsvg , wlroots_0_16, wayland-protocols, libdrm , nixosTests # Used by the NixOS module: , isNixOS ? false , enableXWayland ? true, xorg , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd -, dbusSupport ? true -, dbus -, trayEnabled ? systemdSupport && dbusSupport +, trayEnabled ? systemdSupport }: # The "sd-bus-provider" meson option does not include a "none" option, # but it is silently ignored iff "-Dtray=disabled". We use "basu" # (which is not in nixpkgs) instead of "none" to alert us if this # changes: https://github.com/swaywm/sway/issues/6843#issuecomment-1047288761 -assert trayEnabled -> systemdSupport && dbusSupport; +assert trayEnabled -> systemdSupport; let sd-bus-provider = if systemdSupport then "libsystemd" else "basu"; in stdenv.mkDerivation rec { @@ -65,11 +63,9 @@ stdenv.mkDerivation rec { buildInputs = [ wayland libxkbcommon pcre2 json_c libevdev - pango cairo libinput libcap pam gdk-pixbuf librsvg + pango cairo libinput gdk-pixbuf librsvg wayland-protocols libdrm (wlroots_0_16.override { inherit enableXWayland; }) - ] ++ lib.optionals dbusSupport [ - dbus ] ++ lib.optionals enableXWayland [ xorg.xcbutilwm ];