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