Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package: catcli #84071

Closed
petersjt014 opened this issue Apr 2, 2020 · 1 comment
Closed

Add package: catcli #84071

petersjt014 opened this issue Apr 2, 2020 · 1 comment

Comments

@petersjt014
Copy link
Member

petersjt014 commented Apr 2, 2020

Catcli
"The command line catalog tool for your offline data."
Because git-annex is hard.

Metadata

WIP definition

{ lib
, stdenv
, fetchFromGitHub
, buildPythonApplication
, docopt, anytree, ...
}:

buildPythonApplication rec {

  pname = "catcli";
  version = "v0.5.13";

  src = fetchFromGitHub {
    owner = "deadc0de6";
    repo = pname;
    rev = version;
    sha256 = "04mrkqmm2c8fhi1h1hddc4yh3dqhcvkmcwzhj0ggn34v7wavgb5i";
  };

  propagatedBuildInputs = [ docopt anytree ];
  buildInputs = [ docopt anytree ];

  postPatch = '' patchShebangs . '';

  meta = with stdenv.lib; {
    homepage = https://github.com/deadc0de6/catcli;
    description = "The command line catalog tool for your offline data";
    license = licenses.gpl3;
    maintainers = with maintainers; [ petersjt014 ];
  };
}

This builds with the relevant callPackage line in top-level.nix (I think that's where it must go), but attempting to invoke it with ./result/bin/catcli yields:

Traceback (most recent call last):
  File "/nix/store/vs6ay1fks6gnyq2vbc8bmvy5ydfida56-catcli-v0.5.13/bin/.catcli-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/vs6ay1fks6gnyq2vbc8bmvy5ydfida56-catcli-v0.5.13/lib/python3.7/site-packages/catcli/__init__.py", line 12, in main
    import catcli.catcli
  File "/nix/store/vs6ay1fks6gnyq2vbc8bmvy5ydfida56-catcli-v0.5.13/lib/python3.7/site-packages/catcli/catcli.py", line 14, in <module>
    from docopt import docopt
ModuleNotFoundError: No module named 'docopt'

This is weird, as I have docopt in the build inputs.
edit: typo. ./result/bin/catcli --help now shows the expected help text.
Apparently buildPythonApplication takes care of the tests too, so there's nothing more to add that I can think of for now.

@petersjt014
Copy link
Member Author

#84078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant