Default avatar
YsYe7Rg5O$JeULRiNnJehvlYjlGrxX5xY_tQgpe5NsP9
npub18eyn...cvu7
I created a process for building an AppImage out of the Gossip nostr client. It's actually quite simple because Nix does most of the work. You basically download nix-portable, which is a self-extracting executable, run a few commands, and you have an AppImage. And to clean up the build artifacts, just delete the nix-portable script and the directory $HOME/.nix-portable. No root necessary. image How does it work? The AppImage is build with Nix, which is interesting enough. But there's more. The AppRun executable in the AppImage creates a Linux container so that the embedded Nix store can be mounted at /nix. The details are at the repo: #nix #gossip
Some time ago I created a Nix function called `nvidia-offload-wrapper` which can be used to wrap a Nix package so that it renders using NVIDIA offload rendering. This was nice because you could take the Nix package for a game such as "Super Tux Kart" and add NVIDIA offload rendering without having to modify the package, nor run the package from the command line; Here's the dirty secret, the wrapper creates a symlink to the $out/share directory of the wrapped package, so that NixOS sees the .desktop file and icons, just like an ordinary Nix package. Later, I factored out the wrapping functionality to generalize it. So now it's possible to create all sorts of wrapper functions with very little Nix code. More recently, I added a new wrapper function which creates a launcher to run a Nintendo 64 game using `mupen64plus`. With this function, you can run a N64 ROM as seemless as running a native Linux application; It creates a .desktop file. Sometimes it makes sense to apply multiple wrappers to a package. What if you want to run a N64 ROM using NVIDIA offload rendering? Overkill, I know, but I'd be cool. As of now, not only are the wrapper functions composable, I added a couple of composition functions to make it easier. For example, instead of `x = func4 (func3 (func2 (func1 arg)))` you can do `x = (compose [ func1 func2 func3 func4 ]) arg`. `compose` makes more sense if you can to assign the composed function a name and use it later. If you can to compose some functions and apply then in one go, `composeAndApply` is bit cleaner: `x = composeAndApply [ func1 func2 func3 func4 ] arg` #nix #nixos
Since 2023 has been rather... shitty, I thought I'd create something fun: I created a Nix flake for building and installing the unofficial PC port of Super Mario 64. The flake doesn't contain the ROM, but it does contain packages for a few HD texture packs :) There are a number of forks, but I only packaged the "Render96" fork, without RTX; I don't have the hardware to test the raycasting/RTX build. image