{"id":16333384,"url":"https://github.com/mic92/fast-flake-update","last_synced_at":"2025-03-16T14:31:11.307Z","repository":{"id":167690138,"uuid":"643313397","full_name":"Mic92/fast-flake-update","owner":"Mic92","description":"Update flake.lock with the latest commit of a local checkout","archived":false,"fork":false,"pushed_at":"2024-04-29T00:39:10.000Z","size":58,"stargazers_count":22,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T00:16:37.793Z","etag":null,"topics":["build-with-buildbot","flake","nix"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mic92.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-05-20T19:04:55.000Z","updated_at":"2024-05-06T01:36:02.453Z","dependencies_parsed_at":"2023-10-16T14:54:11.854Z","dependency_job_id":"67af6cec-b4ae-4b68-8e41-018af6ed7723","html_url":"https://github.com/Mic92/fast-flake-update","commit_stats":null,"previous_names":["mic92/fast-flake-update"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mic92%2Ffast-flake-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mic92%2Ffast-flake-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mic92%2Ffast-flake-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mic92%2Ffast-flake-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mic92","download_url":"https://codeload.github.com/Mic92/fast-flake-update/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818194,"owners_count":20352629,"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":["build-with-buildbot","flake","nix"],"created_at":"2024-10-10T23:35:26.119Z","updated_at":"2025-03-16T14:31:10.975Z","avatar_url":"https://github.com/Mic92.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fast-flake-update\n\n\u003e Written next to a pool in Mahalapye, Botswana.\n\nThis tool improves the _efficiency_ of updating flake inputs in\n[nix](https://nixos.org) from local git repository checkouts.\n\nWhen using `nix flake update` with inputs from GitHub or GitLab, the entire\narchive needs to be re-downloaded for every commit change. This process becomes\nespecially slow for repositories like\n[nixpkgs](https://github.com/NixOS/nixpkgs).\n\n`fast-flake-update` uses of a local git checkout for updating the flake lock.\nAdditionally, it adds the checkout to the nix store. This approach allows for\nfaster iterations when testing changes, significantly improving development\nefficiency.\n\nThis is conceptually similar to\n`nix flake lock --update-input inputA ~/code/inputA` but avoids the round-trip\nof pushing to a git remote, and then re-acquiring the git archive. Since this\ncopies to the store, and uses the same archive format, it results in the same\ndiff to `flake.lock`.\n\n## Usage\n\n\u003c!-- `$ python ./bin/fast-flake-update --help` --\u003e\n\n```\nusage: fast-flake-update [-h] [--rev REV] inputname repo\n\nUpdate flake.lock with the latest commit of a local checkout\n\npositional arguments:\n  inputname   Name of the input in flake.lock to update\n  repo        Path to the local checkout\n\noptions:\n  -h, --help  show this help message and exit\n  --rev REV   Revision to use\n```\n\n## Example\n\nLet's say you have a project with the following `flake.nix`:\n\n```nix\n{\n  description = \"Your flake with the nixpkgs input\";\n\n  inputs = {\n    nixpkgs.url = \"github:NixOS/nixpkgs/nixos-unstable\";\n  };\n\n  outputs = { ... }: {\n    # ...\n  };\n}\n```\n\nNow you can quickly do some commits in your local nixpkgs fork that is located\nat `../nixpkgs`. Then you can update your project's flake.lock to the same\ncommit like that:\n\n```\nfast-flake-update nixpkgs ../nixpkgs\n```\n\n## Installation\n\nYou can run fast-flake-update like this from the repository:\n\n```\nnix run github:Mic92/fast-flake-update nixpkgs ../nixpkgs\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmic92%2Ffast-flake-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmic92%2Ffast-flake-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmic92%2Ffast-flake-update/lists"}