this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add Mole for cleaning macOS

+61
+1
modules/tools.nix
··· 28 28 pkgs.senpai 29 29 pkgs.timg 30 30 pkgs.typos 31 + pkgs-self.mac-mole 31 32 ]; 32 33 }
+1
pkgs/default.nix
··· 7 7 imbox = callPackage ./imbox.nix {}; 8 8 ubin-client = callPackage ./ubin-client.nix {}; 9 9 hosevka = callPackage ./hosevka.nix {}; 10 + mac-mole = callPackage ./mac-mole.nix {}; 10 11 11 12 fswatch = writeShellApplication { 12 13 name = "fswatch";
+59
pkgs/mac-mole.nix
··· 1 + { 2 + stdenv, 3 + fetchFromGitHub, 4 + lib, 5 + buildGoModule, 6 + }: 7 + 8 + let 9 + version = "1.30.0"; 10 + src = fetchFromGitHub { 11 + owner = "tw93"; 12 + repo = "Mole"; 13 + tag = "V${version}"; 14 + hash = "sha256-uo/wPKObL5i6A0i/1hmOjXCzlJkkrFsmZHvLoHmM8Ro="; 15 + }; 16 + 17 + goComponents = buildGoModule { 18 + pname = "mac-mole-go"; 19 + inherit version src; 20 + 21 + ldflags = [ 22 + "-s" "-w" 23 + "-X main.Version=${version}" 24 + ]; 25 + 26 + subPackages = [ "cmd/analyze" "cmd/status" ]; 27 + 28 + vendorHash = "sha256-oepnMZcaTB9u3h6S0jcP4W0pqNkDDgETVqDdCL0jarM="; 29 + }; 30 + 31 + in stdenv.mkDerivation (self: { 32 + pname = "mac-mole"; 33 + inherit version src; 34 + 35 + buildPhase = '' 36 + script_dir="$out/libexec" 37 + 38 + mkdir -p $out/bin $script_dir 39 + 40 + cp -r ./bin $script_dir 41 + cp -r ./lib $script_dir 42 + 43 + ln -s ${goComponents}/bin/analyze $script_dir/bin/analyze-go 44 + ln -s ${goComponents}/bin/status $script_dir/bin/status-go 45 + 46 + cp mole $out/bin 47 + ln -s $out/bin/mole $out/bin/mo 48 + 49 + substituteInPlace $out/bin/mole \ 50 + --replace 'SCRIPT_DIR="$(cd "$(dirname "''${BASH_SOURCE[0]}")" && pwd)"' "SCRIPT_DIR='$script_dir'" 51 + ''; 52 + 53 + meta = { 54 + description = "Deep clean and optimize your Mac"; 55 + homepage = "https://github.com/tw93/Mole"; 56 + licenses = lib.licenses.mit; 57 + mainProgram = "mole"; 58 + }; 59 + })