{"id":28610984,"url":"https://github.com/crytic/crytic.nix","last_synced_at":"2025-06-11T23:11:17.968Z","repository":{"id":272984511,"uuid":"899087562","full_name":"crytic/crytic.nix","owner":"crytic","description":"A flake.nix for easy access to crytic tools","archived":false,"fork":false,"pushed_at":"2025-01-29T15:59:26.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-07T23:35:37.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","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/crytic.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":"2024-12-05T15:44:58.000Z","updated_at":"2025-01-29T15:59:30.000Z","dependencies_parsed_at":"2025-01-17T21:30:13.728Z","dependency_job_id":null,"html_url":"https://github.com/crytic/crytic.nix","commit_stats":null,"previous_names":["crytic/crytic.nix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crytic/crytic.nix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fcrytic.nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fcrytic.nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fcrytic.nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fcrytic.nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crytic","download_url":"https://codeload.github.com/crytic/crytic.nix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Fcrytic.nix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259361132,"owners_count":22845836,"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":"2025-06-11T23:11:16.918Z","updated_at":"2025-06-11T23:11:17.963Z","avatar_url":"https://github.com/crytic.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Crytic flake.nix\n\n## Getting Started\n\nMake sure nix is installed and that `nix-command` and `flakes` features are enabled. The [Determinate Systems nix-installer](https://determinate.systems/nix-installer/) will automatically enable these features and is the recommended approach. If nix is already installed without these features enabled, you can run the following commands to enable them.\n\n```\nmkdir -p ~/.config/nix\necho 'experimental-features = nix-command flakes' \u003e ~/.config/nix/nix.conf\n```\n\n## Direct Usage\n\nOnce you have nix installed, you can run the following to use slither without installing anything globally; like a single-serving virtualenv. The first time this is run, it will take time as slither's dependencies (eg crytic-compile) are downloaded and the project is built, but subsequent runs will execute almost instantly without requiring any further downloads. More info re [nix run](https://determinate.systems/posts/nix-run/).\n\n`nix run git+ssh://git@github.com/crytic/crytic.nix#slither -- --help`\n\nYou can use the following just command to install slither globally via your `nix profile`. This installation is hooked up to a new copy of required dependencies, so it'll take care of the `crytic-compile` dependency w/out any risk of conflict w an existing global crytic-compile installation.\n\n`just install slither`\n\nYou can also build the slither executable and run it directly.\n\n`just build slither \u0026\u0026 ./result/bin/slither --help`\n\nSupported tools:\n- cloudexec\n- crytic-compile\n- echidna\n- medusa\n- slither\n- solc-select\n- vscode (including weaudit, sarif explorer, and other generic extensions that are helpful for auditors)\n\n## Usage via other flakes\n\nThis crytic.nix flake, when used as an input to an \"audit toolbox\" flake in your audit repository, provides 2 collections of utilities:\n- `crytic.packages.${system}.supported-tool`: the default version of some supported tool, as specified by the flake in this repo.\n- `crytic.lib.${system}.mkSupportedTool`: a function that generates some supported tool from inputs such as a `commitHash`, `version`, and instances of each crytic dependency.\n\nUsage in an audit repo might look something like the following:\n\n```nix\n{\n  inputs = {\n    nixpkgs.url = \"github:nixos/nixpkgs\";\n    utils.url = \"github:numtide/flake-utils\";\n    foundry.url = \"github:shazow/foundry.nix/monthly\";\n    crytic.url = \"github:crytic/crytic.nix\";\n    crytic.inputs.nixpkgs.follows = \"nixpkgs\";\n  };\n\n  outputs = inputs: with inputs;\n    utils.lib.eachDefaultSystem (system: let\n      pkgs = import nixpkgs { inherit system; overlays = [ foundry.overlay ]; };\n\n      # Use a specific commit of crytic compile that has some hotfix or extra debug logs\n      crytic-compile = crytic.lib.${system}.mkCryticCompile {\n          commitHash = \"0e5457afa28723fb39c419c4d0e3e2097d4235a8\";\n          version = \"PR411\"; # human-readable label eg which PR this commit is from\n      };\n\n    in rec {\n\n        devShells.default = pkgs.mkShell {\n          buildInputs = with pkgs; [\n            # misc dev deps from nixpkgs\n            yarn\n            foundry-bin\n            # crytic audit tools\n            crytic.packages.${system}.solc-select\n            crytic-compile\n            # use our custom version of crytic-compile in slither\n            (crytic.lib.${system}.mkSlither {\n              inherit crytic-compile;\n            })\n            crytic.packages.${system}.echidna\n            crytic.packages.${system}.medusa\n            (crytic.lib.${system}.mkVscode {\n              extensions = with pkgs.vscode-extensions; [\n                vscodevim.vim # Add more vscode extensions like so\n              ];\n            })\n          ];\n        };\n\n      }\n    );\n}\n```\n\nThe above flake provides a development environment for auditing which includes:\n- yarn + foundry for building/testing smart contracts. A specific version of foundry could be set by pinning the foundry input.\n- the default version of solc-select, echidna, and medusa.\n- a specific commit of crytic-compile, tagged with a human-readable version label\n- the default version of slither but using our custom crytic-compile as a dependency\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fcrytic.nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrytic%2Fcrytic.nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Fcrytic.nix/lists"}