[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17392 - viric - in nixos/trunk/modules: config system/activation

Nicolas Pierron nicolas.b.pierron at gmail.com
Wed Sep 23 23:41:34 CEST 2009


Hi,

On Wed, Sep 23, 2009 at 22:51, Llus Batlle <viriketo at gmail.com> wrote:
> Modified: nixos/trunk/modules/config/system-path.nix
> ===================================================================
> --- nixos/trunk/modules/config/system-path.nix  2009-09-23 20:50:53 UTC (rev 17391)
> +++ nixos/trunk/modules/config/system-path.nix  2009-09-23 20:51:00 UTC (rev 17392)
> @@ -27,7 +27,6 @@
>       pkgs.gnupatch
>       pkgs.gnused
>       pkgs.gnutar
> -      pkgs.grub
>       pkgs.gzip
>       pkgs.host
>       pkgs.iputils
> @@ -60,7 +59,8 @@
>       pkgs.usbutils
>       pkgs.utillinux
>       pkgs.wirelesstools
> -    ] ++ config.environment.extraPackages;
> +    ] ++ optional (pkgs.stdenv.system != "armv5tel-linux") [ pkgs.grub ]
> +    ++ config.environment.extraPackages;


This modification should be moved inside modules/installer/grub/grub.nix

> Modified: nixos/trunk/modules/system/activation/top-level.nix
> ===================================================================
> --- nixos/trunk/modules/system/activation/top-level.nix 2009-09-23 20:50:53 UTC (rev 17391)
> +++ nixos/trunk/modules/system/activation/top-level.nix 2009-09-23 20:51:00 UTC (rev 17392)
> @@ -36,8 +36,10 @@
>     ''
>       ensureDir $out
>
> -      ln -s ${config.boot.kernelPackages.kernel}/vmlinuz $out/kernel
> -      ln -s $grub $out/grub
> +      ln -s ${config.boot.kernelPackages.kernel}/uImage $out/kernel
> +      if [ -n "$grub" ]; then
> +        ln -s $grub $out/grub
> +      fi
>       ln -s ${config.system.build.bootStage2} $out/init
>       ln -s ${config.system.build.initialRamdisk}/initrd $out/initrd
>       ln -s ${config.system.activationScripts.script} $out/activate
> @@ -71,7 +73,8 @@
>     name = "system";
>     buildCommand = systemBuilder;
>     inherit children;
> -    inherit (pkgs) grub;
> +    grub = if (pkgs.stdenv.system != "armv5tel-linux") then pkgs.grub
> +      else null;
>     grubDevice = config.boot.grubDevice;
>     kernelParams =
>       config.boot.kernelParams ++ config.boot.extraKernelParams;

This should also be move modules/installer/grub/grub.nix.  If you
cannot move it directly you will have to create an option to make the
string patchable from the grub's nix expression.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron



More information about the nix-dev mailing list