From 3e5d674ebc2099217672e463333fc26388cf813d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:23:02 -0400 Subject: [PATCH] remove uses of `with lib;` (see NixOS/nixpkgs#208242) --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8f38e72..e9402b0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -884,7 +884,7 @@ async fn run() -> Result<()> { desc.get_mut(0 .. 1).map(str::make_ascii_uppercase); write!(out, " ")?; writedoc! {out, r" - meta = with lib; {{ + meta = {{ description = {desc:?}; homepage = {url:?}; "}?; @@ -973,19 +973,19 @@ async fn run() -> Result<()> { if licenses.is_empty() { writeln!( out, - "licenses.unfree; # FIXME: nix-init did not find a license", + "lib.licenses.unfree; # FIXME: nix-init did not find a license", )?; } else if let [license] = &licenses[..] { - writeln!(out, "licenses.{license};")?; + writeln!(out, "lib.licenses.{license};")?; } else { - write!(out, "with licenses; [ ")?; + write!(out, "with lib.licenses; [ ")?; for license in licenses { write!(out, "{license} ")?; } writeln!(out, "];")?; } - write!(out, " maintainers = with maintainers; [ ")?; + write!(out, " maintainers = with lib.maintainers; [ ")?; for maintainer in cfg.maintainers { write!(out, "{maintainer} ")?; } @@ -999,7 +999,7 @@ async fn run() -> Result<()> { if has_zig { writeln!(out, " inherit (zig.meta) platforms;")?; } else { - writeln!(out, " platforms = platforms.all;")?; + writeln!(out, " platforms = lib.platforms.all;")?; } }