Unverified Commit 82c1a79c authored by Fabián Heredia Montiel's avatar Fabián Heredia Montiel
Browse files

Merge remote-tracking branch 'origin/master' into staging-next

parents 7bad3415 04c56b7e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -295,6 +295,7 @@ let
        elemAt
        isList
        concatAttrValues
        replaceElemAt
        ;
      inherit (self.strings)
        concatStrings
+37 −0
Original line number Diff line number Diff line
@@ -2019,4 +2019,41 @@ rec {
    :::
  */
  concatAttrValues = set: concatLists (attrValues set);

  /**
    Replaces a list's nth element with a new element

    # Inputs

    `list`
    : Input list

    `idx`
    : index to replace

    `newElem`
    : new element to replace with

    # Type

    ```
    replaceElemAt :: [a] -> int - b -> [a]
    ```

    # Examples
    :::{.example}
    ## `replaceElemAt` usage example

    ```nix
    lib.replaceElemAt` [1 2 3] 0 "a"
    => ["a" 2 3]
    ```

    :::
  */
  replaceElemAt =
    list: idx: newElem:
    assert lib.assertMsg (idx >= 0 && idx < length list)
      "'lists.replaceElemAt' called with index ${toString idx} on a list of size ${toString (length list)}";
    genList (i: if i == idx then newElem else elemAt list i) (length list);
}
+13 −0
Original line number Diff line number Diff line
@@ -4909,4 +4909,17 @@ runTests {
      targetTarget = "prefix-tt";
    };
  };

  testReplaceElemAt = {
    expr = lib.replaceElemAt [ 1 2 3 ] 1 "a";
    expected = [
      1
      "a"
      3
    ];
  };

  testReplaceElemAtOutOfRange = testingThrow (lib.replaceElemAt [ 1 2 3 ] 5 "a");

  testReplaceElemAtNegative = testingThrow (lib.replaceElemAt [ 1 2 3 ] (-1) "a");
}
+3 −3
Original line number Diff line number Diff line
@@ -1355,13 +1355,13 @@
    "vendorHash": "sha256-CcbNooB1AjLbyMkTNmAklqNm6o6FVCBEBiEnD/U5yGU="
  },
  "terraform-routeros_routeros": {
    "hash": "sha256-KhxNuzVaZFCO6XTCaj9wBddgw7TXULh/6LnMjiqPRLg=",
    "hash": "sha256-19QR6kugDQoWlW3U1u2PX/7+S+Rb+o58HWsKHHd7pqo=",
    "homepage": "https://registry.terraform.io/providers/terraform-routeros/routeros",
    "owner": "terraform-routeros",
    "repo": "terraform-provider-routeros",
    "rev": "v1.98.0",
    "rev": "v1.99.0",
    "spdx": "MPL-2.0",
    "vendorHash": "sha256-+u00PWotHxCQ/BveXY23ulrQszoyG59GCkUIYKwlulc="
    "vendorHash": "sha256-0VVL8wF8bAB77erJ4YgHN5Q4gkuRPL30OucJe7Jvj1w="
  },
  "timohirt_hetznerdns": {
    "hash": "sha256-wmXZ6+5Ex3G2JUdw2is2VIo/X1X0V1Auw5KmYpGllug=",
+14 −21
Original line number Diff line number Diff line
@@ -310,25 +310,18 @@ stdenv.mkDerivation (
        # Not accepted upstream, see https://github.com/gnuradio/gnuradio/pull/5227
        ./modtool-newmod-permissions.patch
      ];
      passthru =
        shared.passthru
        // {
      passthru = shared.passthru // {
        # Deps that are potentially overridden and are used inside GR plugins - the same version must
        inherit
          uhd
          boost
          volk
          libiio
          libad9361
          ;
        # Used by many gnuradio modules, the same attribute is present in
        # previous gnuradio versions where there it's log4cpp.
        logLib = spdlog;
        }
        // lib.optionalAttrs (hasFeature "gr-uhd") {
          inherit uhd;
        }
        // lib.optionalAttrs (hasFeature "gr-pdu") {
          inherit libiio libad9361;
        }
        // lib.optionalAttrs (hasFeature "gr-qtgui") {
        inherit (libsForQt5) qwt;
      };

Loading