{"id":15680678,"url":"https://github.com/brokenpip3/asdf2nix","last_synced_at":"2025-07-23T12:34:56.328Z","repository":{"id":229525192,"uuid":"776956857","full_name":"brokenpip3/asdf2nix","owner":"brokenpip3","description":"asdf2nix is a tool that translates an asdf .tool-versions file into a flake or execute a nix shell","archived":false,"fork":false,"pushed_at":"2025-06-22T16:32:56.000Z","size":51,"stargazers_count":17,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-22T16:35:48.602Z","etag":null,"topics":["asdf","flake","nix"],"latest_commit_sha":null,"homepage":"https://www.brokenpip3.com/posts/2024-27-06-nix-tiny-tools/","language":"Python","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/brokenpip3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-24T22:27:59.000Z","updated_at":"2025-06-22T16:32:59.000Z","dependencies_parsed_at":"2024-03-29T20:30:13.376Z","dependency_job_id":"d181fc77-47c4-4d93-8aee-b1d41311fd31","html_url":"https://github.com/brokenpip3/asdf2nix","commit_stats":null,"previous_names":["brokenpip3/asdf2nix"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/brokenpip3/asdf2nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokenpip3%2Fasdf2nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokenpip3%2Fasdf2nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokenpip3%2Fasdf2nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokenpip3%2Fasdf2nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brokenpip3","download_url":"https://codeload.github.com/brokenpip3/asdf2nix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brokenpip3%2Fasdf2nix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266680305,"owners_count":23967791,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["asdf","flake","nix"],"created_at":"2024-10-03T16:43:53.432Z","updated_at":"2025-07-23T12:34:56.304Z","avatar_url":"https://github.com/brokenpip3.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asdf2nix\n\n**asdf2nix** is a tool that converts an [asdf](https://asdf-vm.com/) `.tool-versions` file into a Nix flake or run a nix shell, simplifying the process of transitioning from asdf to Nix.\n\n## Usage\n\nTo use **asdf2nix**, run the following command in your project root where the `.tool-versions` file is located:\n\n```bash\nnix run github:brokenpip3/asdf2nix -- \u003ccommand\u003e\n```\n\nYou can also specify the file location as an argument if it's in a different directory.\n\n**Note:** Make sure Nix is installed on your system and that flakes are enabled before using this tool.\n\n## Commands\n\n### Flake\n\n```bash\nnix run github:brokenpip3/asdf2nix -- flake\n```\n\nThis command generates a flake based on the packages listed in the `.tool-versions` file:\n\n```bash\n$ cat .tool-versions\nterraform 1.5.2\nnodejs 16.15.0\n\n$ nix run github:brokenpip3/asdf2nix -- flake\n\n{\n  description = \"A flake with devshell generated from .tools-version\";\n\n  inputs = {\n    nixpkgs.url = \"github:NixOS/nixpkgs/nixos-unstable\";\n    flake-utils.url = \"github:numtide/flake-utils\";\n    terraform_1_5_2.url = github:NixOS/nixpkgs/0b9be173860cd1d107169df87f1c7af0d5fac4aa;\n    nodejs_16_15_0.url = github:NixOS/nixpkgs/7b7fe29819c714bb2209c971452506e78e1d1bbd;\n\n  };\n\n  outputs = { self, nixpkgs, flake-utils, ... }@inputs:\n    flake-utils.lib.eachDefaultSystem (system:\n      let\n        pkgs = nixpkgs.legacyPackages.${system};\n        terraform = inputs.terraform_1_5_2.legacyPackages.${system}.terraform;\n        nodejs = inputs.nodejs_16_15_0.legacyPackages.${system}.nodejs;\n\n      in\n        {\n          devShells.default = pkgs.mkShell {\n            packages = [\n              terraform\n              nodejs\n\n            ];\n          };\n      }\n    );\n}\n```\n\n### Shell\n\n```bash\nnix run github:brokenpip3/asdf2nix -- shell\n```\n\nThis command generates and executes a Nix shell based on the packages specified in the `.tool-versions` file.\n\n```bash\n$ cat .tool-versions\nterraform 1.5.2\nnodejs 16.15.0\n\n$ nix run github:brokenpip3/asdf2nix -- shell\nGenerating shell from .tool-versions: nix shell nixpkgs/0b9be173860cd1d107169df87f1c7af0d5fac4aa#terraform nixpkgs/7b7fe29819c714bb2209c971452506e78e1d1bbd#nodejs\n\n$ terraform version\nTerraform v1.5.2\non linux_amd64\n...\n```\n\n## Limitations\n\nDue to the fact that not all patch versions are present, a slight change between patch versions is tolerated (e.g., `3.4.1` vs `3.4.3`), while a change in minor/major versions will not be considered.\n\n## Credits\n\n* Special thanks to `RikudouSage` for the versions [database](https://github.com/RikudouSage/NixPackageHistoryBackend).\n\n* This repository was initialized with:\n\n```bash\nnix flake init -t github:brokenpip3/my-flake-templates#python-poetry\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrokenpip3%2Fasdf2nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrokenpip3%2Fasdf2nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrokenpip3%2Fasdf2nix/lists"}