nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 libsForQt5,
6}:
7
8stdenv.mkDerivation {
9 pname = "selectdefaultapplication";
10 version = "unstable-2021-08-12";
11
12 src = fetchFromGitHub {
13 owner = "sandsmark";
14 repo = "selectdefaultapplication";
15 rev = "c752df6ba8caceeef54bcf6527f1bccc2ca8202a";
16 sha256 = "C/70xpt6RoQNIlAjSJhOCyheolK4Xp6RiSZmeqMP4fw=";
17 };
18
19 nativeBuildInputs = [
20 libsForQt5.qmake
21 libsForQt5.wrapQtAppsHook
22 ];
23 buildInputs = [ libsForQt5.qtbase ];
24
25 installPhase = ''
26 runHook preInstall
27
28 mkdir -p $out/bin
29 cp selectdefaultapplication $out/bin
30
31 install -Dm644 -t "$out/share/applications" selectdefaultapplication.desktop
32 install -Dm644 -t "$out/share/icons/hicolor/48x48/apps" selectdefaultapplication.png
33
34 runHook postInstall
35 '';
36
37 meta = {
38 description = "Very simple application that lets you define default applications on Linux in a sane way";
39 mainProgram = "selectdefaultapplication";
40 homepage = "https://github.com/sandsmark/selectdefaultapplication";
41 maintainers = with lib.maintainers; [ nsnelson ];
42 license = lib.licenses.gpl2;
43 platforms = lib.platforms.linux;
44 };
45}