From 134c4a8fd83c14bcdb8abf794c6f8d5335d0570a Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 2 Jan 2025 21:16:51 -0600 Subject: [PATCH] Fix rust template --- templates/rust/flake.nix | 8 ++++---- templates/rust/nix/boilerplate.nix | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix index af7240e..57d515b 100644 --- a/templates/rust/flake.nix +++ b/templates/rust/flake.nix @@ -3,12 +3,12 @@ inputs.git-hooks.url = "github:cachix/git-hooks.nix"; inputs.git-hooks.inputs.nixpkgs.follows = "nixpkgs"; outputs = inputs: let - inherit (import nix/boilerplate.nix inputs) fullImport genPkgs; + inherit (import nix/boilerplate.nix inputs) call genPkgs; in { # overlays = import nix/overlays.nix; - checks = fullImport nix/checks.nix; - packages = fullImport nix/packages.nix; - devShells = fullImport nix/shells.nix; + checks = call (import nix/checks.nix); + packages = call (import nix/packages.nix); + devShells = call (import nix/shells.nix); formatter = genPkgs (p: p.alejandra); }; } diff --git a/templates/rust/nix/boilerplate.nix b/templates/rust/nix/boilerplate.nix index 2778326..e0b4acd 100644 --- a/templates/rust/nix/boilerplate.nix +++ b/templates/rust/nix/boilerplate.nix @@ -4,7 +4,7 @@ inputs @ { ... }: let forSelfOverlay = - if builtins.hasAttr "forSelf" self.overlays + if builtins.hasAttr "overlays" self && builtins.hasAttr "forSelf" self.overlays then self.overlays.forSelf else (_: p: p); in rec {