I guess you misunderstood my question, because that won’t work. nix-shell -p git doesn’t provide an isolated operating system. They only isolate programs and libraries. If your native git installation modified something in your home folder, those changes will still be visible inside a nix shell.
I’m not sure what you’re trying to accomplish in those other commands, as they just seem to print out git’s dependencies?
Also, I see you’re actively editing your comment as I’m typing so sorry if you actually post the answer after I hit Reply.
Completely off topic, but
Reading this makes me feel so powerful to be as familiar as I am with podman/docker (which to be clear is a modest amount). Just do:
podman run --rm -it debian:latest bashThen apt install git, check those folders, and finally
exitso the entire container gets automatically deleted.The whole thing is done in a few seconds (or more depending on how long git takes to download and whether the debian image is already cached)
Everyone on Linux should have this in their toolbelt.
deleted by creator
The solution to the problem is to install git into a clean system so you can observe what changes it makes.
How would you do this with Nix?
deleted by creator
I guess you misunderstood my question, because that won’t work.
nix-shell -p gitdoesn’t provide an isolated operating system. They only isolate programs and libraries. If your native git installation modified something in your home folder, those changes will still be visible inside a nix shell.I’m not sure what you’re trying to accomplish in those other commands, as they just seem to print out git’s dependencies?
Also, I see you’re actively editing your comment as I’m typing so sorry if you actually post the answer after I hit Reply.
deleted by creator
Well, you’re clearly very passionate about nix, but all you’ve shown is how to install git in an isolated shell, which again isn’t what I was asking.
I don’t have anything against nix, but it doesn’t seem like the right solution to the particular problem that was presented.
deleted by creator
This is why nix is doomed to be a toy forever, because its user base consists of unhinged cheerleaders. Please do the following:
Now, re-read the linked blog post and my comments, and try to understand the problem.