push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchurl,
libGLU,
libGL,
SDL,
libglut,
SDL_mixer,
autoconf,
automake,
libtool,
}:
stdenv.mkDerivation rec {
pname = "gl-117";
version = "1.3.2";
src = fetchurl {
url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/${pname}-${version}.tar.bz2";
sha256 = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4";
};
nativeBuildInputs = [
automake
autoconf
];
buildInputs = [
libGLU
libGL
SDL
libglut
SDL_mixer
libtool
];
meta = with lib; {
description = "Air combat simulator";
mainProgram = "gl-117";
homepage = "https://sourceforge.net/projects/gl-117";
maintainers = with maintainers; [ raskin ];
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchurl,
cmake,
zlib,
libpng,
libGL,
libGLU,
libglut,
}:
stdenv.mkDerivation rec {
pname = "gl2ps";
version = "1.4.2";
src = fetchurl {
url = "http://geuz.org/gl2ps/src/${pname}-${version}.tgz";
sha256 = "1sgzv547h7hrskb9qd0x5yp45kmhvibjwj2mfswv95lg070h074d";
};
# fix build with cmake v4
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail 'cmake_minimum_required(VERSION 2.8 FATAL_ERROR)' 'cmake_minimum_required(VERSION 3.10)'
'';
nativeBuildInputs = [
cmake
];
buildInputs = [
zlib
libpng
]
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
libGL
libGLU
libglut
];
meta = with lib; {
homepage = "http://geuz.org/gl2ps";
description = "OpenGL to PostScript printing library";
platforms = platforms.all;
license = licenses.lgpl2;
maintainers = with maintainers; [
raskin
twhitehead
];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
cmake,
libglvnd,
libGLU,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "gl3w";
version = "0-unstable-2025-09-23";
src = fetchFromGitHub {
owner = "skaslev";
repo = "gl3w";
rev = "97a85e153d7f43c8d2de8b776a33721e238ddb96";
hash = "sha256-cpB/8qo9dDyKPxD6mRriKGZf7N7ei1oL5JtM4jgXsAw=";
};
nativeBuildInputs = [
python3
cmake
];
# gl3w installs a CMake config that when included expects to be able to
# build and link against both of these libraries
# (the gl3w generated C file gets compiled into the downstream target)
propagatedBuildInputs = [
libglvnd
libGLU
];
dontUseCmakeBuildDir = true;
# These files must be copied rather than linked since they are considered
# outputs for the custom command, and CMake expects to be able to touch them
preConfigure = ''
mkdir -p include/{GL,KHR}
cp ${libglvnd.dev}/include/GL/glcorearb.h include/GL/glcorearb.h
cp ${libglvnd.dev}/include/KHR/khrplatform.h include/KHR/khrplatform.h
'';
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "Simple OpenGL core profile loading";
homepage = "https://github.com/skaslev/gl3w";
license = licenses.unlicense;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,92 @@
{
lib,
buildGoModule,
fetchFromGitLab,
installShellFiles,
makeBinaryWrapper,
stdenv,
nix-update-script,
writableTmpDirAsHomeHook,
versionCheckHook,
gitMinimal,
}:
buildGoModule (finalAttrs: {
pname = "glab";
version = "1.73.0";
src = fetchFromGitLab {
owner = "gitlab-org";
repo = "cli";
tag = "v${finalAttrs.version}";
hash = "sha256-2beWB7QD2oeGZIjDWxKyqZLGzNJKWlRuqA1h7GRu1G4=";
leaveDotGit = true;
postFetch = ''
cd "$out"
git rev-parse --short HEAD > $out/COMMIT
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
vendorHash = "sha256-pQK3cRNxvGm+NH4zBlw8jm+fPgSg65FIe7zxZ99jl5Q=";
ldflags = [
"-s"
"-w"
"-X main.version=${finalAttrs.version}"
];
preBuild = ''
ldflags+=" -X main.commit=$(cat COMMIT)"
'';
nativeBuildInputs = [
installShellFiles
makeBinaryWrapper
];
subPackages = [ "cmd/glab" ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
make manpage
installManPage share/man/man1/*
installShellCompletion --cmd glab \
--bash <($out/bin/glab completion -s bash) \
--fish <($out/bin/glab completion -s fish) \
--zsh <($out/bin/glab completion -s zsh)
wrapProgram $out/bin/glab \
--set-default GLAB_CHECK_UPDATE 0 \
--set-default GLAB_SEND_TELEMETRY 0
'';
nativeCheckInputs = [ writableTmpDirAsHomeHook ];
preCheck = ''
git init
'';
doInstallCheck = true;
nativeInstallCheckInputs = [
gitMinimal
versionCheckHook
writableTmpDirAsHomeHook
];
versionCheckProgramArg = "version";
versionCheckKeepEnvironment = [ "HOME" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "GitLab CLI tool bringing GitLab to your command line";
license = lib.licenses.mit;
homepage = "https://gitlab.com/gitlab-org/cli";
changelog = "https://gitlab.com/gitlab-org/cli/-/releases/v${finalAttrs.version}";
maintainers = with lib.maintainers; [
freezeboy
luftmensch-luftmensch
anthonyroussel
];
mainProgram = "glab";
};
})

View File

@@ -0,0 +1,33 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libsForQt5,
}:
stdenv.mkDerivation {
pname = "glabels-qt";
version = "unstable-2021-02-06";
src = fetchFromGitHub {
owner = "jimevins";
repo = "glabels-qt";
rev = "glabels-3.99-master564";
hash = "sha256-SdNOkjspqf6NuuIBZDsJneY6PNrIiP4HU46wDpBLt9Y=";
};
nativeBuildInputs = [
cmake
libsForQt5.wrapQtAppsHook
libsForQt5.qttools
];
meta = with lib; {
description = "GLabels Label Designer (Qt/C++)";
homepage = "https://github.com/jimevins/glabels-qt";
license = licenses.gpl3Only;
maintainers = [ maintainers.matthewcroughan ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,88 @@
{
stdenv,
lib,
gettext,
fetchurl,
python3,
meson,
ninja,
pkg-config,
gtk3,
glib,
gjs,
enableWebkit2gtk ? stdenv.hostPlatform.isLinux,
webkitgtk_4_1,
gobject-introspection,
wrapGAppsHook3,
itstool,
libxml2,
docbook-xsl-nons,
docbook_xml_dtd_42,
gnome,
adwaita-icon-theme,
gdk-pixbuf,
libxslt,
gsettings-desktop-schemas,
}:
stdenv.mkDerivation rec {
pname = "glade";
version = "3.40.0";
src = fetchurl {
url = "mirror://gnome/sources/glade/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "McmtrqhJlyq5UXtWThmsGZd8qXdYsQntwxZwCPU+PZw=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
itstool
wrapGAppsHook3
docbook-xsl-nons
docbook_xml_dtd_42
libxslt
libxml2
gobject-introspection
];
buildInputs = [
gtk3
glib
gjs
libxml2
python3
python3.pkgs.pygobject3
gsettings-desktop-schemas
gdk-pixbuf
adwaita-icon-theme
]
++ lib.optionals enableWebkit2gtk [
webkitgtk_4_1
];
mesonFlags = [
(lib.mesonEnable "webkit2gtk" enableWebkit2gtk)
];
postPatch = ''
substituteInPlace meson.build \
--replace 'webkit2gtk-4.0' 'webkit2gtk-4.1'
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
};
};
meta = with lib; {
homepage = "https://gitlab.gnome.org/GNOME/glade";
description = "User interface designer for GTK applications";
teams = [ teams.gnome ];
license = licenses.lgpl2;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonPackage {
pname = "gladtex";
version = "unstable-2023-01-22";
format = "pyproject";
src = fetchFromGitHub {
owner = "humenda";
repo = "GladTeX";
rev = "f84e63836622ff1325dfddc7c5649f11a795afa0";
sha256 = "sha256-B5sNEmLO4iIJRDgcPhr9LFKV77dPJws8ITNz4R+FE08=";
};
build-system = with python3Packages; [
setuptools
];
meta = with lib; {
description = "Embed LaTeX formulas into HTML documents as SVG images";
mainProgram = "gladtex";
homepage = "https://humenda.github.io/GladTeX";
license = licenses.lgpl3Plus;
platforms = platforms.all;
maintainers = with maintainers; [ pentane ];
};
}

View File

@@ -0,0 +1,25 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash --packages curl
#
# Download the latest GlamorousToolkit image to the current directory, which must be empty
#
set -e
if [ ! -z "$(ls)" ]
then
echo "Warning: the directory is not empty, continuing may overwrite some files"
read -p "Continue? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
fi
GTVERSION=$(curl -s https://api.github.com/repos/feenkcom/gtoolkit/releases/latest 2>/dev/null | grep tag_name | cut -d '"' -f 4)
if [ -z "$GTVERSION" ]
then
echo "Failed to get Gt Version string, exiting..."
exit 1
fi
curl -L \
-o gt-image.zip \
https://github.com/feenkcom/gtoolkit/releases/download/${GTVERSION}/GlamorousToolkit-Linux-x86_64-${GTVERSION}.zip
unzip gt-image.zip
rm -rf bin lib

View File

@@ -0,0 +1,150 @@
{
lib,
stdenv,
fetchurl,
fetchzip,
wrapGAppsHook3,
cairo,
copyDesktopItems,
dbus,
fontconfig,
freetype,
glib,
gtk3,
libX11,
libXcursor,
libXext,
libXi,
libXrandr,
libXrender,
libxkbcommon,
libgit2,
libglvnd,
libuuid,
libxcb,
makeDesktopItem,
harfbuzz,
libsoup_3,
webkitgtk_4_1,
zenity,
}:
let
gkIcon = fetchurl {
url = "https://gist.githubusercontent.com/qbit/cb52e6cd193c410e0b0aee8a216f6574/raw/2b042bde1dc4cbd30457f14c9d18c889444bf3d0/glamoroustoolkit.svg";
sha256 = "sha256-Trfo8P01anLq9yTFzwqIfsyidLGyuZDg48YQPrGBkgs=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "glamoroustoolkit";
version = "1.1.32";
src = fetchzip {
url = "https://github.com/feenkcom/gtoolkit-vm/releases/download/v${finalAttrs.version}/GlamorousToolkit-x86_64-unknown-linux-gnu.zip";
stripRoot = false;
hash = "sha256-uZrq4RM50NcQPHFFfqIRBJ/rq/I09D8WxKz3/xqpOEI=";
};
nativeBuildInputs = [
wrapGAppsHook3
copyDesktopItems
];
sourceRoot = ".";
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
dontStrip = true;
desktopItems = with finalAttrs; [
(makeDesktopItem {
name = pname;
desktopName = "GlamorousToolkit";
exec = "GlamorousToolkit";
icon = "GlamorousToolkit";
})
];
installPhase = ''
runHook preInstall
install -d $out/bin $out/lib $out/share/icons/hicolor/scalable/apps
cp ${gkIcon} $out/share/icons/hicolor/scalable/apps/GlamorousToolkit.svg
cp -r $src/bin $src/lib $out/
cp ${./GlamorousToolkit-GetImage} $out/bin/GlamorousToolkit-GetImage
runHook postInstall
'';
preFixup =
let
libPath = lib.makeLibraryPath [
cairo
dbus
fontconfig
freetype
glib
gtk3
libX11
libXcursor
libXext
libXi
libXrandr
libXrender
libxkbcommon
libglvnd
libuuid
libxcb
harfbuzz # libWebView.so
libsoup_3 # libWebView.so
webkitgtk_4_1 # libWebView.so
(lib.getLib stdenv.cc.cc)
];
binPath = lib.makeBinPath [
zenity # File selection dialog
];
in
''
chmod +x $out/lib/*.so
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}:$out/lib" \
$out/bin/GlamorousToolkit $out/bin/GlamorousToolkit-cli
patchelf --shrink-rpath \
$out/bin/GlamorousToolkit $out/bin/GlamorousToolkit-cli
patchelf \
--set-rpath "${libPath}:$out/lib" \
$out/lib/*.so
patchelf --shrink-rpath $out/lib/*.so
#
# shrink-rpath gets it wrong for the following libraries,
# restore the full rpath.
#
patchelf \
--set-rpath "${libPath}:$out/lib" \
$out/lib/libPharoVMCore.so \
$out/lib/libWinit.so \
$out/lib/libWinit30.so \
$out/lib/libPixels.so
patchelf --set-rpath $out/lib $out/lib/libssl.so
ln -s $out/lib/libcrypto.so $out/lib/libcrypto.so.1.1
ln -s $out/lib/libcairo.so $out/lib/libcairo.so.2
rm $out/lib/libgit2.so
ln -s "${libgit2}/lib/libgit2.so" $out/lib/libgit2.so.1.1
gappsWrapperArgs+=(
--prefix PATH : ${binPath}
)
'';
meta = {
homepage = "https://gtoolkit.com";
description = "GlamorousToolkit Development Environment";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.akgrant43 ];
platforms = [ "x86_64-linux" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
nixosTests,
}:
buildGoModule (finalAttrs: {
pname = "glance";
version = "0.8.4";
src = fetchFromGitHub {
owner = "glanceapp";
repo = "glance";
tag = "v${finalAttrs.version}";
hash = "sha256-4su8CGtS4wqWcQ3yTvZiUHOnTMLICS3XIG8kS+bJ3LQ=";
};
vendorHash = "sha256-Ek1LVCSEJzoI0nVu6zVsSbd/Jzv6/pyMIm991ebvkZY=";
ldflags = [
"-s"
"-w"
"-X github.com/glanceapp/glance/internal/glance.buildVersion=v${finalAttrs.version}"
];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
tests = {
service = nixosTests.glance;
};
};
meta = {
homepage = "https://github.com/glanceapp/glance";
changelog = "https://github.com/glanceapp/glance/releases/tag/v${finalAttrs.version}";
description = "Self-hosted dashboard that puts all your feeds in one place";
mainProgram = "glance";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
dvn0
defelo
];
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "glas";
version = "0.2.3";
src = fetchFromGitHub {
owner = "maurobalbi";
repo = "glas";
rev = "v${version}";
hash = "sha256-jMpFxzosaCedwsJ8URlR3Gd/mnlgSBEfA3oIymmEPFU=";
};
cargoHash = "sha256-uPCWHLqko361S/ThtWOP/XN1QFSHXv0dpYR3xweHqe0=";
doInstallCheck = true;
postInstallCheck = ''
$out/bin/glas --help > /dev/null
'';
meta = {
description = "Language server for the Gleam programming language";
homepage = "https://github.com/maurobalbi/glas";
changelog = "https://github.com/maurobalbi/glas/tag/v${version}";
license = with lib.licenses; [
asl20
mit
];
mainProgram = "glas";
maintainers = with lib.maintainers; [ bhankas ];
};
}

View File

@@ -0,0 +1,121 @@
{
lib,
python3,
fetchFromGitHub,
sdcc,
yosys,
icestorm,
nextpnr,
}:
python3.pkgs.buildPythonApplication rec {
pname = "glasgow";
version = "0-unstable-2025-07-28";
# Similar to `pdm show`, but without the commit counter
pdmVersion =
let
tag = builtins.elemAt (lib.splitString "-" version) 0;
rev = lib.substring 0 7 src.rev;
in
"${tag}.1.dev0+g${rev}";
# the latest commit ID touching the `firmware` directory, can differ from rev!
firmwareGitRev = "4fe35360";
pyproject = true;
src = fetchFromGitHub {
owner = "GlasgowEmbedded";
repo = "glasgow";
rev = "18442e9684cdda4bb2cbd2be9c31b3c6dffc625a";
hash = "sha256-b0kpgCHMk5Ylj4hY29sHRzY/zI1JXReHioHxHSO4h5E=";
};
nativeBuildInputs = [
sdcc
];
build-system = [
python3.pkgs.pdm-backend
];
dependencies = with python3.pkgs; [
aiohttp
amaranth
cobs
fx2
importlib-resources
libusb1
packaging
platformdirs
pyvcd
typing-extensions
];
nativeCheckInputs = [
# pytestCheckHook discovers way less tests
python3.pkgs.unittestCheckHook
icestorm
nextpnr
yosys
];
unittestFlags = [ "-v" ];
enableParallelBuilding = true;
__darwinAllowLocalNetworking = true;
preBuild = ''
make -C firmware GIT_REV_SHORT=${firmwareGitRev} LIBFX2=${python3.pkgs.fx2}/share/libfx2
# Normalize the .ihex file, see ./software/deploy-firmware.sh.
${python3.withPackages (p: [ p.fx2 ])}/bin/python firmware/normalize.py \
firmware/glasgow.ihex firmware/glasgow.ihex
# Ensure the compiled firmware is exactly the same as the one shipped in the repo.
cmp -s firmware/glasgow.ihex software/glasgow/hardware/firmware.ihex
cd software
export PDM_BUILD_SCM_VERSION="${pdmVersion}"
'';
# installCheck tries to build_ext again
doInstallCheck = false;
postInstall = ''
mkdir -p $out/etc/udev/rules.d
cp $src/config/*.rules $out/etc/udev/rules.d
'';
preCheck = ''
export PYTHONWARNINGS="ignore::DeprecationWarning"
# tests attempt to cache bitstreams
# for linux:
export XDG_CACHE_HOME=$TMPDIR
# for darwin:
export HOME=$TMPDIR
'';
makeWrapperArgs = [
"--set"
"YOSYS"
"${yosys}/bin/yosys"
"--set"
"ICEPACK"
"${icestorm}/bin/icepack"
"--set"
"NEXTPNR_ICE40"
"${nextpnr}/bin/nextpnr-ice40"
];
meta = with lib; {
description = "Software for Glasgow, a digital interface multitool";
homepage = "https://github.com/GlasgowEmbedded/Glasgow";
license = licenses.bsd0;
maintainers = with maintainers; [
flokli
thoughtpolice
];
mainProgram = "glasgow";
};
}

View File

@@ -0,0 +1,89 @@
{
lib,
stdenv,
buildGoModule,
buildNpmPackage,
fetchFromGitHub,
nix-update-script,
installShellFiles,
versionCheckHook,
}:
let
version = "0.26.1";
gitSrc = fetchFromGitHub {
owner = "glasskube";
repo = "glasskube";
tag = "v${version}";
hash = "sha256-M/7qfr4gpogx7cr7zh/MARZME3/4ePjVUVcjG85Ona0=";
};
web-bundle = buildNpmPackage {
inherit version;
pname = "glasskube-web-bundle";
src = gitSrc;
npmDepsHash = "sha256-1+ROYamu0FHed6x2Y+88P0ntR8aJdN1d2UBqMBfpmyw=";
dontNpmInstall = true;
installPhase = ''
runHook preInstall
mkdir $out
mv internal/web/root/static/bundle $out
runHook postInstall
'';
};
in
buildGoModule rec {
inherit version;
pname = "glasskube";
src = gitSrc;
vendorHash = "sha256-0cTW01f9yputdqLvpfISaS50Jeolh12OTP+NjsgXncA=";
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/glasskube/glasskube/internal/config.Version=${version}"
"-X github.com/glasskube/glasskube/internal/config.Commit=${src.rev}"
];
subPackages = [
"cmd/glasskube"
"cmd/package-operator"
];
nativeBuildInputs = [ installShellFiles ];
nativeCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
preBuild = ''
cp -r ${web-bundle}/bundle internal/web/root/static/bundle
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# Completions
installShellCompletion --cmd glasskube \
--bash <($out/bin/glasskube completion bash) \
--fish <($out/bin/glasskube completion fish) \
--zsh <($out/bin/glasskube completion zsh)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Missing Package Manager for Kubernetes featuring a GUI and a CLI";
homepage = "https://github.com/glasskube/glasskube";
changelog = "https://github.com/glasskube/glasskube/releases/tag/v${version}";
maintainers = with lib.maintainers; [ jakuzure ];
license = lib.licenses.asl20;
mainProgram = "glasskube";
};
}

View File

@@ -0,0 +1,23 @@
{
runCommand,
fetchurl,
lib,
}:
runCommand "glasstty-ttf"
{
src = fetchurl {
url = "https://github.com/svofski/glasstty/raw/2c47ac1a0065f8b12d9732257993833d8227e3e5/Glass_TTY_VT220.ttf";
sha256 = "sha256-2NYJaSWNr1Seuqdd7nLjA7tAMs/SAvl3uAe3uDoLLO4=";
};
meta = with lib; {
maintainers = [ maintainers.pkharvey ];
homepage = "https://github.com/svofski/glasstty";
license = licenses.unlicense;
platforms = platforms.all;
description = "TrueType VT220 font";
};
}
''
mkdir -p $out/share/fonts/truetype
cp $src $out/share/fonts/truetype/Glass_TTY_VT220.ttf
''

View File

@@ -0,0 +1,54 @@
{
lib,
fetchFromGitHub,
buildGoModule,
oath-toolkit,
openldap,
}:
buildGoModule rec {
pname = "glauth";
version = "2.3.2";
src = fetchFromGitHub {
owner = "glauth";
repo = "glauth";
rev = "v${version}";
hash = "sha256-FOhtL8nIm5kuKRxFtkrDyUU2z1K22ZdHaes3GY0KmfQ=";
};
vendorHash = "sha256-MfauZRufl3kxr1fqatxTmiIvLJ+5JhbpSnbTHiujME8=";
nativeCheckInputs = [
oath-toolkit
openldap
];
modRoot = "v2";
# Disable go workspaces to fix build.
env.GOWORK = "off";
# Based on ldflags in <glauth>/Makefile.
ldflags = [
"-s"
"-w"
"-X main.GitClean=1"
"-X main.LastGitTag=v${version}"
"-X main.GitTagIsCommit=1"
];
# Tests fail in the sandbox.
doCheck = false;
meta = with lib; {
description = "Lightweight LDAP server for development, home use, or CI";
homepage = "https://github.com/glauth/glauth";
license = licenses.mit;
maintainers = with maintainers; [
bjornfor
christoph-heiss
];
mainProgram = "glauth";
};
}

View File

@@ -0,0 +1,106 @@
{
lib,
stdenv,
writeScript,
fetchFromGitHub,
libGL,
libX11,
libXext,
python3,
libXrandr,
libXrender,
libpulseaudio,
libXcomposite,
enableGlfw ? false,
glfw,
runtimeShell,
}:
let
inherit (lib) optional makeLibraryPath;
wrapperScript = writeScript "glava" ''
#!${runtimeShell}
case "$1" in
--copy-config|-C)
# The binary would symlink it, which won't work in Nix because the
# garbage collector will eventually remove the original files after
# updates
echo "Nix wrapper: Copying glava config to ~/.config/glava"
cp -r --no-preserve=all @out@/etc/xdg/glava ~/.config/glava
;;
*)
exec @out@/bin/.glava-unwrapped "$@"
esac
'';
in
stdenv.mkDerivation rec {
pname = "glava";
version = "1.6.3";
src = fetchFromGitHub {
owner = "wacossusca34";
repo = "glava";
rev = "v${version}";
sha256 = "0kqkjxmpqkmgby05lsf6c6iwm45n33jk5qy6gi3zvjx4q4yzal1i";
};
buildInputs = [
libX11
libXext
libXrandr
libXrender
libpulseaudio
libXcomposite
]
++ optional enableGlfw glfw;
nativeBuildInputs = [
python3
];
preConfigure = ''
for f in $(find -type f);do
substituteInPlace $f \
--replace /etc/xdg $out/etc/xdg
done
substituteInPlace Makefile \
--replace '$(DESTDIR)$(SHADERDIR)' '$(SHADERDIR)'
substituteInPlace Makefile \
--replace 'unknown' 'v${version}'
'';
makeFlags = optional (!enableGlfw) "DISABLE_GLFW=1";
installFlags = [
"DESTDIR=$(out)"
];
fixupPhase = ''
mkdir -p $out/bin
mv $out/usr/bin/glava $out/bin/.glava-unwrapped
rm -rf $out/usr
patchelf \
--set-rpath "$(patchelf --print-rpath $out/bin/.glava-unwrapped):${makeLibraryPath [ libGL ]}" \
$out/bin/.glava-unwrapped
substitute ${wrapperScript} $out/bin/glava --subst-var out
chmod +x $out/bin/glava
'';
meta = with lib; {
description = ''
OpenGL audio spectrum visualizer
'';
mainProgram = "glava";
homepage = "https://github.com/wacossusca34/glava";
platforms = platforms.linux;
license = licenses.gpl3;
maintainers = with maintainers; [
eadwu
];
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
enableAvx2 ? false,
}:
stdenv.mkDerivation (final: {
pname = "glaze";
version = "5.7.2";
src = fetchFromGitHub {
owner = "stephenberry";
repo = "glaze";
tag = "v${final.version}";
hash = "sha256-lj4VjPBZql6lfIcXKzZ2hXe9dtonZHj2DqwMrX3q1dI=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [ (lib.cmakeBool "glaze_ENABLE_AVX2" enableAvx2) ];
meta = {
description = "Extremely fast, in memory, JSON and interface library for modern C++";
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ moni ];
license = lib.licenses.mit;
};
})

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libGLU,
}:
stdenv.mkDerivation rec {
pname = "glbinding";
version = "3.5.0";
src = fetchFromGitHub {
owner = "cginternals";
repo = "glbinding";
rev = "v${version}";
sha256 = "sha256-oLtOsiXfl/18rY/89vl9JDDWpPmEELOFKAHuClveU0c=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libGLU ];
meta = with lib; {
homepage = "https://github.com/cginternals/glbinding/";
description = "C++ binding for the OpenGL API, generated using the gl.xml specification";
license = licenses.mit;
maintainers = [ maintainers.mt-caret ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
libglut,
libX11,
libXt,
libXmu,
libXi,
libXext,
libGL,
libGLU,
}:
stdenv.mkDerivation rec {
pname = "gle";
version = "3.1.2";
buildInputs = [
libGLU
libGL
libglut
libX11
libXt
libXmu
libXi
libXext
];
nativeBuildInputs = [
autoreconfHook
];
src = fetchFromGitHub {
owner = "linas";
repo = "glextrusion";
rev = "refs/tags/${pname}-${version}";
sha256 = "sha256-yvCu0EOwxOMN6upeHX+C2sIz1YVjjB/320g+Mf24S6g=";
};
meta = {
description = "Tubing and extrusion library";
homepage = "https://www.linas.org/gle/";
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,68 @@
{
lib,
rustPlatform,
fetchFromGitHub,
git,
pkg-config,
openssl,
erlang_27,
nodejs,
bun,
deno,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "gleam";
version = "1.12.0";
src = fetchFromGitHub {
owner = "gleam-lang";
repo = "gleam";
tag = "v${finalAttrs.version}";
hash = "sha256-Qjl+I09tnBbGc771SVJVb6fzAZ2tVOnBNhGfrIUh824=";
};
cargoHash = "sha256-Ya0glVECB3cb9kgguuH4nY0ClK5NPH1mKAX9INDLzx4=";
nativeBuildInputs = [
pkg-config
erlang_27
];
buildInputs = [ openssl ];
nativeCheckInputs = [
# used by several tests
git
# js runtimes used for integration tests
nodejs
bun
deno
];
checkFlags = [
# Makes a network request
"--skip=tests::echo::echo_dict"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
description = "Statically typed language for the Erlang VM";
mainProgram = "gleam";
homepage = "https://gleam.run/";
changelog = "https://github.com/gleam-lang/gleam/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
philtaken
llakala
];
teams = [ lib.teams.beam ];
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchgit,
cmake,
libGLU,
libGL,
xorg,
}:
stdenv.mkDerivation rec {
pname = "glee";
rev = "f727ec7463d514b6279981d12833f2e11d62b33d";
version = "20170205-${lib.strings.substring 0 7 rev}";
src = fetchgit {
inherit rev;
url = "https://git.code.sf.net/p/${pname}/${pname}";
sha256 = "13mf3s7nvmj26vr2wbcg08l4xxqsc1ha41sx3bfghvq8c5qpk2ph";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
libGLU
libGL
xorg.libX11
];
configureScript = ''
cmake
'';
preInstall = ''
sed -i 's/readme/Readme/' cmake_install.cmake
'';
meta = with lib; {
description = "GL Easy Extension Library";
homepage = "https://sourceforge.net/p/glee/glee/";
maintainers = with maintainers; [ crertel ];
platforms = platforms.linux;
license = licenses.gpl3;
};
}

View File

@@ -0,0 +1,59 @@
From 9997ae55a47de469ea26f8437c30b51483abda5f Mon Sep 17 00:00:00 2001
From: Dan Klishch <danilklishch@gmail.com>
Date: Sat, 30 Sep 2023 23:38:05 -0400
Subject: Defer setting cursor position until the cursor is locked
---
src/wl_platform.h | 3 +++
src/wl_window.c | 14 ++++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/wl_platform.h b/src/wl_platform.h
index ca34f66e..cd1f227f 100644
--- a/src/wl_platform.h
+++ b/src/wl_platform.h
@@ -403,6 +403,9 @@ typedef struct _GLFWwindowWayland
int scaleSize;
int compositorPreferredScale;
+ double askedCursorPosX, askedCursorPosY;
+ GLFWbool didAskForSetCursorPos;
+
struct zwp_relative_pointer_v1* relativePointer;
struct zwp_locked_pointer_v1* lockedPointer;
struct zwp_confined_pointer_v1* confinedPointer;
diff --git a/src/wl_window.c b/src/wl_window.c
index 1de26558..0df16747 100644
--- a/src/wl_window.c
+++ b/src/wl_window.c
@@ -2586,8 +2586,9 @@ void _glfwGetCursorPosWayland(_GLFWwindow* window, double* xpos, double* ypos)
void _glfwSetCursorPosWayland(_GLFWwindow* window, double x, double y)
{
- _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
- "Wayland: The platform does not support setting the cursor position");
+ window->wl.didAskForSetCursorPos = true;
+ window->wl.askedCursorPosX = x;
+ window->wl.askedCursorPosY = y;
}
void _glfwSetCursorModeWayland(_GLFWwindow* window, int mode)
@@ -2819,6 +2820,15 @@ static const struct zwp_relative_pointer_v1_listener relativePointerListener =
static void lockedPointerHandleLocked(void* userData,
struct zwp_locked_pointer_v1* lockedPointer)
{
+ _GLFWwindow* window = userData;
+
+ if (window->wl.didAskForSetCursorPos)
+ {
+ window->wl.didAskForSetCursorPos = false;
+ zwp_locked_pointer_v1_set_cursor_position_hint(window->wl.lockedPointer,
+ wl_fixed_from_double(window->wl.askedCursorPosX),
+ wl_fixed_from_double(window->wl.askedCursorPosY));
+ }
}
static void lockedPointerHandleUnlocked(void* userData,
--
2.42.0

View File

@@ -0,0 +1,108 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
pkg-config,
libGL,
vulkan-loader,
libXrandr,
libXinerama,
libXcursor,
libX11,
libXi,
libXext,
libXxf86vm,
fixDarwinDylibNames,
wayland,
wayland-scanner,
wayland-protocols,
libxkbcommon,
libdecor,
withMinecraftPatch ? false,
}:
let
version = "3.4";
in
stdenv.mkDerivation {
pname = "glfw${lib.optionalString withMinecraftPatch "-minecraft"}";
inherit version;
src = fetchFromGitHub {
owner = "glfw";
repo = "GLFW";
rev = version;
hash = "sha256-FcnQPDeNHgov1Z07gjFze0VMz2diOrpbKZCsI96ngz0=";
};
# Fix linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583)
patches = [
./x11.patch
]
++ lib.optionals withMinecraftPatch [
./0009-Defer-setting-cursor-position-until-the-cursor-is-lo.patch
];
propagatedBuildInputs = lib.optionals (!stdenv.hostPlatform.isWindows) [ libGL ];
nativeBuildInputs = [
cmake
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]
++ lib.optionals stdenv.hostPlatform.isLinux [ wayland-scanner ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
wayland
wayland-protocols
libxkbcommon
libX11
libXrandr
libXinerama
libXcursor
libXi
libXext
libXxf86vm
];
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace src/wl_init.c \
--replace-fail '"libdecor-0.so.0"' '"${lib.getLib libdecor}/lib/libdecor-0.so.0"' \
--replace-fail '"libwayland-client.so.0"' '"${lib.getLib wayland}/lib/libwayland-client.so.0"' \
--replace-fail '"libwayland-cursor.so.0"' '"${lib.getLib wayland}/lib/libwayland-cursor.so.0"' \
--replace-fail '"libwayland-egl.so.1"' '"${lib.getLib wayland}/lib/libwayland-egl.so.1"' \
--replace-fail '"libxkbcommon.so.0"' '"${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0"'
'';
cmakeFlags = [
# Static linking isn't supported
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
];
env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) {
NIX_CFLAGS_COMPILE = toString [
"-D_GLFW_GLX_LIBRARY=\"${lib.getLib libGL}/lib/libGLX.so.0\""
"-D_GLFW_EGL_LIBRARY=\"${lib.getLib libGL}/lib/libEGL.so.1\""
"-D_GLFW_OPENGL_LIBRARY=\"${lib.getLib libGL}/lib/libGL.so.1\""
"-D_GLFW_GLESV1_LIBRARY=\"${lib.getLib libGL}/lib/libGLESv1_CM.so.1\""
"-D_GLFW_GLESV2_LIBRARY=\"${lib.getLib libGL}/lib/libGLESv2.so.2\""
"-D_GLFW_VULKAN_LIBRARY=\"${lib.getLib vulkan-loader}/lib/libvulkan.so.1\""
# This currently omits _GLFW_OSMESA_LIBRARY. Is it even used?
];
};
strictDeps = true;
__structuredAttrs = true;
meta = {
description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time";
homepage = "https://www.glfw.org/";
license = lib.licenses.zlib;
maintainers = with lib.maintainers; [
marcweber
Scrumplex
twey
];
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
}

View File

@@ -0,0 +1,21 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a0be580e..ba143851 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -219,6 +219,16 @@ if (GLFW_BUILD_X11)
if (NOT X11_Xshape_INCLUDE_PATH)
message(FATAL_ERROR "X Shape headers not found; install libxext development package")
endif()
+
+ target_link_libraries(glfw PRIVATE ${X11_Xrandr_LIB}
+ ${X11_Xinerama_LIB}
+ ${X11_X11_xcb_LIB}
+ ${X11_Xrender_LIB}
+ ${X11_Xkb_LIB}
+ ${X11_Xcursor_LIB}
+ ${X11_Xi_LIB}
+ ${X11_Xxf86vm_LIB}
+ ${X11_Xext_LIB})
endif()
if (UNIX AND NOT APPLE)

View File

@@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index 0b3b8c0..7f6ce09 100644
--- a/meson.build
+++ b/meson.build
@@ -86,7 +86,7 @@ if gnutls_dep.found()
backends += ['gnutls']
# test-specific, maybe move to tls/tests
if cc.has_function('gnutls_pkcs11_init', prefix: '#include <gnutls/pkcs11.h>', dependencies: gnutls_dep)
- config_h.set10('HAVE_GNUTLS_PKCS11', true)
+ config_h.set10('HAVE_GNUTLS_PKCS11', false)
endif
endif

View File

@@ -0,0 +1,341 @@
diff --git a/proxy/gnome/gproxyresolvergnome.c b/proxy/gnome/gproxyresolvergnome.c
index 50b63cd..4364116 100644
--- a/proxy/gnome/gproxyresolvergnome.c
+++ b/proxy/gnome/gproxyresolvergnome.c
@@ -156,23 +156,79 @@
resolver->base_resolver = g_simple_proxy_resolver_new (NULL, NULL);
- resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ resolver->proxy_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->proxy_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->http_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ resolver->http_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->http_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->https_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_HTTPS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
+ FALSE);
+ resolver->https_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->https_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->ftp_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_FTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
+ FALSE);
+ resolver->ftp_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->ftp_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->socks_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_SOCKS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
+ FALSE);
+ resolver->socks_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->socks_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
diff --git a/proxy/tests/gnome.c b/proxy/tests/gnome.c
index f76b094..54751e3 100644
--- a/proxy/tests/gnome.c
+++ b/proxy/tests/gnome.c
@@ -55,26 +55,86 @@
{
GSettings *settings, *child;
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (settings, GNOME_PROXY_MODE_KEY);
g_settings_reset (settings, GNOME_PROXY_USE_SAME_PROXY_KEY);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_HTTP_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_HTTP_PORT_KEY);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_HTTPS_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_HTTPS_PORT_KEY);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_FTP_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_FTP_PORT_KEY);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_SOCKS_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_SOCKS_PORT_KEY);
g_object_unref (child);
@@ -88,21 +148,69 @@
{
GSettings *settings, *child;
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
g_settings_set_boolean (settings, GNOME_PROXY_USE_SAME_PROXY_KEY, TRUE);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_HTTP_HOST_KEY, "proxy.example.com");
g_settings_set_int (child, GNOME_PROXY_HTTP_PORT_KEY, 8080);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_HTTPS_HOST_KEY, "proxy-s.example.com");
g_settings_set_int (child, GNOME_PROXY_HTTPS_PORT_KEY, 7070);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_FTP_HOST_KEY, "proxy-f.example.com");
g_settings_set_int (child, GNOME_PROXY_FTP_PORT_KEY, 6060);
g_object_unref (child);
@@ -119,12 +227,36 @@
GSettings *settings, *child;
const gchar *ignore_hosts[2] = { "127.0.0.1", NULL };
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
"@as", g_variant_new_strv (ignore_hosts, -1));
- child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_SOCKS_HOST_KEY, "proxy.example.com");
g_settings_set_int (child, GNOME_PROXY_SOCKS_PORT_KEY, 1234);
g_object_unref (child);
@@ -139,12 +271,36 @@
{
GSettings *settings, *http;
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
"@as", g_variant_new_strv (ignore_hosts, n_ignore_hosts));
- http = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ http = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (http, GNOME_PROXY_HTTP_HOST_KEY, "localhost");
g_settings_set_int (http, GNOME_PROXY_HTTP_PORT_KEY, 8080);

View File

@@ -0,0 +1,27 @@
diff --git a/meson.build b/meson.build
index 01e18a9..5dbb2fc 100644
--- a/meson.build
+++ b/meson.build
@@ -12,8 +12,8 @@ libdir = join_paths(prefix, get_option('libdir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
localedir = join_paths(prefix, get_option('localedir'))
-installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
cc = meson.get_compiler('c')
host_system = host_machine.system()
diff --git a/meson_options.txt b/meson_options.txt
index c566ccd..80f7c33 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,7 @@ option('environment_proxy', type: 'feature', value: 'auto', description: 'suppor
option('libproxy', type: 'feature', value: 'auto', description: 'support for libproxy proxy configration')
option('gnome_proxy', type: 'feature', value: 'auto', description: 'support for GNOME desktop proxy configuration')
option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
option('debug_logs', type: 'boolean', value: false, description: 'enable debug log messages (slow)')
# Deprecated, use -Ddefault_library=static instead.

View File

@@ -0,0 +1,104 @@
{
stdenv,
lib,
fetchurl,
replaceVars,
meson,
ninja,
nixosTests,
pkg-config,
glib,
gettext,
makeWrapper,
gnutls,
libproxy,
gnome,
gsettings-desktop-schemas,
bash,
}:
stdenv.mkDerivation rec {
pname = "glib-networking";
version = "2.80.1";
outputs = [
"out"
"installedTests"
];
src = fetchurl {
url = "mirror://gnome/sources/glib-networking/${lib.versions.majorMinor version}/glib-networking-${version}.tar.xz";
hash = "sha256-uA4odBV81VBx8bZxD6C5EdWsXeEGqe4qTJx77mF4L44=";
};
patches = [
(replaceVars ./hardcode-gsettings.patch {
gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
})
./installed-tests-path.patch
# pkcs11 tests provide a relative path that gnutls of course isn't able to
# load, resulting in test failures
# https://gitlab.gnome.org/GNOME/glib-networking/-/blob/2.78.1/tls/tests/certificate.c#L926
# https://gitlab.gnome.org/GNOME/glib-networking/-/blob/2.78.1/tls/tests/connection.c#L3380
./disable-pkcs11-tests.patch
];
strictDeps = true;
nativeBuildInputs = [
meson
ninja
pkg-config
gettext
makeWrapper
glib # for gio-querymodules
];
buildInputs = [
glib
gnutls
libproxy
gsettings-desktop-schemas
bash # installed-tests shebangs
];
doCheck = false; # tests need to access the certificates (among other things)
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];
postFixup = ''
find "$installedTests/libexec" "$out/libexec" -type f -executable -print0 \
| while IFS= read -r -d "" file; do
echo "Wrapping program '$file'"
wrapProgram "$file" --prefix GIO_EXTRA_MODULES : "$out/lib/gio/modules"
done
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "glib-networking";
versionPolicy = "odd-unstable";
};
tests = {
installedTests = nixosTests.installed-tests.glib-networking;
};
};
meta = with lib; {
description = "Network-related giomodules for glib";
homepage = "https://gitlab.gnome.org/GNOME/glib-networking";
license = licenses.lgpl21Plus;
teams = [ teams.gnome ];
platforms = platforms.unix;
badPlatforms = [
# GIO shared modules are mandatory.
lib.systems.inspect.platformPatterns.isStatic
];
};
}

View File

@@ -0,0 +1,32 @@
diff --git a/libglib-testing/tests/meson.build b/libglib-testing/tests/meson.build
index 4789c63..2b8525d 100644
--- a/libglib-testing/tests/meson.build
+++ b/libglib-testing/tests/meson.build
@@ -15,9 +15,9 @@ test_programs = [
['signal-logger', [], deps],
]
-installed_tests_metadir = join_paths(datadir, 'installed-tests',
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
'libglib-testing-' + libglib_testing_api_version)
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
'libglib-testing-' + libglib_testing_api_version)
foreach program: test_programs
@@ -48,4 +48,4 @@ foreach program: test_programs
exe,
env: envs,
)
-endforeach
\ No newline at end of file
+endforeach
diff --git a/meson_options.txt b/meson_options.txt
index e69263e..7cb1ee8 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,3 +4,4 @@ option(
value: false,
description: 'enable installed tests'
)
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
ninja,
pkg-config,
gtk-doc,
docbook-xsl-nons,
docbook_xml_dtd_43,
glib,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "glib-testing";
version = "0.1.1";
outputs = [
"out"
"dev"
"devdoc"
"installedTests"
];
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "pwithnall";
repo = "libglib-testing";
rev = version;
sha256 = "U3epLDdLES7MA71z7Q1WXMjzySTFERWBU0u8poObbEo=";
};
patches = [
# allow installing installed tests to a separate output
./installed-tests-path.patch
];
nativeBuildInputs = [
meson
ninja
pkg-config
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_43
];
propagatedBuildInputs = [
glib
];
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];
passthru = {
tests = {
installedTests = nixosTests.installed-tests.glib-testing;
};
};
meta = with lib; {
description = "Test library providing test harnesses and mock classes complementing the classes provided by GLib";
homepage = "https://gitlab.gnome.org/pwithnall/libglib-testing";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,24 @@
Fix compilation on Mac OS X with gcc 4.8.
diff -ru glib-2.40.0-orig/gio/gdummyfile.c glib-2.40.0/gio/gdummyfile.c
--- glib-2.40.0-orig/gio/gdummyfile.c 2014-02-03 18:40:41.000000000 +0100
+++ glib-2.40.0/gio/gdummyfile.c 2014-07-15 10:58:31.000000000 +0200
@@ -454,7 +454,8 @@
result = g_malloc (escaped_string_end - escaped_string + 1);
out = result;
- for (in = escaped_string; in < escaped_string_end; in++)
+ in = escaped_string;
+ for (; in < escaped_string_end; in++)
{
character = *in;
if (*in == '%')
@@ -551,6 +552,7 @@
decoded->scheme = g_malloc (p - uri);
out = decoded->scheme;
- for (in = uri; in < p - 1; in++)
+ in = uri;
+ for (; in < p - 1; in++)
*out++ = g_ascii_tolower (*in);
*out = 0;

View File

@@ -0,0 +1,12 @@
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 87db7a97a..bf01fb6b6 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2697,6 +2697,7 @@ prepend_terminal_to_vector (int *argc,
{ "gnome-terminal", "--" },
{ "mate-terminal", "-x" },
{ "xfce4-terminal", "-x" },
+ { "io.elementary.terminal", "-x" },
{ "tilix", "-e" },
{ "konsole", "-e" },
{ "nxterm", "-e" },

View File

@@ -0,0 +1,23 @@
diff --git a/glib/meson.build b/glib/meson.build
index b2dd569e1..b013991a1 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -541,7 +540,7 @@ configure_file(
input: 'libglib-gdb.py.in',
output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
- install_dir: gdb_install_dir,
+ install_dir: glib_libdir,
install_tag: 'devel',
install: gdb_install,
)
diff --git a/gobject/meson.build b/gobject/meson.build
@@ -185,7 +184,7 @@ configure_file(
input: 'libgobject-gdb.py.in',
output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
- install_dir: gdb_install_dir,
+ install_dir: glib_libdir,
install_tag: 'devel',
install: gdb_install,
)

View File

@@ -0,0 +1,90 @@
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 87db7a97a..2e1689ed7 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -147,6 +147,7 @@ typedef struct
gchar *alternatively_watching;
gboolean is_config;
gboolean is_setup;
+ gchar *nix_profile_watch_dir;
GFileMonitor *monitor;
GHashTable *app_names;
GHashTable *mime_tweaks;
@@ -179,6 +180,7 @@ desktop_file_dir_unref (DesktopFileDir *dir)
{
desktop_file_dir_reset (dir);
g_free (dir->path);
+ g_free (dir->nix_profile_watch_dir);
g_free (dir);
}
}
@@ -203,6 +205,14 @@ desktop_file_dir_get_alternative_dir (DesktopFileDir *dir)
{
gchar *parent;
+ /* If DIR is a profile, watch the specified directory--e.g.,
+ * /nix/var/nix/profiles/per-user/$USER/ for the user profile. Do not watch
+ * ~/.nix-profile or /run/current-system/sw because GFileMonitor does
+ * not pass IN_DONT_FOLLOW and thus cannot notice any change.
+ * /etc/profiles/per-user is monitored directly for the same reason. */
+ if (dir->nix_profile_watch_dir != NULL)
+ return g_strdup (dir->nix_profile_watch_dir);
+
/* If the directory itself exists then we need no alternative. */
if (g_access (dir->path, R_OK | X_OK) == 0)
return NULL;
@@ -248,11 +258,11 @@ desktop_file_dir_changed (GFileMonitor *monitor,
*
* If this is a notification for a parent directory (because the
* desktop directory didn't exist) then we shouldn't fire the signal
- * unless something actually changed.
+ * unless something actually changed or it's part of a Nix profile.
*/
g_mutex_lock (&desktop_file_dir_lock);
- if (dir->alternatively_watching)
+ if (dir->alternatively_watching && dir->nix_profile_watch_dir == NULL)
{
gchar *alternative_dir;
@@ -1650,6 +1660,40 @@ desktop_file_dirs_lock (void)
for (i = 0; dirs[i]; i++)
g_ptr_array_add (desktop_file_dirs, desktop_file_dir_new (dirs[i]));
+ {
+ /* Monitor the system and user profile under /nix/var/nix/profiles and
+ * treat modifications to them as if they were modifications to their
+ * /share sub-directory. */
+ const gchar *user;
+ DesktopFileDir *system_profile_dir, *user_profile_dir, *user_env_dir;
+
+ system_profile_dir =
+ desktop_file_dir_new ("/nix/var/nix/profiles/system/sw/share");
+ system_profile_dir->nix_profile_watch_dir = g_strdup ("/nix/var/nix/profiles");
+ g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (system_profile_dir));
+
+ user = g_get_user_name ();
+ if (user != NULL)
+ {
+ gchar *profile_dir, *user_data_dir, *env_dir, *env_data_dir;
+
+ profile_dir = g_build_filename ("/nix/var/nix/profiles/per-user", user, NULL);
+ user_data_dir = g_build_filename (profile_dir, "profile", "share", NULL);
+ user_profile_dir = desktop_file_dir_new (user_data_dir);
+ user_profile_dir->nix_profile_watch_dir = profile_dir;
+
+ env_dir = g_build_filename ("/etc/profiles/per-user", NULL);
+ env_data_dir = g_build_filename (env_dir, user, "share", NULL);
+ user_env_dir = desktop_file_dir_new (env_data_dir);
+ user_env_dir->nix_profile_watch_dir = env_dir;
+
+ g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (user_profile_dir));
+ g_ptr_array_add (desktop_file_dirs, desktop_file_dir_ref (user_env_dir));
+ g_free (user_data_dir);
+ g_free (env_data_dir);
+ }
+ }
+
/* The list of directories will never change after this, unless
* g_get_user_config_dir() changes due to %G_TEST_OPTION_ISOLATE_DIRS. */
desktop_file_dirs_config_dir = user_config_dir;

View File

@@ -0,0 +1,87 @@
--- glib-source/gobject/gtype.c 2016-08-17 17:20:47.000000000 +0200
+++ glib-source/gobject/gtype.c 2016-09-01 21:56:31.777406646 +0200
@@ -209,6 +209,9 @@
static gboolean type_node_is_a_L (TypeNode *node,
TypeNode *iface_node);
+#if !defined(__GLIBC__)
+static void gobject_init (void);
+#endif
/* --- enumeration --- */
@@ -2631,7 +2634,10 @@
GTypeFlags flags)
{
TypeNode *node;
-
+
+#if !defined(__GLIBC__)
+ gobject_init();
+#endif
g_assert_type_system_initialized ();
g_return_val_if_fail (type_id > 0, 0);
g_return_val_if_fail (type_name != NULL, 0);
@@ -2749,6 +2755,9 @@
TypeNode *pnode, *node;
GType type = 0;
+#if !defined(__GLIBC__)
+ gobject_init();
+#endif
g_assert_type_system_initialized ();
g_return_val_if_fail (parent_type > 0, 0);
g_return_val_if_fail (type_name != NULL, 0);
@@ -2804,6 +2813,9 @@
TypeNode *pnode, *node;
GType type;
+#if !defined(__GLIBC__)
+ gobject_init();
+#endif
g_assert_type_system_initialized ();
g_return_val_if_fail (parent_type > 0, 0);
g_return_val_if_fail (type_name != NULL, 0);
@@ -3319,6 +3331,9 @@
{
TypeNode *node;
+#if !defined(__GLIBC__)
+ gobject_init();
+#endif
g_assert_type_system_initialized ();
node = lookup_type_node_I (type);
@@ -4343,6 +4358,9 @@
void
g_type_init_with_debug_flags (GTypeDebugFlags debug_flags)
{
+#if !defined(__GLIBC__)
+ gobject_init();
+#endif
g_assert_type_system_initialized ();
if (debug_flags)
@@ -4361,6 +4379,9 @@
void
g_type_init (void)
{
+#if !defined(__GLIBC__)
+ gobject_init();
+#endif
g_assert_type_system_initialized ();
}
@@ -4372,6 +4393,12 @@
TypeNode *node;
GType type;
+#if !defined(__GLIBC__)
+ static int gobject_initialized = 0;
+ if (gobject_initialized)
+ return;
+ gobject_initialized = 1;
+#endif
/* Ensure GLib is initialized first, see
* https://bugzilla.gnome.org/show_bug.cgi?id=756139
*/

View File

@@ -0,0 +1,388 @@
{
config,
lib,
stdenv,
fetchurl,
gettext,
meson,
ninja,
pkg-config,
perl,
python3,
python3Packages,
libiconv,
zlib,
libffi,
pcre2,
elfutils,
gnome,
libselinux,
bash,
gnum4,
libxslt,
docutils,
gi-docgen,
# use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib)
util-linuxMinimal ? null,
buildPackages,
# this is just for tests (not in the closure of any regular package)
dbus,
tzdata,
desktop-file-utils,
shared-mime-info,
testers,
gobject-introspection,
libsystemtap,
libsysprof-capture,
mesonEmulatorHook,
withIntrospection ?
stdenv.hostPlatform.emulatorAvailable buildPackages
&& lib.meta.availableOn stdenv.hostPlatform gobject-introspection
&& stdenv.hostPlatform.isLittleEndian == stdenv.buildPlatform.isLittleEndian,
}:
assert stdenv.hostPlatform.isLinux -> util-linuxMinimal != null;
let
gobject-introspection' = buildPackages.gobject-introspection.override {
propagateFullGlib = false;
# Avoid introducing cairo, which enables gobjectSupport by default.
x11Support = false;
};
librarySuffix =
if (stdenv.hostPlatform.extensions.library == ".so") then
"2.0.so.0"
else if (stdenv.hostPlatform.extensions.library == ".dylib") then
"2.0.0.dylib"
else if (stdenv.hostPlatform.extensions.library == ".a") then
"2.0.a"
else if (stdenv.hostPlatform.extensions.library == ".dll") then
"2.0-0.dll"
else
"2.0-0.lib";
systemtap' = buildPackages.systemtap-sdt;
withDtrace =
lib.meta.availableOn stdenv.buildPlatform systemtap'
&&
# dtrace support requires sys/sdt.h header
lib.meta.availableOn stdenv.hostPlatform libsystemtap;
in
stdenv.mkDerivation (finalAttrs: {
pname = "glib";
version = "2.84.4";
outputs = [
"bin"
"out"
"dev"
"devdoc"
];
setupHook = ./setup-hook.sh;
src = fetchurl {
url = "mirror://gnome/sources/glib/${lib.versions.majorMinor finalAttrs.version}/glib-${finalAttrs.version}.tar.xz";
hash = "sha256-ip6hCUPDb8EX4lP4DJHkd7ZzUlrkV2KUKFiu9XYxu5A=";
};
patches =
lib.optionals stdenv.hostPlatform.isDarwin [
./darwin-compilation.patch
]
++ lib.optionals stdenv.hostPlatform.isMusl [
./quark_init_on_demand.patch
./gobject_init_on_demand.patch
]
++ [
# This patch lets GLib's GDesktopAppInfo API watch and notice changes
# to the Nix user and system profiles. That way, the list of available
# applications shown by the desktop environment is immediately updated
# when the user installs or removes any
# (see <https://issues.guix.gnu.org/35594>).
# It does so by monitoring /nix/var/nix/profiles (for changes to the system
# profile) and /nix/var/nix/profiles/per-user/USER (for changes to the user
# profile) as well as /etc/profiles/per-user (for chanes to the user
# environment profile) and crawling their share/applications sub-directory when
# changes happen.
./glib-appinfo-watch.patch
./schema-override-variable.patch
# Add support for Pantheons terminal emulator.
./elementary-terminal-support.patch
# GLib contains many binaries used for different purposes;
# we will install them to different outputs:
# 1. Tools for desktop environment and introspection ($bin)
# * gapplication (non-darwin)
# * gdbus
# * gi-compile-repository
# * gi-decompile-typelib
# * gi-inspect-typelib
# * gio
# * gio-launch-desktop (symlink to $out)
# * gsettings
# 2. Development/build tools ($dev)
# * gdbus-codegen
# * gio-querymodules
# * glib-compile-resources
# * glib-compile-schemas
# * glib-genmarshal
# * glib-gettextize
# * glib-mkenums
# * gobject-query
# * gresource
# * gtester
# * gtester-report
# 3. Tools for desktop environment that cannot go to $bin due to $out depending on them ($out)
# * gio-launch-desktop
./split-dev-programs.patch
# Tell Meson to install gdb scripts next to the lib
# GDB only looks there and in ${gdb}/share/gdb/auto-load,
# and by default meson installs in to $out/share/gdb/auto-load
# which does not help
./gdb_script.patch
];
strictDeps = true;
buildInputs = [
finalAttrs.setupHook
]
++ lib.optionals (!stdenv.hostPlatform.isFreeBSD) [
libsysprof-capture
]
++ [
pcre2
]
++ lib.optionals (!stdenv.hostPlatform.isWindows) [
bash
gnum4 # install glib-gettextize and m4 macros for other apps to use
]
++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
elfutils
]
++ lib.optionals withDtrace [
libsystemtap
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libselinux
util-linuxMinimal # for libmount
];
depsBuildBuild = [
pkg-config # required to find native gi-docgen
];
nativeBuildInputs = [
docutils # for rst2man, rst2html5
meson
ninja
pkg-config
perl
python3
python3Packages.packaging # mostly used to make meson happy
python3Packages.wrapPython # for patchPythonScript
gettext
libxslt
]
++ lib.optionals withIntrospection [
gi-docgen
gobject-introspection'
]
++ lib.optionals (withIntrospection && !stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
mesonEmulatorHook
]
++ lib.optionals withDtrace [
systemtap' # for dtrace
];
propagatedBuildInputs = [
zlib
libffi
gettext
libiconv
];
nativeCheckInputs = [
tzdata
desktop-file-utils
shared-mime-info
];
mesonFlags = [
"-Dglib_debug=disabled" # https://gitlab.gnome.org/GNOME/glib/-/issues/3421#note_2206315
"-Ddocumentation=true" # gvariant specification can be built without gi-docgen
(lib.mesonEnable "dtrace" withDtrace)
(lib.mesonEnable "systemtap" withDtrace) # requires dtrace option to be enabled
"-Dnls=enabled"
"-Ddevbindir=${placeholder "dev"}/bin"
(lib.mesonEnable "introspection" withIntrospection)
# FIXME: Fails when linking target glib/tests/libconstructor-helper.so
# relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
"-Dtests=${lib.boolToString (!stdenv.hostPlatform.isStatic)}"
]
++ lib.optionals (!lib.meta.availableOn stdenv.hostPlatform elfutils) [
"-Dlibelf=disabled"
]
++ lib.optionals stdenv.hostPlatform.isFreeBSD [
"-Dxattr=false"
"-Dsysprof=disabled" # sysprof-capture does not build on FreeBSD
];
env = {
NIX_CFLAGS_COMPILE = toString [
"-Wno-error=nonnull"
# Default for release buildtype but passed manually because
# we're using plain
"-DG_DISABLE_CAST_CHECKS"
];
};
postPatch = ''
patchShebangs glib/gen-unicode-tables.pl
patchShebangs glib/tests/gen-casefold-txt.py
patchShebangs glib/tests/gen-casemap-txt.py
patchShebangs tools/gen-visibility-macros.py
patchShebangs tests
# Needs machine-id, comment the test
sed -e '/\/gdbus\/codegen-peer-to-peer/ s/^\/*/\/\//' -i gio/tests/gdbus-peer.c
sed -e '/g_test_add_func/ s/^\/*/\/\//' -i gio/tests/gdbus-address-get-session.c
# All gschemas fail to pass the test, upstream bug?
sed -e '/g_test_add_data_func/ s/^\/*/\/\//' -i gio/tests/gschema-compile.c
# Cannot reproduce the failing test_associations on hydra
sed -e '/\/appinfo\/associations/d' -i gio/tests/appinfo.c
# Needed because of libtool wrappers
sed -e '/g_subprocess_launcher_set_environ (launcher, envp);/a g_subprocess_launcher_setenv (launcher, "PATH", g_getenv("PATH"), TRUE);' -i gio/tests/gsubprocess.c
''
+ lib.optionalString stdenv.hostPlatform.isWindows ''
substituteInPlace gio/win32/meson.build \
--replace "libintl, " ""
'';
postConfigure = ''
patchShebangs gio/gdbus-2.0/codegen/gdbus-codegen gobject/glib-{genmarshal,mkenums}
'';
DETERMINISTIC_BUILD = 1;
postInstall = ''
moveToOutput "share/glib-2.0" "$dev"
moveToOutput "share/glib-2.0/gdb" "$out"
substituteInPlace "$dev/bin/gdbus-codegen" --replace "$out" "$dev"
sed -i "$dev/bin/glib-gettextize" -e "s|^gettext_dir=.*|gettext_dir=$dev/share/glib-2.0/gettext|"
# This file is *included* in gtk3 and would introduce runtime reference via __FILE__.
sed '1i#line 1 "glib-${finalAttrs.version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
for i in $bin/bin/*; do
moveToOutput "share/bash-completion/completions/''${i##*/}" "$bin"
done
for i in $dev/bin/*; do
moveToOutput "share/bash-completion/completions/''${i##*/}" "$dev"
done
'';
preFixup = lib.optionalString (!stdenv.hostPlatform.isStatic) ''
buildPythonPath ${python3Packages.packaging}
patchPythonScript "$dev/share/glib-2.0/codegen/utils.py"
'';
# Move man pages to the same output as their binaries (needs to be
# done after preFixupHooks which moves man pages too - in
# _multioutDocs)
postFixup = ''
for i in $dev/bin/*; do
moveToOutput "share/man/man1/''${i##*/}.1.*" "$dev"
done
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
moveToOutput "share/doc" "$devdoc"
'';
# Conditional necessary to break infinite recursion with passthru.tests
preCheck = lib.optionalString finalAttrs.finalPackage.doCheck or config.doCheckByDefault or false ''
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/glib-${finalAttrs.version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
export TZDIR="${tzdata}/share/zoneinfo"
export XDG_CACHE_HOME="$TMP"
export XDG_RUNTIME_HOME="$TMP"
export HOME="$TMP"
export XDG_DATA_DIRS="${desktop-file-utils}/share:${shared-mime-info}/share"
export G_TEST_DBUS_DAEMON="${dbus}/bin/dbus-daemon"
# pkg_config_tests expects a PKG_CONFIG_PATH that points to meson-private, wrapped pkg-config
# tries to be clever and picks up the wrong glib at the end.
export PATH="${buildPackages.pkg-config-unwrapped}/bin:$PATH:$(pwd)/gobject"
echo "PATH=$PATH"
# Our gobject-introspection patches make the shared library paths absolute
# in the GIR files. When running tests, the library is not yet installed,
# though, so we need to replace the absolute path with a local one during build.
# We are using a symlink that we will delete before installation.
mkdir -p $out/lib
ln -s $PWD/gobject/libgobject-${librarySuffix} $out/lib/libgobject-${librarySuffix}
ln -s $PWD/gio/libgio-${librarySuffix} $out/lib/libgio-${librarySuffix}
ln -s $PWD/glib/libglib-${librarySuffix} $out/lib/libglib-${librarySuffix}
'';
postCheck = ''
rm $out/lib/libgobject-${librarySuffix}
rm $out/lib/libgio-${librarySuffix}
rm $out/lib/libglib-${librarySuffix}
'';
separateDebugInfo = stdenv.hostPlatform.isLinux;
passthru = rec {
gioModuleDir = "lib/gio/modules";
makeSchemaDataDirPath = dir: name: "${dir}/share/gsettings-schemas/${name}";
makeSchemaPath = dir: name: "${makeSchemaDataDirPath dir name}/glib-2.0/schemas";
getSchemaPath = pkg: makeSchemaPath pkg pkg.name;
getSchemaDataDirPath = pkg: makeSchemaDataDirPath pkg pkg.name;
tests = {
withChecks = finalAttrs.finalPackage.overrideAttrs (_: {
doCheck = true;
});
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
updateScript = gnome.updateScript {
packageName = "glib";
versionPolicy = "odd-unstable";
};
};
meta = with lib; {
description = "C library of programming buildings blocks";
homepage = "https://gitlab.gnome.org/GNOME/glib";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [
lovek323
raskin
];
teams = [ teams.gnome ];
pkgConfigModules = [
"gio-2.0"
"gobject-2.0"
"gthread-2.0"
];
platforms = platforms.unix ++ platforms.windows;
longDescription = ''
GLib provides the core application building blocks for libraries
and applications written in C. It provides the core object
system used in GNOME, the main loop implementation, and a large
set of utility functions for strings and common data structures.
'';
};
})

View File

@@ -0,0 +1,33 @@
--- glib-source/glib/gquark.c 2016-08-17 17:20:47.000000000 +0200
+++ glib-source/glib/gquark.c 2016-08-30 07:49:13.298234757 +0200
@@ -57,6 +57,9 @@
void
g_quark_init (void)
{
+ if (quark_ht)
+ return;
+
g_assert (quark_seq_id == 0);
quark_ht = g_hash_table_new (g_str_hash, g_str_equal);
quarks = g_new (gchar*, QUARK_BLOCK_SIZE);
@@ -138,9 +141,12 @@
return 0;
G_LOCK (quark_global);
+#if !defined(__GLIBC__)
+ g_quark_init ();
+#endif
quark = GPOINTER_TO_UINT (g_hash_table_lookup (quark_ht, string));
G_UNLOCK (quark_global);
return quark;
}
@@ -280,6 +286,7 @@
GQuark quark;
gchar **quarks_new;
+ g_quark_init ();
if (quark_seq_id % QUARK_BLOCK_SIZE == 0)
{
quarks_new = g_new (gchar*, quark_seq_id + QUARK_BLOCK_SIZE);

View File

@@ -0,0 +1,14 @@
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index b1918657d..504ff97c4 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -356,6 +356,9 @@ initialise_schema_sources (void)
try_prepend_data_dir (g_get_user_data_dir ());
+ if (!is_setuid && (path = g_getenv ("NIX_GSETTINGS_OVERRIDES_DIR")) != NULL)
+ try_prepend_dir (path);
+
/* Disallow loading extra schemas if running as setuid, as that could
* allow reading privileged files. */
if (!is_setuid && (path = g_getenv ("GSETTINGS_SCHEMA_DIR")) != NULL)

View File

@@ -0,0 +1,31 @@
make_glib_find_gsettings_schemas() {
# For packages that need gschemas of other packages (e.g. empathy)
for maybe_dir in "$1"/share/gsettings-schemas/*; do
if [[ -d "$maybe_dir/glib-2.0/schemas" ]]; then
addToSearchPath GSETTINGS_SCHEMAS_PATH "$maybe_dir"
fi
done
}
addEnvHooks "$targetOffset" make_glib_find_gsettings_schemas
# Install gschemas, if any, in a package-specific directory
glibPreInstallPhase() {
makeFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/")
}
appendToVar preInstallPhases glibPreInstallPhase
glibPostInstallHook() {
# Move gschemas in case the install flag didn't help
if [ -d "$prefix/share/glib-2.0/schemas" ]; then
mkdir -p "${!outputLib}/share/gsettings-schemas/$name/glib-2.0"
mv "$prefix/share/glib-2.0/schemas" "${!outputLib}/share/gsettings-schemas/$name/glib-2.0/"
fi
addToSearchPath GSETTINGS_SCHEMAS_PATH "${!outputLib}/share/gsettings-schemas/$name"
}
# gappsWrapperArgsHook expects GSETTINGS_SCHEMAS_PATH variable to be set by this.
# Until we have dependency mechanism in generic builder, we need to use this hack.
# This relies on the fact that postInstallHooks are run *after* postInstall passed to
# mkDerivation.
postInstallHooks+=(glibPostInstallHook)

View File

@@ -0,0 +1,214 @@
diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
index 6d19cd4ba..0205e5074 100644
--- a/gio/gdbus-2.0/codegen/meson.build
+++ b/gio/gdbus-2.0/codegen/meson.build
@@ -20,7 +20,7 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir)
# Install gdbus-codegen executable
gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
output : 'gdbus-codegen',
- install_dir : get_option('bindir'),
+ install_dir : get_option('devbindir'),
install_tag : 'bin-devel',
configuration : gdbus_codegen_conf
)
diff --git a/gio/meson.build b/gio/meson.build
index 59c2b0fc0..87cbb8229 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -885,14 +885,15 @@ pkg.generate(libgio,
variables : [
'schemasdir=' + '${datadir}' / schemas_subdir,
'dtdsdir=' + '${datadir}' / dtds_subdir,
+ 'devbindir=' + get_option('devbindir'),
'giomoduledir=' + pkgconfig_giomodulesdir,
'gio=' + '${bindir}' / 'gio',
- 'gio_querymodules=' + pkgconfig_multiarch_bindir / 'gio-querymodules',
- 'glib_compile_schemas=' + pkgconfig_multiarch_bindir / 'glib-compile-schemas',
- 'glib_compile_resources=' + '${bindir}' / 'glib-compile-resources',
+ 'gio_querymodules=' + '${devbindir}' / 'gio-querymodules',
+ 'glib_compile_schemas=' + '${devbindir}' / 'glib-compile-schemas',
+ 'glib_compile_resources=' + '${devbindir}' / 'glib-compile-resources',
'gdbus=' + '${bindir}' /'gdbus',
- 'gdbus_codegen=' + '${bindir}' / 'gdbus-codegen',
- 'gresource=' + '${bindir}' / 'gresource',
+ 'gdbus_codegen=' + '${devbindir}' / 'gdbus-codegen',
+ 'gresource=' + '${devbindir}' / 'gresource',
'gsettings=' + '${bindir}' / 'gsettings',
],
version : glib_version,
@@ -995,6 +996,7 @@ gio_tool = executable('gio', gio_tool_sources,
executable('gresource', 'gresource-tool.c',
install : true,
+ install_dir : get_option('devbindir'),
install_tag : 'bin',
# intl.lib is not compatible with SAFESEH
link_args : noseh_link_args,
@@ -1002,7 +1004,7 @@ executable('gresource', 'gresource-tool.c',
gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodule-priv.c',
install : true,
- install_dir : multiarch_bindir,
+ install_dir : get_option('devbindir'),
install_tag : 'bin',
c_args : gio_c_args,
# intl.lib is not compatible with SAFESEH
@@ -1012,7 +1014,7 @@ gio_querymodules = executable('gio-querymodules', 'gio-querymodules.c', 'giomodu
glib_compile_schemas = executable('glib-compile-schemas',
['glib-compile-schemas.c'],
install : true,
- install_dir : multiarch_bindir,
+ install_dir : get_option('devbindir'),
install_tag : 'bin',
# intl.lib is not compatible with SAFESEH
link_args : noseh_link_args,
@@ -1021,6 +1023,7 @@ glib_compile_schemas = executable('glib-compile-schemas',
glib_compile_resources = executable('glib-compile-resources',
[gconstructor_as_data_h, 'glib-compile-resources.c'],
install : true,
+ install_dir : get_option('devbindir'),
install_tag : 'bin-devel',
c_args : gio_c_args,
# intl.lib is not compatible with SAFESEH
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 232ecca5e..e292927ac 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -1182,16 +1182,18 @@ if have_bash and have_pkg_config
gio_binaries = [
'gio',
- 'glib-compile-resources',
'gdbus',
- 'gdbus-codegen',
- 'gresource',
'gsettings',
]
- gio_multiarch_binaries = [
+ gio_dev_binaries = [
+ 'glib-compile-resources',
+ 'gdbus-codegen',
+ 'gresource',
'gio-querymodules',
'glib-compile-schemas',
]
+ gio_multiarch_binaries = [
+ ]
foreach binary: gio_binaries
pkg_config_tests += [
@@ -1200,6 +1202,13 @@ if have_bash and have_pkg_config
prefix / get_option('bindir') / binary)
]
endforeach
+ foreach binary: gio_dev_binaries
+ pkg_config_tests += [
+ 'test "$(pkg-config --variable=@0@ gio-2.0)" = "@1@"'.format(
+ binary.underscorify(),
+ prefix / get_option('devbindir') / binary)
+ ]
+ endforeach
foreach binary: gio_multiarch_binaries
pkg_config_tests += [
diff --git a/glib/meson.build b/glib/meson.build
index d2efebadc..eb9fa5b2f 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -447,9 +447,10 @@ pkg.generate(libglib,
subdirs : ['glib-2.0'],
extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
variables : [
- 'glib_genmarshal=' + '${bindir}' / 'glib-genmarshal',
- 'gobject_query=' + '${bindir}' / 'gobject-query',
- 'glib_mkenums=' + '${bindir}' / 'glib-mkenums',
+ 'devbindir=' + get_option('devbindir'),
+ 'glib_genmarshal=' + '${devbindir}' / 'glib-genmarshal',
+ 'gobject_query=' + '${devbindir}' / 'gobject-query',
+ 'glib_mkenums=' + '${devbindir}' / 'glib-mkenums',
'glib_valgrind_suppressions=' + '${datadir}' /
valgrind_suppression_file_install_subdir /
fs.name(valgrind_suppression_file),
@@ -490,6 +491,7 @@ if host_system == 'windows'
else
gtester = executable('gtester', 'gtester.c',
install : true,
+ install_dir : get_option('devbindir'),
install_tag : 'bin-devel',
c_args : ['-UG_DISABLE_ASSERT'],
include_directories : configinc,
@@ -505,7 +507,7 @@ report_conf.set('PYTHON', python_name)
configure_file(
input: 'gtester-report.in',
output: 'gtester-report',
- install_dir: get_option('bindir'),
+ install_dir: get_option('devbindir'),
install_tag : 'bin-devel',
configuration: report_conf,
install_mode: 'rwxr-xr-x'
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index f6efc593a..5522dcb96 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -568,9 +568,9 @@ if have_bash and have_pkg_config
'test "$(pkg-config --variable=datadir glib-2.0)" = "@0@"'.format(
prefix / get_option('datadir')),
'test "$(pkg-config --variable=gobject_query glib-2.0)" = "@0@"'.format(
- prefix / get_option('bindir') / 'gobject-query'),
+ prefix / get_option('devbindir') / 'gobject-query'),
'test "$(pkg-config --variable=glib_mkenums glib-2.0)" = "@0@"'.format(
- prefix / get_option('bindir') / 'glib-mkenums'),
+ prefix / get_option('devbindir') / 'glib-mkenums'),
'test "$(pkg-config --variable=glib_valgrind_suppressions glib-2.0)" = "@0@"'.format(
prefix / get_option('datadir') /
valgrind_suppression_file_install_subdir / fs.name(valgrind_suppression_file)),
diff --git a/gobject/meson.build b/gobject/meson.build
index 2129aaf8a..da8462428 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -94,7 +94,7 @@ foreach tool: python_tools
input : tool + '.in',
output : tool,
configuration : python_tools_conf,
- install_dir : glib_bindir,
+ install_dir : get_option('devbindir'),
install_tag : 'bin-devel',
)
@@ -172,6 +172,7 @@ meson.override_dependency('gobject-2.0', libgobject_dep)
gobject_query = executable('gobject-query', 'gobject-query.c',
install : true,
+ install_dir : get_option('devbindir'),
install_tag : 'bin-devel',
dependencies : [libglib_dep, libgobject_dep])
diff --git a/meson.options b/meson.options
index 69a2135bc..cfe14bb09 100644
--- a/meson.options
+++ b/meson.options
@@ -4,6 +4,11 @@ option('runtime_libdir',
description : 'install runtime libraries relative to libdir',
deprecated: true)
+option('devbindir',
+ type : 'string',
+ value : '',
+ description : 'bindir for development tools')
+
option('charsetalias_dir',
type : 'string',
value : '',
diff --git a/tools/meson.build b/tools/meson.build
index 257312ebf..f8315392b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -8,7 +8,7 @@ if have_sh
gettextize_conf.set('datarootdir', glib_datadir)
gettextize_conf.set('datadir', glib_datadir)
configure_file(input : 'glib-gettextize.in',
- install_dir : glib_bindir,
+ install_dir : get_option('devbindir'),
install_tag : 'bin-devel',
output : 'glib-gettextize',
configuration : gettextize_conf)

View File

@@ -0,0 +1,7 @@
{ libtool }:
libtool.overrideAttrs {
pname = "glibtool";
meta.mainProgram = "glibtool";
configureFlags = [ "--program-prefix=g" ];
}

View File

@@ -0,0 +1,40 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
stdenv,
alsa-lib,
}:
rustPlatform.buildRustPackage rec {
pname = "glicol-cli";
version = "0.2.0";
src = fetchFromGitHub {
owner = "glicol";
repo = "glicol-cli";
rev = "v${version}";
hash = "sha256-v90FfF4vP5UPy8VnQFvYMKiCrledgNMpWbJR59Cv6a0=";
};
cargoHash = "sha256-u6H+4cikI/jmcKpA2Ty2DjZF8wLiNylFMInA6sdNl0k=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
];
meta = with lib; {
description = "Cross-platform music live coding in terminal";
homepage = "https://github.com/glicol/glicol-cli";
changelog = "https://github.com/glicol/glicol-cli/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "glicol-cli";
};
}

View File

@@ -0,0 +1,75 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
pkg-config,
meson,
ninja,
rustc,
cargo,
wrapGAppsHook4,
python3,
libadwaita,
graphene,
gst_all_1,
glib-networking,
}:
stdenv.mkDerivation rec {
pname = "glide-media-player";
version = "0.6.5";
src = fetchFromGitHub {
owner = "philn";
repo = "glide";
rev = version;
hash = "sha256-gmBXUj6LxC7VDH/ni8neYivysagqcbI/UCUq9Ly3D24=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-5cohhm8/QP+vYzVf8iz3hLtu0ej7lQiHpDAC9I52+ME=";
};
postPatch = ''
substituteInPlace scripts/meson_post_install.py \
--replace-warn "gtk-update-icon-cache" "gtk4-update-icon-cache"
substituteInPlace data/net.base_art.Glide.desktop \
--replace-warn "Icon=net.base_art.Glide.svg" "Icon=net.baseart.Glide"
patchShebangs --build \
scripts/meson_post_install.py \
build-aux/cargo-build.py
'';
nativeBuildInputs = [
pkg-config
meson
ninja
rustPlatform.cargoSetupHook
rustc
cargo
wrapGAppsHook4
python3
];
buildInputs = [
libadwaita
graphene
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-good
glib-networking
];
meta = with lib; {
description = "Linux/macOS media player based on GStreamer and GTK";
homepage = "https://philn.github.io/glide";
license = licenses.mit;
maintainers = with maintainers; [ aleksana ];
mainProgram = "glide";
# Required gdk4-{wayland,x11} and gstreamer-gl not available on darwin
platforms = subtractLists platforms.darwin platforms.unix;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "glider";
version = "0.16.4";
src = fetchFromGitHub {
owner = "nadoo";
repo = "glider";
rev = "v${version}";
hash = "sha256-LrIHdI1/55llENjDgFJxh2KKsJf/tLT3P9L9jhLhfS0=";
};
vendorHash = "sha256-v/HJUah+QC34hcf9y5yRSFO8OTkqD2wzdOH/wIXrKoA=";
ldflags = [
"-s"
"-w"
];
postInstall = ''
substituteInPlace systemd/glider@.service \
--replace-fail "/usr/bin/glider" "$out/bin/glider"
install -Dm444 -t "$out/lib/systemd/system/" systemd/glider@.service
'';
meta = with lib; {
homepage = "https://github.com/nadoo/glider";
description = "Forward proxy with multiple protocols support";
license = licenses.gpl3Only;
mainProgram = "glider";
maintainers = with maintainers; [ oluceps ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
fetchFromGitLab,
buildNpmPackage,
fetchNpmDeps,
jq,
moreutils,
}:
buildNpmPackage (finalAttrs: {
pname = "glitchtip-frontend";
version = "5.1.1";
src = fetchFromGitLab {
owner = "glitchtip";
repo = "glitchtip-frontend";
tag = "v${finalAttrs.version}";
hash = "sha256-WKh5w6AVyKhkGvGsy2Wv4Z01UaKTctDSfEhOek2Y84w=";
};
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
hash = "sha256-G2DZhHfTWi0qCAMs+IP7T2XEecBwTX12Dk3O0pD8ZJw=";
};
postPatch = ''
jq '.devDependencies |= del(.cypress, ."cypress-localstorage-commands")' package.json | sponge package.json
'';
nativeBuildInputs = [
moreutils
jq
];
buildPhase = ''
runHook preBuild
npm run build-prod
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist/glitchtip-frontend/browser $out/
runHook postInstall
'';
meta = {
description = "Frontend for GlitchTip";
homepage = "https://glitchtip.com";
changelog = "https://gitlab.com/glitchtip/glitchtip-frontend/-/releases/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
defelo
felbinger
];
};
})

View File

@@ -0,0 +1,145 @@
{
lib,
python313,
fetchFromGitLab,
fetchPypi,
callPackage,
stdenv,
makeWrapper,
nixosTests,
}:
let
python = python313.override {
self = python;
packageOverrides = final: prev: {
django = final.django_5_2;
django-csp = prev.django-csp.overridePythonAttrs rec {
version = "4.0";
src = fetchPypi {
inherit version;
pname = "django_csp";
hash = "sha256-snAQu3Ausgo9rTKReN8rYaK4LTOLcPvcE8OjvShxKDM=";
};
};
django-ninja-cursor-pagination = prev.django-ninja-cursor-pagination.overridePythonAttrs {
# checks are failing with django 5
doCheck = false;
};
};
};
pythonPackages =
with python.pkgs;
[
aiohttp
anonymizeip
boto3
brotli
celery
celery-batches
cxxfilt
django
django-allauth
django-anymail
django-cors-headers
django-csp
django-environ
django-extensions
django-import-export
django-ipware
django-ninja
django-ninja-cursor-pagination
django-organizations
django-postgres-partition
django-prometheus
django-redis
django-storages
google-cloud-logging
gunicorn
orjson
psycopg
pydantic
sentry-sdk
symbolic
user-agents
uvicorn
uwsgi-chunked
whitenoise
]
++ celery.optional-dependencies.redis
++ django-allauth.optional-dependencies.headless-spec
++ django-allauth.optional-dependencies.mfa
++ django-allauth.optional-dependencies.socialaccount
++ django-redis.optional-dependencies.hiredis
++ django-storages.optional-dependencies.boto3
++ django-storages.optional-dependencies.azure
++ django-storages.optional-dependencies.google
++ psycopg.optional-dependencies.c
++ psycopg.optional-dependencies.pool
++ pydantic.optional-dependencies.email;
frontend = callPackage ./frontend.nix { };
in
stdenv.mkDerivation (finalAttrs: {
pname = "glitchtip";
version = "5.1.1";
pyproject = true;
src = fetchFromGitLab {
owner = "glitchtip";
repo = "glitchtip-backend";
tag = "v${finalAttrs.version}";
hash = "sha256-P5J4nFXQHt+vP2W1bzdw4V9Pq+YnYsjgJPnU89RYofI=";
};
propagatedBuildInputs = pythonPackages;
nativeBuildInputs = [
makeWrapper
python
];
buildPhase = ''
runHook preBuild
export DEBUG=0
export DEBUG_TOOLBAR=0
ln -s ${finalAttrs.passthru.frontend} dist
python3 manage.py collectstatic
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp -r . $out/lib/glitchtip
chmod +x $out/lib/glitchtip/manage.py
makeWrapper $out/lib/glitchtip/manage.py $out/bin/glitchtip-manage \
--prefix PYTHONPATH : "$PYTHONPATH"
runHook postInstall
'';
passthru = {
inherit frontend python;
tests = { inherit (nixosTests) glitchtip; };
updateScript = ./update.sh;
};
meta = {
description = "Open source Sentry API compatible error tracking platform";
homepage = "https://glitchtip.com";
changelog = "https://gitlab.com/glitchtip/glitchtip-backend/-/blob/v${finalAttrs.version}/CHANGELOG";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
defelo
felbinger
];
mainProgram = "glitchtip-manage";
};
})

View File

@@ -0,0 +1,9 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq nix-update
set -eou pipefail
version=$(curl ${GITLAB_TOKEN:+-H "Private-Token: $GITLAB_TOKEN"} -sL https://gitlab.com/api/v4/projects/15450933/repository/tags | jq -r '.[0].name')
nix-update --version="$version" glitchtip
nix-update --version="$version" glitchtip.frontend

View File

@@ -0,0 +1,44 @@
{
lib,
rustPlatform,
fetchFromGitHub,
gitMinimal,
}:
rustPlatform.buildRustPackage rec {
pname = "glitter";
version = "1.6.6";
src = fetchFromGitHub {
owner = "milo123459";
repo = "glitter";
rev = "v${version}";
hash = "sha256-dImQLC7owPf2EB5COO5vjN3a6k7gJ88D2hMSUW2/wn4=";
};
cargoHash = "sha256-gHwweWKRnRJRfVMxnIFkafbN9Sl+UTnnYRQF7QD3nCc=";
nativeCheckInputs = [
gitMinimal
];
# tests require it to be in a git repository
preCheck = ''
git init
'';
# error: Found argument '--test-threads' which wasn't expected, or isn't valid in this context
checkFlags = [
"--skip"
"runs_correctly"
];
meta = {
description = "Git wrapper that allows you to compress multiple commands into one";
homepage = "https://github.com/milo123459/glitter";
changelog = "https://github.com/Milo123459/glitter/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "glitter";
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildGoModule,
fetchFromGitHub,
llvmPackages,
getconf,
}:
buildGoModule {
pname = "gllvm";
version = "1.3.1-unstable-2024-04-28";
src = fetchFromGitHub {
owner = "SRI-CSL";
repo = "gllvm";
rev = "154531bdd9c05cd9d01742bc1b35bdf200a487d3";
sha256 = "sha256-dxrtJFqEEDKx33+sOm+R7huBwbovlKzL4qFXoco8A4s=";
};
vendorHash = null;
nativeCheckInputs =
with llvmPackages;
[
clang
llvm
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ getconf ];
meta = with lib; {
homepage = "https://github.com/SRI-CSL/gllvm";
description = "Whole Program LLVM: wllvm ported to go";
license = licenses.bsd3;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,7 @@
prefix=@out@
includedir=@out@/include
Name: GLM
Description: OpenGL Mathematics
Version: @version@
Cflags: -I${includedir}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
version = "1.0.1";
pname = "glm";
src = fetchFromGitHub {
owner = "g-truc";
repo = "glm";
rev = version;
sha256 = "sha256-GnGyzNRpzuguc3yYbEFtYLvG+KiCtRAktiN+NvbOICE=";
};
outputs = [
"out"
"doc"
];
nativeBuildInputs = [ cmake ];
env.NIX_CFLAGS_COMPILE =
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102823
if (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11") then
"-fno-ipa-modref"
# Fix compilation errors on darwin
else if (stdenv.cc.isClang) then
"-Wno-error"
else
"";
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" false)
(lib.cmakeBool "BUILD_STATIC_LIBS" false)
(lib.cmakeBool "GLM_TEST_ENABLE" doCheck)
];
doCheck = true;
postInstall = ''
# Install pkg-config file
mkdir -p $out/lib/pkgconfig
substituteAll ${./glm.pc.in} $out/lib/pkgconfig/glm.pc
# Install docs
mkdir -p $doc/share/doc/glm
cp -rv ../doc/api $doc/share/doc/glm/html
cp -v ../doc/manual.pdf $doc/share/doc/glm
'';
meta = with lib; {
description = "OpenGL Mathematics library for C++";
longDescription = ''
OpenGL Mathematics (GLM) is a header only C++ mathematics library for
graphics software based on the OpenGL Shading Language (GLSL)
specification and released under the MIT license.
'';
homepage = "https://github.com/g-truc/glm";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ smancill ];
};
}

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
makeWrapper,
meson,
ninja,
wayland-scanner,
libjpeg,
libpng,
libX11,
libGL,
libdrm,
udev,
wayland,
wayland-protocols,
libgbm,
}:
stdenv.mkDerivation rec {
pname = "glmark2";
version = "2023.01";
src = fetchFromGitHub {
owner = "glmark2";
repo = "glmark2";
rev = version;
sha256 = "sha256-WCvc5GqrAdpIKQ4LVqwO6ZGbzBgLCl49NxiGJynIjSQ=";
};
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
pkg-config
makeWrapper
meson
ninja
wayland-scanner
];
buildInputs = [
libjpeg
libpng
libX11
libdrm
udev
wayland
wayland-protocols
libgbm
];
mesonFlags = [
"-Dflavors=drm-gl,drm-glesv2,gbm-gl,gbm-glesv2,wayland-gl,wayland-glesv2,x11-gl,x11-gl-egl,x11-glesv2"
];
postInstall = ''
for binary in $out/bin/glmark2*; do
wrapProgram $binary \
--prefix LD_LIBRARY_PATH ":" ${libGL}/lib
done
'';
meta = with lib; {
description = "OpenGL (ES) 2.0 benchmark";
homepage = "https://github.com/glmark2/glmark2";
license = licenses.gpl3Plus;
longDescription = ''
glmark2 is a benchmark for OpenGL (ES) 2.0. It uses only the subset of
the OpenGL 2.0 API that is compatible with OpenGL ES 2.0.
'';
platforms = platforms.linux;
maintainers = [ maintainers.wmertens ];
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
stdenv,
fetchFromGitHub,
jdk11,
maven,
makeWrapper,
jre_headless,
pcsclite,
proot,
zlib,
}:
let
defineMvnWrapper = ''
mvn()
{
# One of the deps that are downloaded and run needs zlib.
export LD_LIBRARY_PATH="${lib.makeLibraryPath [ zlib ]}"
# Give access to ELF interpreter under FHS path, to be able to run
# prebuilt binaries.
"${lib.getExe proot}" -b "${stdenv.cc.libc}/lib:/lib64" mvn "$@"
}
'';
in
maven.buildMavenPackage rec {
pname = "global-platform-pro";
version = "24.10.15";
GPPRO_VERSION = "v24.10.15-0-gf2af9ef"; # git describe --tags --always --long --dirty
src = fetchFromGitHub {
owner = "martinpaljak";
repo = "GlobalPlatformPro";
rev = "v${version}";
sha256 = "sha256-yy2WOLDetBrbNRf6HvvPdNPD51ujXomI2a2Hj6eVx1Q=";
};
mvnJdk = jdk11;
mvnHash = "sha256-vTlOxFBjEZRD23ldMF+VRKZx6jyZ6YvgvZM353FWrWQ=";
nativeBuildInputs = [
jdk11
makeWrapper
];
# Fix build error due to missing .git directory:
# Failed to execute goal pl.project13.maven:git-commit-id-plugin:4.0.0:revision (retrieve-git-info) on project gppro: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml -> [Help 1]
mvnParameters = "-Dmaven.gitcommitid.skip=true";
mvnFetchExtraArgs = {
preConfigure = defineMvnWrapper;
};
postPatch = ''
git_properties_file="./library/target/classes/pro/javacard/gp/git.properties"
mkdir -p "$(dirname "$git_properties_file")"
# Suffix to differentiate from upstream builds.
distro_suffix=-nixpkgs
echo "git.commit.id.describe=''${GPPRO_VERSION}''${distro_suffix}" > "$git_properties_file"
'';
preConfigure = defineMvnWrapper;
installPhase = ''
mkdir -p "$out/lib/java" "$out/share/java"
cp tool/target/gp.jar "$out/share/java"
makeWrapper "${jre_headless}/bin/java" "$out/bin/gp" \
--add-flags "-jar '$out/share/java/gp.jar'" \
--prefix LD_LIBRARY_PATH : "${lib.getLib pcsclite}/lib"
'';
meta = with lib; {
description = "Command-line utility for managing applets and keys on Java Cards";
longDescription = ''
This command-line utility can be used to manage applets and keys
on Java Cards. It is made available as the `gp` executable.
The executable requires the PC/SC daemon running for correct execution.
If you run NixOS, it can be enabled with `services.pcscd.enable = true;`.
'';
homepage = "https://github.com/martinpaljak/GlobalPlatformPro";
sourceProvenance = with sourceTypes; [
fromSource
binaryBytecode # deps
];
license = with licenses; [ lgpl3 ];
maintainers = with maintainers; [ ekleog ];
mainProgram = "gp";
};
}

View File

@@ -0,0 +1,84 @@
{
fetchurl,
lib,
stdenv,
libtool,
makeWrapper,
coreutils,
ctags,
ncurses,
python3Packages,
sqlite,
universal-ctags,
}:
let
pygments = python3Packages.pygments;
in
stdenv.mkDerivation rec {
pname = "global";
version = "6.6.14";
src = fetchurl {
url = "mirror://gnu/global/${pname}-${version}.tar.gz";
hash = "sha256-9uf9C2iu0pLoW7aGYWuvZVHVyUJK3N3KEdgIujGMsyA=";
};
nativeBuildInputs = [
libtool
makeWrapper
];
buildInputs = [
ncurses
sqlite
];
propagatedBuildInputs = [ pygments ];
configureFlags = [
"--with-ltdl-include=${libtool}/include"
"--with-ltdl-lib=${libtool.lib}/lib"
"--with-ncurses=${ncurses}"
"--with-sqlite3"
"--with-exuberant-ctags=${ctags}/bin/ctags"
"--with-universal-ctags=${universal-ctags}/bin/ctags"
"--with-posix-sort=${coreutils}/bin/sort"
];
doCheck = true;
postInstall = ''
mkdir -p "$out/share/emacs/site-lisp"
cp -v *.el "$out/share/emacs/site-lisp"
wrapProgram $out/bin/gtags \
--prefix PYTHONPATH : "$(toPythonPath ${pygments})"
wrapProgram $out/bin/global \
--prefix PYTHONPATH : "$(toPythonPath ${pygments})"
'';
meta = with lib; {
description = "Source code tag system";
longDescription = ''
GNU GLOBAL is a source code tagging system that works the same way
across diverse environments (Emacs, vi, less, Bash, web browser, etc).
You can locate specified objects in source files and move there easily.
It is useful for hacking a large project containing many
subdirectories, many #ifdef and many main() functions. It is similar
to ctags or etags but is different from them at the point of
independence of any editor. It runs on a UNIX (POSIX) compatible
operating system like GNU and BSD.
'';
homepage = "https://www.gnu.org/software/global/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
pSub
peterhoeg
];
platforms = platforms.unix;
changelog = "https://cvs.savannah.gnu.org/viewvc/global/global/NEWS?view=markup&pathrev=VERSION-${
lib.replaceStrings [ "." ] [ "_" ] version
}";
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
blas,
gfortran,
openssh,
mpi,
}:
stdenv.mkDerivation rec {
pname = "globalarrays";
version = "5.9.2";
src = fetchFromGitHub {
owner = "GlobalArrays";
repo = "ga";
rev = "v${version}";
sha256 = "sha256-leCvbWteOp7z7ORwtljA+KslHUptY2vdupZTmAjsArg=";
};
nativeBuildInputs = [
autoreconfHook
gfortran
];
buildInputs = [
mpi
blas
openssh
];
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
preConfigure = ''
configureFlagsArray+=( "--enable-i8" \
"--with-mpi" \
"--with-mpi3" \
"--enable-eispack" \
"--enable-underscoring" \
"--with-blas8=${blas}/lib -lblas" )
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Global Arrays Programming Models";
homepage = "http://hpc.pnl.gov/globalarrays/";
maintainers = [ maintainers.markuskowa ];
license = licenses.bsd3;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
installShellFiles,
nix-update-script,
}:
buildGoModule rec {
pname = "globalping-cli";
version = "1.5.0";
src = fetchFromGitHub {
owner = "jsdelivr";
repo = "globalping-cli";
rev = "v${version}";
hash = "sha256-UB2vYdyJ2+H8rFyJn1KBNnWoGUlRjwYorWXqoB9WDu0=";
};
vendorHash = "sha256-dJAuN5srL5EvMaRg8rHaTsurjYrdH45p965DeubpB0E=";
nativeBuildInputs = [ installShellFiles ];
env.CGO_ENABLED = 0;
subPackages = [ "." ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
preCheck = ''
export HOME="$TMPDIR"
'';
checkFlags =
let
skippedTests = [
# Skip tests that require network access
"Test_Authorize"
"Test_TokenIntrospection"
"Test_Logout"
"Test_RevokeToken"
"Test_Limits"
"Test_CreateMeasurement"
"Test_GetMeasurement"
];
in
[ "-skip=^${builtins.concatStringsSep "|^" skippedTests}" ];
postInstall = ''
mv $out/bin/globalping-cli $out/bin/globalping
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd globalping \
--bash <($out/bin/globalping completion bash) \
--fish <($out/bin/globalping completion fish) \
--zsh <($out/bin/globalping completion zsh)
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Simple CLI tool to run networking commands remotely from hundreds of globally distributed servers";
homepage = "https://www.jsdelivr.com/globalping/cli";
license = licenses.mpl20;
maintainers = with maintainers; [ xyenon ];
mainProgram = "globalping";
};
}

View File

@@ -0,0 +1,80 @@
{
lib,
stdenv,
fetchFromGitHub,
pcsclite,
pkg-config,
cmake,
zlib,
pandoc,
doxygen,
graphviz,
openssl,
cmocka,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "globalplatform";
version = "2.4.2";
src = fetchFromGitHub {
owner = "kaoh";
repo = "globalplatform";
tag = finalAttrs.version;
sha256 = "sha256-ikhncinibeQjcpYstduYhWS/bvwRah6+wrWF9kutSOI=";
};
nativeBuildInputs = [
pkg-config
cmake
pandoc
doxygen
graphviz
];
buildInputs = [
zlib
openssl
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pcsclite
];
cmakeFlags = [
"-DTESTING=ON"
];
doCheck = true;
nativeCheckInputs = [
cmocka
];
preCheck = ''
cp "$src/gpshell/helloworld.cap" globalplatform/src
cp "$src/globalplatform/src/rsa_pub_key_test.pem" globalplatform/src
'';
# libglobalplatform.so uses dlopen() to load specified connection plugins at runtime.
# Currently, libgppcscconnectionplugin.so is the only plugin included.
# The user has to specify custom plugin locations by setting LD_LIBRARY_PATH.
postFixup =
lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf $out/lib/libglobalplatform.so --add-rpath "$out/lib"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -add_rpath "$out/lib" "$out/lib/libglobalplatform.dylib"
'';
meta = {
description = "C library + command-line for Open- / GlobalPlatform smart cards";
mainProgram = "gpshell";
homepage = "https://github.com/kaoh/globalplatform";
# Clarify license for GPShell
# https://github.com/kaoh/globalplatform/issues/81
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [ stargate01 ];
};
})

View File

@@ -0,0 +1,25 @@
{
lib,
rustPlatform,
fetchCrate,
}:
rustPlatform.buildRustPackage rec {
pname = "globe-cli";
version = "0.2.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-Np1f/mSMIMZU3hE0Fur8bOHhOH3rZyroGiVAqfiIs7g=";
};
cargoHash = "sha256-pcmxtkj3+sS0TytQjrfQLc6qm2JUxtp82VNyvybl9vU=";
meta = with lib; {
description = "Display an interactive ASCII globe in your terminal";
homepage = "https://github.com/adamsky/globe";
license = licenses.gpl3Only;
maintainers = with maintainers; [ devhell ];
mainProgram = "globe";
};
}

View File

@@ -0,0 +1,23 @@
With gcc 4.4, compilation of libgag/src/TextStream.cpp fails with the error:
'class GAGCore::StreamBackend' has no member named 'getc'. Reordering
#include's solves the problem.
Patch from Debian.
Index: glob2-0.9.4.1/libgag/src/TextStream.cpp
===================================================================
--- glob2-0.9.4.1.orig/libgag/src/TextStream.cpp 2009-06-27 20:19:38.000000000 +0400
+++ glob2-0.9.4.1/libgag/src/TextStream.cpp 2009-06-27 20:20:22.000000000 +0400
@@ -17,11 +17,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <TextStream.h>
#include <assert.h>
#include <fstream>
#include <iostream>
#include <stack>
+#include <TextStream.h>
#ifdef WIN32
#define snprintf _snprintf
#define vsnprintf _vsnprintf

View File

@@ -0,0 +1,112 @@
{
lib,
stdenv,
fetchurl,
libGLU,
libGL,
SDL,
scons,
SDL_ttf,
SDL_image,
zlib,
SDL_net,
speex,
libvorbis,
libogg,
boost,
fribidi,
bsdiff,
fetchpatch,
}:
let
version = "0.9.4";
patchlevel = "4";
tutorial4patch = fetchurl {
url = "http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=34;filename=tutorial-part4.map.bspatch;att=1;bug=595448";
name = "globulation2-tutorial4-map-patch-debian.bspatch";
sha256 = "d3511ac0f822d512c42abd34b3122f2990862d3d0af6ce464ff372f5bd7f35e9";
};
in
stdenv.mkDerivation rec {
name = "glob2-${version}.${patchlevel}";
src = fetchurl {
url = "mirror://savannah/glob2/${version}/${name}.tar.gz";
sha256 = "1f0l2cqp2g3llhr9jl6jj15k0wb5q8n29vqj99xy4p5hqs78jk8g";
};
patches = [
./header-order.patch
./public-buildproject.patch
(fetchpatch {
url = "https://bitbucket.org/giszmo/glob2/commits/c9dc715624318e4fea4abb24e04f0ebdd9cd8d2a/raw";
sha256 = "0017xg5agj3dy0hx71ijdcrxb72bjqv7x6aq7c9zxzyyw0mkxj0k";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/10_pthread_underlinkage.patch";
sha256 = "sha256-L9POADlkgQbUQEUmx4s3dxXG9tS0w2IefpRGuQNRMI0=";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/link-boost-system.patch";
sha256 = "sha256-ne6F2ZowB+TUmg3ePuUoPNxXI0ZJC6HEol3oQQHJTy4=";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/scons.patch";
sha256 = "sha256-Gah7SoVcd/Aljs0Nqo3YF0lZImUWtrGM4HbbQ4yrhHU=";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/g/glob2/0.9.4.4-6/debian/patches/boost-1.69.patch";
sha256 = "sha256-D7agFR4uyIHxQz690Q8EHPF+rTEoiGUpgkm7r5cL5SI=";
})
];
postPatch = ''
cp campaigns/tutorial-part4.map{,.orig}
bspatch campaigns/tutorial-part4.map{.orig,} ${tutorial4patch}
sed -i -e "s@env = Environment()@env = Environment( ENV = os.environ )@" SConstruct
'';
# fix sdl-config for cross
# TODO: remaining *-config, and make it work for !(build.canExecute host)
preBuild = ''
substituteInPlace SConstruct \
--replace-fail sdl-config "${lib.getExe' (lib.getDev SDL) "sdl-config"}"
'';
nativeBuildInputs = [
scons
bsdiff # bspatch
];
buildInputs = [
libGLU
libGL
SDL
SDL_ttf
SDL_image
zlib
SDL_net
speex
libvorbis
libogg
boost
fribidi
];
sconsFlags = [
"BINDIR=${placeholder "out"}/bin"
"INSTALLDIR=${placeholder "out"}/share/globulation2"
"DATADIR=${placeholder "out"}/share/globulation2/glob2"
];
NIX_LDFLAGS = "-lboost_system";
meta = with lib; {
description = "RTS without micromanagement";
mainProgram = "glob2";
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
license = licenses.gpl3;
broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
};
passthru.updateInfo.downloadPage = "http://globulation2.org/wiki/Download_and_Install";
}

View File

@@ -0,0 +1,21 @@
diff -Nru glob2-0.9.4.4/src/Game.h glob2-0.9.4.4.new/src/Game.h
--- glob2-0.9.4.4/src/Game.h 2009-08-29 16:39:06.000000000 -0400
+++ glob2-0.9.4.4.new/src/Game.h 2015-08-29 00:59:07.843398596 -0400
@@ -148,7 +148,7 @@
TOP_TO_BOTTOM,
BOTTOM_TO_TOP
};
-
+public:
struct BuildProject
{
int posX;
@@ -158,7 +158,7 @@
int unitWorking;
int unitWorkingFuture;
};
-
+private:
///Initiates Game
void init(GameGUI *gui, MapEdit* edit);

View File

@@ -0,0 +1,73 @@
{
lib,
fetchFromGitHub,
python3Packages,
installShellFiles,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "globus-cli";
version = "3.38.0";
pyproject = true;
src = fetchFromGitHub {
owner = "globus";
repo = "globus-cli";
tag = version;
hash = "sha256-TjJ0GBXRYSMbWfCkGJSBzToHEjoN5ZJAzZe2yiRJhtg=";
};
build-system = with python3Packages; [
setuptools
ruamel-yaml
];
dependencies = with python3Packages; [
globus-sdk
click
jmespath
packaging
typing-extensions
requests
];
nativeBuildInputs = [ installShellFiles ];
nativeCheckInputs = with python3Packages; [
pytest
pytest-xdist
pytest-timeout
responses
click
requests
pyjwt
cryptography
packaging
typing-extensions
pytestCheckHook
versionCheckHook
];
versionCheckProgramArg = "version";
postInstall = ''
mkdir -p completions/{bash,zsh}
$out/bin/globus --bash-completer > completions/bash/globus
$out/bin/globus --zsh-completer > completions/zsh/_globus
installShellCompletion \
--bash completions/bash/globus \
--zsh completions/zsh/_globus
'';
meta = {
mainProgram = "globus";
description = "Command-line interface to Globus REST APIs, including the Transfer API and the Globus Auth API";
homepage = "https://github.com/globus/globus-cli";
changelog = "https://github.com/globus/globus-cli/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.richardjacton ];
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
}:
buildGoModule {
pname = "glock";
version = "0-unstable-2021-03-19";
src = fetchFromGitHub {
owner = "robfig";
repo = "glock";
rev = "0ac7e52a4c8a9a7039a72b3c6a10e8be59bc6599";
hash = "sha256-EDaLk83u1gRcvEjrfBrLZBQZ5unyD9LQA2TccOawXII=";
};
patches = [
# Migrate to Go modules
(fetchpatch {
url = "https://github.com/robfig/glock/commit/943afe5e26dd64ebad5ca17613ae3700c53fb25d.patch";
hash = "sha256-nk+5uHlCv7Hxbo0Axvi15nJVzEcb++gOJpF3w06yQsk=";
})
];
vendorHash = "sha256-v3lfb+CXbTxzObDpubufD3Q1h6IhULcC/6spA6StfGw=";
checkFlags = [ "-skip=^TestSave$" ];
meta = {
homepage = "https://github.com/robfig/glock";
description = "Command-line tool to lock Go dependencies to specific revisions";
mainProgram = "glock";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
luftmensch-luftmensch
rushmorem
];
};
}

View File

@@ -0,0 +1,99 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
gflags,
gtest,
perl,
pkgsBuildHost,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "glog";
version = "0.7.1";
src = fetchFromGitHub {
owner = "google";
repo = "glog";
rev = "v${finalAttrs.version}";
sha256 = "sha256-+nwWP6VBmhgU7GCPSEGUzvUSCc48wXME181WpJ5ABP4=";
};
postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
substituteInPlace src/logging_unittest.cc \
--replace-warn "/usr/bin/true" "${pkgsBuildHost.coreutils}/bin/true"
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ gtest ];
propagatedBuildInputs = [ gflags ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
# glog's custom FindUnwind.cmake module detects LLVM's unwind in case
# stdenv.cc is clang. But the module doesn't get installed, causing
# consumers of the CMake config file to fail at the configuration step.
# Explicitly disabling unwind support sidesteps the issue.
"-DWITH_UNWIND=OFF"
];
doCheck = true;
# There are some non-thread safe tests that can fail
enableParallelChecking = false;
nativeCheckInputs = [ perl ];
env.GTEST_FILTER =
let
filteredTests =
lib.optionals stdenv.hostPlatform.isMusl [
"Symbolize.SymbolizeStackConsumption"
"Symbolize.SymbolizeWithDemanglingStackConsumption"
]
++ lib.optionals stdenv.hostPlatform.isStatic [
"LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled"
]
++ lib.optionals stdenv.cc.isClang [
# Clang optimizes an expected allocation away.
# See https://github.com/google/glog/issues/937
"DeathNoAllocNewHook.logging"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled"
];
in
"-${builtins.concatStringsSep ":" filteredTests}";
checkPhase =
let
excludedTests =
lib.optionals stdenv.hostPlatform.isDarwin [
"mock-log"
]
++ [
"logging" # works around segfaults for now
];
excludedTestsRegex = lib.optionalString (
excludedTests != [ ]
) "(${lib.concatStringsSep "|" excludedTests})";
in
''
runHook preCheck
ctest -E "${excludedTestsRegex}" --output-on-failure
runHook postCheck
'';
meta = with lib; {
homepage = "https://github.com/google/glog";
license = licenses.bsd3;
description = "Library for application-level logging";
platforms = platforms.unix;
maintainers = with maintainers; [
nh2
r-burns
];
};
})

View File

@@ -0,0 +1,161 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
autoconf,
automake,
libtool,
mm-common,
intltool,
itstool,
doxygen,
graphviz,
makeFontsConf,
freefont_ttf,
boost,
libxmlxx3,
libxslt,
libgdamm,
libarchive,
libepc,
python311,
python3,
ncurses,
glibmm,
gtk3,
openssl,
gtkmm3,
goocanvasmm2,
evince,
isocodes,
gtksourceview,
gtksourceviewmm,
postgresql,
gobject-introspection,
yelp-tools,
wrapGAppsHook3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "glom";
version = "1.32.0";
outputs = [
"out"
"lib"
"dev"
"doc"
"devdoc"
];
src = fetchurl {
url = "mirror://gnome/sources/glom/${lib.versions.majorMinor finalAttrs.version}/glom-${finalAttrs.version}.tar.xz";
hash = "sha256-U78gfryoLFY7nme86XdFmhfn/ZTjXCfBlphnNtokjfE=";
};
gda = libgdamm.override {
mysqlSupport = true;
postgresSupport = true;
};
python = python311.withPackages (
pkgs: with pkgs; [
pygobject3
distutils
]
);
python_boost = python311.withPackages (pkgs: with pkgs; [ pygobject3 ]);
sphinx-build = python311.pkgs.sphinx.overrideAttrs (super: {
postFixup = super.postFixup or "" + ''
# Do not propagate Python
rm $out/nix-support/propagated-build-inputs
'';
});
boost_python = boost.override {
enablePython = true;
python = finalAttrs.python_boost;
};
nativeBuildInputs = [
pkg-config
autoconf
automake
libtool
mm-common
intltool
(yelp-tools.override {
python3 = python311;
})
itstool
doxygen
graphviz
finalAttrs.sphinx-build
wrapGAppsHook3
gobject-introspection # for setup hook
];
buildInputs = [
finalAttrs.boost_python
glibmm
gtk3
openssl
libxmlxx3
libxslt
python311.pkgs.pygobject3
finalAttrs.gda
libarchive
libepc
finalAttrs.python
ncurses # for python
gtkmm3
goocanvasmm2
evince
isocodes
gtksourceview
gtksourceviewmm
postgresql # for postgresql utils
];
enableParallelBuilding = true;
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
configureFlags = [
"--with-boost-python=boost_python${lib.versions.major python311.version}${lib.versions.minor python311.version}"
"--with-postgres-utils=${lib.getBin postgresql}/bin"
];
makeFlags = [
"libdocdir=${placeholder "doc"}/share/doc/$(book_name)"
"devhelpdir=${placeholder "devdoc"}/share/devhelp/books/$(book_name)"
];
# Fontconfig error: Cannot load default config file
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [ freefont_ttf ];
};
preFixup = ''
gappsWrapperArgs+=(
--prefix PYTHONPATH : "${placeholder "out"}/${python311.sitePackages}"
--set PYTHONHOME "${finalAttrs.python}"
)
'';
meta = {
description = "Easy-to-use database designer and user interface";
license = with lib.licenses; [
lgpl2
gpl2
];
homepage = "https://gitlab.gnome.org/Archive/glom";
maintainers = with lib.maintainers; [
bot-wxt1221
];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "glooctl";
version = "1.20.1";
src = fetchFromGitHub {
owner = "solo-io";
repo = "gloo";
rev = "v${version}";
hash = "sha256-jSF2B9dbyJ9S4PHt6CKANC40MgXIuVF3uh4Ze0F0jZU=";
};
vendorHash = "sha256-zJmp3UWzZSI7G54DTOEOEo2ZIKjM6GZ0Cf5/BukaB4o=";
subPackages = [ "projects/gloo/cli/cmd" ];
nativeBuildInputs = [ installShellFiles ];
strictDeps = true;
ldflags = [
"-s"
"-X github.com/solo-io/gloo/pkg/version.Version=${version}"
];
preCheck = ''
export HOME=$TMPDIR
'';
postInstall = ''
mv $out/bin/cmd $out/bin/glooctl
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd glooctl \
--bash <($out/bin/glooctl completion bash) \
--zsh <($out/bin/glooctl completion zsh)
'';
meta = {
description = "Unified CLI for Gloo, the feature-rich, Kubernetes-native, next-generation API gateway built on Envoy";
mainProgram = "glooctl";
homepage = "https://docs.solo.io/gloo-edge/latest/reference/cli/glooctl/";
changelog = "https://github.com/solo-io/gloo/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
zlibSupport ? true,
zlib,
sslSupport ? true,
openssl,
idnSupport ? true,
libidn,
}:
stdenv.mkDerivation rec {
pname = "gloox";
version = "1.0.28";
src = fetchurl {
url = "https://camaya.net/download/gloox-${version}.tar.bz2";
sha256 = "sha256-WRvRLCSe3gtQoe9rmawN6O+cG6T9Lhhvl6dAIVzFlmw=";
};
# needed since gcc12
postPatch = ''
sed '1i#include <ctime>' -i \
src/tests/{tag/tag_perf.cpp,zlib/zlib_perf.cpp} \
src/examples/*.cpp
'';
buildInputs =
[ ]
++ lib.optional zlibSupport zlib
++ lib.optional sslSupport openssl
++ lib.optional idnSupport libidn;
meta = with lib; {
description = "Portable high-level Jabber/XMPP library for C++";
mainProgram = "gloox-config";
homepage = "http://camaya.net/gloox";
license = licenses.gpl3;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
stdenv,
}:
buildGoModule rec {
pname = "glow";
version = "2.1.1";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "glow";
rev = "v${version}";
hash = "sha256-lDGCRtwCpW/bZlfcb100g7tMXN2dlCPnCY7qVFyayUo=";
};
vendorHash = "sha256-JqQnLwkxRt+CiP90F+1i4MAiOw3akMQ5BeQXCplZdxA=";
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
"-X=main.Version=${version}"
];
doCheck = false;
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd glow \
--bash <($out/bin/glow completion bash) \
--fish <($out/bin/glow completion fish) \
--zsh <($out/bin/glow completion zsh)
'';
meta = {
description = "Render markdown on the CLI, with pizzazz";
homepage = "https://github.com/charmbracelet/glow";
changelog = "https://github.com/charmbracelet/glow/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
Br1ght0ne
penguwin
];
mainProgram = "glow";
};
}

View File

@@ -0,0 +1,31 @@
{
fetchFromGitHub,
lib,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "glowing-bear";
version = "0.9.0";
src = fetchFromGitHub {
rev = version;
owner = "glowing-bear";
repo = "glowing-bear";
sha256 = "0lf0j72m6rwlgqssdxf0m9si99lah08lww7q7i08p5i5lpv6zh2s";
};
installPhase = ''
mkdir $out
cp index.html serviceworker.js webapp.manifest.json $out
cp -R 3rdparty assets css directives js $out
'';
meta = with lib; {
description = "Web client for Weechat";
homepage = "https://github.com/glowing-bear/glowing-bear";
license = licenses.gpl3Plus;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromSourcehut,
meson,
ninja,
pkg-config,
wayland,
libX11,
libGL,
}:
stdenv.mkDerivation {
pname = "glpaper";
version = "unstable-2022-05-15";
src = fetchFromSourcehut {
owner = "~scoopta";
repo = "glpaper";
vc = "hg";
rev = "f89e60b7941fb60f1069ed51af9c5bb4917aab35";
sha256 = "sha256-E7FKjt3NL0aAEibfaq+YS2IVvpjNjInA+Rs8SU63/3M=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
wayland
libX11 # required by libglvnd
libGL
];
meta = with lib; {
description = "Wallpaper program for wlroots based Wayland compositors such as sway that allows you to render glsl shaders as your wallpaper";
mainProgram = "glpaper";
homepage = "https://hg.sr.ht/~scoopta/glpaper";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ccellado ];
};
}

View File

@@ -0,0 +1,136 @@
{
lib,
perlPackages,
nix,
dmidecode,
pciutils,
usbutils,
iproute2,
net-tools,
fetchFromGitHub,
makeWrapper,
versionCheckHook,
nix-update-script,
}:
perlPackages.buildPerlPackage rec {
pname = "glpi-agent";
version = "1.15";
src = fetchFromGitHub {
owner = "glpi-project";
repo = "glpi-agent";
tag = version;
hash = "sha256-+zHTlxfkZ1x21ePZUni7lbRJQ/NUDeoZnvOzM+yzG3M=";
};
postPatch = ''
patchShebangs bin
substituteInPlace lib/GLPI/Agent/Tools/Linux.pm \
--replace-fail "/sbin/ip" "${lib.getExe' iproute2 "ip"}"
substituteInPlace lib/GLPI/Agent/Task/Inventory/Linux/Networks.pm \
--replace-fail "/sbin/ip" "${lib.getExe' iproute2 "ip"}"
'';
nativeBuildInputs = [ makeWrapper ];
buildInputs = (
with perlPackages;
[
CGI
CpanelJSONXS
CryptDES
DataStructureUtil
DataUUID
DateTime
DigestSHA1
FileCopyRecursive
HTTPDaemon
HTTPProxy
HTTPServerSimple
HTTPServerSimpleAuthen
IOCapture
IOCompress
IOSocketSSL
IPCRun
JSON
LWPProtocolHttps
ModuleInstall
NetPing
NetSNMP
ParallelForkManager
ParseEDID
TestCompile
TestDeep
TestException
TestMockModule
TestMockObject
TestNoWarnings
URI
URIEscapeXS
XMLLibXML
YAML
]
);
propagatedBuildInputs = with perlPackages; [
FileWhich
LWP
NetIP
TextTemplate
UNIVERSALrequire
XMLTreePP
CompressRawZlib
HTTPDaemon
ProcDaemon
ProcPIDFile
];
# Test fails due to "Argument list too long"
doCheck = false;
installPhase = ''
mkdir -p $out
cp -r bin $out
cp -r lib $out
cp -r share $out
for cur in $out/bin/*; do
if [ -x "$cur" ]; then
sed -e "s|./lib|$out/lib|" -i "$cur"
wrapProgram "$cur" --prefix PATH : ${
lib.makeBinPath [
nix
dmidecode
pciutils
usbutils
net-tools
iproute2
]
}
fi
done
'';
outputs = [ "out" ];
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "GLPI unified Agent for UNIX, Linux, Windows and MacOSX";
homepage = "https://glpi-project.org/";
changelog = "https://github.com/glpi-project/glpi-agent/releases/tag/${src.tag}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ liberodark ];
mainProgram = "glpi-agent";
};
}

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
libmysqlclient,
# Excerpt from glpk's INSTALL file:
# This feature allows the exact simplex solver to use the GNU MP
# bignum library. If it is disabled, the exact simplex solver uses the
# GLPK bignum module, which provides the same functionality as GNU MP,
# however, it is much less efficient.
withGmp ? true,
gmp,
}:
assert withGmp -> gmp != null;
stdenv.mkDerivation rec {
version = "5.0";
pname = "glpk";
src = fetchurl {
url = "mirror://gnu/glpk/${pname}-${version}.tar.gz";
sha256 = "sha256-ShAT7rtQ9yj8YBvdgzsLKHAzPDs+WoFu66kh2VvsbxU=";
};
buildInputs = [
libmysqlclient
]
++ lib.optionals withGmp [
gmp
];
configureFlags = lib.optionals withGmp [
"--with-gmp"
];
patches = [
# GLPK makes it possible to customize its message printing behaviour. Sage
# does that and needs to differentiate between printing regular messages and
# printing errors. Unfortunately there is no way to tell and glpk upstream
# rejected this patch. All it does is set the variable pointing to the error
# file back to NULL before glpk calls abort(). In sage's case, abort won't
# actually be called because the error handler jumps out of the function.
# This shouldn't affect everybody else, since glpk just calls abort()
# immediately afterwards anyways.
# See the sage trac ticket for more details:
# https://trac.sagemath.org/ticket/20710#comment:18
(fetchpatch {
name = "error_recovery.patch";
url = "https://raw.githubusercontent.com/sagemath/sage/d3c1f607e32f964bf0cab877a63767c86fd00266/build/pkgs/glpk/patches/error_recovery.patch";
sha256 = "sha256-2hNtUEoGTFt3JgUvLH3tPWnz+DZcXNhjXzS+/V89toA=";
})
];
postPatch =
# Do not hardcode the include path for libmysqlclient.
''
substituteInPlace configure \
--replace '-I/usr/include/mysql' '$(mysql_config --include)'
'';
doCheck = true;
meta = with lib; {
description = "GNU Linear Programming Kit";
longDescription = ''
The GNU Linear Programming Kit is intended for solving large
scale linear programming problems by means of the revised
simplex method. It is a set of routines written in the ANSI C
programming language and organized in the form of a library.
'';
homepage = "https://www.gnu.org/software/glpk/";
license = licenses.gpl3Plus;
teams = [ teams.sage ];
mainProgram = "glpsol";
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromRepoOrCz,
cmake,
libGL,
libpng,
pkg-config,
zlib,
}:
stdenv.mkDerivation rec {
pname = "glpng";
version = "1.47";
src = fetchFromRepoOrCz {
repo = "glpng";
rev = "v${version}";
hash = "sha256-mwh0E8OZKBf6UcRScAeco8dfQ4LJ+7TG0IPuRi3Mzfc=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libGL
libpng
zlib
];
meta = with lib; {
homepage = "https://repo.or.cz/glpng.git/blob_plain/HEAD:/glpng.htm";
description = "PNG loader library for OpenGL";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "glrnvim";
version = "1.5.0";
src = fetchFromGitHub {
owner = "beeender";
repo = "glrnvim";
rev = "v${version}";
hash = "sha256-fyJ3k1CBrxL6It8x9jNumzCuhXug6eB/fuvPUQYEc4A=";
};
cargoHash = "sha256-xDa2aMWx09dEbRDops2HwYSl/KMA7CeFqS2bnxX/8w8=";
postInstall = ''
install -Dm644 glrnvim.desktop -t $out/share/applications
install -Dm644 glrnvim.svg $out/share/icons/hicolor/scalable/apps/glrnvim.svg
'';
meta = {
description = "Really fast & stable neovim GUI which could be accelerated by GPU";
homepage = "https://github.com/beeender/glrnvim";
mainProgram = "glrnvim";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ aacebedo ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
zig_0_14,
}:
let
zig = zig_0_14;
in
stdenv.mkDerivation (finalAttrs: {
pname = "glsl_analyzer";
version = "1.6.0";
src = fetchFromGitHub {
owner = "nolanderc";
repo = "glsl_analyzer";
tag = "v${finalAttrs.version}";
hash = "sha256-UDAbSRGaismUHQy4s+gygDzrrHu1G5PObRBWnua6bDA=";
};
nativeBuildInputs = [
zig.hook
];
postPatch = ''
substituteInPlace build.zig \
--replace-fail 'b.run(&.{ "git", "describe", "--tags", "--always" })' '"${finalAttrs.src.rev}"'
'';
meta = {
description = "Language server for GLSL (OpenGL Shading Language)";
changelog = "https://github.com/nolanderc/glsl_analyzer/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/nolanderc/glsl_analyzer";
mainProgram = "glsl_analyzer";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ wr7 ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchFromGitHub,
bison,
cmake,
jq,
python3,
spirv-headers,
spirv-tools,
}:
stdenv.mkDerivation rec {
pname = "glslang";
version = "15.4.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = version;
hash = "sha256-sPc+G7/ua7LQ7scuSvqWs7Q7Q+gFvXQ5wGQsEXbWH6w=";
};
outputs = [
"bin"
"out"
"dev"
];
# These get set at all-packages, keep onto them for child drvs
passthru = {
spirv-tools = spirv-tools;
spirv-headers = spirv-headers;
};
nativeBuildInputs = [
cmake
python3
bison
jq
];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
postPatch = ''
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
'';
# This is a dirty fix for lib/cmake/SPIRVTargets.cmake:51 which includes this directory
postInstall = ''
mkdir -p $dev/include/External
moveToOutput lib/pkgconfig "''${!outputDev}"
moveToOutput lib/cmake "''${!outputDev}"
'';
# Fix the paths in .pc, even though it's unclear if these .pc are really useful.
postFixup = ''
substituteInPlace $dev/lib/pkgconfig/*.pc \
--replace-fail '=''${prefix}//' '=/' \
--replace-fail "includedir=$dev/$dev" "includedir=$dev"
# add a symlink for backwards compatibility
ln -s $bin/bin/glslang $bin/bin/glslangValidator
'';
meta = with lib; {
inherit (src.meta) homepage;
description = "Khronos reference front-end for GLSL and ESSL";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = [ maintainers.ralith ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "glslls";
version = "0.5.0";
src = fetchFromGitHub {
owner = "svenstaro";
repo = "glsl-language-server";
tag = finalAttrs.version;
fetchSubmodules = true;
hash = "sha256-wi1QiqaWRh1DmIhwmu94lL/4uuMv6DnB+whM61Jg1Zs=";
};
nativeBuildInputs = [
python3
cmake
ninja
];
meta = {
description = "Language server implementation for GLSL";
mainProgram = "glslls";
homepage = "https://github.com/svenstaro/glsl-language-server";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ declan ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,55 @@
{
stdenv,
cmake,
ninja,
lib,
fetchFromGitHub,
pkg-config,
libX11,
libXrandr,
libXinerama,
libXcursor,
libXi,
libXext,
libGLU,
ffmpeg,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "glslviewer";
version = "3.2.4";
src = fetchFromGitHub {
owner = "patriciogonzalezvivo";
repo = "glslViewer";
fetchSubmodules = true;
tag = version;
hash = "sha256-Ve3wmX5+kABCu8IRe4ySrwsBJm47g1zvMqDbqrpQl88=";
};
nativeBuildInputs = [
cmake
ninja
pkg-config
];
buildInputs = [
libX11
libXrandr
libXinerama
libXcursor
libXi
libXext
libGLU
ncurses
ffmpeg
];
meta = with lib; {
description = "Live GLSL coding renderer";
homepage = "https://patriciogonzalezvivo.com/2015/glslViewer/";
license = licenses.bsd3;
maintainers = [ maintainers.hodapp ];
platforms = platforms.unix;
mainProgram = "glslViewer";
# never built on aarch64-darwin since first introduction in nixpkgs
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,27 @@
Taken from:
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/games-action/gltron/files/gltron-0.70-prototypes.patch?revision=1.1&view=markup
scripting.h declares these params as const so make sure they're the same.
--- a/nebu/scripting/scripting.c
+++ b/nebu/scripting/scripting.c
@@ -169,16 +169,16 @@
return status;
}
-void scripting_RunFile(char *name) {
+void scripting_RunFile(const char *name) {
lua_dofile(L, name);
}
-void scripting_Run(char *command) {
+void scripting_Run(const char *command) {
/* fprintf(stderr, "[command] %s\n", command); */
lua_dostring(L, command);
}
-void scripting_RunFormat(char *format, ... ) {
+void scripting_RunFormat(const char *format, ... ) {
char buf[4096];
va_list ap;
va_start(ap, format);

View File

@@ -0,0 +1,68 @@
{
lib,
stdenv,
fetchurl,
SDL,
libGLU,
libGL,
zlib,
libpng,
libvorbis,
libmikmod,
SDL_sound,
}:
stdenv.mkDerivation rec {
pname = "gltron";
version = "0.70";
src = fetchurl {
url = "mirror://sourceforge/gltron/gltron-${version}-source.tar.gz";
sha256 = "e0c8ebb41a18a1f8d7302a9c2cb466f5b1dd63e9a9966c769075e6b6bdad8bb0";
};
patches = [
./gentoo-prototypes.patch
# gcc-14 build fix: https://sourceforge.net/p/gltron/patches/7/
(fetchurl {
name = "gcc-14.patch";
url = "https://sourceforge.net/p/gltron/patches/7/attachment/gcc-14.patch";
hash = "sha256-OJAUAM/OQVwxYnIacBkncNxMLn/HDCoysbi+Txe+DC8=";
})
];
postPatch = ''
# Fix https://sourceforge.net/p/gltron/bugs/15
sed -i /__USE_MISC/d lua/src/lib/liolib.c
'';
# The build fails, unless we disable the default -Wall -Werror
configureFlags = [ "--disable-warn" ];
makeFlags = [ "AR=${stdenv.cc.targetPrefix}ar" ];
env.SDL_CONFIG = lib.getExe' (lib.getDev SDL) "sdl-config";
buildInputs = [
SDL
libGLU
libGL
zlib
libpng
libvorbis
libmikmod
SDL_sound
];
strictDeps = true;
enableParallelBuilding = true;
meta = {
homepage = "http://www.gltron.org/";
description = "Game based on the movie Tron";
mainProgram = "gltron";
license = lib.licenses.gpl2Plus;
maintainers = [ ];
platforms = with lib.platforms; linux;
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchurl,
unzip,
zlib,
enableUnfree ? false,
}:
stdenv.mkDerivation rec {
pname = "glucose" + lib.optionalString enableUnfree "-syrup";
version = "4.2.1";
src = fetchurl {
url = "https://www.labri.fr/perso/lsimon/downloads/softwares/glucose-${version}.zip";
hash = "sha256-J0J9EKC/4cCiZr/y4lz+Hm7OcmJmMIIWzQ+4c+KhqXg=";
};
sourceRoot = "glucose-${version}/sources/${if enableUnfree then "parallel" else "simp"}";
postPatch = ''
substituteInPlace Main.cc \
--replace "defined(__linux__)" "defined(__linux__) && defined(__x86_64__)"
'';
nativeBuildInputs = [ unzip ];
buildInputs = [ zlib ];
makeFlags = [ "r" ];
installPhase = ''
runHook preInstall
install -Dm0755 ${pname}_release $out/bin/${pname}
mkdir -p "$out/share/doc/${pname}-${version}/"
install -Dm0755 ../{LICEN?E,README*,Changelog*} "$out/share/doc/${pname}-${version}/"
runHook postInstall
'';
meta = with lib; {
description = "Modern, parallel SAT solver (${
if enableUnfree then "parallel" else "sequential"
} version)";
mainProgram = "glucose";
homepage = "https://www.labri.fr/perso/lsimon/research/glucose/";
license = if enableUnfree then licenses.unfreeRedistributable else licenses.mit;
platforms = platforms.unix;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
}:
let
pname = "gluesql";
version = "0.14.0";
in
rustPlatform.buildRustPackage {
inherit pname version;
src = fetchFromGitHub {
owner = "gluesql";
repo = "gluesql";
rev = "v${version}";
hash = "sha256-z2fpyPJfyPtO13Ly7XRmMW3rp6G3jNLsMMFz83Wmr0E=";
};
cargoHash = "sha256-QITNkSB/IneKj0w12FCKV1Y0vRAlOfENs8BpFbDpK2M=";
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Rust library for SQL databases";
homepage = "https://github.com/gluesql/gluesql";
license = licenses.asl20;
maintainers = with maintainers; [ happysalada ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchFromGitHub,
libglut,
libGL,
libGLU,
libX11,
libXext,
libXi,
libXmu,
}:
stdenv.mkDerivation rec {
pname = "glui";
version = "2.37";
src = fetchFromGitHub {
owner = "libglui";
repo = "glui";
rev = version;
sha256 = "0qg2y8w95s03zay1qsqs8pqxxlg6l9kwm7rrs1qmx0h22sxb360i";
};
buildInputs = [
libglut
libGLU
libGL
libXmu
libXext
libX11
libXi
];
installPhase = ''
mkdir -p "$out"/{bin,lib,share/glui/doc,include}
cp -rT bin "$out/bin"
cp -rT lib "$out/lib"
cp -rT include "$out/include"
cp -rT doc "$out/share/glui/doc"
cp LICENSE.txt "$out/share/glui/doc"
'';
meta = with lib; {
description = "User interface library using OpenGL";
license = licenses.zlib;
maintainers = [ maintainers.raskin ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,269 @@
{
lib,
stdenv,
fetchFromGitHub,
fuse,
bison,
flex,
openssl,
python3,
ncurses,
readline,
autoconf,
automake,
libtool,
pkg-config,
zlib,
libaio,
libxml2,
acl,
sqlite,
liburcu,
liburing,
attr,
makeWrapper,
coreutils,
gnused,
gnugrep,
which,
openssh,
gawk,
findutils,
util-linux,
lvm2,
btrfs-progs,
e2fsprogs,
xfsprogs,
systemd,
rsync,
getent,
rpcsvc-proto,
libtirpc,
gperftools,
nixosTests,
}:
let
# NOTE: On each glusterfs release, it should be checked if gluster added
# new, or changed, Python scripts whose PYTHONPATH has to be set in
# `postFixup` below, and whose runtime deps need to go into
# `nativeBuildInputs`.
# The command
# find /nix/store/...-glusterfs-.../ -name '*.py' -executable
# can help with finding new Python scripts.
buildInputs = [
fuse
openssl
ncurses
readline
zlib
libaio
libxml2
acl
sqlite
liburcu
attr
util-linux
libtirpc
gperftools
liburing
(python3.withPackages (pkgs: [
pkgs.flask
pkgs.prettytable
pkgs.requests
pkgs.pyxattr
]))
# NOTE: `python3` has to be *AFTER* the above `python3.withPackages`,
# to ensure that the packages are available but the `toPythonPath`
# shell function used in `postFixup` is also still available.
python3
];
# Some of the headers reference acl
propagatedBuildInputs = [
acl
];
# Packages from which GlusterFS calls binaries at run-time from PATH,
# with comments on which commands are known to be called by it.
runtimePATHdeps = [
attr # getfattr setfattr
btrfs-progs # btrfs
coreutils # lots of commands in bash scripts
e2fsprogs # tune2fs
findutils # find
gawk # awk
getent # getent
gnugrep # grep
gnused # sed
lvm2 # lvs
openssh # ssh
rsync # rsync, e.g. for geo-replication
systemd # systemctl
util-linux # mount umount
which # which
xfsprogs # xfs_info
];
in
stdenv.mkDerivation rec {
pname = "glusterfs";
version = "11.2";
src = fetchFromGitHub {
owner = "gluster";
repo = "glusterfs";
rev = "v${version}";
sha256 = "sha256-MGTntR9SVmejgpAkZnhJOaIkZeCMNBGaQSorLOStdjo=";
};
inherit buildInputs propagatedBuildInputs;
patches = [
# Upstream invokes `openssl version -d` to derive the canonical system path
# for certificates, which resolves to a nix store path, so this patch
# statically sets the configure.ac value. There's probably a less-brittle
# way to do this! (this will likely fail on a version bump)
# References:
# - https://github.com/gluster/glusterfs/issues/3234
# - https://github.com/gluster/glusterfs/commit/a7dc43f533ad4b8ff68bf57704fefc614da65493
./ssl_cert_path.patch
];
postPatch = ''
sed -e '/chmod u+s/d' -i contrib/fuse-util/Makefile.am
substituteInPlace libglusterfs/src/glusterfs/lvm-defaults.h \
--replace-fail '/sbin/' '${lvm2}/bin/'
substituteInPlace libglusterfs/src/glusterfs/compat.h \
--replace-fail '/bin/umount' '${util-linux}/bin/umount'
substituteInPlace contrib/fuse-lib/mount-gluster-compat.h \
--replace-fail '/bin/mount' '${util-linux}/bin/mount'
# use local up to date m4 files to ensure the correct python version is detected
substituteInPlace autogen.sh \
--replace-fail '$ACLOCAL -I ./contrib/aclocal' '$ACLOCAL'
'';
# Note that the VERSION file is something that is present in release tarballs
# but not in git tags (at least not as of writing in v3.10.1).
# That's why we have to create it.
# Without this, gluster (at least 3.10.1) will fail very late and cryptically,
# for example when setting up geo-replication, with a message like
# Staging of operation 'Volume Geo-replication Create' failed on localhost : Unable to fetch master volume details. Please check the master cluster and master volume.
# What happens here is that the gverify.sh script tries to compare the versions,
# but fails when the version is empty.
# See upstream GlusterFS bug https://bugzilla.redhat.com/show_bug.cgi?id=1452705
preConfigure = ''
patchShebangs build-aux/pkg-version
echo "v${version}" > VERSION
./autogen.sh
export PYTHON=${python3}/bin/python
'';
configureFlags = [
"--localstatedir=/var"
];
nativeBuildInputs = [
autoconf
automake
libtool
pkg-config
bison
flex
makeWrapper
rpcsvc-proto
];
makeFlags = [ "DESTDIR=$(out)" ];
enableParallelBuilding = true;
postInstall = ''
cp -r $out/$out/* $out
rm -r $out/nix
'';
postFixup = ''
# glusterd invokes `gluster` and other utilities when telling other glusterd nodes to run commands.
# For example for `peer_georep-sshkey` key generation, so `$out/bin` is needed in the PATH.
# It also invokes bash scripts like `gverify.sh`.
# It also invokes executable Python scripts in `$out/libexec/glusterfs`, which is why we set up PYTHONPATH accordingly.
# We set up the paths for the main entry point executables.
GLUSTER_PATH="${lib.makeBinPath runtimePATHdeps}:$out/bin"
GLUSTER_PYTHONPATH="$(toPythonPath $out):$out/libexec/glusterfs"
GLUSTER_LD_LIBRARY_PATH="$out/lib"
wrapProgram $out/bin/glusterd --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
wrapProgram $out/bin/gluster --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
wrapProgram $out/sbin/mount.glusterfs --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
# Set Python environment for the Python based utilities.
# It would be nice if there was a better way to do this, automatically for all of them.
# Also, this is brittle: If we forget a dependency or gluster adds a new one, things will break deep inside gluster.
# We should better try to get an explicit list of Python dependencies from gluster and ensure all of them are in the PYTHONPATH of all these python scripts.
# But at the time of writing (gluster 3.10), gluster only provides this in form of a gluster.spec file for RPM creation,
# and even that one is not complete (for example it doesn't mention the `flask` dependency).
wrapProgram $out/bin/gluster-eventsapi --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
wrapProgram $out/bin/gluster-georep-sshkey --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
wrapProgram $out/bin/gluster-mountbroker --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
wrapProgram $out/bin/glusterfind --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
# Note that we only wrap the symlinks in $out/bin, not the actual executable scripts in $out/libexec/glusterfs.
# This is because those scripts use `__file__` in their program logic
# (see https://github.com/gluster/glusterfs/blob/v3.10.1/extras/cliutils/cliutils.py#L116)
# which would break if we changed the file name (which is what `wrapProgram` does).
# Luckily, `libexec` scripts are never supposed to be invoked straight from PATH,
# instead they are invoked directly from `gluster` or `glusterd`, which is why it is
# sufficient to set PYTHONPATH for those executables.
#
# Exceptions to these rules are the `glusterfind` `brickfind.py` and `changelog.py`
# crawlers, which are directly invoked on other gluster nodes using a remote SSH command
# issues by `glusterfind`.
wrapProgram $out/share/glusterfs/scripts/eventsdash.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
wrapProgram $out/libexec/glusterfs/glusterfind/brickfind.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
wrapProgram $out/libexec/glusterfs/glusterfind/changelog.py --set PATH "$GLUSTER_PATH" --set PYTHONPATH "$GLUSTER_PYTHONPATH" --set LD_LIBRARY_PATH "$GLUSTER_LD_LIBRARY_PATH"
'';
doInstallCheck = true;
# Below we run Python programs. That generates .pyc/.pyo files.
# By default they are indeterministic because such files contain time stamps
# (see https://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html).
# So we use the same environment variables as in
# https://github.com/NixOS/nixpkgs/blob/249b34aadca7038207492f29142a3456d0cecec3/pkgs/development/interpreters/python/mk-python-derivation.nix#L61
# to make these files deterministic.
# A general solution to this problem might be brought by #25707.
DETERMINISTIC_BUILD = 1;
PYTHONHASHSEED = 0;
installCheckPhase = ''
# Tests that the above programs work without import errors.
# For testing it manually in a shell you may want to substitute `$out` with `$(dirname $(readlink -f $(which gluster)))/../`.
$out/bin/glusterd --help
# $out/bin/gluster help # can't do this because even `gluster help` tries to write to `/var/log/glusterfs/cli.log`
$out/bin/gluster-eventsapi --help
$out/bin/gluster-georep-sshkey --help
$out/bin/gluster-mountbroker --help
$out/bin/glusterfind --help
# gfid_to_path.py doesn't accept --help, and it requires different arguments
# (a dir as single argument) than the usage prints when stdin is not a TTY.
# The `echo ""` is just so that stdin is not a TTY even if you try this line
# on a real TTY for testing purposes.
echo "" | (mkdir -p nix-test-dir-for-gfid_to_path && touch b && $out/libexec/glusterfs/gfind_missing_files/gfid_to_path.py nix-test-dir-for-gfid_to_path)
$out/share/glusterfs/scripts/eventsdash.py --help
# this gets falsely loaded as module by glusterfind
rm -r $out/bin/conf.py
'';
passthru.tests = {
glusterfs = nixosTests.glusterfs;
};
meta = with lib; {
description = "Distributed storage system";
homepage = "https://www.gluster.org";
license = licenses.lgpl3Plus; # dual licese: choice of lgpl3Plus or gpl2
maintainers = [ maintainers.raskin ];
platforms = with platforms; linux ++ freebsd;
};
}

View File

@@ -0,0 +1,23 @@
diff --git a/configure.ac b/configure.ac
index fb8db11e9e..4c40683057 100644
--- a/configure.ac
+++ b/configure.ac
@@ -766,14 +766,10 @@ AS_IF([test "x$enable_fuse_notifications" != "xno"], [
dnl Find out OpenSSL trusted certificates path
AC_MSG_CHECKING([for OpenSSL trusted certificates path])
-SSL_CERT_PATH=$(openssl version -d | sed -e 's|OPENSSLDIR: "\(.*\)".*|\1|')
-if test -d "${SSL_CERT_PATH}" 1>/dev/null 2>&1; then
- AC_MSG_RESULT([$SSL_CERT_PATH])
- AC_DEFINE_UNQUOTED(SSL_CERT_PATH, ["$SSL_CERT_PATH"], [Path to OpenSSL trusted certificates.])
- AC_SUBST(SSL_CERT_PATH)
-else
- AC_MSG_ERROR([Unable to detect path to OpenSSL trusted certificates])
-fi
+SSL_CERT_PATH=/etc/ssl
+AC_MSG_RESULT([$SSL_CERT_PATH])
+AC_DEFINE_UNQUOTED(SSL_CERT_PATH, ["$SSL_CERT_PATH"], [Path to OpenSSL trusted certificates.])
+AC_SUBST(SSL_CERT_PATH)
AC_CHECK_LIB([ssl], TLS_method, [HAVE_OPENSSL_1_1="yes"], [HAVE_OPENSSL_1_1="no"])
if test "x$HAVE_OPENSSL_1_1" = "xyes"; then

View File

@@ -0,0 +1,24 @@
diff --git a/vendor/glycin/src/sandbox.rs b/vendor/glycin/src/sandbox.rs
index 08db832..4f44b21 100644
--- a/vendor/glycin/src/sandbox.rs
+++ b/vendor/glycin/src/sandbox.rs
@@ -202,7 +202,7 @@ impl Sandbox {
args.push(self.exec());
- ("bwrap".into(), args, Some(seccomp_memfd))
+ ("@bwrap@".into(), args, Some(seccomp_memfd))
}
SandboxMechanism::FlatpakSpawn => {
let memory_limit = Self::memory_limit();
@@ -299,8 +299,8 @@ impl Sandbox {
"/",
// Make /usr available as read only
"--ro-bind",
- "/usr",
- "/usr",
+ "/nix/store",
+ "/nix/store",
// Make tmpfs dev available
"--dev",
"/dev",

View File

@@ -0,0 +1,103 @@
{
stdenv,
lib,
fetchurl,
replaceVars,
bubblewrap,
cairo,
cargo,
gettext,
git,
gnome,
gtk4,
lcms2,
libheif,
libjxl,
librsvg,
libseccomp,
libxml2,
meson,
ninja,
pkg-config,
rustc,
rustPlatform,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "glycin-loaders";
version = "1.2.3";
src = fetchurl {
url = "mirror://gnome/sources/glycin/${lib.versions.majorMinor finalAttrs.version}/glycin-${finalAttrs.version}.tar.xz";
hash = "sha256-OAqv4r+07KDEW0JmDr/0SWANAKQ7YJ1bHIP3lfXI+zw=";
};
patches = [
# Fix paths in glycin library.
# Not actually needed for this package since we are only building loaders
# and this patch is relevant just to apps that use the loaders
# but apply it here to ensure the patch continues to apply.
finalAttrs.passthru.glycinPathsPatch
];
cargoVendorDir = "vendor";
nativeBuildInputs = [
cargo
gettext # for msgfmt
git
meson
ninja
pkg-config
rustc
rustPlatform.cargoSetupHook
];
buildInputs = [
gtk4 # for GdkTexture
cairo
lcms2
libheif
libxml2 # for librsvg crate
librsvg
libseccomp
libjxl
];
mesonFlags = [
"-Dglycin-loaders=true"
"-Dlibglycin=false"
"-Dvapi=false"
];
strictDeps = true;
postPatch = ''
substituteInPlace loaders/meson.build \
--replace-fail "cargo_target_dir / rust_target / loader," "cargo_target_dir / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / loader,"
'';
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
passthru = {
updateScript = gnome.updateScript {
attrPath = "glycin-loaders";
packageName = "glycin";
};
glycinPathsPatch = replaceVars ./fix-glycin-paths.patch {
bwrap = "${bubblewrap}/bin/bwrap";
};
};
meta = with lib; {
description = "Glycin loaders for several formats";
homepage = "https://gitlab.gnome.org/GNOME/glycin";
teams = [ teams.gnome ];
license = with licenses; [
mpl20 # or
lgpl21Plus
];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
curl,
glib,
sqlite,
pkg-config,
}:
stdenv.mkDerivation rec {
version = "1.0.10";
pname = "glyr";
src = fetchFromGitHub {
owner = "sahib";
repo = "glyr";
rev = version;
sha256 = "1miwbqzkhg0v3zysrwh60pj9sv6ci4lzq2vq2hhc6pc6hdyh8xyr";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
sqlite
glib
curl
];
meta = with lib; {
description = "Music related metadata searchengine";
homepage = "https://github.com/sahib/glyr";
license = licenses.lgpl3;
maintainers = [ maintainers.sternenseemann ];
mainProgram = "glyrc";
platforms = platforms.unix;
};
}