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