!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

223 Members
72 Servers

Load older messages


SenderMessageTime
7 Dec 2022
@artturin:matrix.orgArtturinso the env dict was not being created17:58:42
@artturin:matrix.orgArtturin🤦‍♂️18:01:07
@artturin:matrix.orgArtturinRedacted or Malformed Event18:21:27
@artturin:matrix.orgArtturin
--- /nix/store/4kiy2jkqinfmkjps8p7ahjgj1d106990-compare-env-vars/not-structured
+++ /nix/store/4kiy2jkqinfmkjps8p7ahjgj1d106990-compare-env-vars/structured
@@ -1,26 +1,25 @@
-"
-"
-"
 declare -x CC="gcc"
 declare -x CONFIG_SHELL="bootstrap-tools/bin/bash"
 declare -x CXX="g++"
 declare -x HOME="/homeless-shelter"
+declare -x NIX_ATTRS_JSON_FILE="/build/.attrs.json"
+declare -x NIX_ATTRS_SH_FILE="/build/.attrs.sh"
 declare -x NIX_BINTOOLS="bootstrap-stage0-binutils-wrapper-"
 declare -x NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu="1"
 declare -x NIX_BUILD_CORES="24"
 declare -x NIX_BUILD_TOP="/build"
 declare -x NIX_CC="bootstrap-stage1-gcc-wrapper-"
 declare -x NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu="1"
-declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=7256km5rkx"
+declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=dpqf701mqa"
 declare -x NIX_ENFORCE_NO_NATIVE="1"
 declare -x NIX_ENFORCE_PURITY="1"
 declare -x NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"
 declare -x NIX_INDENT_MAKE="1"
-declare -x NIX_LDFLAGS="-rpath expand-response-params/lib64 -rpath expand-response-params/lib "
+declare -x NIX_LDFLAGS="-rpath expand-response-params-structured/lib64 -rpath expand-response-params-structured/lib "
 declare -x NIX_LOG_FD="2"
 declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
 declare -x NIX_STORE="/nix/store"
 declare -x OLDPWD="/build"
 declare -x PATH="bootstrap-stage1-gcc-wrapper-/bin:bootstrap-tools/bin:bootstrap-stage0-binutils-wrapper-/bin:bootstrap-tools/bin"
 declare -x PWD="/build"
 declare -x SHELL="bootstrap-tools/bin/bash"
@@ -30,45 +29,10 @@
 declare -x TEMP="/build"
 declare -x TEMPDIR="/build"
 declare -x TERM="xterm-256color"
 declare -x TMP="/build"
 declare -x TMPDIR="/build"
 declare -x TZ="UTC"
 declare -x XDG_DATA_DIRS=""
-declare -x __structuredAttrs=""
-declare -x buildInputs=""
-declare -x buildPhase="cp \$NIX_BUILD_TOP/env-vars \$out
-declare -x builder="bootstrap-tools/bin/bash"
-declare -x cmakeFlags=""
-declare -x configureFlags="--prefix=expand-response-params "
-declare -x depsBuildBuild=""
-declare -x depsBuildBuildPropagated=""
-declare -x depsBuildTarget=""
-declare -x depsBuildTargetPropagated=""
-declare -x depsHostHost=""
-declare -x depsHostHostPropagated=""
-declare -x depsTargetTarget=""
-declare -x depsTargetTargetPropagated=""
-declare -x doCheck=""
-declare -x doInstallCheck=""
-declare -x enableParallelBuilding="1"
-declare -x enableParallelChecking="1"
-declare -x installPhase="mkdir -p \$prefix/bin
 declare -x lt_cv_deplibs_check_method="pass_all"
-declare -x mesonFlags=""
-declare -x name="expand-response-params"
-declare -x nativeBuildInputs=""
-declare -x out="expand-response-params"
-declare -x outputs="out"
-declare -x patches=""
-declare -x propagatedBuildInputs=""
-declare -x propagatedNativeBuildInputs=""
+declare -x out="expand-response-params-structured"
 declare -x shell="bootstrap-tools/bin/bash"
-declare -x src="/build"
-declare -x stdenv="bootstrap-stage1-stdenv-linux"
-declare -x strictDeps="1"
-declare -x system="x86_64-linux"
-declare -x unpackPhase="cp \"\$src\" expand-response-params.c
-exit
-mv expand-response-params \$prefix/bin/
-src=\$PWD
-true 1

18:50:38
@artturin:matrix.orgArtturin
let
  pkgs = ((builtins.getFlake "nixpkgs").legacyPackages.${builtins.currentSystem});
  pkgsNoStructured = import ./. { config = { structuredAttrsByDefault = false; }; };
  pkgsStructured = import ./. { config = { structuredAttrsByDefault = true; }; };

  expand-response-params = pkgsNoStructured.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.cc.expand-response-params.overrideAttrs (previousAttrs: {
    buildPhase = ''
      cp $NIX_BUILD_TOP/env-vars $out
      true 1
      exit
    '';
  });
  expand-response-params-structured = pkgsStructured.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.cc.expand-response-params.overrideAttrs (previousAttrs: {
    name = "expand-response-params-structured";
    buildPhase = ''
      dumpVars
      cp $NIX_BUILD_TOP/env-vars $out
      true
      exit
    '';
  });
in
pkgs.runCommand "compare-env-vars"
{ nativeBuildInputs = [ pkgs.diffoscope ]; passthru = { inherit expand-response-params expand-response-params-structured;}; } ''
  mkdir -p $out
  cp ${expand-response-params} $out/not-structured
  cp ${expand-response-params-structured} $out/structured
  chmod -R +w $out
  sort -o $out/not-structured{,}
  sort -o $out/structured{,}
  # remove hashes so diff works better
  sed 's|/nix/store/.\{33\}||g' -i $out/not-structured
  sed 's|/nix/store/.\{33\}||g' -i $out/structured
  diffoscope $out/not-structured $out/structured
''

18:50:47
@artturin:matrix.orgArtturin *
--- /nix/store/4kiy2jkqinfmkjps8p7ahjgj1d106990-compare-env-vars/not-structured
+++ /nix/store/4kiy2jkqinfmkjps8p7ahjgj1d106990-compare-env-vars/structured
@@ -1,26 +1,25 @@
-"
-"
-"
 declare -x CC="gcc"
 declare -x CONFIG_SHELL="bootstrap-tools/bin/bash"
 declare -x CXX="g++"
 declare -x HOME="/homeless-shelter"
+declare -x NIX_ATTRS_JSON_FILE="/build/.attrs.json"
+declare -x NIX_ATTRS_SH_FILE="/build/.attrs.sh"
 declare -x NIX_BINTOOLS="bootstrap-stage0-binutils-wrapper-"
 declare -x NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu="1"
 declare -x NIX_BUILD_CORES="24"
 declare -x NIX_BUILD_TOP="/build"
 declare -x NIX_CC="bootstrap-stage1-gcc-wrapper-"
 declare -x NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu="1"
-declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=7256km5rkx"
+declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=dpqf701mqa"
 declare -x NIX_ENFORCE_NO_NATIVE="1"
 declare -x NIX_ENFORCE_PURITY="1"
 declare -x NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"
 declare -x NIX_INDENT_MAKE="1"
-declare -x NIX_LDFLAGS="-rpath expand-response-params/lib64 -rpath expand-response-params/lib "
+declare -x NIX_LDFLAGS="-rpath expand-response-params-structured/lib64 -rpath expand-response-params-structured/lib "
 declare -x NIX_LOG_FD="2"
 declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
 declare -x NIX_STORE="/nix/store"
 declare -x OLDPWD="/build"
 declare -x PATH="bootstrap-stage1-gcc-wrapper-/bin:bootstrap-tools/bin:bootstrap-stage0-binutils-wrapper-/bin:bootstrap-tools/bin"
 declare -x PWD="/build"
 declare -x SHELL="bootstrap-tools/bin/bash"
@@ -30,45 +29,10 @@
 declare -x TEMP="/build"
 declare -x TEMPDIR="/build"
 declare -x TERM="xterm-256color"
 declare -x TMP="/build"
 declare -x TMPDIR="/build"
 declare -x TZ="UTC"
 declare -x XDG_DATA_DIRS=""
-declare -x __structuredAttrs=""
-declare -x buildInputs=""
-declare -x buildPhase="cp \$NIX_BUILD_TOP/env-vars \$out
-declare -x builder="bootstrap-tools/bin/bash"
-declare -x cmakeFlags=""
-declare -x configureFlags="--prefix=expand-response-params "
-declare -x depsBuildBuild=""
-declare -x depsBuildBuildPropagated=""
-declare -x depsBuildTarget=""
-declare -x depsBuildTargetPropagated=""
-declare -x depsHostHost=""
-declare -x depsHostHostPropagated=""
-declare -x depsTargetTarget=""
-declare -x depsTargetTargetPropagated=""
-declare -x doCheck=""
-declare -x doInstallCheck=""
-declare -x enableParallelBuilding="1"
-declare -x enableParallelChecking="1"
-declare -x installPhase="mkdir -p \$prefix/bin
 declare -x lt_cv_deplibs_check_method="pass_all"
-declare -x mesonFlags=""
-declare -x name="expand-response-params"
-declare -x nativeBuildInputs=""
-declare -x out="expand-response-params"
-declare -x outputs="out"
-declare -x patches=""
-declare -x propagatedBuildInputs=""
-declare -x propagatedNativeBuildInputs=""
+declare -x out="expand-response-params-structured"
 declare -x shell="bootstrap-tools/bin/bash"
-declare -x src="/build"
-declare -x stdenv="bootstrap-stage1-stdenv-linux"
-declare -x strictDeps="1"
-declare -x system="x86_64-linux"
-declare -x unpackPhase="cp \"\$src\" expand-response-params.c
-exit
-mv expand-response-params \$prefix/bin/
-src=\$PWD
-true 1

18:51:00
@artturin:matrix.orgArtturin
In reply to @artturin:matrix.org
--- /nix/store/4kiy2jkqinfmkjps8p7ahjgj1d106990-compare-env-vars/not-structured
+++ /nix/store/4kiy2jkqinfmkjps8p7ahjgj1d106990-compare-env-vars/structured
@@ -1,26 +1,25 @@
-"
-"
-"
 declare -x CC="gcc"
 declare -x CONFIG_SHELL="bootstrap-tools/bin/bash"
 declare -x CXX="g++"
 declare -x HOME="/homeless-shelter"
+declare -x NIX_ATTRS_JSON_FILE="/build/.attrs.json"
+declare -x NIX_ATTRS_SH_FILE="/build/.attrs.sh"
 declare -x NIX_BINTOOLS="bootstrap-stage0-binutils-wrapper-"
 declare -x NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu="1"
 declare -x NIX_BUILD_CORES="24"
 declare -x NIX_BUILD_TOP="/build"
 declare -x NIX_CC="bootstrap-stage1-gcc-wrapper-"
 declare -x NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu="1"
-declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=7256km5rkx"
+declare -x NIX_CFLAGS_COMPILE=" -frandom-seed=dpqf701mqa"
 declare -x NIX_ENFORCE_NO_NATIVE="1"
 declare -x NIX_ENFORCE_PURITY="1"
 declare -x NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"
 declare -x NIX_INDENT_MAKE="1"
-declare -x NIX_LDFLAGS="-rpath expand-response-params/lib64 -rpath expand-response-params/lib "
+declare -x NIX_LDFLAGS="-rpath expand-response-params-structured/lib64 -rpath expand-response-params-structured/lib "
 declare -x NIX_LOG_FD="2"
 declare -x NIX_SSL_CERT_FILE="/no-cert-file.crt"
 declare -x NIX_STORE="/nix/store"
 declare -x OLDPWD="/build"
 declare -x PATH="bootstrap-stage1-gcc-wrapper-/bin:bootstrap-tools/bin:bootstrap-stage0-binutils-wrapper-/bin:bootstrap-tools/bin"
 declare -x PWD="/build"
 declare -x SHELL="bootstrap-tools/bin/bash"
@@ -30,45 +29,10 @@
 declare -x TEMP="/build"
 declare -x TEMPDIR="/build"
 declare -x TERM="xterm-256color"
 declare -x TMP="/build"
 declare -x TMPDIR="/build"
 declare -x TZ="UTC"
 declare -x XDG_DATA_DIRS=""
-declare -x __structuredAttrs=""
-declare -x buildInputs=""
-declare -x buildPhase="cp \$NIX_BUILD_TOP/env-vars \$out
-declare -x builder="bootstrap-tools/bin/bash"
-declare -x cmakeFlags=""
-declare -x configureFlags="--prefix=expand-response-params "
-declare -x depsBuildBuild=""
-declare -x depsBuildBuildPropagated=""
-declare -x depsBuildTarget=""
-declare -x depsBuildTargetPropagated=""
-declare -x depsHostHost=""
-declare -x depsHostHostPropagated=""
-declare -x depsTargetTarget=""
-declare -x depsTargetTargetPropagated=""
-declare -x doCheck=""
-declare -x doInstallCheck=""
-declare -x enableParallelBuilding="1"
-declare -x enableParallelChecking="1"
-declare -x installPhase="mkdir -p \$prefix/bin
 declare -x lt_cv_deplibs_check_method="pass_all"
-declare -x mesonFlags=""
-declare -x name="expand-response-params"
-declare -x nativeBuildInputs=""
-declare -x out="expand-response-params"
-declare -x outputs="out"
-declare -x patches=""
-declare -x propagatedBuildInputs=""
-declare -x propagatedNativeBuildInputs=""
+declare -x out="expand-response-params-structured"
 declare -x shell="bootstrap-tools/bin/bash"
-declare -x src="/build"
-declare -x stdenv="bootstrap-stage1-stdenv-linux"
-declare -x strictDeps="1"
-declare -x system="x86_64-linux"
-declare -x unpackPhase="cp \"\$src\" expand-response-params.c
-exit
-mv expand-response-params \$prefix/bin/
-src=\$PWD
-true 1

dumpVars only shows env variables which are exported
18:51:27
@artturin:matrix.orgArtturinand substituteAll only substitutes with global vars18:51:40
@artturin:matrix.orgArtturin(because awk is used to get the vars) https://github.com/NixOS/nixpkgs/blob/a3c1a4abc78df37b537cb08414efa8eac38211b6/pkgs/stdenv/generic/setup.sh#L79018:59:32
@artturin:matrix.orgArtturinit was made to use awk in https://github.com/NixOS/nixpkgs/pull/2879919:02:43
@artturin:matrix.orgArtturinbefore that the variables did not have to be exported19:02:54
@artturin:matrix.orgArtturini think19:03:27
@artturin:matrix.orgArtturin
$ export hello="1"
$ hello1="2"
$ awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'
hello
skip_global_compinit
$ hello2="3" awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'
hello2
hello
skip_global_compinit
19:07:14
@artturin:matrix.orgArtturin *
$ export hello="1"
$ hello1="2"
$ awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'
hello
$ hello2="3" awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'
hello2
hello
19:07:35
8 Dec 2022
@artturin:matrix.orgArtturin Robert Hensing (roberth): Rick (Mindavi)
i undrafted https://github.com/NixOS/nixpkgs/pull/175649
00:05:12
@artturin:matrix.orgArtturinthere's useful prior art in https://github.com/NixOS/nixpkgs/compare/structured-attrs for any future PRs00:59:25
@artturin:matrix.orgArtturinhttps://gist.github.com/GrahamcOfBorg/8f677e11a810eeef79d69be89ec0c2fb02:16:36
@artturin:matrix.orgArtturin
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix
index be2e3567da8..6945f5b0720 100644
--- a/pkgs/build-support/bintools-wrapper/default.nix
+++ b/pkgs/build-support/bintools-wrapper/default.nix
@@ -106,7 +106,7 @@ stdenv.mkDerivation {
   outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (bintools ? info) "info");
 
   passthru = {
-    inherit targetPrefix suffixSalt;
+    inherit targetPrefix suffixSalt bintools_bin;
     inherit bintools libc nativeTools nativeLibc nativePrefix;
 
     emacsBufferSetup = pkgs: ''
@@ -366,7 +366,7 @@ stdenv.mkDerivation {
     gnugrep_bin = if nativeTools then "" else gnugrep;
     wrapperName = "BINTOOLS_WRAPPER";
     inherit dynamicLinker targetPrefix suffixSalt coreutils_bin;
-    inherit bintools_bin libc_bin libc_dev libc_lib;
+    inherit libc_bin libc_dev libc_lib;
   };
 
   meta =
02:17:14
@artturin:matrix.orgArtturin
nix-repl> legacyPackages.x86_64-darwin.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.cc.bintools.bintools_bin
{ name = "bootstrap-stage0-binutils"; outPath = «derivation /nix/store/wn8fif83s2lwxl8n4s7916c3pj8lli6l-bootstrap-tools.drv»; }
02:17:27
@artturin:matrix.orgArtturindoes not contain a type = derivation02:18:03
@artturin:matrix.orgArtturin on linux it does 02:19:56
@artturin:matrix.orgArtturin * https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/darwin/default.nix#L26502:20:06
@artturin:matrix.orgArtturin binutils-unwrapped = { name = "bootstrap-stage0-binutils"; outPath = bootstrapTools; }; 02:20:19
@artturin:matrix.orgArtturinlinux https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/default.nix#L17902:21:28
@artturin:matrix.orgArtturindone in https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/linux/default.nix#L17902:23:17
@artturin:matrix.orgArtturin * done in https://github.com/nixos/nixpkgs/commit/768aae66efcb50672f0ed728f218f18348193e2702:23:24
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/175649/commits/7939e734af127d8d36add1c5e22fd555b15f975002:32:09
@artturin:matrix.orgArtturin
nix-repl> legacyPackages.x86_64-linux.fastStdenv
error: The ‘env’ attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping: cc
«derivation
02:54:56
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/175649/commits/d437fe5edfae31ab61cea995446d31b9cefb8ea403:02:30
@sandro:supersandro.deSandro 🐧those links are already dead14:50:03

Show newer messages


Back to Room ListRoom Version: 9