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

A way to temporarily install dependencies and then have them auto delete after #11724

Closed
RustoMCSpit opened this issue Oct 20, 2024 · 3 comments
Labels
feature Feature request or proposal nix-shell nix-shell, nix develop, nix print-dev-env, etc

Comments

@RustoMCSpit
Copy link

Description of the new feature/enhancement

If someone wants to build an app from source, they need dependencies. However, people do not want to clog up their systems with useless dependencies. Having the ability to install a multitude of dependencies and have them auto delete automatically once the terminal is closed would be ideal.

e.g. luanti-org/luanti#15198 (comment)

Proposed technical implementation details (optional)

something along the lines of

sudo apt install -t g++ make libc6-dev cmake libpng-dev libjpeg-dev libxi-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext

the terminal would then check which of these are already installed and ignore them, but download those that arent temporarily. you could then close the app and the ones that were downloaded would delete whilst the ones that were already on your system would stay

(i use linux by the way, so the sudo command would be something else)

Priorities

Add 👍 to issues you find important.

@RustoMCSpit RustoMCSpit added the feature Feature request or proposal label Oct 20, 2024
@roberth
Copy link
Member

roberth commented Oct 30, 2024

This sounds a lot like the "nix shell" functionality we already have.

I think it would be annoying if those dependencies are removed eagerly on shell exit, as that could happen by mistake or for the purpose of extending it, so I don't think this should be the default behavior for nix-shell/nix shell/nix develop, ie the commands that already provide this functionality, and relying on the garbage collector to delete them, instead of doing it immediately.

I wouldn't discount the need for a flag that collects the relevant deps immediately, but it seems that you're not using these commands yet, so I kindly suggest to reopen if in your experience such a flag is really needed; otherwise collecting the garbage later seems preferable. Also feel free to ask questions, especially if I misunderstood.

@roberth roberth closed this as completed Oct 30, 2024
@roberth roberth added the nix-shell nix-shell, nix develop, nix print-dev-env, etc label Oct 30, 2024
@RustoMCSpit
Copy link
Author

I wouldn't discount the need for a flag that collects the relevant deps immediately, but it seems that you're not using these commands yet,

something like that, and a way to delete those deps afterwards without deleting the deps i already had

@RustoMCSpit
Copy link
Author

Also feel free to ask questions, especially if I misunderstood.

no you wouldnt have misunderstood, i know little about nix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal nix-shell nix-shell, nix develop, nix print-dev-env, etc
Projects
None yet
Development

No branches or pull requests

2 participants