mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
10 lines
502 B
Text
Executable file
10 lines
502 B
Text
Executable file
#!/usr/bin/env nix-shell
|
|
#! nix-shell -i bash -p curl nix-prefetch-github jq
|
|
|
|
rev=$(curl -s https://api.github.com/repos/python-poetry/poetry/releases/latest | jq -r '.name')
|
|
nix-prefetch-github --rev "$rev" python-poetry poetry > src.json
|
|
echo >> src.json
|
|
|
|
src=$(nix-build --no-out-link --expr 'with import <nixpkgs> {}; fetchFromGitHub (lib.importJSON ./src.json)')
|
|
cp $src/pyproject.toml $src/poetry.lock .
|
|
nix-build --expr '(import <nixpkgs> { overlays = [ (import ../../overlay.nix) ]; }).poetry'
|