diff --git a/pkgs/development/tools/misc/docopts/default.nix b/pkgs/development/tools/misc/docopts/default.nix new file mode 100644 index 000000000000..98a24ca5ebe4 --- /dev/null +++ b/pkgs/development/tools/misc/docopts/default.nix @@ -0,0 +1,31 @@ +{ stdenv, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + pname = "docopts"; + version = "0.6.3-rc2"; + + src = fetchFromGitHub { + owner = "docopt"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-PmsTkPT/sf70MKYLhHvjCDb2o3VQ1k7d++RUW7rcoAg="; + }; + + goPackagePath = "github.com/docopt/${pname}"; + + goDeps = ./deps.nix; + + subPackages = [ "./" ]; + + postInstall = '' + install -D -m 755 ./go/src/$goPackagePath/docopts.sh $out/bin/docopts.sh + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/docopt/${pname}"; + description = "docopt CLI tool for shell scripting"; + license = licenses.mit; + maintainers = [ maintainers.confus ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/tools/misc/docopts/deps.nix b/pkgs/development/tools/misc/docopts/deps.nix new file mode 100644 index 000000000000..8cc1686de7d6 --- /dev/null +++ b/pkgs/development/tools/misc/docopts/deps.nix @@ -0,0 +1,11 @@ +[ + { + goPackagePath = "github.com/docopt/docopt-go"; + fetch = { + type = "git"; + url = "https://github.com/docopt/docopt.go"; + rev = "ee0de3bc6815ee19d4a46c7eb90f829db0e014b1"; # "0.6.2"; + sha256 = "sha256-0mCKIC5x7aauBL8ahXB9ExMfoTJl55HaafWWWPNRmUI="; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 79908b1fc032..e8684893dedb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12742,6 +12742,8 @@ in docopt_cpp = callPackage ../development/libraries/docopt_cpp { }; + docopts = callPackage ../development/tools/misc/docopts { }; + dotconf = callPackage ../development/libraries/dotconf { }; draco = callPackage ../development/libraries/draco { };