depot/third_party/nixpkgs/pkgs/shells/loksh/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

60 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, meson
, ncurses
, ninja
, pkg-config
}:
stdenv.mkDerivation (finalAttrs: {
pname = "loksh";
version = "7.2";
src = fetchFromGitHub {
owner = "dimkr";
repo = finalAttrs.pname;
rev = finalAttrs.version;
fetchSubmodules = true;
sha256 = "sha256-Dnt1xo/5URs5yiNtj75a5K/qGJ+0lirPExnG+0xLuq8=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
ncurses
];
strictDeps = true;
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
'';
meta = with lib; {
homepage = "https://github.com/dimkr/loksh";
description = "Linux port of OpenBSD's ksh";
longDescription = ''
loksh is a Linux port of OpenBSD's ksh.
Unlike other ports of ksh, loksh targets only one platform, follows
upstream closely and keeps changes to a minimum. loksh does not add any
extra features; this reduces the risk of introducing security
vulnerabilities and makes loksh a good fit for resource-constrained
systems.
'';
license = licenses.publicDomain;
maintainers = with maintainers; [ cameronnemo ];
platforms = platforms.linux;
};
passthru = {
shellPath = "/bin/loksh";
};
})