2023-02-02 18:25:31 +00:00
|
|
|
{ stdenv, lib, fetchurl, symlinkJoin, withReadline ? true, readline }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
let
|
|
|
|
readline-all = symlinkJoin {
|
|
|
|
name = "readline-all"; paths = [ readline readline.dev ];
|
|
|
|
};
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "oil";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.18.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.oilshell.org/download/oil-${version}.tar.xz";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-ll4YmmP9A9EpnIyd4Pv8Ot8lrK/grsWzqgn6am9PIRE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
strictDeps = true;
|
2021-07-03 03:11:41 +00:00
|
|
|
buildInputs = lib.optional withReadline readline;
|
2023-02-02 18:25:31 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--datarootdir=${placeholder "out"}"
|
|
|
|
] ++ lib.optionals withReadline [
|
|
|
|
"--with-readline"
|
|
|
|
"--readline=${readline-all}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Stripping breaks the bundles by removing the zip file from the end.
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A new unix shell";
|
|
|
|
homepage = "https://www.oilshell.org/";
|
|
|
|
|
|
|
|
license = with lib.licenses; [
|
|
|
|
psfl # Includes a portion of the python interpreter and standard library
|
|
|
|
asl20 # Licence for Oil itself
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ lheckemann alva ];
|
2021-04-05 15:23:46 +00:00
|
|
|
changelog = "https://www.oilshell.org/release/${version}/changelog.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-20 23:08:51 +00:00
|
|
|
shellPath = "/bin/osh";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|