forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / sl / sloth-app / package.nix
blob1da8d8aac54d5ed2c5a0b02606cc1e95788f70b4
1 { lib
2 , stdenv
3 , fetchurl
4 , unzip
5 , makeBinaryWrapper
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "sloth-app";
10   version = "3.3";
12   src = fetchurl {
13     url = "https://github.com/sveinbjornt/Sloth/releases/download/${finalAttrs.version}/sloth-${finalAttrs.version}.zip";
14     hash = "sha256-LGaL7+NqoPqXZdYWq9x+yNEZFlZZmsZw+qcELC4rdjY=";
15   };
17   dontUnpack = true;
19   nativeBuildInputs = [ unzip makeBinaryWrapper ];
21   installPhase = ''
22     runHook preInstall
24     mkdir -p $out/Applications $out/bin
25     unzip -d $out/Applications $src
26     makeWrapper $out/Applications/Sloth.app/Contents/MacOS/Sloth $out/bin/Sloth
28     runHook postInstall
29   '';
31   meta = {
32     description = "Mac app that shows all open files, directories, sockets, pipes and devices";
33     homepage = "https://sveinbjorn.org/sloth";
34     license = lib.licenses.bsd3;
35     mainProgram = "Sloth";
36     maintainers = with lib.maintainers; [ emilytrau ];
37     platforms = lib.platforms.darwin;
38     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
39   };