From 56449e59d7aabd1c06fb67a51a1e129b55cb9270 Mon Sep 17 00:00:00 2001 From: yuuko Date: Thu, 29 Aug 2024 21:51:04 -0700 Subject: break out of system config --- srcds-pkgs/bad/libfinite.nix | 20 ++++++++++++++++++++ srcds-pkgs/bad/mysql_5_5.nix | 14 ++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 srcds-pkgs/bad/libfinite.nix create mode 100644 srcds-pkgs/bad/mysql_5_5.nix (limited to 'srcds-pkgs/bad') diff --git a/srcds-pkgs/bad/libfinite.nix b/srcds-pkgs/bad/libfinite.nix new file mode 100644 index 0000000..300bd18 --- /dev/null +++ b/srcds-pkgs/bad/libfinite.nix @@ -0,0 +1,20 @@ +# https://sourceware.org/git/?p=glibc.git;a=commit;h=7bdb921d +{ runCommandWith, multiStdenv, writeText }: +runCommandWith { + stdenv = multiStdenv; + name = "libfinite.a"; +} '' + cc -o finite.o -m32 -c ${writeText "finite.c" '' + #include + /* metamod */ + double __pow_finite(double x, double y) { return pow(x, y); } + /* sourcemod */ + float __acosf_finite(float x) { return acosf(x); }; + double __acos_finite(double x) { return acos(x); }; + double __asin_finite(double x) { return asin(x); }; + float __atan2f_finite(double y, double x) { return atan2f(y, x); } + double __atan2_finite(double y, double x) { return atan2(y, x); } + double __log_finite(double x) { return log(x); } + ''} + ar rcs $out finite.o +'' diff --git a/srcds-pkgs/bad/mysql_5_5.nix b/srcds-pkgs/bad/mysql_5_5.nix new file mode 100644 index 0000000..bd7534c --- /dev/null +++ b/srcds-pkgs/bad/mysql_5_5.nix @@ -0,0 +1,14 @@ +# TODO: find out if sourcemod is lying about needing to build against 5.5 +{ lib, stdenv, fetchurl, ncurses, cmake }: +stdenv.mkDerivation rec { + pname = "mysql"; + version = "5.5.62"; + + src = fetchurl { + url = "https://downloads.mysql.com/archives/get/p/23/file/mysql-${version}.tar.gz"; + hash = "sha256-seeFO8HwSqv2dx4K2UfzWsjSN/SzXQcG0QlclSb/mdc="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ ncurses ]; +} -- cgit v1.2.3