2021-03-26 09:15:15 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pcsclite, pth, python2 }:
|
2016-08-07 17:41:47 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "hexio";
|
2017-02-24 10:12:24 +01:00
|
|
|
version = "1.0-RC1";
|
2016-08-07 17:41:47 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
sha256 = "08jxkdi0gjsi8s793f9kdlad0a58a0xpsaayrsnpn9bpmm5cgihq";
|
2017-02-24 10:12:24 +01:00
|
|
|
rev = "version-${version}";
|
2016-08-07 17:41:47 +02:00
|
|
|
owner = "vanrein";
|
|
|
|
repo = "hexio";
|
|
|
|
};
|
|
|
|
|
2021-03-26 09:15:15 +01:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
buildInputs = [ pcsclite pth python2 ];
|
2016-08-07 17:41:47 +02:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace Makefile \
|
2021-01-23 13:26:19 +01:00
|
|
|
--replace '-I/usr/local/include/PCSC/' '-I${lib.getDev pcsclite}/include/PCSC/' \
|
2016-08-07 17:41:47 +02:00
|
|
|
--replace '-L/usr/local/lib/pth' '-I${pth}/lib/'
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/lib $out/sbin $out/man
|
|
|
|
make DESTDIR=$out PREFIX=/ all
|
|
|
|
make DESTDIR=$out PREFIX=/ install
|
|
|
|
'';
|
|
|
|
|
2021-01-23 13:26:19 +01:00
|
|
|
meta = with lib; {
|
2016-08-07 17:41:47 +02:00
|
|
|
description = "Low-level I/O helpers for hexadecimal, tty/serial devices and so on";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/vanrein/hexio";
|
2016-08-07 17:41:47 +02:00
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ leenaars ];
|
|
|
|
};
|
|
|
|
}
|