NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.29k stars 13.54k forks source link

Package request: reportbug #324605

Open AkechiShiro opened 2 months ago

AkechiShiro commented 2 months ago

Project description

Reporting bug tool for Debian

Metadata

LICENSE = """\ Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation.

I DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL I BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."""

  • platforms: unix, linux

Add a :+1: reaction to issues you find important.

ByteSudoer commented 2 months ago

@AkechiShiro Here is the derivation so far. The problem is that the program reportbug expects some apt configuration files installed globally (in /etc for example). Feel free to tinker with it. image

{ lib
, python3
, fetchFromGitLab

, xdg-utils
}:

python3.pkgs.buildPythonApplication rec {
  pname = "reportbug";
  version = "13.0.1";
  pyproject = true;

  src = fetchFromGitLab {
    domain = "salsa.debian.org";
    owner = "reportbug-team";
    repo = "reportbug";
    rev = version;
    hash = "sha256-DBhfajuqtW2Ye+D/WUtf0Woy+IV+vh2QTBS2BwZVUGM=";
  };

  build-system = with python3.pkgs;[
    setuptools
    wheel
  ];

  nativeCheckInpouts = with python3.pkgs;[
    pytestCheckHook
  ];

  buildInputs = [
    xdg-utils
    # apt
  ];

  dependencies = with python3.pkgs; [
    requests
    python-apt
  ];

  pythonImportsCheck = [ "reportbug" ];

  meta = with lib; {
    description = "Reporting bug tool for Debian";
    homepage = "https://salsa.debian.org/reportbug-team/reportbug/-/archive/13.0.1/reportbug-13.0.1.zip";
    license = licenses.mit; # Mentioned  in the setup.py file
    maintainers = with maintainers; [ ByteSudoer ];
    platforms = lib.platforms.unix;
    mainProgram = "reportbug";
  };
}
AkechiShiro commented 2 months ago

Thanks a lot for the derivation will play with it ! Is there any reason why there is no PR for it upstream ? @ByteSudoer

AkechiShiro commented 1 month ago

Gentle ping @ByteSudoer

ByteSudoer commented 1 month ago

@AkechiShiro Mainly because it's focused on linux distributions that are based on the apt package manager (Debian, etc...) which are ALL FHS compliant so to make it work on NixOS it's more or less nix business (patches while making derivation,binary wrapping) something like this.