nixpkgs-suyu/pkgs/applications/window-managers/notion/default.nix
Vladimír Čunát b727aec229
notion: fixup build
Maybe triggered by glibc: 2.35-163 -> 2.35-224
C headers and #defines can be quite an alchemy sometimes.
2022-12-16 12:06:07 +01:00

44 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, pkg-config
, lua, gettext, which, groff, xmessage, xterm
, readline, fontconfig, libX11, libXext, libSM
, libXinerama, libXrandr, libXft
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "notion";
version = "4.0.2";
src = fetchFromGitHub {
owner = "raboof";
repo = pname;
rev = version;
sha256 = "14swd0yqci8lxn259fkd9w92bgyf4rmjwgvgyqp78wlfix6ai4mv";
};
# error: 'PATH_MAX' undeclared
postPatch = ''
sed 1i'#include <linux/limits.h>' -i mod_notionflux/notionflux/notionflux.c
'';
nativeBuildInputs = [ pkg-config makeWrapper groff ];
buildInputs = [ lua gettext which readline fontconfig libX11 libXext libSM
libXinerama libXrandr libXft ];
buildFlags = [ "LUA_DIR=${lua}" "X11_PREFIX=/no-such-path" ];
makeFlags = [ "NOTION_RELEASE=${version}" "PREFIX=\${out}" ];
postInstall = ''
wrapProgram $out/bin/notion \
--prefix PATH ":" "${xmessage}/bin:${xterm}/bin" \
'';
meta = with lib; {
description = "Tiling tabbed window manager";
homepage = "https://notionwm.net";
license = licenses.lgpl21;
maintainers = with maintainers; [ jfb AndersonTorres raboof ];
platforms = platforms.linux;
};
}