nixpkgs-suyu/pkgs/servers
Austin Seipp 6054dabc11 foundationdb: rework python bindings, build system
FoundationDB uses Python at build time for some code generation.
However, it also has the official python bindings inside the source code
too, and the code for the Python bindings has some of it auto-generated
at compile time.

This made building python packages unattractive: we want to use the
source code generated from the FoundationDB build, but we don't want to
rebuild it. Previously we would override the 'python' input to the
FoundationDB module, but this meant we would do a complete rebuild, as
it was a necessary build time dependency, even though the resulting
generated code itself would not change. Furthermore, FoundationDB
versions < 6.0 don't properly support Python 3 *for the build system*,
though the bindings supported it, so that caused build failures. But the
first effect is the worst: it meant building separate python2 and
python3 packages implied two complete rebuilds of a single FoundationDB
version. This meant rather than 3 FDB builds, we'd do 3*N where N = the
number of major Python versions we support.

Finally, because we did not use pip to generate a wheel that we install
with metadata recorded for the installation, the FoundationDB python
package couldn't be used as an input to other setup.py-based packages:
there would be no recorded metadata in the dist-info folder which would
say this is the foundationdb package. This greatly limits its utility.

To fix all this, we do a few things:

  - Apply some patches to fix the build system with Python 3.x for
    older FoundationDB versions. (This is nice if end-users have
    overridden the global Python version for some reason.)
  - Move python directly into nativeBuildInputs, so it is only a
    build time dependency.
  - Take the python source code from the ./bindings directory and
    tar it up use later after the build is done, so we get to keep
    the generated code. This is the new 'pythonsrc' output from the
    build. This code doesn't change based on whether or not the input
    or resulting package is using Python 2 or 3, it's totally
    deterministic.
  - The build system also patches up the python source code a little,
    so it can be installed directly with setup.py (it needs a little
    stuff that it normally expects the build system to do.)
  - Rework the python package to a separate file that uses
    buildPythonPackage directly. Because the source code is already
    prepared, it needs almost nothing else. Furthermore, this kills
    the override itself for the foundationdb package, meaning rebuilds
    are no longer needed.
  - This package is very simple and just uses foundationdb.pythonsrc
    as its source input. It also ensures a link to libfdb_c.so can
    be found by ctypes (using substituteInPlace)
  - python-packages.nix now just uses callPackage directly.

The net effect of this is, most importantly, that python packages do not
imply a full rebuild of the server source code: building python2 and
python3 packages from a version of FoundationDB now does not need to
override the foundationdb python input, reducing the number of needless
builds. They instead just run setup.py with the given version as input.

The second biggest effect is that wheel metadata is recorded correctly,
meaning dependent-python-packages that want to use the FoundationDB
bindings e.g. from PyPi should now work fine with buildPythonPackage.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-11-16 20:34:19 -06:00
..
amqp rabbitmq-server: 3.6.10 -> 3.7.8 2018-09-25 11:19:23 +02:00
apache-kafka apacheKafka_0_10: 0.10.2.1 -> 0.10.2.2 2018-09-15 10:09:21 -04:00
apcupsd
asterisk tree-wide: fix all revs of fetchsvn 2018-11-08 05:29:47 +00:00
atlassian atlassian-jira: 7.12.1 -> 7.12.3 2018-10-27 11:29:54 +02:00
beanstalkd
bird Merge branch 'no-toPath' 2018-09-06 08:09:53 -04:00
brickd
caddy pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
cayley
clickhouse clickhouse: 18.12.17 -> 18.14.9 2018-11-10 01:02:57 -08:00
cloud-print-connector
computing slurm: 18.08.1.1 -> 18.08.3.1 2018-10-27 22:17:56 +02:00
confluent confluent: init at 4.1.1-2.11 (#43137) 2018-08-01 21:35:42 +02:00
consul consul: 0.9.3 -> 1.3.0. 2018-11-03 18:39:46 +01:00
corosync corosync: update RDMA support to rdma-core 2018-10-21 23:18:40 +02:00
coturn coturn: mark broken on darwin 2018-10-21 22:29:02 +02:00
couchpotato
dante
dex
dgraph
dico dico: 2.6 -> 2.7 2018-10-03 13:00:39 -07:00
dict treewide: Make configureFlags lists 2018-08-03 17:06:03 -04:00
diod diod: add license 2018-08-05 16:26:02 +02:00
dns Merge pull request #50189 from r-ryantm/auto-update/bind 2018-11-10 19:16:21 +01:00
elasticmq
emby nixos/emby : delete programData hardcode in pkg 2018-10-08 14:51:49 +02:00
etcd pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
exhibitor pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fcgiwrap
felix
fingerd/bsd-fingerd bsd_fingerd: add license 2018-08-30 22:29:17 +02:00
firebird pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
foswiki treewide: fix build with disallowed aliases (#43872) 2018-07-21 22:03:24 -04:00
foundationdb foundationdb: rework python bindings, build system 2018-11-16 20:34:19 -06:00
freeradius freeradius: add rest module and multiple outputs 2018-08-01 22:24:47 +02:00
ftp bftpd: 4.9 -> 5.0 2018-11-10 08:19:17 -08:00
gnatsd gnatsd: init at 1.2.0 2018-08-19 11:48:27 -07:00
gopher/gofish
gotty pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
gpm gpm: patch to fix w/musl, good for general use 2018-07-18 22:17:44 -05:00
gpsd pps-tools: init at 1.0.2, enable for chrony, gpsd, ntp (#42889) 2018-07-04 11:28:07 +00:00
h2 pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
hbase pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
hitch
holochain-go Add: GoEndian dependancy 2018-07-06 14:00:22 +01:00
home-assistant appdaemon: 3.0.1 -> 3.0.2 (#49581) 2018-11-16 15:06:01 +01:00
http nginxMainline: 1.15.5 -> 1.15.6 2018-11-15 17:52:05 +00:00
hydron hydron: 2018-08-18 -> 2018-09-25 2018-09-25 09:18:38 -05:00
hylafaxplus hylafaxplus: 5.6.0 -> 5.6.1 (#47045) 2018-09-22 18:25:44 +02:00
icecast icecast: 2.4.3 -> 2.4.4 2018-11-01 21:48:22 +01:00
identd nullidentdmod: Init at 1.3 (#46040) 2018-09-05 11:09:55 +02:00
interlock pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
irc charybdis: 4.1 -> 4.1.1 2018-08-24 12:54:44 -07:00
irker
isso isso: 0.10.6 -> 0.11.1 (#50310) 2018-11-13 16:52:33 +01:00
jackett jackett: 0.10.420 -> 0.10.434 2018-11-13 14:12:50 +01:00
jetbrains youtrack: 2018.1.41051 -> 2018.2.44329 2018-08-09 21:46:21 +03:00
kippo kippo: mark as broken 2018-09-13 00:58:57 +02:00
kwakd
ldap/389 pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
lidarr lidarr: 0.3.1.471 -> 0.4.0.524 2018-10-04 13:52:33 +02:00
limesurvey
livepeer treewide: http -> https 2018-07-19 18:12:04 -07:00
mail Merge pull request #50022 from Ekleog/opensmtpd-extras-6.4.0 2018-11-12 12:30:21 +01:00
matrix-synapse matrix-synapse: prepare for python3 switch 2018-11-08 16:23:32 +08:00
matterbridge matterbridge: 1.7.1 -> 1.11.0 2018-08-06 12:25:25 +02:00
mattermost mattermost: 5.3.0 -> 5.4.0 2018-10-18 17:34:43 -07:00
mediatomb
meguca meguca: 2018-08-02 -> 2018-08-13 2018-08-15 22:22:11 -05:00
memcached memcached: 1.5.11 -> 1.5.12 2018-11-09 10:40:25 -08:00
mesos-dns pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
metabase metabase: 0.30.3 -> 0.30.4 2018-10-14 04:31:34 -07:00
meteor
miniflux miniflux: init at 2.0.12 2018-10-29 13:32:55 +02:00
minio minio: 2018-05-11T00-29-24Z -> 2018-07-31T02-11-47Z 2018-08-01 00:36:44 +02:00
mirrorbits pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
misc client-ip-echo: 0.1.0.1 -> 0.1.0.3 2018-11-07 21:55:47 -05:00
monitoring grafana: 5.3.2 -> 5.3.4 (#50311) 2018-11-13 16:49:53 +01:00
mpd mpd_clientlib: 2.15 -> 2.16 2018-10-14 07:28:33 -07:00
mqtt/mosquitto mosquitto: enable websockets support 2018-11-12 15:47:26 +08:00
nas flex_2_6_1: delete in favor of flex 2.6.4 (#50292) 2018-11-13 01:59:55 +00:00
nats-streaming-server nats-streaming-server: init at 0.11.0 2018-09-08 23:11:24 +00:00
neard
news/leafnode treewide: Make configureFlags lists 2018-08-03 17:06:03 -04:00
nextcloud nextcloud: 14.0.1 -> 14.0.3 2018-10-14 10:47:05 +00:00
nosql Merge pull request #50202 from r-ryantm/auto-update/arangodb 2018-11-15 15:51:24 +00:00
nsq pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
oauth2_proxy
openafs openafs: 1.6.22.2 -> 1.6.23 2018-10-17 17:55:10 +02:00
openxpki buildPerlPackage -> perlPackages.buildPerlPackage 2018-10-14 09:10:41 +02:00
osrm-backend osrm-backend: 5.18.0 -> 5.19.0 (#49108) 2018-10-30 00:31:45 +01:00
owncloud [bot] treewide: remove unused 'args@' in lambdas 2018-07-20 19:54:05 +00:00
p910nd
pies
plex plex: 1.13.8.5395 -> 1.13.9.5456 2018-11-04 03:36:10 +03:00
plexpy
polipo
prayer
ps3netsrv
pulseaudio Merge pull request #43160 from jtojnar/pulseaudio-12 2018-07-29 22:40:54 +02:00
quagga
radarr radarr: 0.2.0.995 -> 0.2.0.1120 (#46185) 2018-09-12 22:52:09 +02:00
radicale radicale: 2.1.10 -> 2.1.11 2018-11-06 11:11:10 +01:00
rainloop rainloop: Init at 1.12.1 2018-08-07 19:01:39 +02:00
rippled pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
roundcube roundcube: simplify using fetchzip 2018-09-26 15:34:46 +02:00
rpcbind rpcbind: switch to upstream git repo, drop patch 2018-08-31 00:04:15 +02:00
rt rt: 4.4.2 -> 4.4.3 (#44685) 2018-08-08 15:33:41 +02:00
sabnzbd sabnzbd: add sabyenc to python env 2018-07-27 19:02:11 +01:00
samba samba3: add license 2018-11-14 22:58:39 +01:00
search groonga: 8.0.7 -> 8.0.8 2018-11-09 18:30:01 -08:00
serf
serviio
shairplay
shairport-sync shairport-sync: 3.2.1 -> 3.2.2 2018-10-24 15:23:05 +02:00
shellinabox
shishi treewide: Replace meta.available checks in shouldUsePackages copypasta 2018-09-28 15:01:00 +03:00
sickbeard sickrage: init at v2018.07.21-1 2018-09-13 19:11:18 +02:00
silc-server
simplehttp2server
sip Take me (viric) out of most maintenance 2018-07-22 21:50:19 +02:00
sks sks: Adapt the package to NixOS (pkgs.db provides only "db_stat") 2018-09-08 16:24:05 +02:00
skydns skydns: add license 2018-08-04 18:34:51 +02:00
slimserver buildPerlPackage -> perlPackages.buildPerlPackage 2018-10-14 09:10:41 +02:00
smcroute smcroute: 2.4.2 -> 2.4.3 2018-11-08 12:41:42 -08:00
softether
sonarr sonarr: 2.0.0.5228 -> 2.0.0.5252 2018-10-14 09:00:45 +02:00
sql monetdb: 11.29.7 -> 11.31.11 2018-11-16 23:33:26 +01:00
squid
sslh treewide: http -> https sources (#42676) 2018-06-28 20:43:35 +02:00
teleport
traefik traefik: 1.7.0 -> 1.7.1 (#47660) 2018-10-02 15:58:43 +02:00
trezord trezord: 2.0.19 -> 2.0.24 2018-10-17 16:45:10 -04:00
tt-rss tt-rss-theme-feedly: Init at 1.4.0 (#44634) 2018-08-07 23:33:15 +02:00
tvheadend tvheadend: 4.2.6 -> 4.2.7 2018-10-14 09:49:41 +02:00
u9fs
udpt
uftp uftp: 4.9.7 -> 4.9.8 (#46175) 2018-09-12 22:48:50 +02:00
uhub uhub: fix build for aarch64 2018-10-12 13:44:22 +02:00
ums
unfs3
unifi unifiStable: 5.8.30 -> 5.9.29 2018-10-17 14:53:39 +08:00
uwsgi uwsgi: 2.0.17 -> 2.0.17.1 2018-07-10 21:21:55 -07:00
varnish varnish6: 6.1.0 -> 6.1.1 2018-11-08 07:17:01 -08:00
web-apps frab: rack: 1.6.4 -> 1.6.11 2018-11-06 09:23:23 +00:00
webmetro webmetro: init => unstable-20180426 (#39673) 2018-05-20 23:27:34 +02:00
x11 xorg: init xf86-video-vboxvideo at 1.0.0 2018-11-12 20:29:14 +01:00
xinetd
xmpp pyIRCt,pyMAILt: add license 2018-11-15 00:13:52 +01:00
zookeeper zookeeper: 3.4.12 -> 3.4.13 2018-08-07 20:39:57 -07:00