Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 copyDesktopItems,
6 fontconfig,
7 freetype,
8 libX11,
9 libXext,
10 libXft,
11 libXinerama,
12 makeDesktopItem,
13 pkg-config,
14 which,
15}:
16
17stdenv.mkDerivation (finalAttrs: {
18 pname = "berry";
19 version = "0.1.13";
20
21 src = fetchFromGitHub {
22 owner = "JLErvin";
23 repo = "berry";
24 rev = finalAttrs.version;
25 hash = "sha256-BMK5kZVoYTUA7AFZc/IVv4rpbn893b/QYXySuPAz2Z8=";
26 };
27
28 nativeBuildInputs = [
29 copyDesktopItems
30 pkg-config
31 which
32 ];
33
34 buildInputs = [
35 libX11
36 libXext
37 libXft
38 libXinerama
39 fontconfig
40 freetype
41 ];
42
43 outputs = [
44 "out"
45 "man"
46 ];
47
48 strictDeps = true;
49
50 postPatch = ''
51 sed -i --regexp-extended 's/(pkg_verstr=").*(")/\1${finalAttrs.version}\2/' configure
52 '';
53
54 preConfigure = ''
55 patchShebangs configure
56 '';
57
58 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-D_C99_SOURCE";
59
60 desktopItems = [
61 (makeDesktopItem {
62 name = "berry";
63 exec = "berry";
64 comment = "A healthy, bite-sized window manager";
65 desktopName = "Berry Window Manager";
66 genericName = "Berry Window Manager";
67 categories = [ "Utility" ];
68 })
69 ];
70
71 meta = {
72 homepage = "https://berrywm.org/";
73 description = "Healthy, bite-sized window manager";
74 longDescription = ''
75 berry is a healthy, bite-sized window manager written in C for unix
76 systems. Its main features include:
77
78 - Controlled via a powerful command-line client, allowing users to control
79 windows via a hotkey daemon such as sxhkd or expand functionality via
80 shell scripts.
81 - Small, hackable source code.
82 - Extensible themeing options with double borders, title bars, and window
83 text.
84 - Intuitively place new windows in unoccupied spaces.
85 - Virtual desktops.
86 '';
87 license = lib.licenses.mit;
88 mainProgram = "berry";
89 maintainers = [ ];
90 inherit (libX11.meta) platforms;
91 };
92})