diff --git a/pkgs/os-specific/darwin/plistwatch/default.nix b/pkgs/os-specific/darwin/plistwatch/default.nix new file mode 100644 index 000000000000..852c9c23aa9b --- /dev/null +++ b/pkgs/os-specific/darwin/plistwatch/default.nix @@ -0,0 +1,31 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "plistwatch"; + version = "unstable-2020-12-22"; + + src = fetchFromGitHub { + owner = "catilac"; + repo = "plistwatch"; + rev = "c3a9afd8d3e5ffa8dcc379770bc4216bae88a671"; + sha256 = "0a5rfmpy6h06p02z9gdilh7vr3h9cc6n6zzygpjk6zvnqs3mm3vx"; + }; + + vendorSha256 = "sha256-Layg1axFN86OFgxEyNFtIlm6Jtx317jZb/KH6IjJ8e4="; + + #add missing dependencies and hashes + patches = [ ./go-modules.patch ]; + + doCheck = false; + + meta = with lib; { + description = "Monitors and prints changes to MacOS plists in real time"; + homepage = "https://github.com/catilac/plistwatch"; + maintainers = with maintainers; [ gdinh ]; + license = licenses.mit; + platforms = platforms.darwin; + }; +} diff --git a/pkgs/os-specific/darwin/plistwatch/go-modules.patch b/pkgs/os-specific/darwin/plistwatch/go-modules.patch new file mode 100644 index 000000000000..94d7cc01e24e --- /dev/null +++ b/pkgs/os-specific/darwin/plistwatch/go-modules.patch @@ -0,0 +1,19 @@ +--- a/go.mod ++++ b/go.mod +@@ -3,1 +3,6 @@ + go 1.14 ++ require( ++ github.com/jessevdk/go-flags v1.5.0 ++ howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5 ++ gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 // indirect ++ ) +--- a/go.sum ++++ b/go.sum +@@ -9,1 +9,7 @@ + howett.net/plist v0.0.0-20200419221736-3b63eb3a43b5/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= ++ gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 h1:POO/ycCATvegFmVuPpQzZFJ+pGZeX22Ufu6fibxDVjU= ++ gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg= ++ github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= ++ github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= ++ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc= ++ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f977815de55f..f6ee2814f487 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25465,6 +25465,8 @@ with pkgs; osxsnarf = callPackage ../os-specific/darwin/osxsnarf { }; + plistwatch = callPackage ../os-specific/darwin/plistwatch { }; + power-calibrate = callPackage ../os-specific/linux/power-calibrate { }; powercap = callPackage ../os-specific/linux/powercap { };