I’m writing a derivation for a game that’s has native Linux client but no nixpkg. This game is also NOT open source, so I don’t have the ability to call arguments or run a build on it directly. It’s supposed to just run ideally.
I’m 90% there, it builds and runs (if copied outside the store and ran in a separate directory) but I’m struggling with making a wrapper or making the installer directory writable (which is not a good idea anyway.).
Ideally,
I’d like the derivation to be installed as a system pkg so I can submit it to the nixpkg repo when it’s stable but the installer is kinda weird.
It’s supposed to be a desktop executable launcher that just installs all the necessary game data to the directory the original tarball is unpacked too. This is great everywhere except Nixos. The derivation I wrote builds and ‘technically’ runs but it crashes out and a stack trace reveals it’s attempting to write to the nix store.
Goal is to make the derivation executable from desktop as an application (like lord Gabe intended) and at first start or upon system install would write all the game data to the users home directory under .warthunder/ directory.
I forked the 24.11 stable nixpkgs and am running nix with that repo as the main channel to test an experiment with. Here’s the package.nix and the nixpkgs repo I’m using as a channel. Demon branch is my current branch.
I’m currently calling the package in system packages using (pkgs.makeShellScript) and (pkgs.makeDesktopItem) and it builds and runs successfully, just errors out after finding no write perms to the nix store location.
What’s are some potential solutions?