{ pkgs, ... }:
pkgs.stdenv.mkDerivation rec {
  pname = "plymouth-themes";
  version = "bf2f570bee8e84c5c20caac353cbe1d811a4745f";

  src = builtins.fetchGit {
    url = "https://github.com/adi1090x/plymouth-themes";
    rev = "bf2f570bee8e84c5c20caac353cbe1d811a4745f";
  };

  buildInputs = [
    pkgs.git
  ];

  configurePhase = ''
    mkdir -p $out/share/plymouth/themes/
  '';

  buildPhase = ''
  '';

  installPhase = ''
    cp -r pack_3/lone $out/share/plymouth/themes
    cp -r pack_3/motion $out/share/plymouth/themes
    cp -r pack_1/colorful_sliced $out/share/plymouth/themes
    cp -r pack_2/hexagon_2 $out/share/plymouth/themes
    cp -r pack_2/hexagon_dots_alt $out/share/plymouth/themes
    cat pack_3/lone/lone.plymouth | sed  "s@\/usr\/@$out\/@" > $out/share/plymouth/themes/lone/lone.plymouth
    cat pack_3/motion/motion.plymouth | sed  "s@\/usr\/@$out\/@" > $out/share/plymouth/themes/motion/motion.plymouth
    cat pack_1/colorful_sliced/colorful_sliced.plymouth | sed  "s@\/usr\/@$out\/@" > $out/share/plymouth/themes/colorful_sliced/colorful_sliced.plymouth
    cat pack_2/hexagon_2/hexagon_2.plymouth | sed  "s@\/usr\/@$out\/@" > $out/share/plymouth/themes/hexagon_2/hexagon_2.plymouth
    cat pack_2/hexagon_dots_alt/hexagon_dots_alt.plymouth | sed  "s@\/usr\/@$out\/@" > $out/share/plymouth/themes/hexagon_dots_alt/hexagon_dots_alt.plymouth
  '';
}
