Files
nix/pkgs/rofi-launchers/package.nix
T
Miguel Palhas d4659b1b04 wip
2025-10-06 16:47:27 +01:00

62 lines
1.3 KiB
Nix

{
lib,
stdenvNoCC,
fetchFromGitHub,
rofi,
}:
stdenvNoCC.mkDerivation {
name = "rofi-launchers";
src = fetchFromGitHub {
owner = "adi1090x";
repo = "rofi";
rev = "dce10e9";
hash = "sha256-ZSosFsi/M5Gqb9gsUqS7hu89uOu9078Dus4Y+WCphZc=";
};
buildInputs = [ rofi ];
postPatch = ''
files=$(find files/scripts -type l)
for file in $files; do
substituteInPlace $file \
--replace-fail '$HOME/.config/rofi' "$out/share" \
--replace-fail "rofi " "${lib.getExe rofi} "
done
files=$(find files/launchers -type f -name "*.rasi")
for file in $files; do
substituteInPlace $file \
--replace-quiet '~/.config/rofi' "$out/share"
done
'';
installPhase = ''
runHook preInstall
# Install all scripts as binaries
mkdir -p $out/bin
for script in files/scripts/*; do
install -Dm755 $script $out/bin/$(basename $script)
done
# Install Fonts
mkdir -p "$out/share/fonts"
cp -r fonts/* "$out/share/fonts"
# Install other necessary files
mkdir -p "$out/share"
cp -r files/* "$out/share"
runHook postInstall
'';
meta = {
description = "A collection of rofi launchers";
homepage = "https://github.com/adi1090x/rofi";
maintainers = with lib.maintainers; [ ];
platforms = lib.platforms.linux;
};
}