aboutsummaryrefslogtreecommitdiff
path: root/srcds-pkgs/extensions/SM-neocurl-ext.nix
blob: 8ac2e022adac18326ea87e7cb417cb39e649637f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# pkgsi686Linux.pkgsStatic.callPackage
{ lib, multiStdenv, fetchgit, ed
, metamod-source, sourcemod, ambuild, pkg-config, pkg-config-unwrapped
, pkgsi686Linux
}:
multiStdenv.mkDerivation rec {
  pname = "SM-neocurl-ext";
  version = "2.0.1";
  
  src = fetchgit {
    url = "https://git.partyvan.io/${pname}";
    rev = "0f0f543d79966fc938b3205e5273820e4c2edc56";
    hash = "sha256-zRZddNWc6rl4E/StpTuwtMoL0GVuPRAbcihJ0ViKddo=";
  };

  patchPhase = ''
    ed AMBuilder <<EOF
    g/pkg_config/s/static/dynamic/
    w
    EOF
  '';

  nativeBuildInputs = [ ed ambuild sourcemod pkg-config pkg-config-unwrapped ];
  buildInputs = with pkgsi686Linux; [ openssl curl curl.dev ];

  configurePhase = ''
    mkdir build
    cd build
    python ../configure.py \
      --sm-path ${sourcemod.src} \
      --mms-path ${metamod-source.src}
  '';

  buildPhase = ''
    ambuild
  '';

  installPhase = ''
    mkdir -p $out
    cp -r package $out/share
  '';
}