Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / sl / sloth-app / package.nix
blobc2959589d0baef2f60069d6fbbb020e155226331
1 { lib
2 , stdenv
3 , fetchurl
4 , unzip
5 , makeBinaryWrapper
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "sloth-app";
10   version = "3.2";
12   src = fetchurl {
13     url = "https://github.com/sveinbjornt/Sloth/releases/download/${finalAttrs.version}/sloth-${finalAttrs.version}.zip";
14     hash = "sha256-8/x8I769V8kGxstDuXXUaMtGvg03n2vhrKvmaltSISo=";
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   };