-
-
Notifications
You must be signed in to change notification settings - Fork 159
Running Oils as build shell
Samuel Hierholzer edited this page Nov 4, 2024
·
4 revisions
This document describes issues and notes on running Oils as Shell replacement in package building (either as /bin/bash or /bin/sh)
Oily Nixpkgs is an attempt at replacing bash
with Oils in the stdenv
.
- zulip, PR -
"${a[@]+default}"
doesn't properly expand as bash - zulip, commit -
${mystr[@]}
errors (e.g. it's a string) are often silent in bash - zulip, commit -
:&
and;;&
in acase
statement are missing in Oils - zulip, commit -
export x; x=(a b c)
fails as only strings can be exported - zulip -
let
is not implemented- Workaround
(( EXPR )) | true
, path in oily-nixpkgs
- Workaround
- zulip, [zulip thread](https://oilshell.zulipchat.com/#narrow/channel/307442-nix/topic/Assoc.20Array.20Quoting] - Oils requires quotes in certain assoc array expansions, e.g.
${myarr[a]-}
needs to be${myarr['a']}
in Osh. See also blog post- patch in oily-nixpkgs
-
[[ -v assoc[arr] ]]
failed silently. Fixed but need to find link in zulip - zulip, gh issue, certain
[[ ... =~ ... ]]
are a syntax err in Oils - zulip, commit
if (( )); then
doesn't work on bash- sane alternative:
if (( 0 ));
- sane alternative:
- zulip -
(( a ) b )
is parsed as arithmetic in Osh ending in a syntax err instead of as nested subshells- Wontfix. added to known differences
- patch in oily-nixpkgs