···1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, fetchpatch
5+, cmake
6+# Although we include upstream patches that fix compilation with fmt_10, we
7+# still use fmt_9 because this dependency is propagated, and many of spdlog's
8+# reverse dependencies don't support fmt_10 yet.
9+, fmt_9
10, staticBuild ? stdenv.hostPlatform.isStatic
1112# tests
···37 ];
3839 nativeBuildInputs = [ cmake ];
40+ propagatedBuildInputs = [ fmt_9 ];
4142 cmakeFlags = [
43 "-DSPDLOG_BUILD_SHARED=${if staticBuild then "OFF" else "ON"}"
···131 ${lib.optionalString mesBootstrap "ar x ${tinycc.libs}/lib/libtcc1.a"}
132 ar r $out/lib/gcc-lib/${hostPlatform.config}/${version}/libgcc.a *.o
133 cd ..
0134 ${lib.optionalString mesBootstrap ''
135- cp gcc/libgcc2.a $out/lib/libgcc2.a
136 ar x ${tinycc.libs}/lib/libtcc1.a
137 ar x ${tinycc.libs}/lib/libc.a
138 ar r $out/lib/gcc-lib/${hostPlatform.config}/${version}/libc.a libc.o libtcc1.o
···131 ${lib.optionalString mesBootstrap "ar x ${tinycc.libs}/lib/libtcc1.a"}
132 ar r $out/lib/gcc-lib/${hostPlatform.config}/${version}/libgcc.a *.o
133 cd ..
134+ cp gcc/libgcc2.a $out/lib/libgcc2.a
135 ${lib.optionalString mesBootstrap ''
0136 ar x ${tinycc.libs}/lib/libtcc1.a
137 ar x ${tinycc.libs}/lib/libc.a
138 ar r $out/lib/gcc-lib/${hostPlatform.config}/${version}/libc.a libc.o libtcc1.o
···1{ lib
2, stdenv
3, fetchzip
4-, fetchpatch
5, makeWrapper
6, nixosTests
7, pkg-config
···5051stdenv.mkDerivation rec {
52 pname = "trafficserver";
53- version = "9.1.4";
5455 src = fetchzip {
56 url = "mirror://apache/trafficserver/trafficserver-${version}.tar.bz2";
57- sha256 = "sha256-+iq+z+1JE6JE6OLcUwRRAe2/EISqb6Ax6pNm8GcB7bc=";
58 };
59-60- patches = [
61- # Adds support for NixOS
62- # https://github.com/apache/trafficserver/pull/7697
63- (fetchpatch {
64- url = "https://github.com/apache/trafficserver/commit/19d3af481cf74c91fbf713fc9d2f8b138ed5fbaf.diff";
65- sha256 = "0z1ikgpp00rzrrcqh97931586yn9wbksgai9xlkcjd5cg8gq0150";
66- })
67- ];
6869 # NOTE: The upstream README indicates that flex is needed for some features,
70 # but it actually seems to be unnecessary as of this commit[1]. The detection
···1{ lib
2, stdenv
3, fetchzip
04, makeWrapper
5, nixosTests
6, pkg-config
···4950stdenv.mkDerivation rec {
51 pname = "trafficserver";
52+ version = "9.2.1";
5354 src = fetchzip {
55 url = "mirror://apache/trafficserver/trafficserver-${version}.tar.bz2";
56+ hash = "sha256-Uq6CmbEJfN8ajpVmIutkDy2b8fZcT4wtprcWbMkaNkQ=";
57 };
0000000005859 # NOTE: The upstream README indicates that flex is needed for some features,
60 # but it actually seems to be unnecessary as of this commit[1]. The detection
···1-#TODO: It should be possible to build this from source, but it's currently a lot faster to just package the binaries.
2-{ lib, stdenv, fetchzip, zlib, autoPatchelfHook }:
3-stdenv.mkDerivation rec {
4- pname = "curl-impersonate-bin";
5- version = "v0.5.3";
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000067- src = fetchzip {
8- url = "https://github.com/lwthiker/curl-impersonate/releases/download/${version}/curl-impersonate-${version}.x86_64-linux-gnu.tar.gz";
9- sha256 = "sha256-+cH1swAIadIrWG9anzf0dcW6qyBjcKsUHFWdv75F49g=";
10- stripRoot = false;
0000000011 };
01213- nativeBuildInputs = [ autoPatchelfHook zlib ];
00001415- installPhase = ''
16- mkdir -p $out/bin
17- cp * $out/bin
18- '';
1920- meta = with lib; {
21- description = "curl-impersonate: A special build of curl that can impersonate Chrome & Firefox ";
22- homepage = "https://github.com/lwthiker/curl-impersonate";
23- license = with licenses; [ curl mit ];
24- maintainers = with maintainers; [ deliciouslytyped ];
25- platforms = platforms.linux; #TODO I'm unsure about the restrictions here, feel free to expand the platforms it if it works elsewhere.
00026 };
27}
···1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, fetchpatch
5+, callPackage
6+, buildGoModule
7+, installShellFiles
8+, symlinkJoin
9+, zlib
10+, sqlite
11+, cmake
12+, python3
13+, ninja
14+, perl
15+, autoconf
16+, automake
17+, libtool
18+, darwin
19+, cacert
20+, unzip
21+, go
22+, p11-kit
23+, nixosTests
24+}:
25+26+let
27+ makeCurlImpersonate = { name, target }: stdenv.mkDerivation rec {
28+ pname = "curl-impersonate-${name}";
29+ version = "0.5.4";
30+31+ src = fetchFromGitHub {
32+ owner = "lwthiker";
33+ repo = "curl-impersonate";
34+ rev = "v${version}";
35+ hash = "sha256-LBGWFal2szqgURIBCLB84kHWpdpt5quvBBZu6buGj2A=";
36+ };
37+38+ patches = [
39+ # Fix shebangs in the NSS build script
40+ # (can't just patchShebangs since makefile unpacks it)
41+ ./curl-impersonate-0.5.2-fix-shebangs.patch
42+ ];
43+44+ strictDeps = true;
45+46+ nativeBuildInputs = lib.optionals stdenv.isDarwin [
47+ # Must come first so that it shadows the 'libtool' command but leaves 'libtoolize'
48+ darwin.cctools
49+ ] ++ [
50+ installShellFiles
51+ cmake
52+ python3
53+ python3.pkgs.gyp
54+ ninja
55+ perl
56+ autoconf
57+ automake
58+ libtool
59+ unzip
60+ go
61+ ];
62+63+ buildInputs = [
64+ zlib
65+ sqlite
66+ ];
67+68+ configureFlags = [
69+ "--with-ca-bundle=${if stdenv.isDarwin then "/etc/ssl/cert.pem" else "/etc/ssl/certs/ca-certificates.crt"}"
70+ "--with-ca-path=${cacert}/etc/ssl/certs"
71+ ];
72+73+ buildFlags = [ "${target}-build" ];
74+ checkTarget = "${target}-checkbuild";
75+ installTargets = [ "${target}-install" ];
76+77+ doCheck = true;
78+79+ dontUseCmakeConfigure = true;
80+ dontUseNinjaBuild = true;
81+ dontUseNinjaInstall = true;
82+ dontUseNinjaCheck = true;
83+84+ postUnpack = lib.concatStringsSep "\n" (lib.mapAttrsToList (name: dep: "ln -sT ${dep.outPath} source/${name}") (lib.filterAttrs (n: v: v ? outPath) passthru.deps));
85+86+ preConfigure = ''
87+ export GOCACHE=$TMPDIR/go-cache
88+ export GOPATH=$TMPDIR/go
89+ export GOPROXY=file://${passthru.boringssl-go-modules}
90+ export GOSUMDB=off
91+92+ # Need to get value of $out for this flag
93+ configureFlagsArray+=("--with-libnssckbi=$out/lib")
94+ '';
95+96+ postInstall = ''
97+ # Remove vestigial *-config script
98+ rm $out/bin/curl-impersonate-${name}-config
99+100+ # Patch all shebangs of installed scripts
101+ patchShebangs $out/bin
102+103+ # Build and install completions for each curl binary
104+105+ # Patch in correct binary name and alias it to all scripts
106+ perl curl-*/scripts/completion.pl --curl $out/bin/curl-impersonate-${name} --shell zsh >$TMPDIR/curl-impersonate-${name}.zsh
107+ substituteInPlace $TMPDIR/curl-impersonate-${name}.zsh \
108+ --replace \
109+ '#compdef curl' \
110+ "#compdef curl-impersonate-${name}$(find $out/bin -name 'curl_*' -printf ' %f=curl-impersonate-${name}')"
111+112+ perl curl-*/scripts/completion.pl --curl $out/bin/curl-impersonate-${name} --shell fish >$TMPDIR/curl-impersonate-${name}.fish
113+ substituteInPlace $TMPDIR/curl-impersonate-${name}.fish \
114+ --replace \
115+ '--command curl' \
116+ "--command curl-impersonate-${name}$(find $out/bin -name 'curl_*' -printf ' --command %f')"
117+118+ # Install zsh and fish completions
119+ installShellCompletion $TMPDIR/curl-impersonate-${name}.{zsh,fish}
120+ '';
121+122+ preFixup = let
123+ libext = stdenv.hostPlatform.extensions.sharedLibrary;
124+ in ''
125+ # If libnssckbi.so is needed, link libnssckbi.so without needing nss in closure
126+ if grep -F nssckbi $out/lib/libcurl-impersonate-*${libext} &>/dev/null; then
127+ # NOTE: "p11-kit-trust" always ends in ".so" even when on darwin
128+ ln -s ${p11-kit}/lib/pkcs11/p11-kit-trust.so $out/lib/libnssckbi${libext}
129+ ${lib.optionalString stdenv.isLinux "patchelf --add-needed libnssckbi${libext} $out/lib/libcurl-impersonate-*${libext}"}
130+ fi
131+ '';
132+133+ disallowedReferences = [ go ];
134+135+ passthru = {
136+ deps = callPackage ./deps.nix {};
137+138+ boringssl-go-modules = (buildGoModule {
139+ inherit (passthru.deps."boringssl.zip") name;
140+141+ src = passthru.deps."boringssl.zip";
142+ vendorHash = "sha256-ISmRdumckvSu7hBXrjvs5ZApShDiGLdD3T5B0fJ1x2Q=";
143+144+ nativeBuildInputs = [ unzip ];
145+146+ proxyVendor = true;
147+ }).go-modules;
148+ };
149150+ meta = with lib; {
151+ description = "A special build of curl that can impersonate Chrome & Firefox";
152+ homepage = "https://github.com/lwthiker/curl-impersonate";
153+ license = with licenses; [ curl mit ];
154+ maintainers = with maintainers; [ deliciouslytyped lilyinstarlight ];
155+ platforms = platforms.unix;
156+ knownVulnerabilities = [
157+ "CVE-2023-32001" # fopen TOCTOU race condition - https://curl.se/docs/CVE-2023-32001.html
158+ "CVE-2022-43551" # HSTS bypass - https://curl.se/docs/CVE-2022-43551.html
159+ "CVE-2022-42916" # HSTS bypass - https://curl.se/docs/CVE-2022-42916.html
160+ ];
161+ };
162 };
163+in
164165+symlinkJoin rec {
166+ pname = "curl-impersonate";
167+ inherit (passthru.curl-impersonate-ff) version meta;
168+169+ name = "${pname}-${version}";
170171+ paths = [
172+ passthru.curl-impersonate-ff
173+ passthru.curl-impersonate-chrome
174+ ];
175176+ passthru = {
177+ curl-impersonate-ff = makeCurlImpersonate { name = "ff"; target = "firefox"; };
178+ curl-impersonate-chrome = makeCurlImpersonate { name = "chrome"; target = "chrome"; };
179+180+ updateScript = ./update.sh;
181+182+ inherit (passthru.curl-impersonate-ff) src;
183+184+ tests = { inherit (nixosTests) curl-impersonate; };
185 };
186}
···351 cups-kyodialog3 = cups-kyodialog; # Added 2022-11-12
352 cupsBjnp = throw "'cupsBjnp' has been renamed to/replaced by 'cups-bjnp'"; # Converted to throw 2022-02-22
353 cups_filters = throw "'cups_filters' has been renamed to/replaced by 'cups-filters'"; # Converted to throw 2022-02-22
0354 curlcpp = throw "curlcpp has been removed, no active maintainers and no usage within nixpkgs"; # Added 2022-05-10
355 curaByDagoma = throw "curaByDagoma has been removed from nixpkgs, because it was unmaintained and dependent on python2 packages"; # Added 2022-01-12
356 curaLulzbot = throw "curaLulzbot has been removed due to insufficient upstream support for a modern dependency chain"; # Added 2021-10-23
···1051 mariadb_108 = throw "mariadb_108 has been removed from nixpkgs, please switch to another version like mariadb_1010"; # Added 2022-05-10
1052 mariadb_109 = throw "mariadb_109 has been removed from nixpkgs, please switch to another version like mariadb_1010"; # Added 2022-05-10
1053 mariadb-client = hiPrio mariadb.client; #added 2019.07.28
01054 marp = throw "marp has been removed from nixpkgs, as it's unmaintained and has security issues"; # Added 2022-06-04
1055 matcha = throw "matcha was renamed to matcha-gtk-theme"; # added 2020-05-09
1056 mathics = throw "mathics has been removed from nixpkgs, as it's unmaintained"; # Added 2020-08-15
···351 cups-kyodialog3 = cups-kyodialog; # Added 2022-11-12
352 cupsBjnp = throw "'cupsBjnp' has been renamed to/replaced by 'cups-bjnp'"; # Converted to throw 2022-02-22
353 cups_filters = throw "'cups_filters' has been renamed to/replaced by 'cups-filters'"; # Converted to throw 2022-02-22
354+ curl-impersonate-bin = throw "'curl-impersonate-bin' has been replaced by 'curl-impersonate'"; # Added 2022-10-08
355 curlcpp = throw "curlcpp has been removed, no active maintainers and no usage within nixpkgs"; # Added 2022-05-10
356 curaByDagoma = throw "curaByDagoma has been removed from nixpkgs, because it was unmaintained and dependent on python2 packages"; # Added 2022-01-12
357 curaLulzbot = throw "curaLulzbot has been removed due to insufficient upstream support for a modern dependency chain"; # Added 2021-10-23
···1052 mariadb_108 = throw "mariadb_108 has been removed from nixpkgs, please switch to another version like mariadb_1010"; # Added 2022-05-10
1053 mariadb_109 = throw "mariadb_109 has been removed from nixpkgs, please switch to another version like mariadb_1010"; # Added 2022-05-10
1054 mariadb-client = hiPrio mariadb.client; #added 2019.07.28
1055+ markdown-pp = throw "markdown-pp was removed from nixpkgs, because the upstream archived it on 2021-09-02"; # Added 2023-07-22
1056 marp = throw "marp has been removed from nixpkgs, as it's unmaintained and has security issues"; # Added 2022-06-04
1057 matcha = throw "matcha was renamed to matcha-gtk-theme"; # added 2020-05-09
1058 mathics = throw "mathics has been removed from nixpkgs, as it's unmaintained"; # Added 2020-08-15