Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diskuv/dkml-component-unixutils
unixutils are Unix utilities available to installers on all platforms including Windows
https://github.com/diskuv/dkml-component-unixutils
Last synced: 8 days ago
JSON representation
unixutils are Unix utilities available to installers on all platforms including Windows
- Host: GitHub
- URL: https://github.com/diskuv/dkml-component-unixutils
- Owner: diskuv
- License: apache-2.0
- Created: 2022-02-28T17:33:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-01T23:17:47.000Z (about 1 year ago)
- Last Synced: 2023-09-03T00:20:04.218Z (about 1 year ago)
- Language: OCaml
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unixutils 0.1.0
The unixutils components provides common Unix utilities to all DKML
installable platforms, including Windows.These components can be used with [dkml-install-api](https://diskuv.github.io/dkml-install-api/index.html)
to generate installers.MSYS2 provides the Windows environment. When building with MSYS2 or with
Diskuv OCaml, you will need to first install pkg-config so that the OCaml
package ``conf-pkg-config``, a dependency of ``digestif``, can be built:```bash
pacman -S mingw-w64-clang-x86_64-pkg-config
```## Components
### network-unixutils
Network installation of Unix utilities. Pick this or `offline-unixutils`.
### offline-unixutils
Offline installation of Unix utilities. Pick this or `network-unixutils`.
### staging-unixutils
Internal shared bytecode between `network-unixutils` and `offline-unixutils`.
You should never need to directly rely on this component.## Utilities
On Windows an MSYS2 installation will be available
at `%{prefix}%/tools/MSYS2`. However you should rely on the utility
paths documented below so your installation can work
on non-Windows/non-MSYS2 systems.### sh
> `%{prefix}%/tools/unixutils/bin/sh`
On Windows the `sh.exe` is MSYS2's dash.exe. You will not
need to modify the PATH to run `sh.exe` since all shared
library dependencies like `msys-2.0.dll` will be present
alongside `sh.exe`.On Unix and macOS the `sh` is a symlink to `/bin/dash` if Dash
is available, or `/bin/sh` if not.## Testing
In PowerShell on Windows, to mimic [dkml_component_offline_unixutils.ml](src/buildtime_installer/dkml_component_offline_unixutils.ml):
```powershell
opam install .
if (!(Test-Path _build\tmp)) { New-Item -ItemType Directory _build\tmp }
if (Test-Path _build\tools) { Remove-Item _build\tools -Force -Recurse }
if (Test-Path _build\tools32) { Remove-Item _build\tools32 -Force -Recurse }& "$(opam var dkml-component-staging-unixutils:share)\staging-files\generic\windows_install.bc" `
--tmp-dir=_build/tmp `
--target-msys2-dir=$PWD\_build\tools\MSYS2 `
--target-sh=_build/tools/unixutils/bin/sh.exe `
--msys2-base-exe="$(opam var dkml-component-offline-unixutils:share)\staging-files\windows_x86_64\bin\msys2-base.sfx.exe"& "$(opam var dkml-component-staging-unixutils:share)\staging-files\generic\windows_install.bc" `
--tmp-dir=_build/tmp `
--target-msys2-dir=$PWD\_build\tools32\MSYS2 `
--target-sh=_build/tools32/unixutils/bin/sh.exe `
--msys2-base-exe="$(opam var dkml-component-offline-unixutils:share)\staging-files\windows_x86\bin\msys2-base.sfx.exe" `
--32-bit
```The results will be in `_build/tools`. For example, the POSIX shell can be run with:
```powershell
& .\_build\tools\unixutils\bin\sh.exe
& .\_build\tools32\unixutils\bin\sh.exe
```## Contributing
See [the Contributors section of dkml-install-api](https://github.com/diskuv/dkml-install-api/blob/main/contributors/README.md).
## Status
[![Syntax check](https://github.com/diskuv/dkml-component-unixutils/actions/workflows/syntax.yml/badge.svg)](https://github.com/diskuv/dkml-component-unixutils/actions/workflows/syntax.yml)