Created
February 16, 2020 07:01
-
-
Save Ailrun/aaa724cd81ab3c5a5dd13ce3ef417678 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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