{"id":16199976,"url":"https://github.com/agateau/devo","last_synced_at":"2025-08-14T11:31:54.172Z","repository":{"id":3634496,"uuid":"4701164","full_name":"agateau/devo","owner":"agateau","description":"Development Overlay","archived":false,"fork":false,"pushed_at":"2020-06-16T15:57:13.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T19:49:54.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/agateau.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}},"created_at":"2012-06-18T13:24:15.000Z","updated_at":"2020-06-16T15:57:17.000Z","dependencies_parsed_at":"2022-08-18T21:51:07.379Z","dependency_job_id":null,"html_url":"https://github.com/agateau/devo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fdevo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fdevo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fdevo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agateau%2Fdevo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agateau","download_url":"https://codeload.github.com/agateau/devo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247703810,"owners_count":20982286,"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-10T09:28:53.464Z","updated_at":"2025-04-07T17:47:18.864Z","avatar_url":"https://github.com/agateau.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devo - Developer Overlay\n\nDevo is a system to define custom environments to build and install software\nusing different settings.\n\nThe idea is to define separate build and install dirs, in your home dir.\n\nHere is an example of what the dir hierarchy could look like:\n\n    $HOME/\n        src\n            libfoo\n            fooserver\n            bar\n        build\n            overlay1\n                libfoo\n                fooserver\n            overlay2\n                bar\n        install\n            overlay1\n                bin\n                share\n                lib\n                ...\n            overlay2\n                bin\n                share\n                lib\n                ...\n\nWith such a setup, one could start a shell on using `overlay1` like this:\n\n    devo_sh overlay1\n\nAfter this command, assuming `overlay1` has been correctly set up,\n`$HOME/install/overlay1/bin` would be in $PATH, making it possible to run\nsoftware installed there.\n\nIf libfoo uses the CMake build system, one can then build it with:\n\n    cd $HOME/build/overlay1/libfoo\n    devo_cmake\n    make\n    make install\n\nDevo also provides handy commands to switch dirs, `devo_cb` changes to the build\ndir, `devo_cs` changes to the source dir.\n\n    cd $HOME/src/libfoo\n\n    devo_cb\n    # $PWD is now $HOME/build/overlay1/libfoo\n\n    devo_cs\n    # $PWD is now $HOME/src/libfoo\n\n`devo_cmake` is also smart enough to run in the build dir, and Devo comes with a\nthin wrapper for `make`: `devo_make` which brings build dir awareness as well,\nso one can also build libfoo like this:\n\n    cd $HOME/src/libfoo\n    devo_cmake\n    devo_make\n    devo_make install\n\n## Variables used by Devo\n\n- `$DEVO_NAME`: The name of the overlay (\"overlay1\" or \"overlay2\")\n\n- `$DEVO_SOURCE_BASE_DIR`: Where source is stored ($HOME/src). Can be common, or\nspecific to an overlay.\n\n- `$DEVO_BUILD_BASE_DIR`: Where build dirs for component will be created\n($HOME/build/overlay1)\n\n- `$DEVO_BUILD_BASE_ROOT_DIR`: The dir which contains all `$DEVO_BUILD_BASE_DIR`\n($HOME/build)\n\n- `$DEVO_PREFIX`: The dir where components will be installed\n  ($HOME/install/overlay1)\n\n## Initial setup\n\nFirst, create the `~/.devo/` dir. This dir will contain all the overlay\ndefinitions.\n\nNext create a file named `~/.devo/_base`. This file is loaded before activating\nany overlay. Define the `DEVO_BUILD_BASE_ROOT_DIR` in it:\n\n    export DEVO_BUILD_BASE_ROOT_DIR=/path/to/build/root/dir\n\nFinally, add the following lines to your shell:\n\n    . /path/to/devo/lib/devo/devo-setup.source\n\n## Creating an overlay\n\nCreate an overlay file in `~/.devo/`. The file name is used as the overlay name.\nThis file is a shell script which should at least define the following\nvariables:\n\n- `$DEVO_PREFIX`\n- `$DEVO_SOURCE_BASE_DIR`\n\nIt may also define:\n\n- `$DEVO_CMAKE_BUILD_TYPE`: Build type argument passed by `devo_cmake` to `cmake`.\n\nAnd other variables relevant for your environment:\n\n- `$PATH`\n- `$PKG_CONFIG_PATH`\n- ...\n\nDevo also provides some shell functions which can be used in overlay files:\n\n- `_devo_prepend_prefix \u003carg\u003e`: assume `$arg` is an install prefix and prepend\n  its sub dirs (`$arg/bin`, `$arg/lib`...) to `$PKG_CONFIG_PATH`,\n  `$LD_LIBRARY_PATH`, `$CMAKE_PREFIX_PATH`, `$PATH` and `$PYTHONPATH`.\n\n- `_devo_prepend_path \u003carg\u003e`: shortcut for `export PATH=$arg:$PATH`.\n\n- `_devo_append_path \u003carg\u003e`: shortcut for `export PATH=$PATH:$arg`.\n\n## Tools\n\n### `devo_sh`\n\nStarts a new shell with the specified overlay loaded:\n\n    devo_sh work\n\nStarts a new shell with the \"work\" overlay. Leave the shell with Ctrl+D or\n`exit` to unload all the changes.\n\n### `devo_setup`\n\nLoads an overlay in the current shell:\n\n    devo_setup work\n\nLoads the \"work\" overlay.\n\n### `devo_cmake`\n\nRun `cmake` with the right prefix and build type option. Usage:\n\n    devo_cmake /path/to/source/dir\n\nWhen run without an argument, it tries to figure out the source dir using\n`$DEVO_SOURCE_BASE_DIR` and the base name of the current dir.\n\nFor example if you run `devo_cmake` from dir `$DEVO_BUILD_BASE_DIR/foo`, it\nwill use `$DEVO_SOURCE_BASE_DIR/foo` as the source dir.\n\n### `devo_make`\n\nWrapper around make: switch to the build dir and runs make from there.\n\nIf there is no `Makefile` file in the build dir, but there is one file whose\nname starts with `Makefile`, uses this file instead.\n\n### `devo_run`\n\nRun a command using a specific overlay:\n\n    devo_run work mytool arg1 arg2\n\nLoads the \"work\" overlay and runs `mytool arg1 arg2`.\n\n### `devo_cb`\n\nWhen in a source dir, change to the matching build dir.\n\nIf a matching build dir does not exist, try to find an existing parent build\ndir, for example given this setup:\n\n    $DEVO_SOURCE_BASE_DIR\n        prj1\n            foo\n\n    $DEVO_BUILD_BASE_DIR\n        prj1\n\nIf you are in `$DEVO_SOURCE_BASE_DIR/prj1/foo`, `devo_cb` will switch to\n`$DEVO_BUILD_BASE_DIR/prj1`.\n\nIf no build dir can be found but user is in a source dir, `devo_cb` offers to\ncreate it.\n\nWhen outside of a source dir, `devo_cb` prints an error.\n\n### `devo_cs`\n\nWhen in a build dir, change to the matching source dir if it exists, otherwise\nstays there.\n\n## Interesting variables to set in `~/.devo/_base`\n\nSince `~/.devo/_base` is sourced before loading a new overlay, you can define a\nbase environment in it, for example you can define a base value for `$PATH` or\nfor `$CC` and `$CXX`.\n\n## Shell integration goodies\n\nWhen an overlay is loaded, the `$DEVO_NAME` variable contains its name. It can\nbe handy to add this to your prompt.\n\nZsh users can add the following to their `.zshrc`:\n\n    cd() {\n        builtin cd $*\n        devo_setup_from_pwd\n    }\n\nThis makes Devo load the matching overlay when cd-ing to an overlay build dir.\n\nTODO: Find the bash equivalent\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagateau%2Fdevo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagateau%2Fdevo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagateau%2Fdevo/lists"}