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

stig: init at 0.10.1a0 #67233

Merged
merged 10 commits into from Aug 25, 2019
Merged

stig: init at 0.10.1a0 #67233

merged 10 commits into from Aug 25, 2019

Conversation

doronbehar
Copy link
Contributor

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To enable tests, you need the github repo, here's what I came up with:

{ lib, fetchFromGitHub, python }:

with python.pkgs; buildPythonApplication rec {
  pname = "stig";
  version = "0.10.1a";

  src = fetchFromGitHub {
    owner = "rndusr";
    repo = "stig";
    rev = "v${version}";
    sha256 = "076rlial6h1nhwdxf1mx5nf2zld5ci43cadj9wf8xms7zn8s6c8v";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "urwidtrees>=1.0.3dev0" "urwidtrees"
  '';

  propagatedBuildInputs = [
    urwid
    urwidtrees
    aiohttp
    async-timeout
    pyxdg
    blinker
    natsort
    maxminddb
    setproctitle
  ];

  checkInputs = [
    asynctest
    pytest
  ];

  checkPhase = ''
    pytest --exitfirst tests
  '';

  meta = with lib; {
    description = "TUI and CLI for the BitTorrent client Transmission";
    homepage = "https://github.com/rndusr/stig";
    license = licenses.gpl3;
    maintainers = with maintainers; [ doronbehar ];
  };
}

pkgs/top-level/all-packages.nix Show resolved Hide resolved
@doronbehar
Copy link
Contributor Author

Nice, thanks @jonringer!

@doronbehar
Copy link
Contributor Author

@timokau I'll be happy to get your review on this one as well.

Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you go :)

pkgs/applications/networking/p2p/stig/default.nix Outdated Show resolved Hide resolved
@@ -0,0 +1,49 @@
{ lib
, fetchFromGitHub
, python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is using python2. Is that on purpose? It would be better to use py3 if possible, or be explicit about using py2 otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my last comment.

pkgs/applications/networking/p2p/stig/default.nix Outdated Show resolved Hide resolved
pkgs/applications/networking/p2p/stig/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
Copy link
Contributor Author

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed most of the issues.

pkgs/applications/networking/p2p/stig/default.nix Outdated Show resolved Hide resolved
@doronbehar doronbehar mentioned this pull request Aug 24, 2019
10 tasks
Copy link
Member

@timokau timokau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again :)

@timokau timokau merged commit 1859271 into NixOS:master Aug 25, 2019
@doronbehar doronbehar deleted the package-stig branch March 2, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants