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