bundlewrap/bundles/nodejs/metadata.py
2024-11-24 16:25:55 +01:00

41 lines
922 B
Python

defaults = {
'apt': {
'packages': {
'nodejs': {},
# http://www.alvinsim.com/which-yarn/
'cmdtest': {
'installed': False,
},
},
},
'npm': {},
}
@metadata_reactor.provides(
'apt/sources',
)
def sources(metadata):
version = metadata.get('nodejs/version')
return {
'apt': {
'sources': {
'nodesource': {
'types': {
'deb',
'deb-src',
},
'urls': {
f'https://deb.nodesource.com/node_{version}.x',
},
'suites': {
'{codename}',
},
'components': {
'main',
},
},
},
},
}