nixpkgs/pkgs/shells/loksh/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

2021-09-10 20:43:23 +00:00
{ lib
, stdenv
2022-07-07 01:47:16 +00:00
, fetchFromGitHub
2021-09-10 20:43:23 +00:00
, meson
2022-07-07 01:47:16 +00:00
, ncurses
2021-09-10 20:43:23 +00:00
, ninja
, pkg-config
}:
2022-07-07 01:47:16 +00:00
stdenv.mkDerivation (finalAttrs: {
2021-09-10 20:43:23 +00:00
pname = "loksh";
2022-10-22 19:30:06 +00:00
version = "7.2";
2021-09-10 20:43:23 +00:00
src = fetchFromGitHub {
owner = "dimkr";
2022-07-07 01:47:16 +00:00
repo = finalAttrs.pname;
rev = finalAttrs.version;
2021-09-10 20:43:23 +00:00
fetchSubmodules = true;
2022-10-22 19:30:06 +00:00
sha256 = "sha256-Dnt1xo/5URs5yiNtj75a5K/qGJ+0lirPExnG+0xLuq8=";
2021-09-10 20:43:23 +00:00
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
ncurses
];
2022-07-07 01:47:16 +00:00
strictDeps = true;
2021-09-10 20:43:23 +00:00
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";
2022-07-07 01:47:16 +00:00
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.
'';
2021-09-10 20:43:23 +00:00
license = licenses.publicDomain;
maintainers = with maintainers; [ cameronnemo ];
platforms = platforms.linux;
};
2022-07-07 01:47:16 +00:00
passthru = {
shellPath = "/bin/loksh";
};
})