1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/pkgs/tools/misc/picocom/default.nix
Peter Hoeg cb66517866
picocom: 3.1 -> 3.2a (#107379)
* picocom: 3.1 -> 3.2a

Also:
- drop wrapper and patch in location of binaries
- add bash completion support
- start using shell helpers instead of manually copying in man page

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2020-12-24 07:22:20 +08:00

49 lines
1.2 KiB
Nix

{ stdenv
, fetchFromGitHub
, installShellFiles
, lrzsz
, IOKit
}:
stdenv.mkDerivation rec {
pname = "picocom";
# last tagged release is 3.1 but 3.2 is still considered a release
version = "3.2a";
# upstream is quiet as the original author is no longer active since March 2018
src = fetchFromGitHub {
owner = "npat-efault";
repo = "picocom";
rev = "1acf1ddabaf3576b4023c4f6f09c5a3e4b086fb8";
sha256 = "sha256-cs2bxqZfTbnY5d+VJ257C5hssaFvYup3tBKz68ROnAo=";
};
postPatch = ''
substituteInPlace Makefile \
--replace '.picocom_history' '.cache/picocom_history'
substituteInPlace picocom.c \
--replace '"rz -vv"' '"${lrzsz}/bin/rz -vv"' \
--replace '"sz -vv"' '"${lrzsz}/bin/sz -vv"'
'';
enableParallelBuilding = true;
nativeBuildInputs = [ installShellFiles ];
buildInputs = stdenv.lib.optional stdenv.isDarwin IOKit;
installPhase = ''
install -Dm555 -t $out/bin picocom
installManPage picocom.1
installShellCompletion --bash bash_completion/picocom
'';
meta = with stdenv.lib; {
description = "Minimal dumb-terminal emulation program";
homepage = "https://github.com/npat-efault/picocom/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}