diff options
author | numkem <numkem@numkem.org> | 2018-06-15 15:35:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-15 15:35:23 -0400 |
commit | cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d (patch) | |
tree | ad1269cffa620ce756c0533e438ac86febdf4add /pkgs/servers/x11/xquartz/default.nix | |
parent | 47aa1da7a020e96764ef522c2d63398aa0332798 (diff) | |
parent | 54ea1cd58aefde76f7ab2f63e955b9c622c70d1f (diff) | |
download | nixlib-cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d.tar nixlib-cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d.tar.gz nixlib-cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d.tar.bz2 nixlib-cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d.tar.lz nixlib-cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d.tar.xz nixlib-cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d.tar.zst nixlib-cfbef4a9e6e73f14fbfd5f0b8e9ef8966393976d.zip |
Merge pull request #1 from NixOS/master
Sync with upstream
Diffstat (limited to 'pkgs/servers/x11/xquartz/default.nix')
-rw-r--r-- | pkgs/servers/x11/xquartz/default.nix | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/pkgs/servers/x11/xquartz/default.nix b/pkgs/servers/x11/xquartz/default.nix index 3e9e7cb779ee..9c133f9d5d99 100644 --- a/pkgs/servers/x11/xquartz/default.nix +++ b/pkgs/servers/x11/xquartz/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, buildEnv, makeFontsConf, gnused, writeScript, xorg, bashInteractive, substituteAll, xterm, makeWrapper, ruby -, openssl, quartz-wm, fontconfig, xkeyboard_config, xlsfonts, xfontsel -, ttf_bitstream_vera, freefont_ttf, liberation_ttf_binary +, openssl, quartz-wm, fontconfig, xlsfonts, xfontsel +, ttf_bitstream_vera, freefont_ttf, liberation_ttf , shell ? "${bashInteractive}/bin/bash" }: @@ -37,7 +37,6 @@ # that point into the user's profile. let - shellEscape = x: "'${lib.replaceChars ["'"] [("'\\'" + "'")] x}'"; installer = writeScript "xquartz-install" '' NIX_LINK=$HOME/.nix-profile @@ -61,12 +60,11 @@ let sudo launchctl load -w /Library/LaunchDaemons/$daemonName ''; fontDirs = [ - xorg.fontbhttf xorg.fontbhlucidatypewriter100dpi xorg.fontbhlucidatypewriter75dpi ttf_bitstream_vera freefont_ttf - liberation_ttf_binary + liberation_ttf xorg.fontbh100dpi xorg.fontmiscmisc xorg.fontcursormisc @@ -97,10 +95,14 @@ let ]; }; in stdenv.mkDerivation { - name = "xquartz"; + name = "xquartz-${stdenv.lib.getVersion xorg.xorgserver}"; + buildInputs = [ ruby makeWrapper ]; + unpackPhase = "sourceRoot=."; - buildPhase = ":"; + + dontBuild = true; + installPhase = '' cp -rT ${xorg.xinit} $out chmod -R u+w $out @@ -109,8 +111,7 @@ in stdenv.mkDerivation { cp ${installer} $out/bin/xquartz-install - rm -r $out/LaunchAgents - rm -r $out/LaunchDaemons + rm -rf $out/LaunchAgents $out/LaunchDaemons fontsConfPath=$out/etc/X11/fonts.conf cp ${fontsConf} $fontsConfPath @@ -125,29 +126,26 @@ in stdenv.mkDerivation { --replace "@DEFAULT_CLIENT@" "${xterm}/bin/xterm" \ --replace "@XINIT@" "$out/bin/xinit" \ --replace "@XINITRC@" "$out/etc/X11/xinit/xinitrc" \ - --replace "@XKEYBOARD_CONFIG@" "${xkeyboard_config}/etc/X11/xkb" \ --replace "@FONTCONFIG_FILE@" "$fontsConfPath" wrapProgram $out/bin/Xquartz \ - --set XQUARTZ_X11 $out/Applications/XQuartz.app/Contents/MacOS/X11 \ - --set XKB_BINDIR "${xorg.xkbcomp}/bin" + --set XQUARTZ_X11 $out/Applications/XQuartz.app/Contents/MacOS/X11 defaultStartX="$out/bin/startx -- $out/bin/Xquartz" ruby ${./patch_plist.rb} \ - ${shellEscape (builtins.toXML { + ${lib.escapeShellArg (builtins.toXML { XQUARTZ_DEFAULT_CLIENT = "${xterm}/bin/xterm"; XQUARTZ_DEFAULT_SHELL = "${shell}"; XQUARTZ_DEFAULT_STARTX = "@STARTX@"; FONTCONFIG_FILE = "@FONTCONFIG_FILE@"; - XKB_BINDIR = "${xorg.xkbcomp}/bin"; })} \ $out/Applications/XQuartz.app/Contents/Info.plist substituteInPlace $out/Applications/XQuartz.app/Contents/Info.plist \ --replace "@STARTX@" "$defaultStartX" \ --replace "@FONTCONFIG_FILE@" "$fontsConfPath" - rm $out/lib/X11/xinit/privileged_startx.d/* + mkdir -p $out/lib/X11/xinit/privileged_startx.d cp ${./privileged} $out/lib/X11/xinit/privileged_startx.d/privileged substituteInPlace $out/lib/X11/xinit/privileged_startx.d/privileged \ --replace "@PATH@" "$out/bin:${env}" \ @@ -160,7 +158,7 @@ in stdenv.mkDerivation { --replace "@ENCODINGSDIR@" "${xorg.encodings}/share/fonts/X11/encodings" \ --replace "@MKFONTDIR@" "${xorg.mkfontdir}/bin/mkfontdir" \ --replace "@MKFONTSCALE@" "${xorg.mkfontscale}/bin/mkfontscale" \ - --replace "@FC_CACHE@" "${fontconfig}/bin/fc-cache" \ + --replace "@FC_CACHE@" "${fontconfig.bin}/bin/fc-cache" \ --replace "@FONTCONFIG_FILE@" "$fontsConfPath" cp ${./xinitrc} $out/etc/X11/xinit/xinitrc @@ -180,6 +178,7 @@ in stdenv.mkDerivation { --replace "@DEFAULT_CLIENT@" "${xterm}/bin/xterm" \ --replace "@FONTCONFIG_FILE@" "$fontsConfPath" ''; + meta = with lib; { platforms = platforms.darwin; maintainers = with maintainers; [ cstrahan ]; |