mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
15 lines
397 B
Python
15 lines
397 B
Python
![]() |
#!/usr/bin/env nix-shell
|
||
|
#! nix-shell -i python3 -p python3Packages.poetry
|
||
|
|
||
|
# Run code generation used by poetry2nix
|
||
|
|
||
|
from poetry.packages.utils.utils import SUPPORTED_EXTENSIONS
|
||
|
import json
|
||
|
|
||
|
EXT_FILE = 'extensions.json'
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
with open(EXT_FILE, 'w') as f:
|
||
|
ext = sorted(ext.lstrip('.') for ext in SUPPORTED_EXTENSIONS)
|
||
|
f.write(json.dumps(ext, indent=2))
|