mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-04 16:51:40 -05:00
14 lines
397 B
Python
Executable file
14 lines
397 B
Python
Executable file
#!/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))
|