1{ stdenv, lib, fetchFromGitHub, buildPackages }:
2
3stdenv.mkDerivation rec {
4 pname = "oksh";
5 version = "7.1";
6
7 src = fetchFromGitHub {
8 owner = "ibara";
9 repo = pname;
10 rev = "${pname}-${version}";
11 sha256 = "sha256-cRUL4JwwZ1Nfs9exzleEvJYCZz6knKbjnC9xeRMvClA=";
12 };
13
14 strictDeps = true;
15
16 postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
17 substituteInPlace configure --replace "./conftest" "echo"
18 '';
19
20 configureFlags = [ "--no-strip" ];
21
22 meta = with lib; {
23 description = "Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh)";
24 homepage = "https://github.com/ibara/oksh";
25 license = licenses.publicDomain;
26 maintainers = with maintainers; [ siraben ];
27 platforms = platforms.all;
28 };
29
30 passthru = {
31 shellPath = "/bin/oksh";
32 };
33}