Releases: DavHau/mach-nix
3.5.0 (01 Jun 2022)
What's Changed
- Improve CI. by @tomprince in #397
- Upgrade resolvelib to 0.4.0. by @tomprince in #334
- Track raw provider version, rather than rebuilding. by @tomprince in #340
- Upgrade resolvelib to 0.8.1. by @tomprince in #395
- Add aarch64-darwin to the system map for conda channels. Fix darwin manylinux logic. Fix deptree NoneType + NoneType by @hazelweakly in #400
- Fix typo: bene -> been by @bjornfor in #413
- examples: fix a builtins.fetchGit ref by @bjornfor in #421
- Add a nix version check. by @tomprince in #402
- fix-package: pyjq needs nativeBuildInputs by @bjornfor in #425
- Remove pipenv from dependency extractor derivation by @bjornfor in #427
- feat: support Gitpod by @yajo in #412
- add section: File resolution (#434) by @milahu in #436
- Replace --suffix-each with multiple --suffix options by @bjornfor in #445
New Contributors
Full Changelog: 3.4.0...3.5.0
3.4.0 (04 Feb 2022)
aarch64-darwin, nixpkgs provider improvements, bugfixes
Features
- support conda packages
- support wheels for apple m1 (aarch64-darwin)
Changes
- remove support for installing mach-nix via pip
- updated inputs nixpkgs, pypi-deps-db, conda-channels
Improvements
- support for PEP600 wheels of format: 'manylinux_${GLIBCMAJOR}_${GLIBCMINOR}'
- respect 'python_requires' for sdist packages
- PEP440 compatible pre-release version handling
- improve handling of python packages from nixpkgs
Fixes
- fix problem where required dependencies were removed from nixpkgs python modules.
- prevent package collisions with dependencies from
packagesExtra
- fix version comparison of versions with arbitrary length
- various fixes for MacOS
- various fixes for requirements parsing
- various other fixes
Package Fixes
- libwebp-base: remove colliding binaries in conda package
- pyqt5: fix missing wrapQtAppsHook
3.3.0 (22 May 2021)
3.3.0 (22 May 2021)
bugfixes, improvements
Changes
- The flakes cmdline api has been changed. New usage:
(Despite this changes being backward incompatible, I did not bump the major version since everything flakes related should be considered experimental anyways)
nix (build|shell) mach-nix#gen.(python|docker).package1.package2...
Improvements
- Mach-nix (used via flakes) will now throw an error if the selected nixpkgs version is newer than the dependency DB since this can cause conflicts in the resulting environment.
- When used via flakes, it was impossible to select the python version because the import function is not used anymore. Now
python
can be passed tomkPython
alternatively. - For the flakes cmdline api, collisions are now ignored by default
- The simplified override interface did not deal well with non-existent values.
- Now the
.add
directive automatically assumes an empty list/set/string when the attribute to be extended doesn't exist. - Now the
.mod
directive will passnull
to the given function if the attribute to modify doesn't exist instead.
- Now the
Fixes
- Generating an environment with a package named
overrides
failed due to a variable name collision in the resulting nix expression. - When used via flakes, the pypiData was downloaded twice, because the legacy code path for fetching was still used instead of the flakes input.
nix flake show mach-nix
failed because it required IFD for foreign platforms.- For environments generated via
mach-nix env ...
thepython
command referred to the wrong interpreter. - When checking wheels for compatibility, the minor version for python was not respected which could lead to invalid environments.
- Some python modules in nixpkgs propagate unnecessary dependencies which could lead to collisions in the final environment. Now mach-nix recursively removes all python dependencies which are not strictly required.
Package Fixes
- cryptography: remove rust related hook when version < 3.4
3.2.0 (11 Mar 2021)
3.2.0 (11 Mar 2021)
bugfixes, ignoreCollisions
Features
- add argument
ignoreCollisions
to allmk*
functions - add passthru attribute
expr
to the result ofmkPython
, which is a string containing the internally generated nix expression. - add flake output
sdist
to build pip compatible sdist distribution of mach-nix
Fixes
- Sometimes wrong package versions were inherited when using the
nixpkgs
provider, leading to collision errors or unexpected package versions. Now, python depenencies ofnixpkgs
candidates are automatically replaced recursively. - When cross building, mach-nix attempted to generate the nix expression using the target platform's python interpreter, resulting in failure
Package Fixes
- cartopy: add missing build inputs (geos)
- google-auth: add missing dependency
six
when provider isnixpkgs
3.1.1 (27 Nov 2020)
3.1.1 (27 Nov 2020)
fix cli
Fixes
- Fix missing flake.lock error when using mach-nix cli.
3.1.0 (27 Nov 2020)
3.1.0 (27 Nov 2020)
flakes lib, cli improvements, bugfixes
Features
- expose the following functions via flakes
lib
:- mkPython / mkPythonShell / mkDockerImage / mkOverlay / mkNixpkgs / mkPythonOverrides
- buildPythonPackage / buildPythonApplication
- fetchPypiSdist / fetchPypiWheel
- Properly manage and lock versions of
nixpkgs
andmach-nix
for environments created viamach-nix env
command. - Add example on how to use mach-nix with jupyterWith
Improvements
- Improve portability of
mach-nix env
generated environments. Replace the platform specific compiled nix expression with a call to mach-nix itself, which is platform agnostic. - Mach-nix now produces the same result no matter if it is used through flakes or legacy interface. The legacy interface now loads its dependencies via
flakes.lock
.
Fixes
- mkDockerImage produced corrupt images.
- non-python packages passed via
packagesExtra
were not available during runtime. Now they are added to thePATH
. - remove
<nixpkgs>
impurity in the dependency extractor used in buildPythonPackage.
3.0.2 (27 Oct 2020)
3.0.2 (27 Oct 2020)
bugfixes
Fixes
- fixed "\u characters in JSON strings are currently not supported" error, triggered by some packages using unicode characters in their file names
- mach-nix cmdline tool didn't use specified python version
- wheel provider was broken for MacOS resulting in 0 available packages
- several issues triggering infinite recursions
3.0.1 (21 Oct 2020)
3.0.1 (21 Oct 2020)
bugfixes, return missing packages
Fixes
- Some sdist packages were missing from the dependency DB due to a corrupt index in the SQL DB used by the crawler.
- When automatically fixing circular deps, removed deps could trigger a
No matching distribution found
error in higher level parent packages. Now--no-dependencies
is set recursively for all parents of removed deps. - Mapping out the resulting dependency DAG to a tree for printing could exhaust the systems resources, due to complexity. Now, when printing dependencies, sub-trees are trimmed and marked via (...) if they have already been printed earlier.
Improvements
- optimized autoPatchelfHook for faster processing of large wheel packages (see upstream PR)
networkx
is now used for dealing with some graph related problems
3.0.0 (14 Oct 2020)
3.0.0 (14 Oct 2020)
flakes pypi gateway, R support, new output formats, more packages for python 3.5/3.6, improved providers nixpkgs/wheel
IMPORTANT NOTICE
The UI has been reworked. It is backward compatible with a few exceptions. Most importantly, when importing mach-nix, an attribute set must be passed. It can be empty. Example:
let
mach-nix = import (builtins.fetchGit {
url = "https://github.com/DavHau/mach-nix/";
ref = "refs/tags/3.0.0";
}) {
# optionally bring your own nixpkgs
# pkgs = import <nixpkgs> {};
# or specify the python version
# python = "python38";
};
in
...
Features
-
Flakes gateway to pypi. Get a shell with arbitrary python packages. Example:
nix develop github:davhau/mach-nix#shellWith.requests.tensorflow.aiohttp
-
New output formats:
- mkDockerImage -> produces layered docker image containing a python environment
- mkNixpkgs -> returns nixpkgs which is conform to the given requirements
- mkOverlay -> returns an overlay function to make nixpkgs conform to the given requirements
- mkPythonOverrides -> produces pythonOverrides to make python conform to the given requirements.
-
New functions fetchPypiSdist and fetchPypiWheel. Example:
mach-nix.buildPythonPackge { src = fetchPypiSdist "requests" "2.24.0" };
-
When using the mach-nix cmdline tool, the nixpkgs channel can now be picked via:
mach-nix env ./env -r requirements.txt --nixpkgs nixos-20.09
-
R support (experimental): R packages can be passed via
packagesExtra
. Mach-nix will setup rpy2 accordingly. See usage example. -
Non-python packages can be passed via
packagesExtra
to include them into the environment.
Improvements
- rework the logic for inheriting dependencies from nixpkgs
- fixes.nix: allow alternative mod function signature with more arguments:
key-to-override.mod = pySelf: oldAttrs: oldVal: ...;
- allow derivations passed as
src
argument to buildPythonPackage - stop inheriting attribute names from nixpkgs, instead use normalized package names
- rework the public API of mach-nix (largely downwards compatible)
- add example on how to build aarch64 image containing a mach-nix env
- tests are now enabled/disabled via global override which is more reliable
- raise error if python version of any package in packagesExtra doesn't match to one of the environment
Fixes
- nixpkgs packages with identical versions swallowed
- pname/version null in buildPythonPackage
- update dependency extractor to use "LANG=C.utf8" (increases available packages for python 3.5 and 3.6)
- wheel provider picked wheels incompatible to python version
- unwanted python buildInput inheritance when overriding nixpkgs
- properly parse setup/install_requires if they are strings instead of lists
Package Fixes
- rpy2: sdist: remove conflicting patch for versions newer than 3.2.6
- pytorch from nixpkgs was not detected as
torch
- pyqt5: fix for providers nixpkgs and wheel
- httpx: remove patches
2.4.1 (21 Sep 2020)
2.4.1 (21 Sep 2020)
bugfixes
Fixes
extra_pkgs
was broken: Packages didn't end up in final environment- null value error when inheriting passthru for disabled packages
- Wrong provider detected for
sdist
packages in fixes.nix - overrides from fixes.nix didn't apply for
buildPythonPackage
Package Fixes
- pip: allow from
sdist
provider - pip: remove
reproducible.patch
for versions < 20.0