From cc0b5f01b73f3de89207c0982b7db164dc206399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Mon, 15 Sep 2025 16:08:27 +0100 Subject: [PATCH] temp --- index.html | 45 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/index.html b/index.html index cdb7698..495cc40 100644 --- a/index.html +++ b/index.html @@ -5198,8 +5198,7 @@ hello-flake 44 45 46 -47 -48
{
+47
{
   inputs = {
     nixpkgs.url = "github:NixOS/nixpkgs";
     flake-utils.url = "github:numtide/flake-utils";
@@ -5210,7 +5209,6 @@ hello-flake
     flake-utils.lib.eachDefaultSystem (system:
       let
         pkgs = import nixpkgs { inherit system; };
-        inherit hello-flake;
       in
       {
         packages = rec {
@@ -5228,15 +5226,15 @@ hello-flake
                 mkdir -p $out/bin
                 cp $src/hello-again $out/bin
                 chmod +x $out/bin/hello-again
-
-                # modify the hello-again script so it can find hello-flake
-                HELLO=$(type -p hello-flake)
-                sed "s_hello-nix_"$HELLO"_" --in-place $out/bin/hello-again
-              '';
 
-
-            buildInputs = [ hello-flake ];
-          };
+                # modify the hello-again script so it can find hello-flake
+                HELLO=$(type -p hello-flake)
+                sed "s_hello-flake_"$HELLO"_" --in-place $out/bin/hello-again
+              '';
+
+
+            buildInputs = [ hello-flake.packages.${system}.hello ];
+          };
           default = hello;
         };
 
@@ -5285,24 +5283,11 @@ In that case, adding the dependency to buildInputs is sufficient.
 
$ nix run
-error:
-       … while calling the 'getAttr' builtin
-         at <nix/derivation-internal.nix>:50:17:
-           49|     value = commonAttrs // {
-           50|       outPath = builtins.getAttr outputName strict;
-             |                 ^
-           51|       drvPath = strict.drvPath;
-
-       … while calling the 'derivationStrict' builtin
-         at <nix/derivation-internal.nix>:37:12:
-           36|
-           37|   strict = derivationStrict drvAttrs;
-             |            ^
-           38|
-
-       (stack trace truncated; use '--show-trace' to show the full, detailed trace)
-
-       error: Dependency is not of a valid type: element 1 of buildInputs for hello-again
+this derivation will be built: + /nix/store/73n3x29aksn0dzr1fgqkwygrmdasrgcx-hello-again.drv +building '/nix/store/73n3x29aksn0dzr1fgqkwygrmdasrgcx-hello-again.drv'... +I'm a flake, and I'm running a command defined in a another flake. +Hello from your flake!
@@ -5625,7 +5610,7 @@ Hello from your flake!