nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 cmake,
6 qttools,
7 perl,
8 cpp-utilities,
9 qtutilities,
10 qtbase,
11}:
12
13let
14 fork_awesome_release = fetchFromGitHub {
15 owner = "ForkAwesome";
16 repo = "Fork-Awesome";
17 tag = "1.2.0";
18 hash = "sha256-zG6/0dWjU7/y/oDZuSEv+54Mchng64LVyV8bluskYzc=";
19 };
20in
21stdenv.mkDerivation (finalAttrs: {
22 pname = "qtforkawesome";
23 version = "0.3.1";
24
25 src = fetchFromGitHub {
26 owner = "Martchus";
27 repo = "qtforkawesome";
28 tag = "v${finalAttrs.version}";
29 hash = "sha256-djYgZt1mNmV5yLfQH/DPikfOPqtF11XZCTOfNXHur28=";
30 };
31
32 nativeBuildInputs = [
33 cmake
34 qttools
35 perl
36 perl.pkgs.YAML
37 ];
38
39 buildInputs = [
40 qtbase
41 cpp-utilities
42 qtutilities
43 ];
44
45 cmakeFlags = [
46 "-DQT_PACKAGE_PREFIX=Qt${lib.versions.major qtbase.version}"
47 # Current freetype used by NixOS users doesn't support the `.woff2` font
48 # format, so we use ttf. See
49 # https://github.com/NixOS/nixpkgs/pull/174875#discussion_r883423881
50 "-DFORK_AWESOME_FONT_FILE=${fork_awesome_release}/fonts/forkawesome-webfont.ttf"
51 "-DFORK_AWESOME_ICON_DEFINITIONS=${fork_awesome_release}/src/icons/icons.yml"
52 ];
53
54 dontWrapQtApps = true;
55
56 meta = {
57 homepage = "https://github.com/Martchus/qtforkawesome";
58 description = "Library that bundles ForkAwesome for use within Qt applications";
59 license = lib.licenses.gpl2Plus;
60 maintainers = with lib.maintainers; [ doronbehar ];
61 platforms = lib.platforms.linux ++ lib.platforms.darwin;
62 };
63})