at 18.03-beta 37 lines 1.0 kB view raw
1{ stdenv, fetchFromGitHub, fetchurl, python, pcsclite, pth }: 2 3stdenv.mkDerivation rec { 4 pname = "hexio"; 5 name = "${pname}-${version}"; 6 version = "1.0-RC1"; 7 8 src = fetchFromGitHub { 9 sha256 = "08jxkdi0gjsi8s793f9kdlad0a58a0xpsaayrsnpn9bpmm5cgihq"; 10 rev = "version-${version}"; 11 owner = "vanrein"; 12 repo = "hexio"; 13 }; 14 15 propagatedBuildInputs = [ python ]; 16 buildInputs = [ pcsclite pth ]; 17 18 patchPhase = '' 19 substituteInPlace Makefile \ 20 --replace '-I/usr/local/include/PCSC/' '-I${pcsclite}/include/PCSC/' \ 21 --replace '-L/usr/local/lib/pth' '-I${pth}/lib/' 22 ''; 23 24 installPhase = '' 25 mkdir -p $out/bin $out/lib $out/sbin $out/man 26 make DESTDIR=$out PREFIX=/ all 27 make DESTDIR=$out PREFIX=/ install 28 ''; 29 30 meta = with stdenv.lib; { 31 description = "Low-level I/O helpers for hexadecimal, tty/serial devices and so on"; 32 homepage = https://github.com/vanrein/hexio; 33 license = licenses.bsd2; 34 platforms = platforms.linux; 35 maintainers = with maintainers; [ leenaars ]; 36 }; 37}