blob: 457e6d1659c0210d076cabdc6f328fc519720eb2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
{
stdenv,
lib,
fetchFromGitHub,
libsForQt5,
qt5,
makeDesktopItem,
nix-update-script,
copyDesktopItems,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "qtalarm";
version = "2.5.1";
src = fetchFromGitHub {
owner = "CountMurphy";
repo = "QTalarm";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-87w5YFQ9olLnCfPF04jOnIMn1NtE2M2n5WZX4e69UGU=";
};
buildInputs = [
libsForQt5.qtbase
libsForQt5.qtmultimedia
];
installPhase =
''
runHook preInstall
''
+ (
if stdenv.hostPlatform.isDarwin then
''
mkdir -p $out/Applications
mv qtalarm.app $out/Applications
''
else
''
install -Dm755 qtalarm -t $out/bin
install -Dm644 Icons/1349069370_Alarm_Clock.png $out/share/icons/hicolor/48x48/apps/qtalarm.png
install -Dm644 Icons/1349069370_Alarm_Clock24.png $out/share/icons/hicolor/24x24/apps/qtalarm.png
install -Dm644 Icons/1349069370_Alarm_Clock16.png $out/share/icons/hicolor/16x16/apps/qtalarm.png
''
)
+ ''
runHook postInstall
'';
nativeBuildInputs = [
qt5.wrapQtAppsHook
qt5.qmake
copyDesktopItems
];
passthru.updateScript = nix-update-script { };
desktopItems = [
(makeDesktopItem {
name = "QTalarm";
exec = "qtalarm";
icon = "qtalarm";
desktopName = "QTalarm";
genericName = "Nifty alarm clock";
categories = [
"Application"
"Utility"
];
terminal = false;
})
];
meta = {
description = "Nifty alarm clock written in QT";
changelog = "https://github.com/CountMurphy/QTalarm/releases/tag/${finalAttrs.version}";
homepage = "https://github.com/CountMurphy/QTalarm";
license = lib.licenses.gpl3Only;
mainProgram = "qtalarm";
maintainers = with lib.maintainers; [ bot-wxt1221 ];
platforms = lib.platforms.unix;
};
})
|