Files
nixpkgs/pkgs/by-name/co/commit/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

86 lines
1.8 KiB
Nix

{
lib,
stdenv,
appstream,
blueprint-compiler,
desktop-file-utils,
fetchFromGitHub,
gjs,
glib,
gtk4,
gtksourceview5,
libadwaita,
libspelling,
meson,
ninja,
nix-update-script,
pkg-config,
wrapGAppsHook4,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "commit";
version = "4.3";
src = fetchFromGitHub {
owner = "sonnyp";
repo = "Commit";
tag = "v${finalAttrs.version}";
hash = "sha256-yNzMFOd0IN5EUKG7ztCEbQzQ9RHc+D4iC1OiBauMSwE=";
fetchSubmodules = true;
};
patches = [
# Instead of using the absolute path in command snippets,
# assume `re.sonny.Commit` is already in PATH. This prevents
# configurations from breaking when our store path changes
./command-from-path.patch
];
# gjs uses the invocation name to add gresource files
# to get around this, we set the entry point name manually
#
# `/usr/bin/env` is also used quite a bit
postPatch = ''
sed -i "1 a imports.package._findEffectiveEntryPointName = () => 're.sonny.Commit';" src/bin.js
patchShebangs {,.}*
'';
strictDeps = true;
nativeBuildInputs = [
appstream
blueprint-compiler
desktop-file-utils # for `desktop-file-validate` & `update-desktop-database`
gjs
glib # for `glib-compile-schemas`
gtk4 # for `gtk-update-icon-cache`
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
gjs
gtksourceview5
libadwaita
libspelling
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Git commit message editor";
homepage = "https://github.com/sonnyp/Commit";
license = lib.licenses.gpl3Only;
teams = [ lib.teams.gnome-circle ];
mainProgram = "re.sonny.Commit";
platforms = lib.platforms.linux;
};
})