Daylin's Brain Dump

# Build From A PR with NixOS

Even though I use NixOS and run nixos-unstable. There is occasionally slow to merge PR’s either because of thorough review or build infrastructure.

It’s fairly straightforward to test simple packages that aren’t deeply integrated with the OS level for functionality.

As an example, I wanted to try out v4 of fish but it had yet to be released luckily this (at the time) draft PR already had a working derivation.

To use this on othalan and with oizys I made the following changes:

  1. Added a flake input:
nixpkgs-fish-pr = "github:nixos/nixpkgs/fish;"
  1. Added this nixpkgs as an attribute to nixpkgs using an overlay:
(final: prev: {
  nixpkgs-fish-pr = import inputs.nixpkgs-fish-pr {
    system = final.system;
  };
})
  1. Referenced this package in my host config for othalan:
environment.systemPackages = [ pkgs.nixpkgs-fish-pr.fish ];