{"id":15657949,"url":"https://github.com/teohm/natives","last_synced_at":"2025-04-15T21:22:39.720Z","repository":{"id":11341332,"uuid":"13769170","full_name":"teohm/natives","owner":"teohm","description":"List native packages required by gems on your machine.","archived":false,"fork":false,"pushed_at":"2014-01-13T04:56:20.000Z","size":384,"stargazers_count":46,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T01:23:53.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teohm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-22T09:54:09.000Z","updated_at":"2022-07-23T12:16:26.000Z","dependencies_parsed_at":"2022-08-20T15:50:57.385Z","dependency_job_id":null,"html_url":"https://github.com/teohm/natives","commit_stats":null,"previous_names":["teohm/natives-catalog"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohm%2Fnatives","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohm%2Fnatives/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohm%2Fnatives/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teohm%2Fnatives/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teohm","download_url":"https://codeload.github.com/teohm/natives/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543837,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T13:10:29.334Z","updated_at":"2025-04-15T21:22:39.698Z","avatar_url":"https://github.com/teohm.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# natives\n\n[![Gem Version](https://badge.fury.io/rb/natives.png)](http://badge.fury.io/rb/natives)\n[![Code Climate](https://codeclimate.com/github/teohm/natives.png)](https://codeclimate.com/github/teohm/natives)\n[![Build Status](https://travis-ci.org/teohm/natives.png)](https://travis-ci.org/teohm/natives)\n[![Dependency Status](https://gemnasium.com/teohm/natives.png)](https://gemnasium.com/teohm/natives)\n\nList native packages required by ruby gems on your machine.\n\nWhat it does:\n\n* maintains a [multi-platform catalog](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml) of native packages for ruby gems.\n* detects platform, platform version using [Chef Ohai](https://github.com/opscode/ohai).\n* detects package manager.\n* returns a list of native packages based on the gems specified by you or a gemfile.\n\n\n## Install\n\n```\ngem install natives\n```\n\n## Use\n\n```\nnatives list capybara-webkit sqlite3\n```\n\n### Have a gemfile?\n\n```\nnatives list  # looks for Gemfile in current directory\nnatives list --gemfile Gemfile.special\nnatives list --gemfile /path/to/Gemfile.special\n```\n\n### How to install native packages?\n\nOutput from `natives list` can be used together with your package manager e.g. `brew`, `apt-get`. If you need a package manager wrapper, try [pacapt](https://github.com/icy/pacapt).\n\n```\nbrew install $(natives list capybara-webkit sqlite3)\napt-get install $(natives list capybara-webkit sqlite3)\npacapt -S $(natives list capybara-webkit sqlite3)\n```\n\n### Switch catalog\nIt uses 'rubygems' catalog by default. To use a different catalog:\n\n```\nnatives list --catalog npm sqlite3\n```\n\n### Custom (project-specific) catalog\nIt also looks for `natives-catalogs/` in current directory. If exists, it loads all catalog files in the directory.\n\n```\n$ cd rails_app1\n$ cat natives-catalogs/catalog1.yaml\nrubygems:\n  my_gem:\n    homebrew:\n      mac_os_x:\n        - package1\n    apt:\n      default:\n        - package2\n\n$ natives list my_gem   # runs on mac os x\npackage1\n```\n\n## Catalog\n\n### Supported catalogs\n\n* **[rubygems](https://github.com/teohm/natives-catalog/blob/master/catalogs/rubygems.yaml) \u003c-- calling for contributions! :-)**\n* new catalog contributions e.g. for \"npm\" are welcomed too! Just submit your PR.\n\n### Catalog load paths\n\nIt loads YAML files (.yaml, .yml) from the following paths in this order:\n\n1. `catalogs/` in this gem.\n2. `natives-catalogs/` in current working directory, if any.\n\nWhen there are multiple YAML files in a path, they are **sorted by filename** and loaded in that order.\n\n### Catalog YAML format\n\nA catalog file is written in YAML, based on this format:\n\n```\ncatalog_name:\n  entry_name:\n    package_provider:\n      platform:\n        platform_version:\n          - package_name\n```\n\nFor example,\n\n```\nrubygems:\n  capybara-webkit:\n    homebrew:\n      mac_os_x:\n        10.7.5:\n          - libqtwebkit-dev\n```\n\n#### Use `default` when apply to all platforms\n\n```\nrubygems:\n  curb:\n    apt:\n      default:\n        - libcurl4-openssl-dev\n\n```\n\n#### Use `default` when apply to all platform versions\n\n```\nrubygems:\n  capybara-webkit:\n    homebrew:\n      mac_os_x:\n        default:\n          - libqtwebkit-dev\n```\n\n#### Use array to group platform versions\n\n```\nrubygems:\n  capybara-webkit:\n    apt:\n      ubuntu:\n        [10.04, 10.04.1, 10.04.2, 10.04.3, 10.04.4]:\n          - libqt4-dev\n        default:\n          - libqtwebkit-dev\n```\n\n\n#### Supported values for platforms and package providers\n\nNot in the list? No worry, submit a PR to patch [`host_detection/package_provider.rb`](https://github.com/teohm/natives/blob/master/lib/natives/host_detection/package_provider.rb).\n\n##### Package providers\n```\naix\nyum\npackman\napt\nfeebsd\nportage\nhomebrew\nmacports\nsolaris\nips\nzypper\nsmartos\n```\n\n##### Platforms\n```\naix\namazon\narch\ncentos\ndebian\nfedora\nfreebsd\ngcel\ngentoo\nlinaro\nlinuxmint\nmac_os_x\nmac_os_x_server\nnexentacore\nomnios\nopenindiana\nopensolaris\nopensuse\noracle\nraspbian\nredhat\nscientific\nsmartos\nsolaris2\nsuse\nubuntu\nxcp\nxenserver\n```\n\n## Related work\n\n* [gem-nice-install](https://github.com/voxik/gem-nice-install/) - uses\n  rubygems plugin API to auto-install natives dependencies, now supports\n  fedora only.\n\n## Contributing to natives\n\n* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.\n* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.\n* Fork the project.\n* Start a feature/bugfix branch.\n* Commit and push until you are happy with your contribution.\n* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.\n* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.\n\n## Copyright\n\nCopyright (c) 2013 Huiming Teo. See LICENSE.txt for\nfurther details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteohm%2Fnatives","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteohm%2Fnatives","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteohm%2Fnatives/lists"}