mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 16:24:10 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, cmake, SDL2, libGLU, libGL, zlib, libjpeg, libogg, libvorbis
|
|
, openal, curl, copyDesktopItems, makeDesktopItem }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "dhewm3";
|
|
version = "1.5.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dhewm";
|
|
repo = "dhewm3";
|
|
rev = version;
|
|
sha256 = "sha256-losqnxnjRPOczjrRPyyOxCeg9TNScXLcXADgo9Bxm5k=";
|
|
};
|
|
|
|
# Add libGLU libGL linking
|
|
patchPhase = ''
|
|
sed -i 's/\<idlib\()\?\)$/idlib GL\1/' neo/CMakeLists.txt
|
|
'';
|
|
|
|
preConfigure = ''
|
|
cd "$(ls -d dhewm3-*.src)"/neo
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake copyDesktopItems ];
|
|
buildInputs = [ SDL2 libGLU libGL zlib libjpeg libogg libvorbis openal curl ];
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "dhewm3";
|
|
exec = "dhewm3";
|
|
desktopName = "Doom 3";
|
|
categories = [ "Game" ];
|
|
})
|
|
];
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/dhewm/dhewm3";
|
|
description = "Doom 3 port to SDL";
|
|
mainProgram = "dhewm3";
|
|
license = lib.licenses.gpl3;
|
|
maintainers = [ ];
|
|
platforms = with platforms; linux;
|
|
};
|
|
}
|