{"id":13610954,"url":"https://github.com/nickel-lang/organist","last_synced_at":"2025-04-13T01:33:42.856Z","repository":{"id":37831457,"uuid":"460802072","full_name":"nickel-lang/organist","owner":"nickel-lang","description":"Control all your tooling from a single console","archived":false,"fork":false,"pushed_at":"2024-05-22T15:14:06.000Z","size":536,"stargazers_count":339,"open_issues_count":23,"forks_count":18,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-05-22T15:52:09.533Z","etag":null,"topics":["developer-tools","development","development-environment","nickel","nix"],"latest_commit_sha":null,"homepage":"","language":"NCL","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/nickel-lang.png","metadata":{"files":{"readme":"README.ideal.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":"roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-18T10:09:58.000Z","updated_at":"2024-05-27T17:33:28.641Z","dependencies_parsed_at":"2023-11-22T18:25:22.120Z","dependency_job_id":"c1b3c586-4500-499b-8b79-77aaead74dc6","html_url":"https://github.com/nickel-lang/organist","commit_stats":null,"previous_names":["nickel-lang/organist"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickel-lang%2Forganist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickel-lang%2Forganist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickel-lang%2Forganist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickel-lang%2Forganist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickel-lang","download_url":"https://codeload.github.com/nickel-lang/organist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558429,"owners_count":17165129,"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":["developer-tools","development","development-environment","nickel","nix"],"created_at":"2024-08-01T19:01:49.925Z","updated_at":"2024-11-07T17:30:57.545Z","avatar_url":"https://github.com/nickel-lang.png","language":"NCL","funding_links":[],"categories":["NCL"],"sub_categories":[],"readme":"_Ni-Mh — batteries included environments with Nickel inside_.\n\nManaging a project's development environment involves configuring a lot of tools and occasionally getting to communicate with each other: one (or several) package managers, a CI system, a service manager (to run that local postgresql database without which you can't test anything), custom utility scripts that end up spawning everywhere, etc.\nNi-Mh (called “nickel-nix” or “Nixel” at the moment, but I really like Ni-Mh) aims at being your main entrypoint for managaing all these different tools, so that you can get:\n\n1. A unified configuration framework for all of these\n2. A powerful and ergonomic language to allow you to easily abstract over these configurations, with discoverability and early error reporting\n\n## Getting started\n\nTo start using `nickel-nix`, you need `Nix` to be installed and configured.\nIf it isn't already the case, you can get it with:\n\n```console\n$ curl -L https://nixos.org/nix/install | bash\n# We also need a couple of experimental Nix features\n$ mkdir -p ~/.config/nix\n$ echo 'experimental-features = nix-command flakes' \u003e\u003e ~/.config/nix/nix.conf\n```\n\nThen bootstrap a project with:\n\n```console\n$ nix flake init -t github:nickel-lang/nickel-nix\n# Edit the project file to fit your needs\n$ $EDITOR project.ncl\n# Enter the environment\n$ nix develop\n```\n\n## Managing your environment with Nixel\n\n### Dependencies\n\nNixel can be used to declare the dependencies for your project.\nThese can then be instantiated using [Nix](https://nixos.org/nix).\n\nMore information on \u003c./doc-ideal/dependency-management.md\u003e.\n\n### CI configuration\n\nYou can use Nixel to generate a CI configuration.\nThis is extremely handy if you want to test some non-trivial matrix of platforms/configuration.\n\n\u003e TODO: Document\n\n### Development services\n\nNixel can also be used for some simple service management.\nIn combination with the Nix integration, this allows you to quickly spawn any service that you might depend on.\n\nOnce the services have been defined in your `project.ncl` file, you can run `nixel up` to start them.\n\n\u003e TODO: Document\n\n### Deployment\n\nIf you want to push things yet a bit further, Nixel can also be used to manage the deployment of your project, using for instance [tf-ncl](https://github.com/tweag/tf-ncl) or [nickel-kubernetes](https://github.com/tweag/nickel-kubernetes/).\n\n\u003e TODO: Document\n\n## Structure of the `project.ncl` file\n\n`project.ncl` is the main entrypoint for `nickel-nix`.\nIt describes the packages that should be included in your development environment, as well as the template for any file you'd like to generate:\n\n```nickel\nlet Nixel = import \".nickel-nix/lock.ncl\" in\nlet inputs = Nixel.nix.import_flake \".\" in\n{\n  shells = Nixel.shells.Rust,\n  shells = Nixel.shells.Nickel,\n\n  shells.build = {\n    packages = [inputs.nixpkgs.pandoc],\n    scripts = {\n      build = nix-s%\"\n                #!/usr/bin/env bash\n\n                %{inputs.nixpkgs.gnumake}/bin/make -j$(nproc) -l$(nproc)\n            \"%,\n    },\n  },\n\n  shells.dev = {\n    env = {\n      DEV_ENDPOINT = \"http://localhost:1234\",\n    },\n    packages = [inputs.nixpkgs.nodePackages.prettier],\n  },\n  services = {\n    postgresql = Nixel.services.postgresql,\n    redis.start = nix-s%\"\n            %{inputs.nixpkgs.redis}/bin/redis\n        \"%,\n    # Optional, will do the right things by default\n    # redis.stop = \"kill $PID\",\n  },\n  ci.github_actions =\n    let CI = Nixel.CI.GithubActions in\n      {\n        jobs.build =\n          CI.matrix\n            {\n              system = [{ os : \"ubuntu-latest\" }, { os : \"macos-latest\" }],\n              configVariant = [\"FOO=1\", \"FOO=2\"],\n              config = [\n                {\n                  system | { os : String },\n                  steps =\n                    # The steps that you'll want in nearly any case: Checkout the repo,\n                    # check that the Nixel configuration is up-to-date, etc..\n                    CI.standardSteps\n                    + [\n                      (\n                        CI.steps.runInEnv\n                          m%\"\n                %{configVariant} build\n                make check\n                \"%\n                      )\n                      \u0026 { name = \"test\" }\n                    ],\n                }\n              ],\n            }.config,\n      },\n}\n```\n\n## Local overrides\n\nIf a file `project.local.ncl` is present, then it will be merged with `project.ncl`. This allows locally overriding some parts of the development environment.\n\nFor instance, a `project.local.ncl` like the below will add [hyperfine](https://github.com/sharkdp/hyperfine) to the development shell:\n\n```nickel\nlet Nixel = import \".nickel-nix/lock.ncl\" in\n{\n  shells.dev.packages = [ Nixel.nix.inputs.nixpkgs.hyperfine ],\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickel-lang%2Forganist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickel-lang%2Forganist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickel-lang%2Forganist/lists"}