From 84383f85ae92bf496bdc5975fef840c5caa90cc2 Mon Sep 17 00:00:00 2001 From: DavHau Date: Fri, 27 Nov 2020 00:54:09 +0700 Subject: [PATCH] version 3.1.0 --- Changelog.md | 22 ++++++++++++++++++++++ Readme.md | 2 +- examples.md | 4 ++-- mach_nix/VERSION | 2 +- tests/test_flakes_legacy_consistent.nix | 19 +++++++++++++++++++ 5 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 tests/test_flakes_legacy_consistent.nix diff --git a/Changelog.md b/Changelog.md index eb07817..81d75d0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,25 @@ +# 3.1.0 (27 Sep 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` and `mach-nix` for environments created via `mach-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 the `PATH`. + - remove `` impurity in the dependency extractor used in buildPythonPackage. + + + # 3.0.2 (27 Oct 2020) bugfixes diff --git a/Readme.md b/Readme.md index cdffae2..822acb4 100644 --- a/Readme.md +++ b/Readme.md @@ -99,7 +99,7 @@ You can call mach-nix directly from a nix expression let mach-nix = import (builtins.fetchGit { url = "https://github.com/DavHau/mach-nix/"; - ref = "refs/tags/3.0.2"; + ref = "refs/tags/3.1.0"; }) {}; in mach-nix.mkPython { diff --git a/examples.md b/examples.md index 543f27e..7f34389 100644 --- a/examples.md +++ b/examples.md @@ -41,7 +41,7 @@ every mach-nix expression should begin like this: let mach-nix = import (builtins.fetchGit { url = "https://github.com/DavHau/mach-nix/"; - ref = "refs/tags/3.0.2"; + ref = "refs/tags/3.1.0"; }) { # optionally bring your own nixpkgs # pkgs = import {}; @@ -277,7 +277,7 @@ In this example, mach-nix is used to resolve our python dependencies and provide let mach-nix = import (builtins.fetchGit { url = "https://github.com/DavHau/mach-nix/"; - ref = "refs/tags/3.0.2"; # update this version + ref = "refs/tags/3.1.0"; # update this version }) { python = "python37"; }; diff --git a/mach_nix/VERSION b/mach_nix/VERSION index d9c62ed..a0cd9f0 100644 --- a/mach_nix/VERSION +++ b/mach_nix/VERSION @@ -1 +1 @@ -3.0.2 \ No newline at end of file +3.1.0 \ No newline at end of file diff --git a/tests/test_flakes_legacy_consistent.nix b/tests/test_flakes_legacy_consistent.nix new file mode 100644 index 0000000..94a4ca1 --- /dev/null +++ b/tests/test_flakes_legacy_consistent.nix @@ -0,0 +1,19 @@ +{ + mach-nix ? import ../. {}, + ... +}: +with builtins; +let + mkPythonFlakes = (getFlake (toString ../.)).lib.x86_64-linux.mkPython; + pyFlakes = mkPythonFlakes { + requirements = "requests"; + }; + py = mach-nix.mkPython { + requirements = "requests"; + }; +in +if pyFlakes == py then + py +else + throw "flakes and legacy output differ" +