mirror of
https://codeberg.org/spire/nix.git
synced 2026-06-03 09:54:19 +02:00
update metamod
This commit is contained in:
parent
2c980455bb
commit
c437cdd54d
1 changed files with 20 additions and 11 deletions
|
|
@ -3,26 +3,38 @@
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
ambuild,
|
ambuild,
|
||||||
git,
|
git,
|
||||||
|
fetchpatch2,
|
||||||
|
symlinkJoin,
|
||||||
sdks ? {},
|
sdks ? {},
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) attrNames concatStringsSep;
|
inherit (builtins) attrNames concatStringsSep attrValues;
|
||||||
sdkNames = attrNames sdks;
|
sdkNames = attrNames sdks;
|
||||||
links = map (sdk: "ln -s ${sdks.${sdk}} hl2sdk-${sdk}") sdkNames;
|
combinedSdks = symlinkJoin {
|
||||||
|
name = "hl2sdk-${concatStringsSep "-" (attrNames sdks)}";
|
||||||
|
paths = attrValues sdks;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
multiStdenv.mkDerivation rec {
|
multiStdenv.mkDerivation rec {
|
||||||
pname = "metamod-source";
|
pname = "metamod-source";
|
||||||
version = "1.10";
|
version = "1.12";
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-Wno-error=class-memaccess -Wno-error=format-truncation";
|
NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation -Wno-error=ignored-attributes";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "alliedmodders";
|
owner = "alliedmodders";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
# rev = version;
|
rev = "02ee4a312525d17b2f6d2f21a953d06";
|
||||||
rev = "b8d1fd401d685fe711ad27e4e169742bd8a51978";
|
sha256 = "sha256-Q+MDJsB6bDWos04gkzr2QY8Bn+vDmHM0ljQy80FlKzM=";
|
||||||
sha256 = "sha256-8rQJ99f+XxD+rSP7OpyU5Ml+Wwp/SqJ9+B9EEWmcqDY=";
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(fetchpatch2 {
|
||||||
|
url = "https://github.com/alliedmodders/metamod-source/commit/144fbb52c48f7b0b8ba6ad4c92f55c3f2ff20456.patch";
|
||||||
|
sha256 = "sha256-7Atz5n9nSkX+qw546t2IosA9mdgkg67kuyXcdnUc2Uc=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
ambuild
|
ambuild
|
||||||
git
|
git
|
||||||
|
|
@ -30,13 +42,10 @@ in
|
||||||
|
|
||||||
hardeningDisable = ["all"];
|
hardeningDisable = ["all"];
|
||||||
|
|
||||||
CFLAGS = "-Wno-error=class-memaccess";
|
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
${concatStringsSep "\n" links}
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
python ../configure.py --sdks present --disable-auto-versioning
|
python ../configure.py --sdks ${concatStringsSep "," sdkNames} --hl2sdk-root=${combinedSdks} --disable-auto-versioning
|
||||||
ambuild
|
ambuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue