Hello,
I’m simply trying to wrap the AppImage of SourceGit and create a .desktop to be able to launch it from Gnome.
I’m able to launch the program using a terminal by simply writing sourcegit
, but when searching for sourcegit
in Gnome, I doesn’t found it.
Nix configuration
I’m using NixOS 24.11 with the stable channel and there is the relevant part of my Nix configuration.
configuration.nix:
{ pkgs, ... }:
{
# A lot of unrelevant stuff.
environment.systemPackages = with pkgs; [
# Other unrelevant packages
(callPackage ./packages/sourcegit.nix {inherit appimageTools fetchurl copyDesktopItems makeDesktopItem lib stdenv;})
];
# A lot of unrelevant stuff.
}
sourcegit.nix:
#with import <nixpkgs> {}; # I also tried before with this and without the callPackage in configuration.nix without success.
{appimageTools, fetchurl, copyDesktopItems, makeDesktopItem, lib, stdenv}:
appimageTools.wrapType2 rec {
pname = "sourcegit";
version = "2025.03";
arch = "amd64";
src = fetchurl {
url = "https://github.com/sourcegit-scm/sourcegit/releases/download/v${version}/sourcegit-${version}.linux.${arch}.AppImage";
hash = "sha256-2EHLDDqb5EsZ3pea5ass1Xpx79ZpOUTxvE1D+klRsms=";
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
copyDesktopItems
];
meta = {
description = "Opensource Git GUI client.";
homepage = "https://github.com/sourcegit-scm/sourcegit/";
downloadPage = "https://github.com/sourcegit-scm/sourcegit/releases/";
license = lib.licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ sourcegit-scm ];
platforms = [ "x86_64-linux" ];
mainProgram = "sourcegit";
};
desktopItems = [
(makeDesktopItem {
name = "SourceGit";
exec = "sourcegit";
desktopName = "SourceGit";
})
];
extraPkgs = pkgs: with pkgs; [ icu git ];
}