{"id":16334798,"url":"https://github.com/berbiche/sample-flake-rust","last_synced_at":"2026-04-19T03:03:52.528Z","repository":{"id":119107993,"uuid":"289142420","full_name":"berbiche/sample-flake-rust","owner":"berbiche","description":"Sample nix Flake repository for a Rust application","archived":false,"fork":false,"pushed_at":"2020-10-12T23:26:07.000Z","size":10,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-16T09:10:05.342Z","etag":null,"topics":["flake","nix","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/berbiche.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}},"created_at":"2020-08-21T00:50:44.000Z","updated_at":"2025-03-02T12:21:56.000Z","dependencies_parsed_at":"2023-12-27T07:15:47.586Z","dependency_job_id":null,"html_url":"https://github.com/berbiche/sample-flake-rust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/berbiche/sample-flake-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berbiche%2Fsample-flake-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berbiche%2Fsample-flake-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berbiche%2Fsample-flake-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berbiche%2Fsample-flake-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berbiche","download_url":"https://codeload.github.com/berbiche/sample-flake-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berbiche%2Fsample-flake-rust/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268638667,"owners_count":24282633,"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-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["flake","nix","rust"],"created_at":"2024-10-10T23:39:18.518Z","updated_at":"2026-04-19T03:03:52.482Z","avatar_url":"https://github.com/berbiche.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Rust project with nix Flakes\n\nThis is a stub repository to develop using Rust, nix and Flakes.\n\nThis is aimed to people with basic knowledge of Flakes and moderate knowledge of Nix.\nSee the [NixOS Wiki](https://nixos.wiki/wiki/Flakes) for more information about Flakes.\nThe relevant sections are `Basic project usage` and `Flake schema`.\n\n## Getting started\n\n1. Install [direnv](https://github.com/direnv/direnv) on your system by following the instructions\nprovided on the project page.  \n  **Important**: you can skip this step if you do not intend to use direnv as it's optional.\n\n    `direnv` is a tool that setups your shell with the required environment variables (and tools in\n  the case of Nix) to hack on!\n\n2. Clone the project\n\n    ``` console\n    $ git clone git@github.com:berbiche/sample-flake-rust\n    Cloning into 'sample-flake-rust'...\n    direnv: error .envrc is blocked.\n    ```\n\n    If you have `direnv` installed and configured for your shell you will see the following error message:\n\n    ```\n    direnv: error /path/sample-flake-rust/.envrc is blocked.\n    Run `direnv allow` to approve its content\n    ```\n\n3. If you installed `direnv` then allow `direnv` to setup your shell with the required dependencies to develop\n\n    ``` console\n    $ direnv allow\n    direnv: loading /path/sample-flake-rust/.envrc\n    direnv: using flake\n    ```\n\n## Development\n\nUse `nix shell` to spawn a shell with `cargo` and all necessary dependencies.\n\nWithin this shell you can use `cargo` commands as you normally would.\n\nIf your project requires external dependencies (outside of `crates.io`) then use `nix run '.#my-package'`\nto build and run your project.\n\n## Commands cheatsheet\n\n- `nix shell`: Spawns a shell with all the required development dependencies.\n\n- `nix develop`: Spawns a shell with all the dependencies needed to build the Flake you specify.\n  Defaults to the `defaultPackage` specified in `flake.nix`.\n\n- `nix run`: Builds and runs the package specified. Defaults to the `defaultPackage` specified\n  in `flake.nix`.\n\n  Example: `nix run '.#hello'` will run the package `hello` specified in your `flake.nix`.\n\n- `nix build`: Builds the package specified. Defaults\n\n  Example: `nix build '.#hello'` will build the package `hello` specified in your `flake.nix`.\n  The resulting build will be available at `./result/`\n\n## Howtos\n\n- Q: I build multiple binaries, how do I manage that?\n- A: I don't have the answer yet\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberbiche%2Fsample-flake-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberbiche%2Fsample-flake-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberbiche%2Fsample-flake-rust/lists"}