nixpkgs/pkgs/shells/oksh/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

35 lines
855 B
Nix

{ stdenv, lib, fetchFromGitHub, buildPackages }:
stdenv.mkDerivation rec {
pname = "oksh";
version = "7.4";
src = fetchFromGitHub {
owner = "ibara";
repo = pname;
rev = "${pname}-${version}";
sha256 = "sha256-QkWUTqFoEA+XZv0EAHnDtkm9xI+NlQcNqicCvCtXJYc=";
};
strictDeps = true;
postPatch = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace configure --replace "./conftest" "echo"
'';
configureFlags = [ "--no-strip" ];
meta = with lib; {
description = "Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh)";
mainProgram = "oksh";
homepage = "https://github.com/ibara/oksh";
license = licenses.publicDomain;
maintainers = with maintainers; [ siraben ];
platforms = platforms.all;
};
passthru = {
shellPath = "/bin/oksh";
};
}