1 { lib, stdenv, fetchFromGitHub }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-KzlE1DdVMLnGmcOS1a2HK4pASofD1EHpdqbzVVIxeb4=";
17 local MPATH="$out/share/m"
20 gsub(/^\[ -L.*|^\s+\|\| pushd.*|^popd.*/, "");
21 gsub(/MPATH=.*/, "MPATH='$MPATH'");
22 gsub(/(update|uninstall)_mcli \&\&.*/, "echo NOOP \\&\\& exit 0");
26 install -Dt "$MPATH/plugins" -m755 plugins/*
28 install -Dm755 m $out/bin/m
30 install -Dt "$out/share/bash-completion/completions/" -m444 completion/bash/m
31 install -Dt "$out/share/fish/vendor_completions.d/" -m444 completion/fish/m.fish
32 install -Dt "$out/share/zsh/site-functions/" -m444 completion/zsh/_m
36 description = "Swiss Army Knife for macOS";
37 inherit (src.meta) homepage;
39 license = licenses.mit;
41 platforms = platforms.darwin;