chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / os-specific / darwin / m-cli / default.nix
blob41f112cf4802edd3e629394d5437dd2c8a1b664d
1 { lib, stdenv, fetchFromGitHub }:
3 stdenv.mkDerivation rec {
4   pname = "m-cli";
5   version = "0.3.0";
7   src = fetchFromGitHub {
8     owner = "rgcr";
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-KzlE1DdVMLnGmcOS1a2HK4pASofD1EHpdqbzVVIxeb4=";
12   };
14   dontBuild = true;
16   installPhase = ''
17     local MPATH="$out/share/m"
19     gawk -i inplace '{
20       gsub(/^\[ -L.*|^\s+\|\| pushd.*|^popd.*/, "");
21       gsub(/MPATH=.*/, "MPATH='$MPATH'");
22       gsub(/(update|uninstall)_mcli \&\&.*/, "echo NOOP \\&\\& exit 0");
23       print
24     }' m
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
33   '';
35   meta = with lib; {
36     description = "Swiss Army Knife for macOS";
37     inherit (src.meta) homepage;
39     license = licenses.mit;
41     platforms = platforms.darwin;
42     maintainers = [ ];
43     mainProgram = "m";
44   };