nixpkgs/pkgs/development/tools/hexio/default.nix

38 lines
1.0 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, python, pcsclite, pth }:
2016-08-07 18:41:47 +03:00
stdenv.mkDerivation rec {
pname = "hexio";
name = "${pname}-${version}";
2017-02-24 12:12:24 +03:00
version = "1.0-RC1";
2016-08-07 18:41:47 +03:00
src = fetchFromGitHub {
sha256 = "08jxkdi0gjsi8s793f9kdlad0a58a0xpsaayrsnpn9bpmm5cgihq";
2017-02-24 12:12:24 +03:00
rev = "version-${version}";
2016-08-07 18:41:47 +03:00
owner = "vanrein";
repo = "hexio";
};
2017-02-24 12:12:24 +03:00
propagatedBuildInputs = [ python ];
buildInputs = [ pcsclite pth ];
2016-08-07 18:41:47 +03:00
patchPhase = ''
substituteInPlace Makefile \
2018-06-21 13:40:15 +03:00
--replace '-I/usr/local/include/PCSC/' '-I${stdenv.lib.getDev pcsclite}/include/PCSC/' \
2016-08-07 18:41:47 +03: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
'';
meta = with stdenv.lib; {
description = "Low-level I/O helpers for hexadecimal, tty/serial devices and so on";
homepage = https://github.com/vanrein/hexio;
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ leenaars ];
};
}