1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 11:03:37 +03:00

examples/hello: Use eval-with-configuration.nix

This commit is contained in:
Samuel Dionne-Riel 2021-02-21 17:31:56 -05:00
parent 0ef6bd9d5d
commit 5b49dcf208

View File

@ -1,22 +1,11 @@
{ device ? null }: { device ? null, pkgs ? null }@args:
let
system-build = import ../../. {
inherit device;
configuration = [ { imports = [ ./configuration.nix ]; } ];
};
in
system-build // {
___readme-default = throw ''
Cannot directly build for ${device}...
import ../../lib/eval-with-configuration.nix (args // {
configuration = [ (import ./configuration.nix) ];
additionalHelpInstructions = ''
You can build the `-A build.default` attribute to build the default output You can build the `-A build.default` attribute to build the default output
for your device. for your device.
$ nix-build examples/hello --argstr device ${device} -A build.default $ nix-build examples/hello --argstr device ${device} -A build.default
*************************************************************************
* Please also read your device's documentation for further usage notes. *
*************************************************************************
''; '';
} })