2021-09-10 21:43:23 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, ncurses
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "loksh";
|
2021-11-03 12:44:16 +00:00
|
|
|
version = "7.0";
|
2021-09-10 21:43:23 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dimkr";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
fetchSubmodules = true;
|
2021-11-03 12:44:16 +00:00
|
|
|
sha256 = "sha256-q5RiY9/xEFCk+oHlxgNwDOB+TNjRWHKzU2kQH2LjCWY=";
|
2021-09-10 21:43:23 +01:00
|
|
|
};
|
|
|
|
|
2022-05-06 19:39:28 +01:00
|
|
|
strictDeps = true;
|
2021-09-10 21:43:23 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/bin/ksh $out/bin/loksh
|
|
|
|
mv $out/share/man/man1/ksh.1 $out/share/man/man1/loksh.1
|
|
|
|
mv $out/share/man/man1/sh.1 $out/share/man/man1/loksh-sh.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
shellPath = "/bin/loksh";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Linux port of OpenBSD's ksh";
|
|
|
|
homepage = "https://github.com/dimkr/loksh";
|
|
|
|
license = licenses.publicDomain;
|
|
|
|
maintainers = with maintainers; [ cameronnemo ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|