···88 sha256 = "1bmdr51wxiir595k2r6z9a7rcgm42kkgnr586xir7vdcndr3pwf8";
99 };
10101111+ # By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
1212+ # then stops downstream builds (mariadb in particular) from detecting it. This
1313+ # option should remove the prefix and give us a working jemalloc.
1414+ configureFlags = stdenv.lib.optional stdenv.isDarwin "--with-jemalloc-prefix=";
1515+1116 meta = with stdenv.lib; {
1217 homepage = http://www.canonware.com/jemalloc/index.html;
1318 description = "General purpose malloc(3) implementation";
···99 --max-redirs 20 \
1010 --retry 3 \
1111 --cacert $cacert/etc/ssl/certs/ca-bundle.crt \
1212+ -b cookies \
1313+ -c cookies \
1214 $curlOpts \
1315 $NIX_CURL_FLAGS"
14161517# We don't want the password to be on any program's argv, as it may be
1618# visible in /proc. Writing it to file with echo should be safe, since
1719# it's a shell builtin.
1818-echo "password=$password" > password
2020+echo -n "$password" > password
1921# Might as well hide the username as well.
2020-echo "username-or-email=$username" > username
2222+echo -n "$username" > username
2323+2424+# Get a CSRF token.
2525+csrf=$($curl $loginUrl | xidel - -e '//input[@id="csrf_token"]/@value')
21262227# Log in. We don't especially care about the result, but let's check if login failed.
2323-$curl -c cookies -d @username -d @password $loginUrl -D headers > /dev/null
2828+$curl --data-urlencode csrf_token="$csrf" \
2929+ --data-urlencode username_or_email@username \
3030+ --data-urlencode password@password \
3131+ -d action=Login \
3232+ $loginUrl -D headers > /dev/null
24332525-if grep -q 'Location: /' headers; then
3434+if grep -q 'Location: https://' headers; then
2635 # Now download. We need --insecure for this, but the sha256 should cover us.
2727- $curl -b cookies --insecure --location $url > $out
3636+ $curl --insecure --location $url > $out
3737+ set +x
2838else
3939+ set +x
2940 echo 'Login failed'
3041 echo 'Please set username and password with config.nix,'
3142 echo 'or /etc/nix/nixpkgs-config.nix if on NixOS.'
···3232 nativeBuildInputs = [ cmake pkgconfig ];
33333434 buildInputs = [
3535- ncurses openssl zlib pcre
3636- ] ++ stdenv.lib.optionals stdenv.isLinux [ jemalloc libaio systemd ]
3535+ ncurses openssl zlib pcre jemalloc
3636+ ] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd ]
3737 ++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
38383939 cmakeFlags = [
···4949 "-DWITH_ZLIB=system"
5050 "-DWITH_SSL=system"
5151 "-DWITH_PCRE=system"
5252+5353+ # On Darwin without sandbox, CMake will find the system java and attempt to build with java support, but
5454+ # then it will fail during the actual build. Let's just disable the flag explicitly until someone decides
5555+ # to pass in java explicitly. This should have no effect on Linux.
5656+ "-DCONNECT_WITH_JDBC=OFF"
5757+5858+ # Same as above. Somehow on Darwin CMake decides that we support GSS even though we aren't provding the
5959+ # library through Nix, and then breaks later on. This should have no effect on Linux.
6060+ "-DPLUGIN_AUTH_GSSAPI=NO"
6161+ "-DPLUGIN_AUTH_GSSAPI_CLIENT=NO"
5262 ]
5363 ++ optional stdenv.isDarwin "-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
5454- ++ optional (!stdenv.isLinux) "-DWITH_JEMALLOC=no" # bad build at least on Darwin
5564 ;
56655766 preConfigure = ''
+1-1
pkgs/servers/uwsgi/default.nix
···8181 NIX_CFLAGS_LINK = [ "-lsystemd" ];
82828383 meta = with stdenv.lib; {
8484- homepage = http://uwsgi-docs.readthedocs.org/en/latest/;
8484+ homepage = "http://uwsgi-docs.readthedocs.org/en/latest/";
8585 description = "A fast, self-healing and developer/sysadmin-friendly application container server coded in pure C";
8686 license = licenses.gpl2;
8787 maintainers = with maintainers; [ abbradar ];
···2020 enableParallelBuilding = true;
21212222 meta = with stdenv.lib; {
2323- homepage = http://www.virtualgl.org/;
2323+ homepage = "http://www.virtualgl.org/";
2424 description = "X11 GL rendering in a remote computer with full 3D hw acceleration";
2525 license = licenses.free; # many parts under different free licenses
2626 platforms = platforms.linux;