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