[Nix-dev] Re: [Nix-commits] SVN commit: nix - 17393 - viric - nixos/trunk/modules/system/activation
Nicolas Pierron
nicolas.b.pierron at gmail.com
Wed Sep 23 23:49:05 CEST 2009
On Wed, Sep 23, 2009 at 22:51, Llus Batlle <viriketo at gmail.com> wrote:
> Modified: nixos/trunk/modules/system/activation/top-level.nix
> ===================================================================
> --- nixos/trunk/modules/system/activation/top-level.nix 2009-09-23 20:51:00 UTC (rev 17392)
> +++ nixos/trunk/modules/system/activation/top-level.nix 2009-09-23 20:51:09 UTC (rev 17393)
> @@ -32,11 +32,14 @@
> config.nesting.children;
>
>
> - systemBuilder =
> - ''
> + systemBuilder = let
> + kernelfile = if (pkgs.stdenv.system == "armv5tel-linux")
> + then "${config.boot.kernelPackages.kernel}/uImage"
> + else "${config.boot.kernelPackages.kernel}/vmlinuz";
> + in ''
> ensureDir $out
>
> - ln -s ${config.boot.kernelPackages.kernel}/uImage $out/kernel
> + ln -s ${kernelfile} $out/kernel
> if [ -n "$grub" ]; then
> ln -s $grub $out/grub
> fi
You should move this modification to modules/system/boot/kernel.nix
and create an option inside kernel.nix which allow you to override it.
The default then may depends on the system on which you are
compiling.
kernelImage =mkOption {
default = if (pkgs.stdenv.system == "armv5tel-linux")
then "${config.boot.kernelPackages.kernel}/uImage"
else "${config.boot.kernelPackages.kernel}/vmlinuz";
description = "define which kernel image should be used.";
}
and inside the top-level expression:
ln -s ${config.****.kernelImage} $out/kernel
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron
Andrew S. Tanenbaum - Never underestimate the bandwith of a wagon full of tapes.
More information about the nix-dev
mailing list