poetry2nix/README.org

30 lines
992 B
Org Mode
Raw Normal View History

2019-11-19 22:09:02 +00:00
[[https://travis-ci.org/adisbladis/pnpm2nix][https://travis-ci.org/adisbladis/poetry2nix.svg?branch=master]]
2019-06-17 19:04:44 +01:00
2019-11-19 22:09:02 +00:00
* poetry2nix
Poetry2nix turns [[https://poetry.eustace.io/][Poetry]] projects into Nix derivations without the need to actually write Nix expressions.
2019-06-17 19:04:44 +01:00
2019-11-19 22:09:02 +00:00
It does so by parsing =pyproject.toml= and =poetry.lock= and converting them to Nix derivations on the fly.
2019-06-17 19:04:44 +01:00
2019-11-19 22:09:02 +00:00
** Usage
2019-11-19 22:09:02 +00:00
*** Example =default.nix=
The easiest way to import poetry2nix is as an overlay.
#+begin_src nix
let
pkgs = import <nixpkgs> {
overlays = [
(import ((builtins.fetchTarball { url = https://github.com/adisbladis/poetry2nix/archive/master.tar.gz; }) + "/overlay.nix"))
];
};
in pkgs.poetry2nix.mkPoetryPackage {
python = python3;
pyproject = ./pyproject.toml;
poetryLock = ./poetry.lock;
src = lib.cleanSource ./.;
}
#+END_SRC
Poetry2nix is also available as a [[https://github.com/NixOS/rfcs/pull/49][Nix flake]].
** License
=poetry2nix= is released under the terms of the MIT license.