nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation (finalAttrs: {
8 pname = "pacparser";
9 version = "1.4.5";
10
11 src = fetchFromGitHub {
12 owner = "manugarg";
13 repo = "pacparser";
14 rev = "v${finalAttrs.version}";
15 hash = "sha256-X842+xPjM404aQJTc2JwqU4vq8kgyKhpnqVu70pNLks=";
16 };
17
18 patches = [
19 # jsapi.c:96:35: error: passing argument 5 of 'TryArgumentFormatter' from incompatible pointer type []
20 # 96 | #define JS_ADDRESSOF_VA_LIST(ap) (&(ap))
21 # suggested by https://github.com/manugarg/pacparser/issues/194#issuecomment-2262030966
22 ./fix-invalid-pointer-type.patch
23 ];
24
25 makeFlags = [
26 "NO_INTERNET=1"
27 "PREFIX=${placeholder "out"}"
28 ];
29
30 enableParallelBuilding = true;
31
32 preConfigure = ''
33 patchShebangs tests/runtests.sh
34 cd src
35 '';
36
37 hardeningDisable = [ "format" ];
38
39 meta = {
40 description = "Library to parse proxy auto-config (PAC) files";
41 homepage = "https://pacparser.manugarg.com/";
42 license = lib.licenses.lgpl3;
43 platforms = lib.platforms.all;
44 maintainers = [ ];
45 mainProgram = "pactester";
46 };
47})