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

[nix-local-build] new-install interface for installing executables #3332

Closed
ezyang opened this issue Apr 13, 2016 · 7 comments
Closed

[nix-local-build] new-install interface for installing executables #3332

ezyang opened this issue Apr 13, 2016 · 7 comments

Comments

@ezyang
Copy link
Contributor

ezyang commented Apr 13, 2016

Suppose you want to install pandoc. How would you do so using the Nix-local build interface? new-install is not supported, so you can't. Installing executables is, indeed, a really good reason why we need new-install: to manage a "Nix profile", which is the actual set of packages available to a user's PATH. I suppose we also want the ability to rollback (like in Nix) in case someone installs something they don't like. These would also be considered roots for any sort of hypothetical GC mechanism.

Here's an even easier way to do it: to new-install an executable, first install it into the store, and then create a symlink from .cabal/bin to this executable.

(@hvr says: see also #4558)

@codygman
Copy link

I suppose we also want the ability to rollback

Eventually sure. And we don't want to tie our hands up implementing it later. However I think this cabal new-install feature alone without ability to roll back is very valuable on its own and will give many the option of using cabal new-build rather than stack in their workflows.

@maoe
Copy link
Member

maoe commented Apr 12, 2017

Is there a blocking issue for this feature or just no one has tried to implement it yet?

@23Skidoo
Copy link
Member

Is there a blocking issue for this feature or just no one has tried to implement it yet?

IIUC, the latter.

@maoe
Copy link
Member

maoe commented Apr 14, 2017

Thanks. I think this is a very useful feature even without the rollback feature or the GC mechanism mentioned in the description. I'll see later if I can quickly implement it.

@23Skidoo
Copy link
Member

23Skidoo commented May 5, 2017

This script by @hvr can be used as a starting point for the implementation: https://gist.github.com/hvr/c77c54d682555b7dd4fe1248732fe978

13:47 <hvr> I use that script a lot for stuff like alex/happy/pandoc/hakyll/hlint/stylish-haskell
13:48 <hvr> the thing I like about it is that I can reuse/share buildtools
13:48 <hvr> w/ what cabal  new-build automatically builds to satisfy build-tools
13:48 <hvr> and I can quickly get access to different versions
13:48 <hvr> of the same tool

@fgaz
Copy link
Member

fgaz commented Nov 5, 2017

This is partially done (nonlocal exes) with #4825.
Also, can we close this in favor of #4558?

@23Skidoo
Copy link
Member

23Skidoo commented Nov 5, 2017

Closing in favour of #4558.

@23Skidoo 23Skidoo closed this as completed Nov 5, 2017
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

5 participants