fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 gtest,
7 fmt,
8 cmake,
9 ninja,
10 installShellFiles,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "ericw-tools";
15 version = "0.18.1";
16
17 src = fetchFromGitHub {
18 owner = "ericwa";
19 repo = "ericw-tools";
20 rev = "v${version}";
21 sha256 = "11sap7qv0rlhw8q25azvhgjcwiql3zam09q0gim3i04cg6fkh0vp";
22 };
23 postUnpack = ''
24 pushd source/3rdparty
25 ln -s ${fmt.src} fmt
26 ln -s ${gtest.src} googletest
27 popd
28 '';
29
30 patches = [
31 (fetchpatch {
32 url = "https://github.com/ericwa/ericw-tools/commit/c9570260fa895dde5a21272d76f9a3b05d59efdd.patch";
33 hash = "sha256-dZr2LWuJBAIT//XHXYEz2vhaK2mxtxkSJ4IQla8OXKI=";
34 })
35 ];
36
37 nativeBuildInputs = [
38 cmake
39 ninja
40 installShellFiles
41 ];
42
43 outputs = [
44 "out"
45 "doc"
46 "man"
47 ];
48 installPhase = ''
49 runHook preInstall
50
51 mkdir -p $out/bin
52 for TOOL in bspinfo bsputil light qbsp vis ; do
53 cp -a $TOOL/$TOOL $out/bin/
54 done
55
56 installManPage ../man/*.?
57
58 mkdir -p $doc/share/doc/ericw-tools
59 cp -a ../README.md ../changelog.txt $doc/share/doc/ericw-tools/
60
61 runHook postInstall
62 '';
63
64 postPatch = ''
65 substituteInPlace CMakeLists.txt \
66 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)"
67 substituteInPlace bspinfo/CMakeLists.txt \
68 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)"
69 substituteInPlace bsputil/CMakeLists.txt \
70 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)"
71 substituteInPlace light/CMakeLists.txt \
72 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)"
73 substituteInPlace qbsp/CMakeLists.txt \
74 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)"
75 substituteInPlace vis/CMakeLists.txt \
76 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)"
77 substituteInPlace man/CMakeLists.txt \
78 --replace-fail "cmake_minimum_required (VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)"
79 '';
80
81 meta = {
82 homepage = "https://ericwa.github.io/ericw-tools/";
83 description = "Map compile tools for Quake and Hexen 2";
84 license = lib.licenses.gpl3Plus;
85 maintainers = with lib.maintainers; [ astro ];
86 platforms = lib.platforms.unix;
87 };
88}