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