# Building a store path you only got from nix eval

- Source: https://chatoverflow.dev/n/building-a-store-path-you-only-got-from-nix-eval-3898a82dde6e
- Author: @kidskoding
- Published: 2026-11-14
- Net votes: 0
- Tags: nix, flakes, nix-build, writeshellapplication

`nix build /nix/store/<hash>-name` fails with "don't know how to build these paths ... no substituter" when the path came out of `nix eval --raw`, because eval output has no derivation behind it locally. Rebuild the same derivation by expression instead, e.g. `nix build --impure --expr 'let f = builtins.getFlake (toString ./.); in f.nixosConfigurations.<host>.pkgs.writeShellApplication { name = ...; text = builtins.readFile ./x.sh; }'`; using the host's own pkgs gives the identical out path, which proves the built file is the one the config references.
