Commit Graph
223792 Commits
Author SHA1 Message Date
adisbladis 2ed1477d86 Merge pull request #82453 from adisbladis/nix-pythonprefix
Python: introduce NIX_PYTHONPREFIX in order to set site.PREFIXES
2020-03-14 21:42:01 +00:00
Frederik Rietdijk 7447fff95a Fix sys.prefix in case of a Nix env
The prefix will now be correct in case of Nix env.

Note, however, that creating a venv from a Nix env still does not function. This does not seem to be possible
with the current approach either, because venv will copy or symlink our Python wrapper. In case it symlinks
(the default) it won't see a pyvenv.cfg. If it is copied I think it should function but it does not...
2020-03-14 21:39:32 +00:00
adisbladis 753122388d Python: Add integration test verifying NIX_PYTHONPATH with Mypy 2020-03-14 21:39:32 +00:00
adisbladis 05571d3059 Python Add test for NIX_PYTHONPREFIX 2020-03-14 21:39:31 +00:00
adisbladis d88a7735d2 Python: introduce NIX_PYTHONPREFIX in order to set site.PREFIXES
This is needed in case of `python.buildEnv` to make sure site.PREFIXES
does not only point to the unwrapped executable prefix.

--------------------------------------------------------------------------------

This PR is a story where your valiant hero sets out on a very simple adventure but ends up having to slay dragons, starts questioning his own sanity and finally manages to gain enough knowledge to slay the evil dragon and finally win the proverbial price.

It all started out on sunny spring day with trying to tackle the Nixops plugin infrastructure and make that nice enough to work with.

Our story begins in the shanty town of [NixOps-AWS](https://github.com/nixos/nixops-aws) where [mypy](http://mypy-lang.org/) type checking has not yet been seen.

As our deuteragonist (@grahamc) has made great strides in the capital city of [NixOps](https://github.com/nixos/nixops) our hero wanted to bring this out into the land and let the people rejoice in reliability and a wonderful development experience.

The plugin work itself was straight forward and our hero quickly slayed the first small dragon, at this point things felt good and our hero thought he was going to reach the town of NixOps-AWS very quickly.

But alas! Mypy did not want to go, it said:
`Cannot find implementation or library stub for module named 'nixops'`

Our hero felt a small sliver of life escape from his body. Things were not going to be so easy.

After some frustration our hero discovered there was a [rule of the land of Python](https://www.python.org/dev/peps/pep-0561/) that governed the import of types into the kingdom, more specificaly a very special document (file) called `py.typed`.
Things were looking good.

But no, what the law said did not seem to match reality. How could things be so?

After some frustrating debugging our valiant hero thought to himself "Hmm, I wonder if this is simply a Nix idiosyncrasy", and it turns out indeed it was.
Things that were working in the blessed way of the land of Python (inside a `virtualenv`) were not working the way they were from his home town of Nix (`nix-shell` + `python.withPackages`).

After even more frustrating attempts at reading the mypy documentation and trying to understand how things were supposed to work our hero started questioning his sanity.
This is where things started to get truly interesting.

Our hero started to use a number of powerful weapons, both forged in the land of Python (pdb) & by the mages of UNIX (printf-style-debugging & strace).

After first trying to slay the dragon simply by `strace` and a keen eye our hero did not spot any weak points.
Time to break out a more powerful sword (`pdb`) which also did not divulge any secrets about what was wrong.

Our hero went back to the `strace` output and after a fair bit of thought and analysis a pattern started to emerge. Mypy was looking in the wrong place (i.e. not in in the environment created by `python.withPackages` but in the interpreter store path) and our princess was in another castle!

Our hero went to the pub full of old grumpy men giving out the inner workings of the open source universe (Github) and acquired a copy of Mypy.
He littered the code with print statements & break points.
After a fierce battle full of blood, sweat & tears he ended up in https://github.com/python/mypy/blob/20f7f2dd71c21bde4d3d99f9ab69bf6670c7fa03/mypy/sitepkgs.py and realised that everything came down to the Python `site` module and more specifically https://docs.python.org/3.7/library/site.html#site.getsitepackages which in turn relies on https://docs.python.org/3.7/library/site.html#site.PREFIXES .

Our hero created a copy of the environment created by `python.withPackages` and manually modified it to confirm his findings, and it turned out it was indeed the case.
Our hero had damaged the dragon and it was time for a celebration.

He went out and acquired some mead which he ingested while he typed up his story and waited for the dragon to finally die (the commit caused a mass-rebuild, I had to wait for my repro).

In the end all was good in [NixOps-AWS](https://github.com/nixos/nixops-aws)-town and type checks could run. (PR for that incoming tomorrow).
2020-03-14 21:39:31 +00:00
adisbladis 77396a8c47 Merge pull request #81098 from bignaux/cadence
cadence: fix dbus,libjack and missing dependancies
2020-03-14 21:30:57 +00:00
R. RyanTM 73d7dbf272 fluxctl: 1.17.1 -> 1.18.0 2020-03-14 21:18:51 +00:00
R. RyanTM fd9a2e7e38 k9s: 0.13.8 -> 0.17.7 2020-03-14 21:18:27 +00:00
R. RyanTM 892827c0eb lego: 3.3.0 -> 3.4.0 2020-03-14 21:17:55 +00:00
R. RyanTM dece4b99fa tautulli: 2.1.44 -> 2.2.0 2020-03-14 21:10:15 +00:00
Léo Gaspard 175f9ef4f8 xfce4-12: remove alias 2020-03-14 22:05:50 +01:00
Elis Hirwing e0b1b9d556 phpPackages.exts: Add extensions 2020-03-14 21:53:59 +01:00
EEva (JPotier) 20ef86ed52 bitlbee-mastodon: 1.4.2 -> 1.4.3 2020-03-14 20:49:11 +00:00
R. RyanTM bafbfc5a06 eagle: 9.5.2 -> 9.6.0 2020-03-14 20:19:26 +00:00
Ryan Mulligan 3be1ae971d Merge pull request #82554 from r-ryantm/auto-update/libuninameslist
libuninameslist: 20190701 -> 20200313
2020-03-14 13:13:17 -07:00
zimbatm 001be890f7 folding@home: 6.02 -> 7.5.1
The v7 series is very different.

This commit introduces the 3 packages: fahclient, fahcontrol and
fahviewer. It also rebuilds the NixOS module to map better with the new
client.
2020-03-14 13:01:26 -07:00
zimbatm b6fe12b1cc cryptpad: 3.0.1 -> 3.13.0 (#82602) 2020-03-14 19:51:44 +00:00
Elis Hirwing 387d52106a phpPackages.exts: Add alias so we have the right pcre lib 2020-03-14 20:30:28 +01:00
Elis Hirwing b2933434f5 phpPackages: Initial work for building phpExtensions separately 2020-03-14 20:30:18 +01:00
Ryan Mulligan 94a67e67b8 Merge pull request #82532 from r-ryantm/auto-update/croc
croc: 6.4.10 -> 8.0.3
2020-03-14 12:30:15 -07:00
adisbladis 920187c247 Merge pull request #82574 from r-ryantm/auto-update/rar2fs
rar2fs: 1.28.0 -> 1.29.0
2020-03-14 18:46:44 +00:00
Robert Helgesson 2d2de743d0 emacs: improve setup hook
- Add packages installed in a sub-directory of site-lisp, such as
  mu4e, to EMACSLOADPATH.

- Add ELPA packages to EMACSLOADPATH.

- Add each package only once to EMACSLOADPATH. Before, each package
  would typically be added twice for each transitive dependency
  leading to a huge variable for a package having many dependencies.

Fixed #78680
2020-03-14 19:46:28 +01:00
Vladyslav M 1f8127d2ab Merge pull request #82498 from r-ryantm/auto-update/cargo-udeps
cargo-udeps: 0.1.7 -> 0.1.9
2020-03-14 20:43:13 +02:00
Dmitry Kalinkin 2547ef9286 Merge pull request #75312 from KAction/mmh
mmh: init at 0.4
2020-03-14 14:20:44 -04:00
Vladyslav M 9d8580fe4c miniserve: 0.5.0 -> 0.6.0 2020-03-14 18:08:10 +00:00
Tom Hall c6c753668d openblas: disable optimisation pending fix
See https://github.com/xianyi/OpenBLAS/issues/2496
2020-03-14 18:06:59 +00:00
R. RyanTM e3e86f1b12 caddy: 1.0.4 -> 1.0.5 (#82601) 2020-03-14 18:04:13 +00:00
Ryan Mulligan 6ac55d9ecc Merge pull request #82577 from r-ryantm/auto-update/sampler
sampler: 1.0.3 -> 1.1.0
2020-03-14 11:02:11 -07:00
Mario Rodas 6e2eeba534 Merge pull request #82572 from r-ryantm/auto-update/pgmetrics
pgmetrics: 1.7.1 -> 1.8.1
2020-03-14 12:04:48 -05:00
Alyssa Ross dcb43197ea rust_1_38_0: drop 2020-03-14 16:55:06 +00:00
Alyssa Ross c4393d6ac4 thunderbird: build with current rust 2020-03-14 16:55:06 +00:00
Alyssa Ross 6cea0daaa9 rustracerd: build with current rust
Fix taken from https://github.com/jwilm/racerd/pull/82.  It just
updates a dependency.
2020-03-14 16:55:06 +00:00
Pascal Bach 337b35707d minio-client: 2019-01-30 -> 2020-03-06 2020-03-14 16:50:29 +00:00
Pascal Bach 85f8014655 minio: 2019-10-12 -> 2020-03-06 2020-03-14 16:50:29 +00:00
Dominik Xaver Hörl 45cc3c986d neomutt: configure with zlib to enable imap compression 2020-03-14 16:48:47 +00:00
Mario Rodas 3b2d9b3e4c tflint: 0.15.1 -> 0.15.2
Changelog: https://github.com/terraform-linters/tflint/releases/tag/v0.15.2
2020-03-14 16:40:18 +00:00
R. RyanTM 281dd8bd44 ntp: 4.2.8p13 -> 4.2.8p14 2020-03-14 16:26:40 +00:00
R. RyanTM 1abca6627e bitwarden_rs: 1.13.1 -> 1.14 2020-03-14 16:15:12 +00:00
R. RyanTM 98aa4da995 berglas: 0.5.0 -> 0.5.1 2020-03-14 15:54:07 +00:00
Dmitry Bogatov b1c71ebe2b mmh-unstable: init at 2019-09-08 2020-03-14 11:27:49 -04:00
Mario Rodas 8a0c1b8cf1 Merge pull request #82068 from anmonteiro/anmonteiro/bs-platform-7.2.0
bs-platform: 7.0.1 -> 7.2.0
2020-03-14 10:25:53 -05:00
Frederik Rietdijk 13e7a3e112 Python: introduce tests for interpreters
This adds tests to the passthru of all Python interpreters.
2020-03-14 15:05:37 +01:00
Frederik Rietdijk dbf125d286 Python: introduce tests for interpreters
This adds tests to the passthru of all Python interpreters.
2020-03-14 15:01:30 +01:00
Graham Christensen 39aac70d74 pythonMinimal: don't include site-customise
Experimenting with patching the site-customize file causes mass
rebuilds for no reason.
2020-03-14 15:02:51 +01:00
R. RyanTM 096ab84b0d tinygo: 0.11.0 -> 0.12.0 2020-03-14 13:52:08 +00:00
R. RyanTM 1b467f21f6 thanos: 0.7.0 -> 0.11.0 2020-03-14 13:44:06 +00:00
Frederik Rietdijk 0c13b0d7d3 Merge staging-next into staging 2020-03-14 14:34:59 +01:00
Frederik Rietdijk 9fd82b3e7e Merge master into staging-next 2020-03-14 14:34:29 +01:00
R. RyanTM 93144e0f4a gitAndTools.stgit: 0.21 -> 0.22 2020-03-14 14:33:20 +01:00
R. RyanTM 699eb40353 libinput: 1.15.2 -> 1.15.3 2020-03-14 14:32:55 +01:00