-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
g-golf: init at 0.8.2 #410234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
g-golf: init at 0.8.2 #410234
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| { | ||
| stdenv, | ||
| lib, | ||
| makeWrapper, | ||
| wrapGAppsHook4, | ||
| pkg-config, | ||
| guile, | ||
| guile-cairo-unstable, | ||
| glib, | ||
| gobject-introspection, | ||
| gtk4, | ||
| which, | ||
| adwaita-icon-theme, | ||
| libadwaita, | ||
| g-golf, | ||
| texinfo, | ||
| g-golf-adw-1-examples, | ||
| useLibadwaita ? false, | ||
| }: | ||
| stdenv.mkDerivation (finalAttrs: { | ||
|
|
||
| inherit (g-golf) version src; | ||
|
|
||
| pname = "g-golf-${finalAttrs.variant}-examples"; | ||
|
|
||
| variant = if useLibadwaita then "adw-1" else "gtk-4"; | ||
|
|
||
| nativeBuildInputs = [ | ||
| pkg-config | ||
| which | ||
| texinfo | ||
| makeWrapper | ||
| wrapGAppsHook4 | ||
| glib | ||
| ] | ||
| ++ lib.optionals useLibadwaita [ libadwaita ]; | ||
|
|
||
| buildInputs = [ | ||
| guile | ||
| g-golf | ||
| guile-cairo-unstable | ||
| gobject-introspection | ||
| gtk4 | ||
| adwaita-icon-theme | ||
| ]; | ||
|
|
||
| sourceRoot = "g-golf-${finalAttrs.version}/examples/${finalAttrs.variant}/${ | ||
| if useLibadwaita then "demo" else "demos" | ||
| }"; | ||
|
|
||
| postBuild = | ||
| if useLibadwaita then "glib-compile-resources --target g-resources g-resources.xml" else ""; | ||
|
|
||
| installPhase = '' | ||
| runHook preInstall | ||
|
|
||
| mkdir -p $out/bin $out/share/doc/g-golf/examples | ||
| cp -rf .. $out/share/doc/g-golf/examples/ | ||
|
|
||
| find $out/share -type f -executable | while read file; do | ||
| name=g-golf-${finalAttrs.variant}-$(basename $file) | ||
| makeWrapper $file $out/bin/$name \ | ||
| --chdir $(dirname $file) \ | ||
| --prefix PATH : "${guile}/bin" \ | ||
| --prefix GUILE_LOAD_PATH : "$GUILE_LOAD_PATH" \ | ||
| --prefix GUILE_LOAD_COMPILED_PATH : "$GUILE_LOAD_COMPILED_PATH" \ | ||
| --prefix LD_LIBRARY_PATH : "${g-golf}/lib:${guile-cairo-unstable}/lib" \ | ||
| --set GUILE_AUTO_COMPILE 0 | ||
| done | ||
|
|
||
| runHook postInstall | ||
| ''; | ||
|
|
||
| passthru.tests = { inherit g-golf-adw-1-examples; }; | ||
|
|
||
| meta = { | ||
| description = "G-Golf ${finalAttrs.variant} examples"; | ||
| homepage = "https://www.gnu.org/software/g-golf/"; | ||
| license = lib.licenses.lgpl3Plus; | ||
| maintainers = with lib.maintainers; [ mobid ]; | ||
| platforms = lib.platforms.unix; | ||
| }; | ||
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| { | ||
| stdenv, | ||
| lib, | ||
| fetchurl, | ||
| pkg-config, | ||
| texinfo, | ||
| guile, | ||
| guile-lib, | ||
| gobject-introspection, | ||
| glib, | ||
| xvfb-run, | ||
| gtk3, | ||
| gtk4, | ||
| which, | ||
| libadwaita, | ||
| }: | ||
| stdenv.mkDerivation (finalAttrs: { | ||
|
|
||
| pname = "g-golf"; | ||
| version = "0.8.2"; | ||
|
|
||
| src = fetchurl { | ||
| url = "mirror://gnu/g-golf/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; | ||
| hash = "sha256-eXO+RcHFckjPouX1rIhrlv712X0hLTx3s+uRnsLNHQM="; | ||
| }; | ||
|
|
||
| doCheck = true; | ||
| makeFlags = [ "GUILE_AUTO_COMPILE=0" ]; | ||
|
|
||
| nativeBuildInputs = [ | ||
| pkg-config | ||
| texinfo | ||
| guile | ||
| guile-lib | ||
| xvfb-run | ||
| gtk3 | ||
| glib | ||
| ]; | ||
|
|
||
| buildInputs = [ | ||
| gobject-introspection | ||
| ]; | ||
|
|
||
| postPatch = '' | ||
| sed -i 's|libgirepository-1.0|${gobject-introspection}/lib/libgirepository-1.0.so|' g-golf/init.scm | ||
| sed -i "s|libglib-2.0|${glib.out}/lib/libglib-2.0.so|" g-golf/init.scm | ||
| sed -i "s|libgobject-2.0|${glib.out}/lib/libgobject-2.0.so|" g-golf/init.scm | ||
|
Comment on lines
+45
to
+47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was able to get the equivalent working with env.LD_LIBRARY_PATH = lib.makeLibraryPath [
gobject-introspection
glib
];If you also want to support cross-compilation, these libraries probably need to be retrieved from
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I do this, the examples stop working.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like the way this is supposed to work is with GUILE_EXTENSIONS_PATH. But since this needs to be propagated (as you found by the broken examples), this would probably need to be added to the Not sure who maintains this interpreter though.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FWIW, the Guix package does the same thing |
||
|
|
||
| # In build environment, There is no /dev/tty | ||
| sed -i "s|/dev/tty|/dev/null|g" test-suite/tests/gobject.scm | ||
|
|
||
| sed -i "s|SITEDIR=.*$|SITEDIR="$out/${guile.siteDir}"|" configure | ||
| sed -i "s|SITECCACHEDIR=.*$|SITECCACHEDIR="$out/${guile.siteCcacheDir}"|" configure | ||
| ''; | ||
|
|
||
| checkPhase = '' | ||
| runHook preCheck | ||
| xvfb-run make check | ||
| runHook postCheck | ||
| ''; | ||
|
|
||
| postFixup = '' | ||
| sed -i "s|(dynamic-link \"libg-golf\")|(dynamic-link \"$out/lib/libg-golf\")|" $out/${guile.siteDir}/g-golf/init.scm | ||
| ''; | ||
|
|
||
| meta = { | ||
| description = "Guile Object Library for GNOME"; | ||
| homepage = "https://www.gnu.org/software/g-golf/"; | ||
| license = lib.licenses.lgpl3Plus; | ||
| maintainers = with lib.maintainers; [ mobid ]; | ||
| platforms = lib.platforms.unix; | ||
| }; | ||
| }) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| fetchgit, | ||
| cairo, | ||
| expat, | ||
| guile, | ||
| guile-lib, | ||
| pkg-config, | ||
| autoconf, | ||
| automake, | ||
| texinfo, | ||
| gettext, | ||
| }: | ||
|
|
||
| stdenv.mkDerivation { | ||
| pname = "guile-cairo"; | ||
| version = "1.11.2-unstable-2026-01-05"; | ||
|
|
||
| src = fetchgit { | ||
| url = "https://git.savannah.gnu.org/git/guile-cairo.git"; | ||
| hash = "sha256-MdXqMl0seOoL8muKOOrR5h4arpCeTunNnrHCEAD+nI4="; | ||
| rev = "399fbb3f9cb80dca2fefd2fceaedde4c8e75deee"; | ||
| }; | ||
|
|
||
| nativeBuildInputs = [ | ||
| autoconf | ||
| automake | ||
| texinfo | ||
| pkg-config | ||
| gettext | ||
| ]; | ||
| buildInputs = [ | ||
| cairo | ||
| expat | ||
| guile | ||
| ]; | ||
|
|
||
| preConfigure = '' | ||
| cp ${gettext}/share/gettext/m4/lib-{ld,link,prefix}.m4 m4 | ||
| autoreconf -fvi | ||
| ''; | ||
|
|
||
| enableParallelBuilding = true; | ||
|
|
||
| doCheck = false; # Cannot find unit-test module from guile-lib | ||
| nativeCheckInputs = [ guile-lib ]; | ||
|
|
||
| meta = { | ||
| homepage = "https://www.nongnu.org/guile-cairo/"; | ||
| description = "Cairo bindings for GNU Guile"; | ||
| longDescription = '' | ||
| Guile-Cairo wraps the Cairo graphics library for Guile Scheme. | ||
|
|
||
| Guile-Cairo is complete, wrapping almost all of the Cairo API. It is API | ||
| stable, providing a firm base on which to do graphics work. Finally, and | ||
| importantly, it is pleasant to use. You get a powerful and well | ||
| maintained graphics library with all of the benefits of Scheme: memory | ||
| management, exceptions, macros, and a dynamic programming environment. | ||
| ''; | ||
| license = lib.licenses.lgpl3Plus; | ||
| maintainers = with lib.maintainers; [ mobid ]; | ||
| platforms = guile.meta.platforms; | ||
| }; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.