Skip to content

Commit

Permalink
darkradiant: init at 3.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
theobori committed Dec 16, 2024
1 parent 6167355 commit 8999c8e
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions pkgs/by-name/da/darkradiant/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
zlib,
libjpeg,
wxGTK32,
libxml2,
libsigcxx,
libpng,
openal,
libvorbis,
eigen,
ftgl,
freetype,
glew,
libX11,
glib,
python3,
asciidoctor,
libgit2,
apple-sdk_11,
wrapGAppsHook3,
installShellFiles,
buildPlugins ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "darkradiant";
version = "3.9.0";

src = fetchFromGitHub {
owner = "codereader";
repo = "DarkRadiant";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-y0VzTnHobW36/25/nTV49OKnUMpnsjImioMdNKoTyYA=";
};

nativeBuildInputs = [
cmake
pkg-config
asciidoctor
wrapGAppsHook3
wxGTK32
installShellFiles
];

buildInputs =
[
zlib
libjpeg
wxGTK32
libxml2
libsigcxx
libpng
openal
libvorbis
eigen
ftgl
freetype
glew
glib
libgit2
python3
]
++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_11
];

doCheck = true;

cmakeFlags = [
# Disabling dynamic rpath, otherwise it will not found the needed libraries within $out/lib/darkradiant
(lib.cmakeBool "ENABLE_RELOCATION" false)
(lib.cmakeBool "ENABLE_DM_PLUGINS" buildPlugins)
];

postPatch = ''
substituteInPlace radiantcore/CMakeLists.txt \
--replace-fail "\$ORIGIN/.." "$out/lib/darkradiant"
'';

postInstall = ''
installManPage ../man/darkradiant.1
'';

meta = {
description = "Open-source level editor for Doom 3 and The Dark Mod";
homepage = "https://github.com/codereader/DarkRadiant";
changelog = "https://github.com/codereader/DarkRadiant/releases";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ theobori ];
platforms = lib.platforms.unix;
mainProgram = "darkradiant";
broken = stdenv.hostPlatform.isDarwin;
};
})

0 comments on commit 8999c8e

Please sign in to comment.