···4646 the LS_COLORS environment variable is set and output is to tty.
4747 '';
4848 platforms = platforms.all;
4949- maintainers = with maintainers; [ ];
4949+ maintainers = with maintainers; [ nickcao ];
5050 };
5151}
+51
pkgs/tools/text/pyp/default.nix
···11+{ lib
22+, fetchFromGitHub
33+, python3
44+, bc
55+, jq
66+}:
77+88+let
99+ version = "1.1.0";
1010+in python3.pkgs.buildPythonApplication {
1111+ pname = "pyp";
1212+ inherit version;
1313+ format = "pyproject";
1414+1515+ src = fetchFromGitHub {
1616+ owner = "hauntsaninja";
1717+ repo = "pyp";
1818+ rev = "v${version}";
1919+ hash = "sha256-A1Ip41kxH17BakHEWEuymfa24eBEl5FIHAWL+iZFM4I=";
2020+ };
2121+2222+ nativeBuildInputs = [
2323+ python3.pkgs.flit-core
2424+ ];
2525+2626+ nativeCheckInputs = [
2727+ python3.pkgs.pytestCheckHook
2828+ bc
2929+ jq
3030+ ];
3131+3232+ # without this, the tests fail because they are unable to find the pyp tool
3333+ # itself...
3434+ preCheck = ''
3535+ _OLD_PATH_=$PATH
3636+ PATH=$out/bin:$PATH
3737+ '';
3838+3939+ # And a cleanup
4040+ postCheck = ''
4141+ PATH=$_OLD_PATH_
4242+ '';
4343+4444+ meta = {
4545+ homepage = "https://github.com/hauntsaninja/pyp";
4646+ description = "Easily run Python at the shell";
4747+ changelog = "https://github.com/hauntsaninja/pyp/blob/${version}/CHANGELOG.md";
4848+ license = lib.licenses.mit;
4949+ maintainers = with lib.maintainers; [ AndersonTorres ];
5050+ };
5151+}