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