ecwolf: cleanup, format

launchpad/nixpkgs/master
Sandro Jäckel 3 years ago
parent 8a07b0d732
commit b2bdf29ced
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
  1. 29
      pkgs/games/ecwolf/default.nix

@ -1,14 +1,5 @@
{stdenv, lib, fetchurl, makeDesktopItem, copyDesktopItems, cmake, pkg-config, zlib, bzip2, libjpeg, SDL, SDL_mixer, gtk2}:
let
desktopItem = makeDesktopItem {
name = "ecwolf";
exec = "ecwolf";
comment = "Enhanced Wolfenstein 3D port";
desktopName = "Wolfenstein 3D";
categories = "Game;";
};
in
{ stdenv, lib, fetchurl, makeDesktopItem, copyDesktopItems, cmake, pkg-config, zlib, bzip2, libjpeg, SDL, SDL_mixer, gtk2 }:
stdenv.mkDerivation rec {
pname = "ecwolf";
version = "1.3.3";
@ -18,10 +9,18 @@ stdenv.mkDerivation rec {
sha256 = "1sbdv672dz47la5a5qwmdi1v258k9kc5dkx7cdj2b6gk8nbm2srl";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ zlib bzip2 libjpeg SDL SDL_mixer gtk2 copyDesktopItems ];
nativeBuildInputs = [ cmake copyDesktopItems pkg-config ];
buildInputs = [ zlib bzip2 libjpeg SDL SDL_mixer gtk2 ];
desktopItems = [ desktopItem ];
desktopItems = [
(makeDesktopItem {
name = "ecwolf";
exec = "ecwolf";
comment = "Enhanced Wolfenstein 3D port";
desktopName = "Wolfenstein 3D";
categories = "Game;";
})
];
# Change the location where the ecwolf executable looks for the ecwolf.pk3
# file.
@ -35,7 +34,7 @@ stdenv.mkDerivation rec {
sed -i -e "s|ecwolf.pk3|$out/share/ecwolf/ecwolf.pk3|" src/version.h
''
# Disable app bundle creation on Darwin. It fails, and it is not needed to run it from the Nix store
+ lib.optionalString (stdenv.isDarwin) ''
+ lib.optionalString stdenv.isDarwin ''
sed -i -e "s|include(\''${CMAKE_CURRENT_SOURCE_DIR}/macosx/install.txt)||" src/CMakeLists.txt
'';

Loading…
Cancel
Save