vifm: 0.13 -> 0.14 (#380559)
[NixPkgs.git] / pkgs / by-name / sl / sloth-app / package.nix
blob1b9a2bbb8934c8a4a67641d84e9bbd2fd006150a
2   lib,
3   stdenv,
4   fetchurl,
5   unzip,
6   makeBinaryWrapper,
7 }:
9 stdenv.mkDerivation (finalAttrs: {
10   pname = "sloth-app";
11   version = "3.3";
13   src = fetchurl {
14     url = "https://github.com/sveinbjornt/Sloth/releases/download/${finalAttrs.version}/sloth-${finalAttrs.version}.zip";
15     hash = "sha256-LGaL7+NqoPqXZdYWq9x+yNEZFlZZmsZw+qcELC4rdjY=";
16   };
18   dontUnpack = true;
20   nativeBuildInputs = [
21     unzip
22     makeBinaryWrapper
23   ];
25   installPhase = ''
26     runHook preInstall
28     mkdir -p $out/Applications $out/bin
29     unzip -d $out/Applications $src
30     makeWrapper $out/Applications/Sloth.app/Contents/MacOS/Sloth $out/bin/Sloth
32     runHook postInstall
33   '';
35   meta = {
36     description = "Mac app that shows all open files, directories, sockets, pipes and devices";
37     homepage = "https://sveinbjorn.org/sloth";
38     license = lib.licenses.bsd3;
39     mainProgram = "Sloth";
40     maintainers = with lib.maintainers; [ emilytrau ];
41     platforms = lib.platforms.darwin;
42     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
43   };