lol
1{
2 lib,
3 stdenv,
4 fetchurl,
5 unzip,
6 makeBinaryWrapper,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "sloth-app";
11 version = "3.4";
12
13 src = fetchurl {
14 url = "https://github.com/sveinbjornt/Sloth/releases/download/${finalAttrs.version}/sloth-${finalAttrs.version}.zip";
15 hash = "sha256-K8DweBFAILEQyqri6NO+p5qRam+BHjIk1tl43gcseNs=";
16 };
17
18 dontUnpack = true;
19
20 nativeBuildInputs = [
21 unzip
22 makeBinaryWrapper
23 ];
24
25 installPhase = ''
26 runHook preInstall
27
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
31
32 runHook postInstall
33 '';
34
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; [
41 emilytrau
42 iedame
43 ];
44 platforms = lib.platforms.darwin;
45 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
46 };
47})