Skip to content

Instantly share code, notes, and snippets.

@Ailrun
Created February 16, 2020 07:01
Show Gist options
  • Save Ailrun/aaa724cd81ab3c5a5dd13ce3ef417678 to your computer and use it in GitHub Desktop.
Save Ailrun/aaa724cd81ab3c5a5dd13ce3ef417678 to your computer and use it in GitHub Desktop.
{
allowUnfree = true;
packageOverrides = pkgs: with pkgs; rec {
nixFontsConf = stdenv.mkDerivation {
name = "nix-fonts-conf";
version = "0.0.1";
src = makeFontsConf {
fontDirectories = [
vistafonts
dejavu_fonts
anonymousPro
nanum-gothic-coding
];
};
dontUnpack = true;
installPhase = ''
mkdir -p $out/etc/fonts
cp $src $out/etc/fonts/fonts.conf
'';
};
customEmacs = symlinkJoin {
name = "custom-emacs";
paths = [
emacs
];
buildInputs = [
makeWrapper
];
postBuild = ''
rm $out/share/applications/*
cp $emacs/share/applications/* $out/share/applications/
for bin in $out/bin/*
do
wrapProgram $bin --set FONTCONFIG_FILE $nixFontsConf/etc/fonts/fonts.conf
done
'';
inherit nixFontsConf emacs;
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment