LGFae / swww

A Solution to your Wayland Wallpaper Woes
GNU General Public License v3.0
2.38k stars 70 forks source link

Nix: allow building swww from the source directly #306

Closed JohnRTitor closed 6 months ago

JohnRTitor commented 6 months ago

This PR adds support for building nix binaries directly from this repo.

NixOS user's can easily add this repo to their flake.nix and use the latest version directly from this repository.

```nix inputs.swww.url = "github:LGFae/swww"; ``` Then in `configuration.nix` ```nix environment.systemPackages = [ inputs.swww.packages.${pkgs.system}.swww ]; ```

Build instructions for nix after cloning this repo:

With `nix-build`: ```bash nix-build ``` With `nix build` (flakes): ```bash nix build .#swww ```

Why?

Motivation for this comes from the need to have a swww-git package on NixOS to get the latest changes. However nixpkgs is inefficient for hosting a -git package, since approval and merging of PRs do take a lot of time. Adventurous users can use the flake directly to stay upto date on the latest bugfixes and features.

A lot of packages already utilise this to provide nix packages directly from their source repository.

To-Do

LGFae commented 6 months ago

I'll be honest, I don't like having files I am not entirely familiar with in the repo. But I remember someone asked this before, and these seem fairly straightforward, so I will be merging them.

Thanks!

JohnRTitor commented 6 months ago

Thanks. These changes are pretty low-maintainance, only flake.lock needs to be updated (there is a automatic GitHub action that'll run every Sunday), unless you add a new dependency to the source.

I am happy to help with further maintanence/support related to this. Just @ me.