Create highly reproducible python environments
MIT License
Bot releases are hidden (Show)
Full Changelog: https://github.com/DavHau/mach-nix/compare/3.4.0...3.5.0
Published by DavHau over 2 years ago
aarch64-darwin, nixpkgs provider improvements, bugfixes
packagesExtra
Published by DavHau over 3 years ago
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.Published by DavHau over 3 years ago
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
Published by DavHau almost 4 years ago
fix cli
Published by DavHau almost 4 years ago
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.Published by DavHau almost 4 years ago
bugfixes
Published by DavHau almost 4 years ago
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 problemsPublished by DavHau about 4 years ago
flakes 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
Published by DavHau about 4 years ago
bugfixes
extra_pkgs
was broken: Packages didn't end up in final environmentsdist
packages in fixes.nixbuildPythonPackage
sdist
providerreproducible.patch
for versions < 20.0Published by DavHau about 4 years ago
Global conditional overrides, simple overrides for buildPythonPackage, improved metadata extraction, fix wheel selection
version
, python version
, or provider
. This format is designed in a way, so it could easily be reused by projects other than mach-nix. Please contribute your fixes to ./mach_nix/fixes.nix
numpy.blas
.python
argument of mkPython: Values like, for example, "python38"
are now accepted in which case pkgs.python38
will be used. The intention is to reduce the risk of accidentally mixing multiple nixpkgs versions.extras
when using buildPythonPackage
didn't have any effectpassthru
argument for buildPythonPackage
was ignoredpropagatedBuildInputs
argument for buildPythonPackage
was ignoredPyQt5-...-cp35.cp36.cp37.cp38-...whl
were not selected correctly.Published by DavHau about 4 years ago
simplified override system, autodetect requirements, improved success rate
_
(underscore) argument for mkPython
._.{package}.buildInputs.add = [...]
buildPythonPackage
now automatically detects requirements. Therefore the requrements
argument becomes optional.buildPythonPackage
now automatically detects package name
and version
. Therefore those attributes become optional.buildPythonPackage
can now be called while only passing a tarball url or a pathmkPython
allows to include python packages from arbitrary sources via new argument extra_pkgs
mkPython
can now be called while only passing a list of tarball urls or pathsoverrides_pre
were sometimes disregarded due to wrong use of with
-statements inside a recursive attrset.Published by DavHau about 4 years ago
buildPythonPackage
of mach-nix failed if arguments like pkgs
were passed.overrideAttrs
if overridePythonAttrs
is not available.nixpkgs
providernixpkgs
providerpypi-crawlers
into mach-nix (was separated project before)Published by DavHau about 4 years ago
Handle circular dependencies, fix python 3.8 wheels, improve error message
Published by DavHau about 4 years ago
Improved success rate, MacOS support, bugfixes, optimizations
system
. This should decrease the chance of impurities during dependency resolution.requires_python
is part of the dependency graph and affects resolution.url
inside the src
attribute which is much more reliable. For packages which are not fetched from pypi, the pname
attribute is used as fallback.attribute 'sdist' missing
if a package from the nixpkgs provider was used which doesn't publish it's source on pypi. (For example tensorflow
)Published by DavHau about 4 years ago
Fix broken wheel packages
dontStrip
to the autoPatchelf
routine.Published by DavHau over 4 years ago
Bug fixes + new feature buildPythonPackage / buildPythonApplication
value is null while a set was expected
error when python package is used which is set to null in nixpkgs.Published by DavHau over 4 years ago
Improves build-time closure, build success rate and fixes disable_checks option.
disable_checks
did not work for packages built via the sdist
provider if the required version matches exactly the version used in nixpkgs.nixpkgs
and sdist
inherited many unneeded build inputs from nixpkgs leading to bloated build-time closures, increased failure rate and uneffective disable_checks
option. After this fix, only non-python build-inputs are inherited from nixpkgs.pname
+ version
for python packages instead of name
Published by DavHau over 4 years ago
nixpkgs
, sdist
, wheel
.mkPython
and lower level interfaces now accept new parameter pkgs
and python
which indirectly enables you to use any nixpkgs overlays (But don't use this for modifying python packages. Better do this with Python Overrides)mkPython
now accepts new parameter overrides_pre
and overrides_post
each allowing to inject a list of python overrides to apply before and after the mach-nix internal overrides. This allows you to fixup packages or add your own modifications to them.requests[security]
' will be correctly resolved.machNixFile
and machNix
overrides
and select_pkgs
python_attr
in favor if python
prefer_nixpkgs
in favor of providers
nixpkgs_commit
in favor of pkgs
nixpkgs_tarball_sha256
in favor of pkgs
overrides_pre
: list of python overrides to apply before the machnix overridesoverrides_post
: list of python overrides to apply after the machnix overridespkgs
: pass custom nixpkgs. Only used for manylinux wheel dependencies.providers
: define provider preferences_provider_defaults
: builtin provider defaults. Disable them by passing {}