]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
nix: Make Nix shell contain all needed Perl packages
authorMichal Sojka <michal.sojka@cvut.cz>
Mon, 25 Jan 2021 00:25:47 +0000 (01:25 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 25 Jan 2021 00:29:34 +0000 (01:29 +0100)
Namely: novaboot dependencies as well as pod2X needed for README
creation during commit (my git hook).

default.nix
shell.nix

index 0d3ac0f46e7625f449a1b94efdf962f3a6c4b2f3..cbc44719e96fa216699879848970593dde21fe97 100644 (file)
@@ -1,6 +1,7 @@
 {
   nixpkgs ? <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 {
index a3ee325ddc54f2928a2656237535d55511bc7f84..0867e33e92024d80592cbd9544865759d3995941 100644 (file)
--- a/shell.nix
+++ b/shell.nix
@@ -1,6 +1,10 @@
 { pkgs ? import <nixpkgs> {} }:
 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
+  ];
 }