dosbox-staging: writeShellScript into makeWrapper

+5 -10
+5 -10
pkgs/misc/emulators/dosbox-staging/default.nix
··· 1 - { stdenv, lib, fetchFromGitHub, writeShellScript 2 - , gtest, meson, ninja, pkg-config 1 + { lib, fetchFromGitHub, stdenv 2 + , gtest, makeWrapper, meson, ninja, pkg-config 3 3 , alsa-lib, fluidsynth, libGL, libGLU, libogg, libpng, munt, opusfile, SDL2, SDL2_net 4 4 }: 5 5 6 - let 7 - dosbox_run = writeShellScript "dosbox" '' 8 - $(dirname "$0")/dosbox-staging "$@" 9 - ''; 10 - 11 - in stdenv.mkDerivation rec { 6 + stdenv.mkDerivation rec { 12 7 pname = "dosbox-staging"; 13 8 version = "0.77.1"; 14 9 ··· 19 14 sha256 = "07jwmmm1bhfxavlhl854cj8l5iy5hqx5hpwkkjbcwqg7yh9jfs2x"; 20 15 }; 21 16 22 - nativeBuildInputs = [ gtest meson ninja pkg-config ]; 17 + nativeBuildInputs = [ gtest makeWrapper meson ninja pkg-config ]; 23 18 buildInputs = [ alsa-lib fluidsynth libGL libGLU libogg libpng munt opusfile SDL2 SDL2_net ]; 24 19 25 20 hardeningDisable = [ "format" ]; ··· 39 34 # binary to be named dosbox, but get out of the way of vanilla dosbox if the user 40 35 # desires to install that as well. 41 36 mv $out/bin/dosbox $out/bin/${pname} 42 - cp -r ${dosbox_run} "$out/bin/dosbox" 37 + makeWrapper $out/bin/dosbox-staging $out/bin/dosbox 43 38 cp $out/share/man/man1/dosbox.1.gz $out/share/man/man1/${pname}.1.gz 44 39 ''; 45 40