<p>This looks like your <code>/nix/store</code> is somehow corrupted. Without having it hand it's hard to tell what exactly went wrong. You can try:</p>
<pre><code>nix-collect-garbage
nix-shell
</code></pre>
<p>hopefully the bad path would be collected and refetched/built.</p>

CC BY-SA 4.0
2022-01-18T18:24:58.650Z
Thanks @angerman, I did what you told me, but it resulted in the same error
deimagjas
CC BY-SA 4.0
2022-01-18T14:31:20.843Z
2022-01-18T14:31:20.843Z
angerman
<p>Using the <code>nix-shell</code> command in a docker container on GitHub codespaces results in the following error:</p>
<pre><code>$ nix-shell --show-trace
trace: To materialize project.plan-nix for cabal-install entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
building '/nix/store/q6yfjd9rgb49g5g89x9gqlsv9sv8rs2g-cabal.project.drv'...
error: suspicious ownership or permission on '/nix/store/lzcnjxp2ri40gfy0yysww2vpiac4sng0-cabal.project' for output 'out'; rejecting this build output
error: 1 dependencies of derivation '/nix/store/5hyxv4yfwk8a1jml1cs2yifkxncym1sd-cabal-install-plan-to-nix-pkgs.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gp4k8l89l05jh9a62i6ahdy8h3gfpkng-cabal-install-plan-to-nix-pkgs.drv' failed to build

       … while importing '/nix/store/2wiwkbq968s4l3mg9mal28sxfbsy2xm5-cabal-install-plan-to-nix-pkgs'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/import-and-filter-project.nix:21:13:

           20|   projectSubDir'' = if projectSubDir == &quot;&quot; then &quot;&quot; else projectSubDir + &quot;/&quot;; # With trailing /
           21|   project = import &quot;${projectNix}${projectSubDir'}&quot;;
             |             ^
           22| in project // {

       … while evaluating anonymous lambda

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/import-and-filter-project.nix:5:1:

            4| { pkgs, haskellLib }:
            5| { projectNix, sourceRepos, src }:
             | ^
            6| let

       … from call site

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:488:27:

          487|               callProjectResults = callCabalProjectToNix args;
          488|               plan-pkgs = importAndFilterProject {
             |                           ^
          489|                 inherit (callProjectResults) projectNix sourceRepos src;

       … while evaluating the attribute 'hsPkgs'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:510:43:

          509|               project = addProjectAndPackageAttrs rec {
          510|                   inherit (pkg-set.config) hsPkgs;
             |                                           ^
          511|                   inherit pkg-set;

       … while evaluating the attribute 'hsPkgs'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:533:15:

          532|               # Haskell packages
          533|               hsPkgs = final.lib.mapAttrs (packageName: package':
             |               ^
          534|                 if package' == null

       … while evaluating the attribute 'extraPackages.cabal-install.components.exes.cabal'

       at /workspaces/ppp-3/plutus-apps/nix/pkgs/haskell/extra.nix:73:39:

           72|   inherit (hlsProject.hsPkgs) haskell-language-server hie-bios implicit-hie stylish-haskell hlint;
           73|   inherit (cabalInstallProject.hsPkgs) cabal-install;
             |                                       ^
           74|   inherit (cardanoRepoToolProject.hsPkgs) cardano-repo-tool;

       … while evaluating anonymous lambda

       at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/pkgs/stdenv/generic/make-derivation.nix:145:17:

          144|           (map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
          145|           (map (drv: drv.nativeDrv or drv) nativeBuildInputs
             |                 ^
          146|              ++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh

       … from call site

       … while evaluating 'getOutput'

       at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:486:23:

          485|   */
          486|   getOutput = output: pkg:
             |                       ^
          487|     if pkg.outputUnspecified or false

       … from call site

       … while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-shell-for-packages'

       at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/pkgs/stdenv/generic/make-derivation.nix:203:11:

          202|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname &amp;&amp; attrs ? version)) {
          203|           name =
             |           ^
          204|             let
</code></pre>
<p>I was following this <a href="https://github.com/input-output-hk/plutus-pioneer-program" rel="nofollow noreferrer">guide</a> &quot;Enter a <code>nix-shell</code>&quot;</p>
<p>Nix version 2.5.1</p>
<p>Nix installation for single user</p>

CC BY-SA 4.0
2022-01-20T06:04:06.657Z
Is this better addressed in: https://github.com/input-output-hk/plutus-pioneer-program/issues
gRebel
<plutus-pioneer-program><plutus-playground><nix><docker>
error: suspicious ownership or permission with nix-shell command on plutus-apps repository
# error: suspicious ownership or permission with nix-shell command on plutus-apps repository

(Asked by: username_0 on 2022-01-18)

Using the nix-shell command in a docker container on GitHub codespaces results in the following error:
$ nix-shell --show-trace
trace: To materialize project.plan-nix for cabal-install entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'.
building '/nix/store/q6yfjd9rgb49g5g89x9gqlsv9sv8rs2g-cabal.project.drv'...
error: suspicious ownership or permission on '/nix/store/lzcnjxp2ri40gfy0yysww2vpiac4sng0-cabal.project' for output 'out'; rejecting this build output
error: 1 dependencies of derivation '/nix/store/5hyxv4yfwk8a1jml1cs2yifkxncym1sd-cabal-install-plan-to-nix-pkgs.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gp4k8l89l05jh9a62i6ahdy8h3gfpkng-cabal-install-plan-to-nix-pkgs.drv' failed to build

       … while importing '/nix/store/2wiwkbq968s4l3mg9mal28sxfbsy2xm5-cabal-install-plan-to-nix-pkgs'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/import-and-filter-project.nix:21:13:

           20|   projectSubDir'' = if projectSubDir == "" then "" else projectSubDir + "/"; # With trailing /
           21|   project = import "${projectNix}${projectSubDir'}";
             |             ^
           22| in project // {

       … while evaluating anonymous lambda

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/lib/import-and-filter-project.nix:5:1:

            4| { pkgs, haskellLib }:
            5| { projectNix, sourceRepos, src }:
             | ^
            6| let

       … from call site

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:488:27:

          487|               callProjectResults = callCabalProjectToNix args;
          488|               plan-pkgs = importAndFilterProject {
             |                           ^
          489|                 inherit (callProjectResults) projectNix sourceRepos src;

       … while evaluating the attribute 'hsPkgs'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:510:43:

          509|               project = addProjectAndPackageAttrs rec {
          510|                   inherit (pkg-set.config) hsPkgs;
             |                                           ^
          511|                   inherit pkg-set;

       … while evaluating the attribute 'hsPkgs'

       at /nix/store/8n76c1c3nz2wl6dzxmxdz2y5xrx70flw-source/overlays/haskell.nix:533:15:

          532|               # Haskell packages
          533|               hsPkgs = final.lib.mapAttrs (packageName: package':
             |               ^
          534|                 if package' == null

       … while evaluating the attribute 'extraPackages.cabal-install.components.exes.cabal'

       at /workspaces/ppp-3/plutus-apps/nix/pkgs/haskell/extra.nix:73:39:

           72|   inherit (hlsProject.hsPkgs) haskell-language-server hie-bios implicit-hie stylish-haskell hlint;
           73|   inherit (cabalInstallProject.hsPkgs) cabal-install;
             |                                       ^
           74|   inherit (cardanoRepoToolProject.hsPkgs) cardano-repo-tool;

       … while evaluating anonymous lambda

       at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/pkgs/stdenv/generic/make-derivation.nix:145:17:

          144|           (map (drv: drv.__spliced.buildBuild or drv) depsBuildBuild)
          145|           (map (drv: drv.nativeDrv or drv) nativeBuildInputs
             |                 ^
          146|              ++ lib.optional separateDebugInfo' ../../build-support/setup-hooks/separate-debug-info.sh

       … from call site

       … while evaluating 'getOutput'

       at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/lib/attrsets.nix:486:23:

          485|   */
          486|   getOutput = output: pkg:
             |                       ^
          487|     if pkg.outputUnspecified or false

       … from call site

       … while evaluating the attribute 'nativeBuildInputs' of the derivation 'ghc-shell-for-packages'

       at /nix/store/kawxd91ly09hlyqprqs7yn650s3cfvf6-source/pkgs/stdenv/generic/make-derivation.nix:203:11:

          202|         // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          203|           name =
             |           ^
          204|             let

I was following this guide "Enter a nix-shell"
Nix version 2.5.1
Nix installation for single user

**Tags:** plutus-pioneer-program, plutus-playground, nix, docker
> **Comments:**
> **username_1**: Is this better addressed in: https://github.com/input-output-hk/plutus-pioneer-program/issues  

---

## 1 answers

### Answer by username_2 on 2022-01-18. Score: 0

This looks like your /nix/store is somehow corrupted. Without having it hand it's hard to tell what exactly went wrong. You can try:
nix-collect-garbage
nix-shell

hopefully the bad path would be collected and refetched/built.

> **Comments:**
> **username_0**: Thanks @angerman, I did what you told me, but it resulted in the same error  

---

