1{ lib, stdenv, fetchFromGitHub, unzip, txt2tags }:
2
3stdenv.mkDerivation rec {
4 pname = "libixp";
5 version = "unstable-2022-04-04";
6
7 src = fetchFromGitHub {
8 owner = "0intro";
9 repo = "libixp";
10 rev = "ca2acb2988e4f040022f0e2094c69ab65fa6ec53";
11 hash = "sha256-S25DmXJ7fN0gXLV0IzUdz8hXPTYEHmaSG7Mnli6GQVc=";
12 };
13
14 postPatch = lib.optionalString stdenv.cc.isClang ''
15 substituteInPlace mk/ixp.mk \
16 --replace "©" "C "
17 '';
18
19 postConfigure = ''
20 sed -i -e "s|^PREFIX.*=.*$|PREFIX = $out|" config.mk
21 '';
22
23 nativeBuildInputs = [ unzip ];
24 buildInputs = [ txt2tags ];
25
26 meta = {
27 homepage = "https://github.com/0intro/libixp";
28 description = "Portable, simple C-language 9P client and server libary";
29 maintainers = with lib.maintainers; [ kovirobi ];
30 license = lib.licenses.mit;
31 platforms = with lib.platforms; unix;
32 };
33}