Skip to content

Commit

Permalink
Merge master into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 13, 2021
2 parents 6995601 + 3f915b4 commit c0c7fbd
Show file tree
Hide file tree
Showing 54 changed files with 712 additions and 235 deletions.
10 changes: 10 additions & 0 deletions nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,16 @@
RandomX benchmark.
</para>
</listitem>
<listitem>
<para>
Auto nice daemons
<link xlink:href="https://github.com/Nefelim4ag/Ananicy">ananicy</link>
and
<link xlink:href="https://gitlab.com/ananicy-cpp/ananicy-cpp/">ananicy-cpp</link>.
Available as
<link linkend="opt-services.ananicy.enable">services.ananicy</link>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-21.11-incompatibilities">
Expand Down
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2111.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- [xmrig](https://github.com/xmrig/xmrig), a high performance, open source, cross platform RandomX, KawPow, CryptoNight and AstroBWT unified CPU/GPU miner and RandomX benchmark.

- Auto nice daemons [ananicy](https://github.com/Nefelim4ag/Ananicy) and [ananicy-cpp](https://gitlab.com/ananicy-cpp/ananicy-cpp/). Available as [services.ananicy](#opt-services.ananicy.enable).

## Backward Incompatibilities {#sec-release-21.11-incompatibilities}

- The NixOS VM test framework, `pkgs.nixosTest`/`make-test-python.nix`, now requires detaching commands such as `succeed("foo &")` and `succeed("foo | xclip -i")` to close stdout.
Expand Down
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@
./services/mail/roundcube.nix
./services/mail/sympa.nix
./services/mail/nullmailer.nix
./services/misc/ananicy.nix
./services/misc/airsonic.nix
./services/misc/ankisyncd.nix
./services/misc/apache-kafka.nix
Expand Down
107 changes: 107 additions & 0 deletions nixos/modules/services/misc/ananicy.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{ config, lib, pkgs, ... }:

with lib;

let
cfg = config.services.ananicy;
configFile = pkgs.writeText "ananicy.conf" (generators.toKeyValue { } cfg.settings);
extraRules = pkgs.writeText "extraRules" cfg.extraRules;
servicename = if ((lib.getName cfg.package) == (lib.getName pkgs.ananicy-cpp)) then "ananicy-cpp" else "ananicy";
in
{
options = {
services.ananicy = {
enable = mkEnableOption "Ananicy, an auto nice daemon";

package = mkOption {
type = types.package;
default = pkgs.ananicy;
defaultText = literalExpression "pkgs.ananicy";
example = literalExpression "pkgs.ananicy-cpp";
description = ''
Which ananicy package to use.
'';
};

settings = mkOption {
type = with types; attrsOf (oneOf [ int bool str ]);
default = { };
example = {
apply_nice = false;
};
description = ''
See <link xlink:href="https://github.com/Nefelim4ag/Ananicy/blob/master/ananicy.d/ananicy.conf"/>
'';
};

extraRules = mkOption {
type = types.str;
default = "";
description = ''
Extra rules in json format on separate lines. See:
<link xlink:href="https://github.com/Nefelim4ag/Ananicy#configuration"/>
<link xlink:href="https://gitlab.com/ananicy-cpp/ananicy-cpp/#global-configuration"/>
'';
example = literalExpression ''
'''
{ "name": "eog", "type": "Image-View" }
{ "name": "fdupes", "type": "BG_CPUIO" }
'''
'';

};
};
};

config = mkIf cfg.enable {
environment = {
systemPackages = [ cfg.package ];
etc."ananicy.d".source = pkgs.runCommandLocal "ananicyfiles" { } ''
mkdir -p $out
# ananicy-cpp does not include rules or settings on purpose
cp -r ${pkgs.ananicy}/etc/ananicy.d/* $out
rm $out/ananicy.conf
cp ${configFile} $out/ananicy.conf
${optionalString (cfg.extraRules != "") "cp ${extraRules} $out/nixRules.rules"}
'';
};

# ananicy and ananicy-cpp have different default settings
services.ananicy.settings =
let
mkOD = mkOptionDefault;
in
{
cgroup_load = mkOD true;
type_load = mkOD true;
rule_load = mkOD true;
apply_nice = mkOD true;
apply_ioclass = mkOD true;
apply_ionice = mkOD true;
apply_sched = mkOD true;
apply_oom_score_adj = mkOD true;
apply_cgroup = mkOD true;
} // (if ((lib.getName cfg.package) == (lib.getName pkgs.ananicy-cpp)) then {
# https://gitlab.com/ananicy-cpp/ananicy-cpp/-/blob/master/src/config.cpp#L12
loglevel = mkOD "warn"; # default is info but its spammy
cgroup_realtime_workaround = mkOD true;
} else {
# https://github.com/Nefelim4ag/Ananicy/blob/master/ananicy.d/ananicy.conf
check_disks_schedulers = mkOD true;
check_freq = mkOD 5;
});

systemd = {
# https://gitlab.com/ananicy-cpp/ananicy-cpp/#cgroups applies to both ananicy and -cpp
enableUnifiedCgroupHierarchy = mkDefault false;
packages = [ cfg.package ];
services."${servicename}" = {
wantedBy = [ "default.target" ];
};
};
};

meta = {
maintainers = with maintainers; [ artturin ];
};
}
2 changes: 2 additions & 0 deletions pkgs/applications/blockchains/bitcoin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, pkg-config
, util-linux
, hexdump
, autoSignDarwinBinariesHook
, wrapQtAppsHook ? null
, boost
, libevent
Expand Down Expand Up @@ -47,6 +48,7 @@ stdenv.mkDerivation rec {
[ autoreconfHook pkg-config ]
++ optionals stdenv.isLinux [ util-linux ]
++ optionals stdenv.isDarwin [ hexdump ]
++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
++ optionals withGui [ wrapQtAppsHook ];

buildInputs = [ boost libevent miniupnpc zeromq zlib ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
}
},
"beta": {
"version": "96.0.4664.35",
"sha256": "047zc1hl5iwhrgnypl7r5ga2cx1yz26lf1x5cnvdqmarmmkq380m",
"sha256bin64": "1cw89fafxxhr85x4vzhxv3jkmqfnxjisc7gj9v8y2ixqpn190hjl",
"version": "96.0.4664.45",
"sha256": "01q4fsf2cbx6g9nnaihvc5jj3ap8jq2gf16pnhf7ixzbhgcnm328",
"sha256bin64": "1vaazcrlx0999xd9yp25i9kzb8y8g0yqd28xssw7jqwrhz033wgr",
"deps": {
"gn": {
"version": "2021-09-24",
Expand Down
14 changes: 7 additions & 7 deletions pkgs/applications/networking/browsers/gmni/default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{ stdenv, lib, fetchFromSourcehut, pkg-config, bearssl, scdoc }:
{ stdenv, lib, fetchFromSourcehut, bearssl, scdoc }:

stdenv.mkDerivation rec {
pname = "gmni";
version = "unstable-2021-03-26";
version = "1.0";

src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "gmni";
rev = "77b73efbcd3ea7ed9e3e4c0aa19d9247e21d3c87";
sha256 = "1wvnzyv7vyddcd39y6q5aflpnnsdl4k4y5aj5ssb7vgkld0h1b7r";
rev = version;
sha256 = "sha256-3MFNAI/SfFigNfitfFs3o9kkz7JeEflMHiH7iJpLfi4=";
};

nativeBuildInputs = [ pkg-config ];
buildInputs = [ bearssl scdoc ];
nativeBuildInputs = [ scdoc ];
buildInputs = [ bearssl ];

meta = with lib; {
description = "A Gemini client";
homepage = "https://git.sr.ht/~sircmpwn/gmni";
license = licenses.gpl3Only;
maintainers = with maintainers; [ bsima jb55 ];
platforms = platforms.all;
platforms = platforms.linux;
};
}
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
{ fetchFromGitHub
, lib
, stdenv
, gtkmm3
, webkitgtk
, cmake
, pkg-config
, libappindicator-gtk3
, glib-networking
, gst_all_1
, gtkmm3
, libappindicator-gtk3
, pcre
, pkg-config
, webkitgtk
, wrapGAppsHook
}:

stdenv.mkDerivation rec {
pname = "whatsapp-for-linux";
version = "1.2.1";
version = "1.3.0";

src = fetchFromGitHub {
owner = "eneshecan";
repo = pname;
rev = "v${version}";
sha256 = "sha256-dEJRufOqlY+DnJdUaG5WP9hR1qO7KxR6MjKWq1SJB8A=";
sha256 = "sha256-VdkCjzmZqP/ZVY1H9FxBGe5rN0nZEPZbMp3MVKL6WLc=";
};

nativeBuildInputs = [
Expand All @@ -29,14 +30,15 @@ stdenv.mkDerivation rec {
];

buildInputs = [
gtkmm3
webkitgtk
libappindicator-gtk3
glib-networking
gst_all_1.gst-libav
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-bad
gst_all_1.gst-libav
gtkmm3
libappindicator-gtk3
pcre
webkitgtk
];

meta = with lib; {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

rustPlatform.buildRustPackage rec {
pname = "glitter";
version = "1.5.0";
version = "1.5.1";

src = fetchFromGitHub {
owner = "milo123459";
repo = pname;
rev = "v${version}";
sha256 = "sha256-AEtew+oS66H1BNh71SqRuj8eXmBEA45dRmtc/9fem9s=";
sha256 = "sha256-AVHMDDvrSLg0OwoG4I5/W2ttWgBwzOG7553gr9bCDFs=";
};

cargoSha256 = "sha256-bVYfmp0KcVuy0CbUOUoXYQ8BalaKXShitGXLdGWl+rQ=";
cargoSha256 = "sha256-vBzy4gnlJMQwvVieuWuiVOm/HAr6rHkHcLmzY7eklT4=";

# tests require it to be in a git repository
preCheck = ''
Expand Down
16 changes: 8 additions & 8 deletions pkgs/build-support/build-dotnet-package/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
attrsOrig @
{ baseName
, version
, buildInputs ? []
, nativeBuildInputs ? []
, xBuildFiles ? [ ]
, xBuildFlags ? [ "/p:Configuration=Release" ]
, outputFiles ? [ "bin/Release/*" ]
Expand All @@ -19,12 +19,12 @@ attrsOrig @
attrs = {
name = "${baseName}-${version}";

nativeBuildInputs = [ pkg-config ];
buildInputs = [
mono
dotnetbuildhelpers
nativeBuildInputs = [
pkg-config
makeWrapper
] ++ buildInputs;
dotnetbuildhelpers
mono
] ++ nativeBuildInputs;

configurePhase = ''
runHook preConfigure
Expand Down Expand Up @@ -87,7 +87,7 @@ attrsOrig @
then
echo "$dll already exported by a buildInputs, not re-exporting"
else
${dotnetbuildhelpers}/bin/create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll"
create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll"
fi
done
done
Expand All @@ -113,4 +113,4 @@ attrsOrig @
'';
};
in
stdenv.mkDerivation (attrs // (builtins.removeAttrs attrsOrig [ "buildInputs" ] ))
stdenv.mkDerivation (attrs // (builtins.removeAttrs attrsOrig [ "nativeBuildInputs" ] ))
6 changes: 3 additions & 3 deletions pkgs/development/dhall-modules/dhall-grafana.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ buildDhallGitHubPackage {
name = "grafana";
owner = "weeezes";
repo = "dhall-grafana";
# 2021-11-06
rev = "9ee0bb643f01db6d9935cf7df1914c32a92730b4";
sha256 = "0a123r5a33p8kaqs68rx2ycjr72xvxcpcmvpqxgb2jb05mnjj540";
# 2021-11-12
rev = "d5630dc55deacf5100a99802a4df1d9680b263b3";
sha256 = "01320hpqgr5r4grsydmdl9yznmly1ssnlc9gcwa8rj1ah0a8xlgz";
dependencies = [ dhallPackages.Prelude ];
}
2 changes: 1 addition & 1 deletion pkgs/development/libraries/pcre/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ in stdenv.mkDerivation {
name = "${pname}-${version}";

src = fetchurl {
url = "https://ftp.pcre.org/pub/pcre/pcre-${version}.tar.bz2";
url = "mirror://sourceforge/project/pcre/pcre/${version}/pcre-${version}.tar.bz2";
sha256 = "0v9nk51wh55pcbnf2jr36yarz8ayajn6d7ywiq2wagivn9c8c40r";
};

Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/libraries/xdg-desktop-portal/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, nixosTests
, substituteAll
, autoreconfHook
Expand Down Expand Up @@ -38,6 +39,12 @@ stdenv.mkDerivation rec {
src = ./fix-paths.patch;
inherit flatpak;
})
# Fixes the issue in https://github.com/flatpak/xdg-desktop-portal/issues/636
# Remove it when the next stable release arrives
(fetchpatch {
url = "https://github.com/flatpak/xdg-desktop-portal/commit/d7622e15ff8fef114a6759dde564826d04215a9f.patch";
sha256 = "sha256-vmfxK4ddG6Xon//rpiz6OiBsDLtT0VG5XyBJG3E4PPs=";
})
];

nativeBuildInputs = [
Expand Down
Loading

0 comments on commit c0c7fbd

Please sign in to comment.