Create highly reproducible python environments
Full Changelog: https://github.com/DavHau/mach-nix/compare/3.4.0...3.5.0
aarch64-darwin, nixpkgs provider improvements, bugfixes
packagesExtra
bugfixes, improvements
nix (build|shell) mach-nix#gen.(python|docker).package1.package2...
(Despite this changes being backward incompatible, I did not bump the major version since everything flakes related should be considered experimental anyways)python
can be passed to mkPython
alternatively..add
directive automatically assumes an empty list/set/string when the attribute to be extended doesn't exist..mod
directive will pass null
to the given function if the attribute to modify doesn't exist instead.overrides
failed due to a variable name collision in the resulting nix expression.nix flake show mach-nix
failed because it required IFD for foreign platforms.mach-nix env ...
the python
command referred to the wrong interpreter.bugfixes, ignoreCollisions
ignoreCollisions
to all mk*
functionsexpr
to the result of mkPython
, which is a string containing the internally generated nix expression.sdist
to build pip compatible sdist distribution of mach-nixnixpkgs
provider, leading to collision errors or unexpected package versions. Now, python depenencies of nixpkgs
candidates are automatically replaced recursively.six
when provider is nixpkgs
flakes lib, cli improvements, bugfixes
lib
:
nixpkgs
and mach-nix
for environments created via mach-nix env
command.mach-nix env
generated environments. Replace the platform specific compiled nix expression with a call to mach-nix itself, which is platform agnostic.flakes.lock
.packagesExtra
were not available during runtime. Now they are added to the PATH
.<nixpkgs>
impurity in the dependency extractor used in buildPythonPackage.bugfixes
bugfixes, return missing packages
No matching distribution found
error in higher level parent packages. Now --no-dependencies
is set recursively for all parents of removed deps.networkx
is now used for dealing with some graph related problemsflakes pypi gateway, R support, new output formats, more packages for python 3.5/3.6, improved providers nixpkgs/wheel
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
...
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:
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.
key-to-override.mod = pySelf: oldAttrs: oldVal: ...;
src
argument to buildPythonPackagetorch
bugfixes
extra_pkgs
was broken: Packages didn't end up in final environmentsdist
packages in fixes.nixbuildPythonPackage
sdist
providerreproducible.patch
for versions < 20.0