{"id":16345239,"url":"https://github.com/jonringer/nixos-polytest","last_synced_at":"2025-04-12T03:14:29.070Z","repository":{"id":244341602,"uuid":"811630759","full_name":"jonringer/nixos-polytest","owner":"jonringer","description":"Allow you to evaluate many nixos closures from different points in time","archived":false,"fork":false,"pushed_at":"2024-06-18T16:58:14.000Z","size":37,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T03:14:24.379Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Nix","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/jonringer.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":"2024-06-07T01:40:00.000Z","updated_at":"2024-10-22T15:41:10.000Z","dependencies_parsed_at":"2024-06-14T05:39:41.769Z","dependency_job_id":"3044785b-5559-4f5a-b5b7-03a9eeff95ff","html_url":"https://github.com/jonringer/nixos-polytest","commit_stats":null,"previous_names":["jonringer/nixos-polytest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Fnixos-polytest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Fnixos-polytest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Fnixos-polytest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonringer%2Fnixos-polytest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonringer","download_url":"https://codeload.github.com/jonringer/nixos-polytest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248510001,"owners_count":21116130,"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-11T00:30:22.615Z","updated_at":"2025-04-12T03:14:29.052Z","avatar_url":"https://github.com/jonringer.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NixOS Polytest\n\nAllow for multiple nixpkgs evaluations within a \"runTest\" like environment\n\n## Minimal example\n\n```nix\n{\n  description = \"Example poly nixpkgs tests\";\n\n  inputs = {\n    nixpkgs-2311.url = \"github:nixos/nixpkgs/nixos-23.11\";\n    nixpkgs-2405.url = \"github:nixos/nixpkgs/nixos-24.05\";\n    poly-test.url = \"github:jonringer/nixos-polytest\";\n  };\n\n  outputs = { nixpkgs-2311, nixpkgs-2405, poly-test, self }: let\n    # This can be a linux or darwin system\n    hostPkgs = import nixpkgs-2311 { system = \"x86_64-linux\"; };\n    runPolyTest = poly-test.lib.mkRunPolyTest hostPkgs;\n  in {\n    checks.x86_64-linux.example = runPolyTest {\n      name = \"example-polytest\";\n\n      testScript = ''\n        start_all()\n        foo.wait_for_unit(\"multi-user.target\")\n        bar.wait_for_unit(\"multi-user.target\")\n        \n        foo.succeed(\"grep 23.11 /etc/os-release\")\n        bar.succeed(\"grep 24.05 /etc/os-release\")\n      '';\n\n      nodes.a = {\n        nixpkgsPath = toString nixpkgs-2311;\n        specialArgs = { };\n        modules = [ {\n          system.name = \"foo\";\n        }];\n      };\n\n      nodes.b = {\n        nixpkgsPath = toString nixpkgs-2405;\n        specialArgs = { };\n        modules = [ {\n          system.name = \"bar\";\n        }];\n      };\n    };\n  };\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonringer%2Fnixos-polytest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonringer%2Fnixos-polytest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonringer%2Fnixos-polytest/lists"}