I have recently switched to Fedora, from NixOS. I gave NixOS quite some time, and i liked the declarative way of dealing with my system, but the language was to obscure for me, and i didn't have time to dive into the nix language. I switched to Fedora, because it was easy to install on my Surfacebook 2, didn't have snap turned on behind my back by default (looking at you Ubuntu), and felt nice. I have then made a vast and big set of bash scripts that i can run, to initiate my system (it needs a couple of more rounds before i add it do my dees repository - it will be added! Give me zeh time). One of the scripts handles

  1. pulling emacs

  2. installing dependencies

  3. compiling emacs

I have some other scripts that uses stow to symlink it into my path. Pretty neat. Here is the full script

#!/usr/bin/env bash

echo 'installing programs for compiling emacs'
sudo dnf install -y jansson-devel mpfr-devel libmpc-devel gmp-devel libgccjit-devel autoconf texinfo libX11-devel jansson jansson-devel libXpm libXaw-devel \
    libjpeg-turbo-devel libpng-devel giflib-devel libtiff-devel gnutls-devel ncurses-devel gtk3-devel webkit2gtk3-devel

echo 'compiling emacs'
cd ~/git/emacs

echo 'cleaning before beginning'
make clean

./autogen.sh
./configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
    --with-tiff --with-xft --with-xpm --with-gpm=no \
    --with-xwidgets --with-modules --with-native-compilation --with-pgtk \
    -with-threads --with-included-regex

make -j8
sudo make install bindir=~/dees/bin/emacs

I build it with native-comp and pgtk. I don't use the daemon, but I have a really slim down version of emacs, that i use for doing terminal editing (it only has some basic modes and evil enabled so it starts up fast).

It is implied here that i clone emacs to /git/emacs (actually i have added emacs as a submodule that i can update before calling this script, but that is a minor detail).

Hope you can make use of it somehow!