Nix package request for "libadwaita-without-adwaita"

Hi :slight_smile:

I don’t know if this is the right place to ask but,
is it possible to port something like this to nix?

I see no reasons why you wouldn’t be able to package it, as it is simply a few patches that are applied on libadwaita… In order to avoid depending on the .git (this brings impurity as it might change the hash over time due to git stuff), I would generate patch files for all the items that are cherry-picked (I guess this would work), and then do something like:

let myLibAdwaita = pkgs.libAdwaita.overrideAttrs (finalAttrs: previousAttrs:
    {
      patches = [ ./mypatch.patch ];
    }); in

If you plan to replace libadwaita in all softwares without recompiling everything, please look at the system.replaceRuntimeDependencies option..

And usually you can submit package requests on GitHub - NixOS/nixpkgs: Nix Packages collection & NixOS

Okay, I’ve no idea how to do this right now, but I will take a look!
Thank you for your advice!

I don’t have much time to do it right now, but for what I see this is basically what I wrote above, where the patches are the one from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=libadwaita-without-adwaita-git and aur.git - AUR Package Repositories Notably:

  • appstream-1.0-test.patch from https://aur.archlinux.org/cgit/aur.git/tree/appstream-1.0-test.patch?h=libadwaita-without-adwaita-git can be taken as it and added to the above list
  • themeing_patch.diff comes form aur.git - AUR Package Repositories, sadly it does not specify on which file it should be applied to: one possibility is to run the patch command <"${./theming_patch.diff}" patch src/adw-style-manager.c in postPatch phase, the other possibility is maybe directly to manually apply the patch on the source code and generate the .patch with git diff > themeing_patch.diff, and then you just insert it in your derivation like above. This way you have a more uniform interface of patches.

The above repository also mentions a few commits that it cherry picks, but my understanding is that it is just used to fix the build… but if libadwaita is already building correctly in nix, my understanding is that it should not be necessary.