Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Mar 8, 2023
2 parents fe54abb + 9af96de commit a9f42c3
Show file tree
Hide file tree
Showing 49 changed files with 594 additions and 371 deletions.
86 changes: 0 additions & 86 deletions lib/debug.nix
Original file line number Diff line number Diff line change
Expand Up @@ -250,90 +250,4 @@ rec {
{ testX = allTrue [ true ]; }
*/
testAllTrue = expr: { inherit expr; expected = map (x: true) expr; };


# -- DEPRECATED --

traceShowVal = x: trace (showVal x) x;
traceShowValMarked = str: x: trace (str + showVal x) x;

attrNamesToStr = a:
trace ( "Warning: `attrNamesToStr` is deprecated "
+ "and will be removed in the next release. "
+ "Please use more specific concatenation "
+ "for your uses (`lib.concat(Map)StringsSep`)." )
(concatStringsSep "; " (map (x: "${x}=") (attrNames a)));

showVal =
trace ( "Warning: `showVal` is deprecated "
+ "and will be removed in the next release, "
+ "please use `traceSeqN`" )
(let
modify = v:
let pr = f: { __pretty = f; val = v; };
in if isDerivation v then pr
(drv: "<δ:${drv.name}:${concatStringsSep ","
(attrNames drv)}>")
else if [] == v then pr (const "[]")
else if isList v then pr (l: "[ ${go (head l)}, … ]")
else if isAttrs v then pr
(a: "{ ${ concatStringsSep ", " (attrNames a)} }")
else v;
go = x: generators.toPretty
{ allowPrettyValues = true; }
(modify x);
in go);

traceXMLVal = x:
trace ( "Warning: `traceXMLVal` is deprecated "
+ "and will be removed in the next release. "
+ "Please use `traceValFn builtins.toXML`." )
(trace (builtins.toXML x) x);
traceXMLValMarked = str: x:
trace ( "Warning: `traceXMLValMarked` is deprecated "
+ "and will be removed in the next release. "
+ "Please use `traceValFn (x: str + builtins.toXML x)`." )
(trace (str + builtins.toXML x) x);

# trace the arguments passed to function and its result
# maybe rewrite these functions in a traceCallXml like style. Then one function is enough
traceCall = n: f: a: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a));
traceCall2 = n: f: a: b: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b));
traceCall3 = n: f: a: b: c: let t = n2: x: traceShowValMarked "${n} ${n2}:" x; in t "result" (f (t "arg 1" a) (t "arg 2" b) (t "arg 3" c));

traceValIfNot = c: x:
trace ( "Warning: `traceValIfNot` is deprecated "
+ "and will be removed in the next release. "
+ "Please use `if/then/else` and `traceValSeq 1`.")
(if c x then true else traceSeq (showVal x) false);


addErrorContextToAttrs = attrs:
trace ( "Warning: `addErrorContextToAttrs` is deprecated "
+ "and will be removed in the next release. "
+ "Please use `builtins.addErrorContext` directly." )
(mapAttrs (a: v: addErrorContext "while evaluating ${a}" v) attrs);

# example: (traceCallXml "myfun" id 3) will output something like
# calling myfun arg 1: 3 result: 3
# this forces deep evaluation of all arguments and the result!
# note: if result doesn't evaluate you'll get no trace at all (FIXME)
# args should be printed in any case
traceCallXml = a:
trace ( "Warning: `traceCallXml` is deprecated "
+ "and will be removed in the next release. "
+ "Please complain if you use the function regularly." )
(if !isInt a then
traceCallXml 1 "calling ${a}\n"
else
let nr = a;
in (str: expr:
if isFunction expr then
(arg:
traceCallXml (builtins.add 1 nr) "${str}\n arg ${builtins.toString nr} is \n ${builtins.toXML (builtins.seq arg arg)}" (expr arg)
)
else
let r = builtins.seq expr expr;
in trace "${str}\n result:\n${builtins.toXML r}" r
));
}
9 changes: 4 additions & 5 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,10 @@ let
isOptionType mkOptionType;
inherit (self.asserts)
assertMsg assertOneOf;
inherit (self.debug) addErrorContextToAttrs traceIf traceVal traceValFn
traceXMLVal traceXMLValMarked traceSeq traceSeqN traceValSeq
traceValSeqFn traceValSeqN traceValSeqNFn traceFnSeqN traceShowVal
traceShowValMarked showVal traceCall traceCall2 traceCall3
traceValIfNot runTests testAllTrue traceCallXml attrNamesToStr;
inherit (self.debug) traceIf traceVal traceValFn
traceSeq traceSeqN traceValSeq
traceValSeqFn traceValSeqN traceValSeqNFn traceFnSeqN
runTests testAllTrue;
inherit (self.misc) maybeEnv defaultMergeArg defaultMerge foldArgs
maybeAttrNullable maybeAttr ifEnable checkFlag getValue
checkReqs uniqList uniqListExt condConcat lazyGenericClosure
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 @@ -205,6 +205,7 @@
./programs/nbd.nix
./programs/neovim.nix
./programs/nethoscope.nix
./programs/nexttrace.nix
./programs/nix-index.nix
./programs/nix-ld.nix
./programs/nm-applet.nix
Expand Down
25 changes: 25 additions & 0 deletions nixos/modules/programs/nexttrace.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:

let
cfg = config.programs.nexttrace;

in
{
options = {
programs.nexttrace = {
enable = lib.mkEnableOption (lib.mdDoc "Nexttrace to the global environment and configure a setcap wrapper for it");
package = lib.mkPackageOptionMD pkgs "nexttrace" { };
};
};

config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];

security.wrappers.nexttrace = {
owner = "root";
group = "root";
capabilities = "cap_net_raw,cap_net_admin+eip";
source = "${cfg.package}/bin/nexttrace";
};
};
}
5 changes: 5 additions & 0 deletions nixos/tests/pantheon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
services.xserver.enable = true;
services.xserver.desktopManager.pantheon.enable = true;

environment.systemPackages = [ pkgs.xdotool ];
};

enableOCR = true;
Expand All @@ -29,6 +30,10 @@ import ./make-test-python.nix ({ pkgs, lib, ...} :
machine.wait_for_text("${user.description}")
# OCR was struggling with this one.
# machine.wait_for_text("${bob.description}")
# Ensure the password box is focused by clicking it.
# Workaround for https://github.com/NixOS/nixpkgs/issues/211366.
machine.succeed("XAUTHORITY=/var/lib/lightdm/.Xauthority DISPLAY=:0 xdotool mousemove 512 505 click 1")
machine.sleep(2)
machine.screenshot("elementary_greeter_lightdm")
with subtest("Login with elementary-greeter"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"vendorHash": "sha256-jK7JuARpoxq7hvq5+vTtUwcYot0YqlOZdtDwq4IqKvk="
},
"aiven": {
"hash": "sha256-ahqp63zzO4+TvdXk2e4r3r0VG7Cys3lhE+wkEkjN+vI=",
"hash": "sha256-InYRBUjOJ29dbnXTcz/ErPhEMyRdKn+YxHrAyBZNLdo=",
"homepage": "https://registry.terraform.io/providers/aiven/aiven",
"owner": "aiven",
"repo": "terraform-provider-aiven",
"rev": "v4.0.0",
"rev": "v4.1.0",
"spdx": "MIT",
"vendorHash": "sha256-VAYCx0DHG+J8zzYFP2UyZ+W6cOgi8G+PQktEBOWbjSk="
},
Expand Down Expand Up @@ -101,11 +101,11 @@
"vendorHash": "sha256-0k1BYRQWp4iU9DRwPbluOg3S5VzL981PpFrgiQaYWNw="
},
"aviatrix": {
"hash": "sha256-jZXTsCa1TDwdOFGJKX4xM3sB0zfix5nTBuBdBGtwOOs=",
"hash": "sha256-vlDpubfBnNPFsU/kJl7GpSH4SKs1CDlgPVlPnCBb/lM=",
"homepage": "https://registry.terraform.io/providers/AviatrixSystems/aviatrix",
"owner": "AviatrixSystems",
"repo": "terraform-provider-aviatrix",
"rev": "v3.0.1",
"rev": "v3.0.2",
"spdx": "MPL-2.0",
"vendorHash": null
},
Expand Down Expand Up @@ -210,13 +210,13 @@
"vendorHash": null
},
"cloudamqp": {
"hash": "sha256-xua8ZJjc+y6bzF/I2N752Cv22XAXvOjrH9Du1TdipM0=",
"hash": "sha256-gUOWUvdlmn+u6IL6UrzA8MKErl43VmtIqnilzUTKuis=",
"homepage": "https://registry.terraform.io/providers/cloudamqp/cloudamqp",
"owner": "cloudamqp",
"repo": "terraform-provider-cloudamqp",
"rev": "v1.23.0",
"rev": "v1.24.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-PALZGyGZ6Ggccl4V9gG+gsEdNipYG+DCaZkqF0W1IMQ="
"vendorHash": "sha256-V5nI7B45VJb7j7AoPrKQknJbVW5C9oyDs9q2u8LXD+M="
},
"cloudflare": {
"hash": "sha256-fHugf+nvel/bSyh+l94q0iE7E+ZYBt2qfGSoot9xI8w=",
Expand All @@ -228,13 +228,13 @@
"vendorHash": "sha256-jIQcgGknigQFUkLjLoxUjq+Mqjb085v6Zqgd49Dxivo="
},
"cloudfoundry": {
"hash": "sha256-/Zxj9cous0SjYxeDo+8/u61pqDwMGt/UsS/OC1oSR2U=",
"hash": "sha256-Js/UBblHkCkfaBVOpYFGyrleOjpNE1mo+Sf3OpXLkfM=",
"homepage": "https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry",
"owner": "cloudfoundry-community",
"repo": "terraform-provider-cloudfoundry",
"rev": "v0.50.4",
"rev": "v0.50.5",
"spdx": "MPL-2.0",
"vendorHash": "sha256-mEWhLh4E3SI7xfmal1sJ5PdAYbYJrW/YFoBjTW9w4bA="
"vendorHash": "sha256-2ulAzgDBdcYTqGRmEL9+h9MglZ9bt5WRXzNP099g2kk="
},
"cloudinit": {
"hash": "sha256-fdtUKD8XC1Y72IzrsCfTZYVYZwLqY3gV2sajiw4Krzw=",
Expand Down Expand Up @@ -283,13 +283,13 @@
"vendorHash": "sha256-QlmVrcC1ctjAHOd7qsqc9gpqttKplEy4hlT++cFUZfM="
},
"datadog": {
"hash": "sha256-gZdjbW2yz3TmnGfCLiveUpTcMeKBUUSV6CnugnkdoZ8=",
"hash": "sha256-7z7NjQ6JBZOCEn8ZiyrgiAlzbzWpzNEhveydBmh841E=",
"homepage": "https://registry.terraform.io/providers/DataDog/datadog",
"owner": "DataDog",
"repo": "terraform-provider-datadog",
"rev": "v3.21.0",
"rev": "v3.22.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-6aBwtm4p/sJyH9jT7wT+utHIlOSgOilOk0AZSI9RzD8="
"vendorHash": "sha256-2cv7ffNuis91C2iUaYqq5uKx7wwpi2ohwU1q7wjurbA="
},
"dhall": {
"hash": "sha256-K0j90YAzYqdyJD4aofyxAJF9QBYNMbhSVm/s1GvWuJ4=",
Expand Down Expand Up @@ -738,13 +738,13 @@
"vendorHash": "sha256-MLhHRMahJjTgQBzYkSaVv6wFm6b+YgpkitBHuj5B6po="
},
"mongodbatlas": {
"hash": "sha256-OR9bvtg3DoJ4hFP/iqzQ1cFwWZYrUrzykN6sycd0Z6o=",
"hash": "sha256-HkY2X6EbgObgXH2jLhQ96edlxMHytSGfXETQ5oXPI6M=",
"homepage": "https://registry.terraform.io/providers/mongodb/mongodbatlas",
"owner": "mongodb",
"repo": "terraform-provider-mongodbatlas",
"rev": "v1.8.0",
"rev": "v1.8.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-cvTIFjKYrIohRjUTxGOxgla2t/elj3Aw79kbVdaQbrY="
"vendorHash": "sha256-/DQsnKuRHO/SUyL+mCDP619iHLtWanqNyZkB2ryLSaA="
},
"namecheap": {
"hash": "sha256-cms8YUL+SjTeYyIOQibksi8ZHEBYq2JlgTEpOO1uMZE=",
Expand Down Expand Up @@ -820,13 +820,13 @@
"vendorHash": null
},
"okta": {
"hash": "sha256-UMQ1YEXYdaLwYZBhGzbikhExW/HT/u4QSNk08vhmbwA=",
"hash": "sha256-3Ym2Q3Y2f26ioiB3N2HZiPsrgVe4zszJDR7e0gzxOHU=",
"homepage": "https://registry.terraform.io/providers/okta/okta",
"owner": "okta",
"repo": "terraform-provider-okta",
"rev": "v3.42.0",
"rev": "v3.43.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-KWSHVI51YHHF3HXpyd1WB5Za721ak+cFhwDIfvC/ax4="
"vendorHash": "sha256-7jA44ZcBGCeLrr+On8F9er+ch2qf6vbijTRtu+aHrB4="
},
"oktaasa": {
"hash": "sha256-2LhxgowqKvDDDOwdznusL52p2DKP+UiXALHcs9ZQd0U=",
Expand Down Expand Up @@ -964,13 +964,13 @@
"vendorHash": null
},
"scaleway": {
"hash": "sha256-rkDNV58mN/7pgQC1WBnrggHtq7q3O7r3v+huB4oPVLM=",
"hash": "sha256-gscuuaohIOIdDAAUWKg82fm9iY51ZxoN4EeAxAzTvjI=",
"homepage": "https://registry.terraform.io/providers/scaleway/scaleway",
"owner": "scaleway",
"repo": "terraform-provider-scaleway",
"rev": "v2.12.0",
"rev": "v2.12.1",
"spdx": "MPL-2.0",
"vendorHash": "sha256-zice1rGuZH9kmQJQ8RdIONJXVXu1BIuRUKjTGLPK7Ns="
"vendorHash": "sha256-kh1wv7cuWCC1rP0WBQW95pFg53gZTakqGoMIDMDSmt0="
},
"secret": {
"hash": "sha256-MmAnA/4SAPqLY/gYcJSTnEttQTsDd2kEdkQjQj6Bb+A=",
Expand Down Expand Up @@ -1254,13 +1254,13 @@
"vendorHash": "sha256-ib1Esx2AO7b9S+v+zzuATgSVHI3HVwbzEeyqhpBz1BQ="
},
"yandex": {
"hash": "sha256-aBWcxC6mHM/3GOjnN/Qi0DNoZjehh5i3C2+XRZ2Igdo=",
"hash": "sha256-0P8R0L5PGrDKWGd92OkKi9WCfMK5IrdYJyoINaZWZjc=",
"homepage": "https://registry.terraform.io/providers/yandex-cloud/yandex",
"owner": "yandex-cloud",
"proxyVendor": true,
"repo": "terraform-provider-yandex",
"rev": "v0.85.0",
"rev": "v0.86.0",
"spdx": "MPL-2.0",
"vendorHash": "sha256-eLCFnBGAvH0ZEzOb5xVCY0Yy4U5V407AhpGSFpa9t7I="
"vendorHash": "sha256-r2+ARKvTghscGBhmZpz84vdBudiy2OsmQR03oDz5gbs="
}
}

This file was deleted.

6 changes: 2 additions & 4 deletions pkgs/applications/office/kbibtex/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
, extra-cmake-modules
, shared-mime-info
# Qt
, qtnetworkauth
, qtxmlpatterns
, qtwebengine
, qca-qt5
Expand All @@ -29,13 +28,13 @@

mkDerivation rec {
pname = "kbibtex";
version = "0.9.3.1";
version = "0.9.3.2";

src = let
majorMinorPatch = lib.concatStringsSep "." (lib.take 3 (lib.splitVersion version));
in fetchurl {
url = "mirror://kde/stable/KBibTeX/${majorMinorPatch}/kbibtex-${version}.tar.xz";
hash = "sha256-kH/E5xv9dmzM7WrIMlGCo4y0Xv/7XHowELJP3OJz8kQ=";
hash = "sha256-BzPCTKMiMnzz2S+jbk4ZbEudyJX5EaTDVY59te/AxFc=";
};

nativeBuildInputs = [
Expand All @@ -44,7 +43,6 @@ mkDerivation rec {
];

buildInputs = [
qtnetworkauth
qtxmlpatterns
qtwebengine
qca-qt5
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/radio/csdr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

stdenv.mkDerivation rec {
pname = "csdr";
version = "0.18.0";
version = "0.18.1";

src = fetchFromGitHub {
owner = "jketterl";
repo = pname;
rev = version;
sha256 = "sha256-4XO3QYF0yaMNFjBHulrlZvO0/A1fFscD98QxnC6Itmk=";
sha256 = "sha256-Cmms+kQzTP+CMDRXCbtWuizosFe9FywLobjBOUA79O0=";
};

nativeBuildInputs = [
Expand Down
Loading

0 comments on commit a9f42c3

Please sign in to comment.