www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit ee5d1d4eee5820be0ddc94066c0a7a814377d4d4
parent 08873181afbf5e08810f670c15e7ee4cad6ee3d8
Author: Joe Hermaszewski <git@monoid.al>
Date:   Sat,  7 Apr 2018 15:46:06 +0800

Make nixVulkanIntel more like the other derivations

Diffstat:
Mdefault.nix | 46+++++++++++++++++++++++++---------------------
1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/default.nix b/default.nix @@ -75,26 +75,30 @@ rec { chmod u+x $out/bin/nixGLIntel ''; - nixVulkanIntel = writeTextFile rec { - name = "nixVulkanIntel-${version}"; - executable = true; - destination = "/bin/nixVulkanIntel"; - checkPhase = ''${shellcheck}/bin/shellcheck "$out/bin/nixVulkanIntel"''; - text = '' - #!/usr/bin/env bash - if [ ! -z "$LD_LIBRARY_PATH" ]; then - echo "Warning, ${name} overwriting existing LD_LIBRARY_PATH" 1>&2 - fi - export LD_LIBRARY_PATH=${lib.makeLibraryPath [ - zlib - libdrm - xorg.libX11 - xorg.libxcb - xorg.libxshmfence - wayland - gcc.cc - ]} - exec "$@" + nixVulkanIntel = runCommand "nixVulkanIntel-${version}" { + meta = with pkgs.stdenv.lib; { + description = "A tool to launch Vulkan application on system other than NixOS - Intel version"; + homepage = "https://github.com/guibou/nixGL"; + }; + } '' + mkdir -p "$out/bin" + cat > "$out/bin/nixVulkanIntel" << EOF + #!/usr/bin/env bash + if [ ! -z "$LD_LIBRARY_PATH" ]; then + echo "Warning, nixVulkanIntel overwriting existing LD_LIBRARY_PATH" 1>&2 + fi + export LD_LIBRARY_PATH=${lib.makeLibraryPath [ + zlib + libdrm + xorg.libX11 + xorg.libxcb + xorg.libxshmfence + wayland + gcc.cc + ]} + exec "\$@" + EOF + chmod u+x "$out/bin/nixVulkanIntel" + ${shellcheck}/bin/shellcheck "$out/bin/nixVulkanIntel" ''; - }; }