nixpkgs/pkgs/tools/networking/http-prompt/default.nix
ryneeverett 0e283d6a2d http-prompt: fix build
I don't really understand why this works:

- Building with python3 because python2 fails with "error: invalid command
'bdist_wheel'".
- Specifying the path to prompt_toolkit v1 because otherwise the dependency
resolution fails with "ERROR: Could not find a version that satisfies the
requirement prompt-toolkit<2.0.0,>=1.0.0 (from http-prompt==1.0.0) (from
versions: none) ERROR: No matching distribution found for
prompt-toolkit<2.0.0,>=1.0.0 (from http-prompt==1.0.0)".
2019-11-16 04:34:53 +00:00

35 lines
943 B
Nix

{ stdenv, fetchFromGitHub, python3Packages, httpie }:
python3Packages.buildPythonApplication rec {
pname = "http-prompt";
version = "1.0.0";
src = fetchFromGitHub {
rev = "v${version}";
repo = "http-prompt";
owner = "eliangcs";
sha256 = "0kngz2izcqjphbrdkg489p0xmf65xjc8ki1a2szcc8sgwc7z74xy";
};
propagatedBuildInputs = with python3Packages; [
click
httpie
parsimonious
(python.pkgs.callPackage ../../../development/python-modules/prompt_toolkit/1.nix {})
pygments
six
];
checkPhase = ''
$out/bin/${pname} --version | grep -q "${version}"
'';
meta = with stdenv.lib; {
description = "An interactive command-line HTTP client featuring autocomplete and syntax highlighting";
homepage = https://github.com/eliangcs/http-prompt;
license = licenses.mit;
maintainers = with maintainers; [ matthiasbeyer ];
platforms = platforms.linux ++ platforms.darwin;
};
}