From 14bdbae603b0aad44395f98083f8775cf645c843 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Wed, 27 Nov 2024 17:24:39 +0800 Subject: [PATCH] shells: adopt packages from other devshells if applicable --- shells/go.nix | 6 +++++- shells/hugo.nix | 9 +++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/shells/go.nix b/shells/go.nix index 385de58e..391012b3 100644 --- a/shells/go.nix +++ b/shells/go.nix @@ -2,8 +2,12 @@ , go , gofumpt , gopls +, callPackage }: +let + nodejsDevshell = callPackage ./nodejs.nix { }; +in mkShell { packages = [ go @@ -11,5 +15,5 @@ mkShell { gopls ]; - inputsFrom = [ go ]; + inputsFrom = [ go nodejsDevshell ]; } diff --git a/shells/hugo.nix b/shells/hugo.nix index cc559a33..3ec7c86e 100644 --- a/shells/hugo.nix +++ b/shells/hugo.nix @@ -1,5 +1,6 @@ # My usual toolchain for developing Hugo projects. { mkShell +, callPackage , hugo , asciidoctor , pandoc @@ -9,6 +10,10 @@ , imagemagick }: +let + nodejsDevshell = callPackage ./nodejs.nix { }; + goDevshell = callPackage ./go.nix { }; +in mkShell { packages = [ asciidoctor # Some sites use this. @@ -21,7 +26,7 @@ mkShell { ]; inputsFrom = [ - go - nodejs_latest + nodejsDevshell + goDevshell ]; }