Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghc-pkg: you don't have permissions to modify this file. #6419

Closed
meditans opened this issue Feb 18, 2015 · 2 comments
Closed

ghc-pkg: you don't have permissions to modify this file. #6419

meditans opened this issue Feb 18, 2015 · 2 comments

Comments

@meditans
Copy link
Member

Hi, I'm using nix in fedora, with the nixpkgs-unstable channel.
Among the other things in my config.nix, I defined:

haskellDevEnv = self.haskellngPackages.ghcWithPackages (p: with p; [
  cabal-install
  structured-haskell-mode
]);

when I try nix-env -iA nixpkgs.haskellDevEnv i get this error towards the end of the installation:

ghc-pkg: /nix/store/s6c7wgcia36mwwq4q0k1manzi3x9ni7a-ghc-7.8.4/lib/ghc-7.8.4/package.conf.d/package.cache: you don't have permission to modify this file
builder for ‘/nix/store/xwy2dbirvjacfyb6gcbpskzyrx01mcdp-ghc-7.8.4.drv’ failed with exit code 1
error: build of ‘/nix/store/xwy2dbirvjacfyb6gcbpskzyrx01mcdp-ghc-7.8.4.drv’ failed

Any ideas on why this happens?

@peti
Copy link
Member

peti commented Feb 18, 2015

This is a bug in the ghcWithLibraries function I've been meaning to fix but haven't gotten around to yet. The problem is that you have only one library in that packet list (cabal-install is a tool but no library), and the wrapper function doesn't deal gracefully with that case. It sounds silly, I know, but you can remedy that issue by (a) adding a second library to the environment, say ghc-paths, or by (b) removing cabal-install.

@meditans
Copy link
Member Author

Got it, thanks for the quick reply, indeed it works with more libraries :)

2015-02-18 20:42 GMT+01:00 Peter Simons notifications@github.com:

This is a bug in the ghcWithLibraries function I've been meaning to fix
but haven't gotten around to yet. The problem is that you have only one
library in that packet list (cabal-install is a tool but no library), and
the wrapper function doesn't deal gracefully with that case. It sounds
silly, I know, but you can remedy that issue by (a) adding a second library
to the environment, say ghc-paths, or by (b) removing cabal-install.


Reply to this email directly or view it on GitHub
#6419 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants