So some software such as flutter needs to be able to write to their installation directory in order to function properly, there is an option on nix to make the nix store writable but that's not an elegant solution
it would be nice to be able to specify in a derivation that just its install directory is writable or to have a second nix store for softwares that needs to write to their installation directory in order to function correctly, maybe a non multiuser nix store /shrug
point is, it would be nice to be able to package software that needs rw access to their installation directory without having to make the whole nix store rw and or having to run the software as root
Some software already in Nixpkgs wanted something similar. However, that goes against a core tenant of Nix: immutable packages and less writability. The correct way to handle this is fix the software and have it write elsewhere.
having to run the software as root
side note: on NixOS even root is unable to write to /nix/store, as the store is mounted ro.
And note that if the software is badly written and making it use sane locations is hard, it rarely complains if its installation directory contains symlinks to saner writeable locations.
FYI: A common way to "fix" the software in nixpkgs without editing the software itself is to use wrapProgram in the derivation in order to set environment variables or command line arguments to make it use a different directory.
Most helpful comment
Some software already in Nixpkgs wanted something similar. However, that goes against a core tenant of Nix: immutable packages and less writability. The correct way to handle this is fix the software and have it write elsewhere.