···7575}
7676```
77777878+### Building a crate with an absent or out-of-date Cargo.lock file
7979+8080+`buildRustPackage` needs a `Cargo.lock` file to get all dependencies in the
8181+source code in a reproducible way. If it is missing or out-of-date one can use
8282+the `cargoPatches` attribute to update or add it.
8383+8484+```
8585+{ lib, rustPlatform, fetchFromGitHub }:
8686+8787+rustPlatform.buildRustPackage rec {
8888+ (...)
8989+ cargoPatches = [
9090+ # a patch file to add/update Cargo.lock in the source code
9191+ ./add-Cargo.lock.patch
9292+ ];
9393+}
9494+```
9595+7896## Compiling Rust crates using Nix instead of Cargo
79978098### Simple operation
+1-1
lib/minver.nix
···11# Expose the minimum required version for evaluating Nixpkgs
22-"2.0"
22+"2.2"
···441441 recommended to only use lower-case characters.
442442 </para>
443443 </listitem>
444444+ <listitem>
445445+ <para>
446446+ The GRUB specific option <option>boot.loader.grub.extraInitrd</option>
447447+ has been replaced with the generic option
448448+ <option>boot.initrd.secrets</option>. This option creates a secondary
449449+ initrd from the specified files, rather than using a manually created
450450+ initrd file.
451451+452452+ Due to an existing bug with <option>boot.loader.grub.extraInitrd</option>,
453453+ it is not possible to directly boot an older generation that used that
454454+ option. It is still possible to rollback to that generation if the required
455455+ initrd file has not been deleted.
456456+ </para>
457457+ </listitem>
444458 </itemizedlist>
445459 </section>
446460
···2424 (mkRemovedOptionModule [ "environment" "blcr" "enable" ] "The BLCR module has been removed")
2525 (mkRemovedOptionModule [ "services" "beegfsEnable" ] "The BeeGFS module has been removed")
2626 (mkRemovedOptionModule [ "services" "beegfs" ] "The BeeGFS module has been removed")
2727+ (mkRemovedOptionModule ["services" "cgmanager" "enable"] "cgmanager was deprecated by lxc and therefore removed from nixpkgs.")
2728 (mkRemovedOptionModule [ "services" "osquery" ] "The osquery module has been removed")
2829 (mkRemovedOptionModule [ "services" "fourStore" ] "The fourStore module has been removed")
2930 (mkRemovedOptionModule [ "services" "fourStoreEndpoint" ] "The fourStoreEndpoint module has been removed")
···1616 factory = util.BuildFactory()
1717 c = BuildmasterConfig = dict(
1818 workers = [${concatStringsSep "," cfg.workers}],
1919- protocols = { 'pb': {'port': ${toString cfg.bpPort} } },
1919+ protocols = { 'pb': {'port': ${toString cfg.pbPort} } },
2020 title = '${escapeStr cfg.title}',
2121 titleURL = '${escapeStr cfg.titleUrl}',
2222 buildbotURL = '${escapeStr cfg.buildbotUrl}',
···155155 description = "Specifies the Buildbot directory.";
156156 };
157157158158- bpPort = mkOption {
158158+ pbPort = mkOption {
159159 default = 9989;
160160- type = types.int;
161161- description = "Port where the master will listen to Buildbot Worker.";
160160+ type = types.either types.str types.int;
161161+ example = "'tcp:9990:interface=127.0.0.1'";
162162+ description = ''
163163+ The buildmaster will listen on a TCP port of your choosing
164164+ for connections from workers.
165165+ It can also use this port for connections from remote Change Sources,
166166+ status clients, and debug tools.
167167+ This port should be visible to the outside world, and you’ll need to tell
168168+ your worker admins about your choice.
169169+ If put in (single) quotes, this can also be used as a connection string,
170170+ as defined in the <link xlink:href="https://twistedmatrix.com/documents/current/core/howto/endpoints.html">ConnectionStrings guide</link>.
171171+ '';
162172 };
163173164174 listenAddress = mkOption {
···263273 };
264274 };
265275 };
276276+277277+ imports = [
278278+ (mkRenamedOptionModule [ "services" "buildbot-master" "bpPort" ] [ "services" "buildbot-master" "pbPort" ])
279279+ ];
266280267281 meta.maintainers = with lib.maintainers; [ nand0p mic92 ];
268282}
···130130 # give a friendlier error msg.
131131 if ! [ -e $srcLockfile ]; then
132132 echo "ERROR: Missing Cargo.lock from src. Expected to find it at: $srcLockfile"
133133+ echo "Hint: You can use the cargoPatches attribute to add a Cargo.lock manually to the build."
133134 exit 1
134135 fi
135136