1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 qt5,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "frequest";
11 version = "1.2a";
12
13 srcs = [
14 (fetchFromGitHub {
15 owner = "fabiobento512";
16 name = "frequest";
17 repo = "FRequest";
18 rev = "v${finalAttrs.version}";
19 hash = "sha256-fdn3MK5GWBOhJjpMtRaytO9EsVzz6KJknDhqWtAyXCc=";
20 })
21 # The application depends on hard-coded relative paths to ../CommonLibs and ../CommonUtils.
22 # See https://github.com/fabiobento512/FRequest/wiki/Building-FRequest for more info.
23 # Upstream provides no tags for these dependencies, use latest commit on their `master` branch.
24 # Changing the name of these srcs will break the build.
25 (fetchFromGitHub {
26 owner = "fabiobento512";
27 name = "CommonLibs";
28 repo = "CommonLibs";
29 rev = "d3906931bb06ddf4194ff711a59e1dcff80fa82f";
30 hash = "sha256-iLJJ95yJ+VjNPuk8fNEDvYBI0db0rcfJF12a9azGv1Y=";
31 })
32 (fetchFromGitHub {
33 owner = "fabiobento512";
34 name = "CommonUtils";
35 repo = "CommonUtils";
36 rev = "53970984f6538d78350be1b9426032bcb5bcf818";
37 hash = "sha256-nRv9DriSOuAiWhy+KkOVNEz5oSgNNNJZqk8sNwgbx8U=";
38 })
39 ];
40 sourceRoot = "frequest";
41
42 patches = [
43 # This fix has been merged upstream into the develop branch, but it was not released yet. It can be removed once a new version is released.
44 (fetchpatch {
45 name = "Change-desktop-icon-name";
46 url = "https://github.com/fabiobento512/FRequest/commit/22e98970b78f6d9ca0037c39c2492e93e836abff.patch";
47 hash = "sha256-YoI68SPMHD4bAgjWpn6eSda3Oon8bevbiwTx1JFFm40=";
48 })
49 ];
50
51 buildInputs = [
52 qt5.qtbase
53 ];
54
55 nativeBuildInputs = [
56 qt5.wrapQtAppsHook
57 qt5.qmake
58 ];
59
60 # Without this, nothing gets installed in $out.
61 postInstall = ''
62 install -D FRequest $out/bin/FRequest
63 install -D LinuxAppImageDeployment/frequest.desktop $out/share/applications/frequest.desktop
64 install -D LinuxAppImageDeployment/frequest_icon.png $out/share/icons/hicolor/128x128/apps/frequest_icon.png
65 '';
66
67 meta = {
68 description = "Fast, lightweight and opensource desktop application to make HTTP(s) requests";
69 homepage = "https://fabiobento512.github.io/FRequest";
70 license = lib.licenses.gpl3Plus;
71 maintainers = with lib.maintainers; [ eliandoran ];
72 platforms = lib.platforms.linux;
73 mainProgram = "frequest";
74 };
75})