nixpkgs/pkgs/tools/misc/picocom/default.nix

37 lines
856 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, makeWrapper, lrzsz, IOKit }:
assert stdenv.isDarwin -> IOKit != null;
with stdenv.lib;
2012-09-23 23:26:46 +01:00
stdenv.mkDerivation rec {
2015-08-17 21:14:51 +01:00
name = "picocom-${version}";
2018-02-04 23:02:24 +00:00
version = "3.1";
2012-09-23 23:26:46 +01:00
2015-08-17 21:14:51 +01:00
src = fetchFromGitHub {
owner = "npat-efault";
repo = "picocom";
rev = version;
2018-02-04 23:02:24 +00:00
sha256 = "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n";
2012-09-23 23:26:46 +01:00
};
buildInputs = [ makeWrapper ]
++ optionals stdenv.isDarwin [ IOKit ];
2012-09-23 23:26:46 +01:00
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
2012-09-23 23:26:46 +01:00
cp picocom $out/bin
cp picocom.1 $out/share/man/man1
wrapProgram $out/bin/picocom \
--prefix PATH ":" "${lrzsz}/bin"
2012-09-23 23:26:46 +01:00
'';
meta = {
description = "Minimal dumb-terminal emulation program";
homepage = https://github.com/npat-efault/picocom/;
license = stdenv.lib.licenses.gpl2Plus;
platforms = platforms.unix;
2012-09-23 23:26:46 +01:00
};
}