Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkgs/development/libraries/gtk/4.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ stdenv.mkDerivation rec {
for f in $dev/bin/gtk4-encode-symbolic-svg; do
wrapProgram $f --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
done
'' + lib.optionalString broadwaySupport ''
# Broadway daemon
moveToOutput bin/gtk4-broadwayd "$out"
'';

# Wrap demos
Expand Down
96 changes: 96 additions & 0 deletions pkgs/development/tools/cambalache/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{ stdenv
, lib
, fetchFromGitLab
, python3
, meson
, ninja
, pkg-config
, gobject-introspection
, desktop-file-utils
, shared-mime-info
, wrapGAppsHook
, glib
, gtk3
, gtk4
, webkitgtk
, nix-update-script
}:

python3.pkgs.buildPythonApplication rec {
pname = "cambalache";
version = "0.8.2";

format = "other";

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "jpu";
repo = pname;
rev = version;
sha256 = "sha256-1+IoBoaNHwvN8W+KRyV5cTFkFG+pTHJBehQ2VosCEfs=";
};

nativeBuildInputs = [
meson
ninja
pkg-config
gobject-introspection # for setup hook
desktop-file-utils # for update-desktop-database
shared-mime-info # for update-mime-database
wrapGAppsHook
];

pythonPath = with python3.pkgs; [
pygobject3
lxml
];

buildInputs = [
glib
gtk3
gtk4
webkitgtk
];

# Not compatible with gobject-introspection setup hooks.
# https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;

# Prevent double wrapping.
dontWrapGApps = true;

postPatch = ''
patchShebangs postinstall.py
'';

preFixup = ''
# Let python wrapper use GNOME flags.
makeWrapperArgs+=(
# For broadway daemons
--prefix PATH : "${lib.makeBinPath [ gtk3 gtk4 ]}"
"''${gappsWrapperArgs[@]}"
)
'';

postFixup = ''
# Wrap a helper script in an unusual location.
wrapPythonProgramsIn "$out/${python3.sitePackages}/cambalache/priv/merengue" "$out $pythonPath"
'';

passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};

meta = with lib; {
homepage = "https://gitlab.gnome.org/jpu/cambalache";
description = "RAD tool for GTK 4 and 3 with data model first philosophy";
maintainers = teams.gnome.members;
license = with licenses; [
lgpl21Only # Cambalache
gpl2Only # tools
];
platforms = platforms.unix;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2759,6 +2759,8 @@ with pkgs;

ydotool = callPackage ../tools/wayland/ydotool { };

cambalache = callPackage ../development/tools/cambalache { };

clipster = callPackage ../tools/misc/clipster { };

clockify = callPackage ../applications/office/clockify {
Expand Down