oils-for-unix: expose both available shells provided by the upstream project (#478139)

This commit is contained in:
Maciej Krüger
2026-01-11 22:13:34 +00:00
committed by GitHub
+25 -7
View File
@@ -16,12 +16,12 @@ let
];
};
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "oils-for-unix";
version = "0.37.0";
src = fetchurl {
url = "https://oils.pub/download/oils-for-unix-${version}.tar.gz";
url = "https://oils.pub/download/oils-for-unix-${finalAttrs.version}.tar.gz";
hash = "sha256-9NQdIKBSPbz71LojH4Lt8lsI1JZdZbxx/LVmZtZ0MAA=";
};
@@ -66,6 +66,10 @@ stdenv.mkDerivation rec {
meta = {
description = "Unix shell with JSON-compatible structured data. It's our upgrade path from bash to a better language and runtime";
homepage = "https://www.oils.pub/";
longDescription = ''
This package installs both `osh` and `ysh`. To use one as a login shell,
select one of `pkgs.oils-for-unix.osh`, `pkgs.oils-for-unix.ysh`.
'';
license = lib.licenses.asl20;
@@ -74,10 +78,24 @@ stdenv.mkDerivation rec {
mkg20001
melkor333
];
changelog = "https://www.oils.pub/release/${version}/changelog.html";
changelog = "https://www.oils.pub/release/${finalAttrs.version}/changelog.html";
};
passthru = {
shellPath = "/bin/osh";
};
}
passthru =
let
mkShell =
shellName:
symlinkJoin {
name = "oils-for-unix-${shellName}-${finalAttrs.version}";
paths = [ finalAttrs.finalPackage ];
passthru.shellPath = "/bin/${shellName}";
meta = finalAttrs.meta // {
mainProgram = shellName;
};
};
in
{
osh = mkShell "osh";
ysh = mkShell "ysh";
};
})