From: Ville Ilvonen <ville.ilvonen@unikie.com>
To: Alyssa Ross <hi@alyssa.is>, devel@spectrum-os.org
Cc: "José Pekkarinen" <jose.pekkarinen@unikie.com>,
"Ivan Nikolaenko" <ivan.nikolaenko@unikie.com>
Subject: Re: [PATCH 1/4] Introduce a build configuration file
Date: Tue, 6 Sep 2022 08:53:03 +0300 [thread overview]
Message-ID: <2ff7084f-a7e3-b6da-21cd-cf65392ce834@unikie.com> (raw)
In-Reply-To: <20220831093727.282797-1-hi@alyssa.is>
On 8/31/22 12:37, Alyssa Ross wrote:
> By default, a file called "config.nix" in the root of the Spectrum
> repository will be read if it exists. That file should contain an
> attribute set. Currently, only a "pkgs" key is supported, which
> allows specifying a custom package set that will be used throughout
> the Spectrum Nix files. This will allow us to provide configuartion
> options for people who want to build Spectrum in ways that are
> probably not suitable for upstreaming.
>
> For example, using the "pkgs" config option I'm introducing here, it
> would be possible to use an overlay to patch individual components,
> like so:
>
> {
> pkgs = import <nixpkgs> {
> overlays = [
> (final: super: {
> weston = super.weston.overrideAttrs ({ patches ? [], ... }: {
> patches = patches ++ [
> path/to/weston.patch
> ];
> });
> })
> ];
> };
> }
>
> Signed-off-by: Alyssa Ross <hi@alyssa.is>
> ---
Appreciate it as this makes it more clean to implement device specifics.
Would you like to see the device specific configs in tree or out of
tree? One option would be to set the default config and support in tree
configs of devices people could choose from. Even if not fully supported
by upstream, they could be useful as examples. If both are possible,
criteria for guiding in-tree and out-of-tree configs could be also useful.
Thanks,
-Ville
Reviewed-by: Ville Ilvonen <ville.ilvonen@unikie.com>
> José, Ivan, if you'd like to review these patches, there's some
> documentation on how to do so here: :)
>
> https://spectrum-os.org/doc/reviewing-patches.html
>
> .gitignore | 1 +
> Documentation/default.nix | 4 ++--
> Documentation/jekyll.nix | 2 +-
> host/initramfs/default.nix | 7 +++----
> host/initramfs/extfs.nix | 8 ++++----
> host/initramfs/shell.nix | 9 +++++----
> host/rootfs/default.nix | 7 +++++--
> host/rootfs/shell.nix | 8 ++++----
> host/start-vm/default.nix | 2 +-
> host/start-vm/shell.nix | 6 +++---
> img/combined/default.nix | 6 +++---
> img/combined/eosimages.nix | 4 ++--
> img/combined/run-vm.nix | 4 ++--
> img/installer/default.nix | 3 ++-
> img/installer/run-vm.nix | 7 ++++---
> img/live/default.nix | 11 ++++++-----
> img/live/shell.nix | 15 +++++++++------
> nix/eval-config.nix | 10 ++++++++++
> release.nix | 10 +++++++---
> scripts/default.nix | 4 ++--
> shell.nix | 2 +-
> vm/app/catgirl/default.nix | 6 +++---
> vm/app/catgirl/shell.nix | 6 +++---
> vm/app/lynx/default.nix | 6 +++---
> vm/app/lynx/shell.nix | 6 +++---
> vm/sys/net/default.nix | 6 +++---
> vm/sys/net/shell.nix | 6 +++---
> 27 files changed, 95 insertions(+), 71 deletions(-)
> create mode 100644 nix/eval-config.nix
>
> diff --git a/.gitignore b/.gitignore
> index 8b965e2..a97f309 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -1,6 +1,7 @@
> # SPDX-License-Identifier: CC0-1.0
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> +/config.nix
> build/
> result
> result-*
> diff --git a/Documentation/default.nix b/Documentation/default.nix
> index d94a8cd..9edfbe8 100644
> --- a/Documentation/default.nix
> +++ b/Documentation/default.nix
> @@ -2,7 +2,7 @@
> # SPDX-FileCopyrightText: 2022 Unikie
> # SPDX-License-Identifier: MIT
>
> -{ pkgs ? import <nixpkgs> {} }: pkgs.callPackage (
> +{ config ? import ../nix/eval-config.nix {} }: config.pkgs.callPackage (
>
> { lib, stdenvNoCC, jekyll, drawio-headless }:
>
> @@ -31,5 +31,5 @@ stdenvNoCC.mkDerivation {
> passthru = { inherit jekyll; };
> }
> ) {
> - jekyll = import ./jekyll.nix { inherit pkgs; };
> + jekyll = import ./jekyll.nix { inherit config; };
> }
> diff --git a/Documentation/jekyll.nix b/Documentation/jekyll.nix
> index bc804b1..6f2866f 100644
> --- a/Documentation/jekyll.nix
> +++ b/Documentation/jekyll.nix
> @@ -1,7 +1,7 @@
> # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
> # SPDX-License-Identifier: MIT
>
> -{ pkgs ? import <nixpkgs> {} }: pkgs.callPackage (
> +{ config ? import ../nix/eval-config.nix {} }: config.pkgs.callPackage (
>
> { bundlerApp }:
>
> diff --git a/host/initramfs/default.nix b/host/initramfs/default.nix
> index a4f7330..68deb5e 100644
> --- a/host/initramfs/default.nix
> +++ b/host/initramfs/default.nix
> @@ -1,11 +1,10 @@
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
> # SPDX-License-Identifier: MIT
>
> -{ pkgs ? import <nixpkgs> {}
> -, rootfs ? import ../rootfs { inherit pkgs; }
> +{ config ? import ../../nix/eval-config.nix {}
> +, rootfs ? import ../rootfs { inherit config; }
> }:
> -
> -pkgs.callPackage (
> +let inherit (config) pkgs; in pkgs.callPackage (
> { lib, stdenvNoCC, makeModulesClosure, runCommand, writeReferencesToFile
> , pkgsStatic, busybox, cpio, cryptsetup, lvm2, microcodeAmd, microcodeIntel
> }:
> diff --git a/host/initramfs/extfs.nix b/host/initramfs/extfs.nix
> index 9fdbd9a..63f436a 100644
> --- a/host/initramfs/extfs.nix
> +++ b/host/initramfs/extfs.nix
> @@ -1,21 +1,21 @@
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
> # SPDX-License-Identifier: MIT
>
> -{ pkgs, runCommand, tar2ext4 }:
> +{ config, runCommand, tar2ext4 }:
>
> let
> netvm = import ../../vm/sys/net {
> - inherit pkgs;
> + inherit config;
> # inherit (foot) terminfo;
> };
>
> appvm-catgirl = import ../../vm/app/catgirl {
> - inherit pkgs;
> + inherit config;
> # inherit (foot) terminfo;
> };
>
> appvm-lynx = import ../../vm/app/lynx {
> - inherit pkgs;
> + inherit config;
> # inherit (foot) terminfo;
> };
> in
> diff --git a/host/initramfs/shell.nix b/host/initramfs/shell.nix
> index 42da6a4..cbd2c60 100644
> --- a/host/initramfs/shell.nix
> +++ b/host/initramfs/shell.nix
> @@ -1,16 +1,17 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../nix/eval-config.nix {} }:
>
> let
> + inherit (config) pkgs;
> inherit (pkgs.lib) cleanSource cleanSourceWith;
>
> extfs = pkgs.pkgsStatic.callPackage ./extfs.nix {
> - inherit pkgs;
> + inherit config;
> };
> - rootfs = import ../rootfs { inherit pkgs; };
> - initramfs = import ./. { inherit pkgs rootfs; };
> + rootfs = import ../rootfs { inherit config; };
> + initramfs = import ./. { inherit config rootfs; };
> in
>
> with pkgs;
> diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix
> index e5f316f..44e910b 100644
> --- a/host/rootfs/default.nix
> +++ b/host/rootfs/default.nix
> @@ -2,7 +2,8 @@
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
> # SPDX-FileCopyrightText: 2022 Unikie
>
> -{ pkgs ? import <nixpkgs> {} }: pkgs.pkgsStatic.callPackage (
> +{ config ? import ../../nix/eval-config.nix {} }: let inherit (config) pkgs; in
> +pkgs.pkgsStatic.callPackage (
>
> { lib, stdenvNoCC, nixos, runCommand, writeReferencesToFile, s6-rc, tar2ext4
> , busybox, cloud-hypervisor, cryptsetup, execline, jq, kmod
> @@ -13,7 +14,9 @@ let
> inherit (lib) cleanSource cleanSourceWith concatMapStringsSep hasSuffix;
> inherit (nixosAllHardware.config.hardware) firmware;
>
> - start-vm = import ../start-vm { pkgs = pkgs.pkgsStatic; };
> + start-vm = import ../start-vm {
> + config = config // { pkgs = pkgs.pkgsStatic; };
> + };
>
> pkgsGui = pkgs.pkgsMusl.extend (final: super: {
> systemd = final.libudev-zero;
> diff --git a/host/rootfs/shell.nix b/host/rootfs/shell.nix
> index 3b2310f..8c30f68 100644
> --- a/host/rootfs/shell.nix
> +++ b/host/rootfs/shell.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../nix/eval-config.nix {} }:
>
> -with pkgs;
> +with config.pkgs;
>
> -(import ./. { inherit pkgs; }).overrideAttrs (
> +(import ./. { inherit config; }).overrideAttrs (
> { passthru ? {}, nativeBuildInputs ? [], ... }:
>
> {
> @@ -13,6 +13,6 @@ with pkgs;
> jq netcat qemu_kvm reuse util-linux
> ];
>
> - EXT_FS = pkgsStatic.callPackage ../initramfs/extfs.nix { inherit pkgs; };
> + EXT_FS = pkgsStatic.callPackage ../initramfs/extfs.nix { inherit config; };
> KERNEL = "${passthru.kernel}/${stdenv.hostPlatform.linux-kernel.target}";
> })
> diff --git a/host/start-vm/default.nix b/host/start-vm/default.nix
> index 56be882..fcce495 100644
> --- a/host/start-vm/default.nix
> +++ b/host/start-vm/default.nix
> @@ -1,7 +1,7 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }: pkgs.callPackage (
> +{ config ? import ../../nix/eval-config.nix {} }: config.pkgs.callPackage (
> { lib, stdenv, fetchpatch, meson, ninja, rustc }:
>
> let
> diff --git a/host/start-vm/shell.nix b/host/start-vm/shell.nix
> index c7f6365..5192b76 100644
> --- a/host/start-vm/shell.nix
> +++ b/host/start-vm/shell.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../nix/eval-config.nix {} }:
>
> -with pkgs;
> +with config.pkgs;
>
> -(import ./. { inherit pkgs; }).overrideAttrs (
> +(import ./. { inherit config; }).overrideAttrs (
> { nativeBuildInputs ? [], ... }:
>
> {
> diff --git a/img/combined/default.nix b/img/combined/default.nix
> index 16cd506..3989d55 100644
> --- a/img/combined/default.nix
> +++ b/img/combined/default.nix
> @@ -2,17 +2,17 @@
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
> # SPDX-FileCopyrightText: 2021 Yureka <yuka@yuka.dev>
>
> -{ pkgs ? import <nixpkgs> {} }: with pkgs;
> +{ config ? import ../../nix/eval-config.nix {} }: with config.pkgs;
>
> let
> inherit (builtins) storeDir;
> inherit (pkgs.lib) removePrefix;
>
> - eosimages = import ./eosimages.nix { inherit pkgs; };
> + eosimages = import ./eosimages.nix { inherit config; };
>
> installerPartUuid = "6e23b026-9f1e-479d-8a58-a0cda382e1ce";
> installer = import ../installer {
> - inherit pkgs;
> + inherit config;
>
> extraConfig = {
> boot.initrd.availableKernelModules = [ "squashfs" ];
> diff --git a/img/combined/eosimages.nix b/img/combined/eosimages.nix
> index 4ec28e5..9f2ab10 100644
> --- a/img/combined/eosimages.nix
> +++ b/img/combined/eosimages.nix
> @@ -1,12 +1,12 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }: with pkgs;
> +{ config ? import ../../nix/eval-config.nix {} }: with config.pkgs;
>
> runCommand "eosimages.img" {
> nativeBuildInputs = [ e2fsprogs tar2ext4 ];
> imageName = "Spectrum-0.0-x86_64-generic.0.Live.img";
> - image = import ../live { inherit pkgs; };
> + image = import ../live { inherit config; };
> } ''
> mkdir dir
> cd dir
> diff --git a/img/combined/run-vm.nix b/img/combined/run-vm.nix
> index 893bc7d..40eacc4 100644
> --- a/img/combined/run-vm.nix
> +++ b/img/combined/run-vm.nix
> @@ -1,10 +1,10 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }: with pkgs;
> +{ config ? import ../../nix/eval-config.nix {} }: with config.pkgs;
>
> let
> - image = import ./. { inherit pkgs; };
> + image = import ./. { inherit config; };
> in
>
> writeShellScript "run-spectrum-installer-vm.sh" ''
> diff --git a/img/installer/default.nix b/img/installer/default.nix
> index ba97a53..0c57704 100644
> --- a/img/installer/default.nix
> +++ b/img/installer/default.nix
> @@ -1,7 +1,8 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {}, extraConfig ? {} }: with pkgs;
> +{ config ? import ../../nix/eval-config.nix {}, extraConfig ? {} }:
> +with config.pkgs;
>
> let
> inherit (builtins) head match storeDir;
> diff --git a/img/installer/run-vm.nix b/img/installer/run-vm.nix
> index 4a6c849..4efbf1a 100644
> --- a/img/installer/run-vm.nix
> +++ b/img/installer/run-vm.nix
> @@ -1,17 +1,18 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../nix/eval-config.nix {} }:
>
> let
> inherit (builtins) storeDir;
> + inherit (config) pkgs;
> inherit (pkgs) coreutils qemu_kvm stdenv writeShellScript;
> inherit (pkgs.lib) makeBinPath escapeShellArg;
>
> - eosimages = import ../combined/eosimages.nix { inherit pkgs; };
> + eosimages = import ../combined/eosimages.nix { inherit config; };
>
> installer = import ./. {
> - inherit pkgs;
> + inherit config;
>
> extraConfig = {
> boot.initrd.availableKernelModules = [ "9p" "9pnet_virtio" ];
> diff --git a/img/live/default.nix b/img/live/default.nix
> index 88f0ee4..65ad058 100644
> --- a/img/live/default.nix
> +++ b/img/live/default.nix
> @@ -1,17 +1,18 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../nix/eval-config.nix {} }:
>
> let
> + inherit (config) pkgs;
> inherit (pkgs.lib) cleanSource cleanSourceWith hasSuffix;
>
> extfs = pkgs.pkgsStatic.callPackage ../../host/initramfs/extfs.nix {
> - inherit pkgs;
> + inherit config;
> };
> - rootfs = import ../../host/rootfs { inherit pkgs; };
> - scripts = import ../../scripts { inherit pkgs; };
> - initramfs = import ../../host/initramfs { inherit pkgs rootfs; };
> + rootfs = import ../../host/rootfs { inherit config; };
> + scripts = import ../../scripts { inherit config; };
> + initramfs = import ../../host/initramfs { inherit config rootfs; };
> in
>
> with pkgs;
> diff --git a/img/live/shell.nix b/img/live/shell.nix
> index b9f0246..dcf2059 100644
> --- a/img/live/shell.nix
> +++ b/img/live/shell.nix
> @@ -1,12 +1,15 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021-2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../nix/eval-config.nix {} }:
>
> -with pkgs;
> +with config.pkgs;
>
> -(import ./. { inherit pkgs; }).overrideAttrs ({ nativeBuildInputs ? [], ... }: {
> - nativeBuildInputs = nativeBuildInputs ++ [ qemu_kvm ];
> +(import ./. { inherit config; }).overrideAttrs (
> + { nativeBuildInputs ? [], ... }:
> + {
> + nativeBuildInputs = nativeBuildInputs ++ [ qemu_kvm ];
>
> - OVMF_CODE = "${qemu_kvm}/share/qemu/edk2-${stdenv.hostPlatform.qemuArch}-code.fd";
> -})
> + OVMF_CODE = "${qemu_kvm}/share/qemu/edk2-${stdenv.hostPlatform.qemuArch}-code.fd";
> + }
> +)
> diff --git a/nix/eval-config.nix b/nix/eval-config.nix
> new file mode 100644
> index 0000000..9265df7
> --- /dev/null
> +++ b/nix/eval-config.nix
> @@ -0,0 +1,10 @@
> +# SPDX-License-Identifier: MIT
> +# SPDX-FileCopyrightText: 2022 Unikie
> +
> +{ config ?
> + if builtins.pathExists ../config.nix then import ../config.nix else {}
> +}:
> +
> +({ pkgs ? import <nixpkgs> {} }: {
> + inherit pkgs;
> +}) config
> diff --git a/release.nix b/release.nix
> index da7123f..91a843b 100644
> --- a/release.nix
> +++ b/release.nix
> @@ -3,10 +3,14 @@
>
> # This file is built to populate the binary cache.
>
> -{ pkgs ? import <nixpkgs> {} }:
> +# Set config = {} to disable implicitly reading config.nix, since
> +# we'll want the result to be the same as on the binary cache. If it
> +# turns out there is a compelling reason to read the default config
> +# here, we can reconsider this.
> +{ config ? import nix/eval-config.nix { config = {}; } }:
>
> {
> - doc = import ./Documentation { inherit pkgs; };
> + doc = import ./Documentation { inherit config; };
>
> - combined = import img/combined/run-vm.nix { inherit pkgs; };
> + combined = import img/combined/run-vm.nix { inherit config; };
> }
> diff --git a/scripts/default.nix b/scripts/default.nix
> index 7995723..2237cb5 100644
> --- a/scripts/default.nix
> +++ b/scripts/default.nix
> @@ -1,10 +1,10 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../nix/eval-config.nix {} }:
>
> let
> - inherit (pkgs.lib) cleanSource cleanSourceWith hasSuffix;
> + inherit (config.pkgs.lib) cleanSource cleanSourceWith hasSuffix;
> in
>
> cleanSourceWith {
> diff --git a/shell.nix b/shell.nix
> index 41d0865..4dc8558 100644
> --- a/shell.nix
> +++ b/shell.nix
> @@ -1,7 +1,7 @@
> # SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
> # SPDX-License-Identifier: MIT
>
> -{ pkgs ? import <nixpkgs> {} }: with pkgs;
> +{ config ? import nix/eval-config.nix {} }: with config.pkgs;
>
> mkShell {
> nativeBuildInputs = [ reuse rustfmt ];
> diff --git a/vm/app/catgirl/default.nix b/vm/app/catgirl/default.nix
> index 738a603..61f1462 100644
> --- a/vm/app/catgirl/default.nix
> +++ b/vm/app/catgirl/default.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {}
> -, terminfo ? pkgs.foot.terminfo
> +{ config ? import ../../../nix/eval-config.nix {}
> +, terminfo ? config.pkgs.foot.terminfo
> }:
>
> -pkgs.pkgsStatic.callPackage (
> +config.pkgs.pkgsStatic.callPackage (
>
> { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages
> , s6-rc, tar2ext4
> diff --git a/vm/app/catgirl/shell.nix b/vm/app/catgirl/shell.nix
> index 87c4f6e..852b246 100644
> --- a/vm/app/catgirl/shell.nix
> +++ b/vm/app/catgirl/shell.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../../nix/eval-config.nix {} }:
>
> -with pkgs;
> +with config.pkgs;
>
> -(import ./. { inherit pkgs; }).overrideAttrs (
> +(import ./. { inherit config; }).overrideAttrs (
> { passthru ? {}, nativeBuildInputs ? [], ... }:
>
> {
> diff --git a/vm/app/lynx/default.nix b/vm/app/lynx/default.nix
> index 50fd760..ba715ec 100644
> --- a/vm/app/lynx/default.nix
> +++ b/vm/app/lynx/default.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {}
> -, terminfo ? pkgs.foot.terminfo
> +{ config ? import ../../../nix/eval-config.nix {}
> +, terminfo ? config.pkgs.foot.terminfo
> }:
>
> -pkgs.pkgsStatic.callPackage (
> +config.pkgs.pkgsStatic.callPackage (
>
> { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages
> , s6-rc, tar2ext4
> diff --git a/vm/app/lynx/shell.nix b/vm/app/lynx/shell.nix
> index 87c4f6e..852b246 100644
> --- a/vm/app/lynx/shell.nix
> +++ b/vm/app/lynx/shell.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../../nix/eval-config.nix {} }:
>
> -with pkgs;
> +with config.pkgs;
>
> -(import ./. { inherit pkgs; }).overrideAttrs (
> +(import ./. { inherit config; }).overrideAttrs (
> { passthru ? {}, nativeBuildInputs ? [], ... }:
>
> {
> diff --git a/vm/sys/net/default.nix b/vm/sys/net/default.nix
> index 0ce72fc..dfc7c35 100644
> --- a/vm/sys/net/default.nix
> +++ b/vm/sys/net/default.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {}
> -, terminfo ? pkgs.foot.terminfo
> +{ config ? import ../../../nix/eval-config.nix {}
> +, terminfo ? config.pkgs.foot.terminfo
> }:
>
> -pkgs.pkgsStatic.callPackage (
> +config.pkgs.pkgsStatic.callPackage (
>
> { lib, stdenvNoCC, runCommand, writeReferencesToFile, buildPackages
> , s6-rc, tar2ext4, xorg
> diff --git a/vm/sys/net/shell.nix b/vm/sys/net/shell.nix
> index bc4de67..849920d 100644
> --- a/vm/sys/net/shell.nix
> +++ b/vm/sys/net/shell.nix
> @@ -1,11 +1,11 @@
> # SPDX-License-Identifier: MIT
> # SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>
>
> -{ pkgs ? import <nixpkgs> {} }:
> +{ config ? import ../../../nix/eval-config.nix {} }:
>
> -with pkgs;
> +with config.pkgs;
>
> -(import ./. { inherit pkgs; }).overrideAttrs (
> +(import ./. { inherit config; }).overrideAttrs (
> { passthru ? {}, nativeBuildInputs ? [], ... }:
>
> {
next prev parent reply other threads:[~2022-09-06 5:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 9:37 [PATCH 1/4] Introduce a build configuration file Alyssa Ross
2022-08-31 9:37 ` [PATCH 2/4] nix: prefer build configs from <spectrum-config> Alyssa Ross
2022-09-08 11:40 ` José Pekkarinen
2022-09-14 6:58 ` Alyssa Ross
2022-08-31 9:37 ` [PATCH 3/4] Documentation/jekyll: patch for AsciiDoc examples Alyssa Ross
2022-09-14 7:03 ` Alyssa Ross
2022-08-31 9:37 ` [PATCH 4/4] Documentation: document build configuration file Alyssa Ross
2022-09-14 6:58 ` Alyssa Ross
2022-09-06 5:53 ` Ville Ilvonen [this message]
[not found] ` <87fsh5c60x.fsf@alyssa.is>
2022-09-08 11:39 ` [PATCH 1/4] Introduce a " José Pekkarinen
2022-09-14 6:58 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ff7084f-a7e3-b6da-21cd-cf65392ce834@unikie.com \
--to=ville.ilvonen@unikie.com \
--cc=devel@spectrum-os.org \
--cc=hi@alyssa.is \
--cc=ivan.nikolaenko@unikie.com \
--cc=jose.pekkarinen@unikie.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).