| 27 Mar 2023 |
Sandro 🐧 | nope | 11:25:41 |
| 31 Mar 2023 |
| Ilan Joselevich (Kranzes) joined the room. | 00:54:24 |
| 2 Apr 2023 |
| tea joined the room. | 08:46:58 |
| 3 Apr 2023 |
| raitobezarius joined the room. | 12:09:19 |
raitobezarius | x-post from compiler: https://github.com/NixOS/nixpkgs/issues/37056 if anyone want to pursue this for 23.05, please let me know :) | 12:09:48 |
Ilan Joselevich (Kranzes) | https://github.com/NixOS/nixpkgs/pull/209870 | 22:58:39 |
Ilan Joselevich (Kranzes) | This got merged into staging. | 22:58:44 |
Ilan Joselevich (Kranzes) | * This got merged into staging! | 22:58:46 |
| 5 Apr 2023 |
| redstone-menace joined the room. | 05:51:39 |
| 20 Apr 2023 |
| shawn8901 joined the room. | 17:22:16 |
| 24 Apr 2023 |
emilytrau | I wanted to kick off the effort of incorporating a stage0-based bootstrap into nixpkgs. I rewrote and cleaned up my prev work and put up a PR for discussion :))) https://github.com/NixOS/nixpkgs/pull/227914 | 05:14:17 |
| emilytrau changed their display name from emilytrau (she/her) to emilytrau. | 08:37:35 |
| 27 Apr 2023 |
| phaer joined the room. | 15:33:23 |
| 2 May 2023 |
Artturin | emilytrau: i assume it would be preferable to have minimal-bootstrap be importable outside of nixpkgs? | 17:27:00 |
Artturin | From 12d47e9bbef05c69c5b49f53eb8d73e53124af63 Mon Sep 17 00:00:00 2001
From: Artturin <Artturin@artturin.com>
Date: Tue, 2 May 2023 20:52:13 +0300
Subject: [PATCH] minimal-bootstrap: work towards making it independant of a
initialized nixpkgs
dont use top-level newScope to prevent accidentally using top-level attrs
---
pkgs/os-specific/linux/minimal-bootstrap/default.nix | 11 ++++++-----
.../linux/minimal-bootstrap/stage0-posix/utils.nix | 9 +++------
pkgs/top-level/all-packages.nix | 2 +-
3 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/default.nix b/pkgs/os-specific/linux/minimal-bootstrap/default.nix
index fd1693e761b..6f6c5852576 100644
--- a/pkgs/os-specific/linux/minimal-bootstrap/default.nix
+++ b/pkgs/os-specific/linux/minimal-bootstrap/default.nix
@@ -1,11 +1,12 @@
-{ lib
-, newScope
-, stdenv
+{ buildPlatform
+, hostPlatform
+, config
+, lib ? import ../../lib
}:
-lib.makeScope newScope (self: with self; {
+lib.makeScope (extra: lib.callPackageWith ({ inherit lib config buildPlatform hostPlatform; } // extra)) (self: with self; {
fetchurl = import ../../../build-support/fetchurl/boot.nix {
- inherit (stdenv.buildPlatform) system;
+ inherit (buildPlatform) system;
};
inherit (callPackage ./stage0-posix { }) kaem m2libc mescc-tools mescc-tools-extra writeTextFile writeText runCommand;
diff --git a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/utils.nix b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/utils.nix
index 239d17e4fbc..4d44b7447fb 100644
--- a/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/utils.nix
+++ b/pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/utils.nix
@@ -1,7 +1,6 @@
{ lib
-, stdenv
+, buildPlatform
, callPackage
-, fetchurl
, kaem
, kaem-unwrapped
, mescc-tools
@@ -9,9 +8,7 @@
}:
let
- checkMeta = callPackage ../../../../stdenv/generic/check-meta.nix {
- inherit (stdenv) hostPlatform;
- };
+ checkMeta = callPackage ../../../../stdenv/generic/check-meta.nix { };
in
rec {
derivationWithMeta = attrs:
@@ -24,7 +21,7 @@ rec {
validity.handled
({ inherit meta passthru; } // passthru)
(derivation ({
- inherit (stdenv.buildPlatform) system;
+ inherit (buildPlatform) system;
inherit (meta) name;
} // (builtins.removeAttrs attrs [ "meta" "passthru" ])));
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index dfdc90afaa8..efa5d3a7cac 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -26943,7 +26943,7 @@ with pkgs;
metastore = callPackage ../os-specific/linux/metastore { };
- minimal-bootstrap = recurseIntoAttrs (callPackage ../os-specific/linux/minimal-bootstrap { });
+ minimal-bootstrap = recurseIntoAttrs (import ../os-specific/linux/minimal-bootstrap { inherit (stdenv) buildPlatform hostPlatform; inherit config lib; });
mingetty = callPackage ../os-specific/linux/mingetty { };
--
2.40.0
| 18:02:38 |
emilytrau | Artturin: heya. love this change for preventing accidental leaks thank you! i hadn't considered uses of minimal-bootstrap outside of nixpkgs, and in the near future will likely draw in some top-level packages after constructing stdenv. is this a use case you're after? | 23:11:40 |
| 3 May 2023 |
Artturin | In reply to @emilytrau:matrix.org Artturin: heya. love this change for preventing accidental leaks thank you! i hadn't considered uses of minimal-bootstrap outside of nixpkgs, and in the near future will likely draw in some top-level packages after constructing stdenv. is this a use case you're after? I don't have a use case, I just thought it would be good to have it as independent as possible if it's going to be used in bootstrapping | 01:10:37 |
emilytrau | you raise a good point. the "can't use fetchurl in this package because it's in bootstrap" footgun is prickly enough as a new contributor. it might be good since this bootstrap is starting from scratch to do a clean division even if that means a little duplication of packages? | 01:13:36 |
emilytrau | (Artturin, sorry forgot to add the mention) | 01:14:51 |
Alyssa Ross | I think it's okay — we already have packages that can't use fetchpatch because they're in the bootstrap. | 09:44:04 |
| Federico Damián Schonborn joined the room. | 23:57:29 |
| 10 May 2023 |
| Weijia joined the room. | 09:45:17 |
Weijia | https://github.com/NixOS/nixpkgs/issues/230933 | 09:45:30 |
| 12 May 2023 |
| Federico Damián Schonborn changed their profile picture. | 00:58:18 |
| Federico Damián Schonborn changed their profile picture. | 19:34:12 |
| Federico Damián Schonborn changed their display name from Federico Schonborn to Federico Damián Schonborn. | 19:34:57 |
| 24 May 2023 |
| Yureka (she/her) joined the room. | 11:13:12 |
| 25 May 2023 |
| thevar1able joined the room. | 11:56:06 |
| raitobezarius changed their display name from raitobezarius to disko in NixOS 23.11 when. | 13:32:37 |
| raitobezarius changed their display name from disko in NixOS 23.11 when to raitobezarius. | 13:37:37 |