diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 0d249968402..4b2e5afc1d6 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -132,6 +132,16 @@ runTests { expected = [ 1 1 0 ]; }; + testFunctionArgsFunctor = { + expr = functionArgs { __functor = self: { a, b }: null; }; + expected = { a = false; b = false; }; + }; + + testFunctionArgsSetFunctionArgs = { + expr = functionArgs (setFunctionArgs (args: args.x) { x = false; }); + expected = { x = false; }; + }; + # STRINGS testConcatMapStrings = { diff --git a/lib/trivial.nix b/lib/trivial.nix index f6f5da5998f..48a1b128e2e 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -334,7 +334,10 @@ rec { has the same return type and semantics as builtins.functionArgs. setFunctionArgs : (a → b) → Map String Bool. */ - functionArgs = f: f.__functionArgs or (builtins.functionArgs f); + functionArgs = f: + if f ? __functor + then f.__functionArgs or (lib.functionArgs (f.__functor f)) + else builtins.functionArgs f; /* Check whether something is a function or something annotated with function args. diff --git a/pkgs/tools/backup/restic/default.nix b/pkgs/tools/backup/restic/default.nix index 65ff53bf677..0cf25941e90 100644 --- a/pkgs/tools/backup/restic/default.nix +++ b/pkgs/tools/backup/restic/default.nix @@ -3,13 +3,13 @@ buildGoModule rec { pname = "restic"; - version = "0.12.0"; + version = "0.12.1"; src = fetchFromGitHub { owner = "restic"; repo = "restic"; rev = "v${version}"; - sha256 = "07gxf56g45gj2arvdnrr9656i9ykhy1y6k6zdlni1sa3aa2x2bbf"; + sha256 = "19lzccipbpxdkay60zdqfq8dgah0sbxzjcfcx285c28js2zpp85m"; }; patches = [ @@ -17,7 +17,7 @@ buildGoModule rec { ./0001-Skip-testing-restore-with-permission-failure.patch ]; - vendorSha256 = "14z22lmdd681rn61alpqbn3i9fn0kcc74321vjvhz2ix2mch3c1z"; + vendorSha256 = "0sdswihiy4r3lw9a87xj2qm3nf28cw56yfm56mva6b8lr3vk93l6"; subPackages = [ "cmd/restic" ]; diff --git a/pkgs/tools/misc/flameshot/default.nix b/pkgs/tools/misc/flameshot/default.nix index f0ed87bcc22..8e17111ce8e 100644 --- a/pkgs/tools/misc/flameshot/default.nix +++ b/pkgs/tools/misc/flameshot/default.nix @@ -2,13 +2,13 @@ mkDerivation rec { pname = "flameshot"; - version = "0.9.0"; + version = "0.10.1"; src = fetchFromGitHub { owner = "flameshot-org"; repo = "flameshot"; rev = "v${version}"; - sha256 = "sha256-E5J61k1tVpbwlzYHbCY1rf9+GODcJRRAQwb0jR4s7BU="; + sha256 = "1ncknjayl6am740f49g0lc28z1zsifbicxz1j1kwps3ksj15nl7a"; }; nativeBuildInputs = [ cmake qttools qtsvg ]; @@ -17,8 +17,8 @@ mkDerivation rec { meta = with lib; { description = "Powerful yet simple to use screenshot software"; homepage = "https://github.com/flameshot-org/flameshot"; - maintainers = [ maintainers.scode ]; - license = lib.licenses.gpl3Plus; - platforms = lib.platforms.linux; + maintainers = with maintainers; [ scode ]; + license = licenses.gpl3Plus; + platforms = platforms.linux; }; }