NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.58k stars 13.73k forks source link

Package request: Kommit #217631

Open hervyqa opened 1 year ago

hervyqa commented 1 year ago

Project description

Git gui client for KDE img

Metadata

nasrally commented 1 year ago

Could you please update your issue and rename "gitklient" to "kommit"? It appears that the devs have renamed it some time ago.

https://invent.kde.org/sdk/kommit

hervyqa commented 1 year ago

Could you please update your issue and rename "gitklient" to "kommit"? It appears that the devs have renamed it some time ago.

Updated.

raspher commented 7 months ago

I've worked on it a little, got something... Definitely not perfect as there are a lot of segfaults when opening a repo, seems not even usable atm. I've found that they should know about their segfaults as compiler warns them even in their build job. Maybe it's just qt5 related, idk.

Current work for future packagers, do what you want with it (and test it before sending PR):

{ cmake
, extra-cmake-modules
, fetchFromGitLab
, lib
, libgit2
, libsForQt5
, nix-update-script
, openssl
, pcre
, pkg-config
, stdenv
, zlib
}:

stdenv.mkDerivation rec {
  pname = "kommit";
  version = "1.3.1";

  src = fetchFromGitLab {
    domain = "invent.kde.org";
    owner = "sdk";
    repo = "kommit";
    rev = "v${version}";
    hash = "sha256-H/GPgS63fNI1t6gIavTpoBX+yCkCa1sU50eKluHv5Ao=";
  };

  nativeBuildInputs = with libsForQt5; [
    cmake
    kdoctools
    pkg-config
    qt5.wrapQtAppsHook
  ];

  buildInputs = with libsForQt5; [
    dolphin.dev
    extra-cmake-modules
    kconfigwidgets
    kcoreaddons
    kcrash
    kdbusaddons
    ki18n
    kio
    ktexteditor
    ktextwidgets
    libgit2
    openssl
    pcre
    zlib
  ];

  # todo: uncomment this when `nix-update` is version higher than 1.1.0
  #passthru.updateScript = nix-update-script {
  #  extraArgs = [ "--version-regex" "^(v[0-9.]+)$" ];
  #};

  meta = with lib; {
    description = "Graphical Git Client";
    homepage = "https://invent.kde.org/sdk/kommit";
    license = licenses.gpl3Only;
    maintainers = with maintainers; [  ];
    platforms = platforms.linux; 
  };
}
alex-fu27 commented 2 months ago

I just startet trying to package this, too.

For KDE Packages, kdePackages.mkKDEDerivation { pname = "kommit"; } should suffice, as far as I understand. But this fails for Kommit. The reason is that while pkgs/kde/generated/projects.json contains kommit, it is missing from pkgs/kde/generated/licenses.json.

But I don't know how these files are generated. @K900 you were the last to update these, can you give us more information, please?

K900 commented 2 months ago

You can explicitly provide your own source and license information, as done for many other packages in pkgs/kde/misc.

alex-fu27 commented 1 month ago

I've packaged Kommit, opened pull request #326325 but I don't want to maintain the package because I realized I won't be using it at all. If anyone would like to do that, have a look at the pull request and feel free to continue from there :slightly_smiling_face: