2024-09-12 14:06:58 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2024-09-12 13:45:05 +00:00
|
|
|
fetchFromGitLab,
|
|
|
|
replaceVars,
|
2024-09-12 13:45:05 +00:00
|
|
|
pkg-config,
|
2024-09-12 13:45:05 +00:00
|
|
|
go-md2man,
|
2024-09-12 14:06:58 +00:00
|
|
|
installShellFiles,
|
2024-09-12 13:45:05 +00:00
|
|
|
linenoise,
|
2024-09-12 14:06:58 +00:00
|
|
|
darwin,
|
2024-09-12 13:45:05 +00:00
|
|
|
lrzsz,
|
2020-12-23 23:22:20 +00:00
|
|
|
}:
|
2012-09-23 22:26:46 +00:00
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "picocom";
|
2024-09-12 13:45:05 +00:00
|
|
|
version = "2024-07";
|
2012-09-23 22:26:46 +00:00
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "wsakernel";
|
2015-08-17 20:14:51 +00:00
|
|
|
repo = "picocom";
|
2024-09-12 13:45:05 +00:00
|
|
|
rev = finalAttrs.version;
|
|
|
|
hash = "sha256-cQoEfi75iltjeAm26NvXgfrL7d1Hm+1veQ4dVe0S1q8=";
|
2012-09-23 22:26:46 +00:00
|
|
|
};
|
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
patches = [
|
2024-09-12 13:45:05 +00:00
|
|
|
./use-system-linenoise.patch
|
2024-09-12 13:45:05 +00:00
|
|
|
(replaceVars ./lrzsz-path.patch { inherit lrzsz; })
|
|
|
|
];
|
2014-07-22 21:51:25 +00:00
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
nativeBuildInputs = [
|
2024-09-12 13:45:05 +00:00
|
|
|
pkg-config
|
2024-09-12 13:45:05 +00:00
|
|
|
go-md2man
|
|
|
|
installShellFiles
|
|
|
|
];
|
2014-07-22 21:51:25 +00:00
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
buildInputs = [
|
|
|
|
linenoise
|
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
|
2020-12-23 23:22:20 +00:00
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
makeFlags = [
|
|
|
|
"HISTFILE=.cache/picocom_history"
|
|
|
|
"all"
|
|
|
|
"doc"
|
|
|
|
];
|
2020-12-23 23:22:20 +00:00
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-12-23 23:22:20 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2024-09-12 13:45:05 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-12-23 23:22:20 +00:00
|
|
|
install -Dm555 -t $out/bin picocom
|
|
|
|
installManPage picocom.1
|
|
|
|
installShellCompletion --bash bash_completion/picocom
|
2024-09-12 13:45:05 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2012-09-23 22:26:46 +00:00
|
|
|
'';
|
|
|
|
|
2024-09-12 13:45:05 +00:00
|
|
|
meta = {
|
2012-09-23 22:26:46 +00:00
|
|
|
description = "Minimal dumb-terminal emulation program";
|
2024-09-12 13:45:05 +00:00
|
|
|
homepage = "https://gitlab.com/wsakernel/picocom";
|
|
|
|
changelog = "https://gitlab.com/wsakernel/picocom/-/releases";
|
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.unix;
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "picocom";
|
2012-09-23 22:26:46 +00:00
|
|
|
};
|
2024-09-12 13:45:05 +00:00
|
|
|
})
|