or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Nix Python Packaging
1-2 sentence description of the project
Nix is a package manager with a focus on reproducible builds from the point of metadata/inputs.
It also features a declarative language in which these builds are written in, the Nix language.
Nixpkgs is a set of packages shipped by default when using Nix.
NixOS is a declaratively configured Linux distrubtion built on top of Nixpkgs.
When was the project created?
Nix has been around for more than 20 years and Python support has been around since the very early days.
Why was the project created?
An experiment to make package management stateless by
applying funtional programming paradigm ideas.
Strong focus on reproducible builds, i.e. repeatable process
of going from source to a working software.
Following is the motivation from the PhD thesis
To resolve issues with existing systems:
What is the project's scope as relates to Python distribution/packaging?
Build Python interpreters?
Distribute Python interpreters?
Create Python packages?
poetry2nix
Distribute Python packages?
Install Python packages?
What is the project specifically trying to excel at, generally?
Reproducible builds with sandboxing at the package granurality.
Locking dependency trees all the way from your leaf package down to your
glibc
or even Linux kernel (on NixOS), and other tools and libraries used along the way.Build time dependencies
Creating declarative/imperative developer environments
What is the project specifically trying to excel at, as relates to Python distribution/packaging?
Handles system dependencies - over 90 0000 packages in Nixpkgs.
Relocatable - can be copied on any other machine with the same platform.
Composition of Python environments
What are some key weak points of the project, as relates to Python distribution/packaging?
Nix requires a DAG and thus cannot handle cyclic dependencies, while Python allows it.
Dealing with native dependencies that are opened using e.g.
ctypes
. We need to patch all of these occurences.In Nixpkgs only a single version of a Python package is provided. For example, there is no version constraint solver. However,
poetry2nix
can usepoetry
to lock Python dependencies on top of Nixpkgs providing the non-Python components.Impure builds using e.g.
pip
directly on top of system-provided packages. Especially with NixOS there are no base system packages.Limitations of Python packaging for the project
Lack of standardized lock file format for applications
Mapping native dependencies into Nix dependencies is manual work, there's no pkgconfig support in Python.
Non-Python package managers invoked as part of the build, such as npm/yarn/cargo
Lack of test dependencies / runner specifications.
Automating conversion of Python packaging metadata into Nix packages using a single command (for example using poetry2nix).
added by dream2nix maintainers: