2020-01-10 14:01:54 +00:00
|
|
|
#!/usr/bin/env nix-shell
|
2021-03-04 12:56:50 +02:00
|
|
|
#! nix-shell -i bash -p curl nix-prefetch-github jq
|
2020-01-10 14:01:54 +00:00
|
|
|
|
|
|
|
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
|
2021-02-02 14:02:45 +01:00
|
|
|
echo >> src.json
|
2020-01-10 14:01:54 +00:00
|
|
|
|
|
|
|
src=$(nix-build --no-out-link --expr 'with import <nixpkgs> {}; fetchFromGitHub (lib.importJSON ./src.json)')
|
|
|
|
cp $src/pyproject.toml $src/poetry.lock .
|
2021-12-25 15:42:39 -08:00
|
|
|
nix-shell -p poetry --run 'poetry lock'
|
2020-02-29 22:09:44 +00:00
|
|
|
nix-build --expr '(import <nixpkgs> { overlays = [ (import ../../overlay.nix) ]; }).poetry'
|