From b2387b8304b8ab4f97a2094b2c074da01ceae61c Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 25 Jan 2021 01:25:47 +0100 Subject: [PATCH] nix: Make Nix shell contain all needed Perl packages Namely: novaboot dependencies as well as pod2X needed for README creation during commit (my git hook). --- default.nix | 5 +++-- shell.nix | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/default.nix b/default.nix index 0d3ac0f..cbc4471 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,7 @@ { nixpkgs ? , - pkgs ? import nixpkgs {} + pkgs ? import nixpkgs {}, + otherPerlPackages ? [] }: with pkgs; let @@ -12,7 +13,7 @@ let sha256 = "1hjicqy50mgbippn310k4zclr9ksz05yyg81za3q4gb9m3qhk5aw"; }; }; - perlEnv = (perl.withPackages (p: [ p.Expect IO-Stty ])); + perlEnv = (perl.withPackages (p: [ p.Expect IO-Stty ] ++ otherPerlPackages)); in { novaboot = stdenv.mkDerivation { diff --git a/shell.nix b/shell.nix index a3ee325..0867e33 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,10 @@ { pkgs ? import {} }: with pkgs; mkShell { - inputsFrom = [ (import ./default.nix { inherit pkgs; }).novaboot ]; - buildInputs = [ (perl.withPackages (p: [ p.PodParser ])) ]; + inputsFrom = [ + (import ./default.nix { + inherit pkgs; + otherPerlPackages = [ perl.pkgs.PodParser ]; + }).novaboot + ]; } -- 2.39.2