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,38 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
which,
ronn,
opencv,
}:
stdenv.mkDerivation rec {
pname = "focus-stack";
version = "1.4";
src = fetchFromGitHub {
owner = "PetteriAimonen";
repo = "focus-stack";
rev = version;
hash = "sha256-SoECgBMjWI+n7H6p3hf8J5E9UCLHGiiz5WAsEEioJsU=";
};
nativeBuildInputs = [
pkg-config
which
ronn
];
buildInputs = [ opencv ];
makeFlags = [ "prefix=$(out)" ];
meta = with lib; {
description = "Fast and easy focus stacking";
homepage = "https://github.com/PetteriAimonen/focus-stack";
license = licenses.mit;
maintainers = with maintainers; [ paperdigits ];
mainProgram = "focus-stack";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
libX11,
libXinerama,
}:
stdenv.mkDerivation {
pname = "focus";
version = "0-unstable-2021-02-23";
src = fetchFromGitHub {
owner = "phillbush";
repo = "focus";
rev = "fed2fdbd3f73b192882d97aeb5b1cea681bb7d85";
sha256 = "sha256-IDiUXindzv5Ng5oCTyUlj2il/2kLvXG4YhgiYp7ZebQ=";
};
buildInputs = [
libX11
libXinerama
];
makeFlags = [ "PREFIX=\${out}" ];
meta = with lib; {
description = "Focus window, workspace or monitor by direction or cycle through them";
longDescription = ''
A collection of utilities that change the focus of windows, workspaces or
monitors.
'';
homepage = "https://github.com/phillbush/focus";
license = licenses.publicDomain;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,56 @@
{
stdenvNoCC,
lib,
fetchFromGitHub,
gettext,
python3,
}:
stdenvNoCC.mkDerivation {
pname = "folder-color-switcher";
version = "1.6.8";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "folder-color-switcher";
# They don't really do tags, this is just a named commit.
rev = "d135f29d688d89a0e7b48acec9e08738c7976ee1";
hash = "sha256-3EFnQxTYcJLGjfAzZNS7pgVDUwuU3juOAwUyaKOHemI=";
};
nativeBuildInputs = [
gettext
python3.pkgs.wrapPython
];
postPatch = ''
substituteInPlace usr/share/nemo-python/extensions/nemo-folder-color-switcher.py \
--replace "/usr/share/locale" "$out/share/locale" \
--replace "/usr/share/folder-color-switcher/colors.d" "/run/current-system/sw/share/folder-color-switcher/colors.d" \
--replace "/usr/share/folder-color-switcher/color.svg" "$out/share/folder-color-switcher/color.svg"
substituteInPlace usr/share/caja-python/extensions/caja-folder-color-switcher.py \
--replace "/usr/share/folder-color-switcher/colors.d" "/run/current-system/sw/share/folder-color-switcher/colors.d"
'';
installPhase = ''
runHook preInstall
mkdir -p $out
mv usr/share $out
runHook postInstall
'';
# For Gdk.cairo_surface_create_from_pixbuf()
# TypeError: Couldn't find foreign struct converter for 'cairo.Surface'
passthru.nemoPythonExtensionDeps = [ python3.pkgs.pycairo ];
meta = with lib; {
homepage = "https://github.com/linuxmint/folder-color-switcher";
description = "Change folder colors for Nemo and Caja";
license = licenses.gpl3Only;
platforms = platforms.linux;
teams = [ teams.cinnamon ];
};
}

View File

@@ -0,0 +1,64 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
gettext,
glib,
gjs,
ninja,
gtk4,
webkitgtk_6_0,
gsettings-desktop-schemas,
wrapGAppsHook4,
desktop-file-utils,
gobject-introspection,
glib-networking,
pkg-config,
libadwaita,
}:
stdenv.mkDerivation rec {
pname = "foliate";
version = "3.3.0";
src = fetchFromGitHub {
owner = "johnfactotum";
repo = "foliate";
tag = version;
hash = "sha256-QpWJDwatT4zOAPF+dn+Sm5xivk9SIZOvexj0M/Nyu24=";
fetchSubmodules = true;
};
nativeBuildInputs = [
desktop-file-utils
gobject-introspection
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
gettext
gjs
glib
glib-networking
gsettings-desktop-schemas
gtk4
libadwaita
webkitgtk_6_0
];
meta = {
description = "Simple and modern GTK eBook reader";
homepage = "https://johnfactotum.github.io/foliate";
changelog = "https://github.com/johnfactotum/foliate/releases/tag/${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
onny
aleksana
];
mainProgram = "foliate";
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
vala,
blueprint-compiler,
wrapGAppsHook4,
desktop-file-utils,
libadwaita,
libgee,
gtksourceview5,
}:
stdenv.mkDerivation rec {
pname = "folio";
version = "25.02";
src = fetchFromGitHub {
owner = "toolstack";
repo = "Folio";
tag = version;
hash = "sha256-u7HieTsbSohCjpLNyeY/ZZdmpQWulZaCkxOV5a5QyBY=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
vala
blueprint-compiler
wrapGAppsHook4
desktop-file-utils
];
buildInputs = [
libadwaita
libgee
gtksourceview5
];
meta = {
description = "Beautiful markdown note-taking app for GNOME (forked from Paper)";
homepage = "https://github.com/toolstack/Folio";
license = lib.licenses.gpl3Only;
mainProgram = "com.toolstack.Folio";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,120 @@
{
stdenv,
lib,
fetchurl,
pkg-config,
meson,
ninja,
glib,
gnome,
gettext,
gobject-introspection,
vala,
sqlite,
dbus-glib,
dbus,
libgee,
evolution-data-server-gtk4,
python3,
readline,
gtk-doc,
docbook-xsl-nons,
docbook_xml_dtd_43,
telepathy-glib,
telepathySupport ? false,
}:
# TODO: enable more folks backends
stdenv.mkDerivation (finalAttrs: {
pname = "folks";
version = "0.15.9";
outputs = [
"out"
"dev"
"devdoc"
];
src = fetchurl {
url = "mirror://gnome/sources/folks/${lib.versions.majorMinor finalAttrs.version}/folks-${finalAttrs.version}.tar.xz";
hash = "sha256-IxGzc1XDUfM/Fj/cOUh0oioKBoLDGUk9bYpuQgcRQV8=";
};
nativeBuildInputs = [
gettext
gobject-introspection
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_43
meson
ninja
pkg-config
vala
]
++ lib.optionals telepathySupport [
python3
];
buildInputs = [
dbus-glib
evolution-data-server-gtk4 # UI part not needed, using gtk4 version to reduce system closure.
readline
]
++ lib.optionals telepathySupport [
telepathy-glib
];
propagatedBuildInputs = [
glib
libgee
sqlite
];
nativeCheckInputs = [
dbus
(python3.withPackages (
pp: with pp; [
python-dbusmock
# The following possibly need to be propagated by dbusmock
# if they are not optional
dbus-python
pygobject3
]
))
];
mesonFlags = [
"-Ddocs=true"
"-Dtelepathy_backend=${lib.boolToString telepathySupport}"
"-Dtests=${lib.boolToString (finalAttrs.finalPackage.doCheck && stdenv.hostPlatform.isLinux)}"
];
# backends/eds/lib/libfolks-eds.so.26.0.0.p/edsf-persona-store.c:10697:4:
# error: call to undeclared function 'folks_persona_store_set_is_user_set_default';
# ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=implicit-function-declaration";
# Checks last re-enabled in https://github.com/NixOS/nixpkgs/pull/279843, but timeouts in tests still
# occur inconsistently
doCheck = false;
postPatch = lib.optionalString telepathySupport ''
patchShebangs tests/tools/manager-file.py
'';
passthru = {
updateScript = gnome.updateScript {
packageName = "folks";
versionPolicy = "none";
};
};
meta = with lib; {
description = "Library that aggregates people from multiple sources to create metacontacts";
homepage = "https://gitlab.gnome.org/GNOME/folks";
license = licenses.lgpl21Plus;
teams = [ teams.gnome ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,29 @@
diff --git a/folly/memory/test/UninitializedMemoryHacksTest.cpp b/folly/memory/test/UninitializedMemoryHacksTest.cpp
index 38e27c3..17424af 100644
--- a/folly/memory/test/UninitializedMemoryHacksTest.cpp
+++ b/folly/memory/test/UninitializedMemoryHacksTest.cpp
@@ -283,7 +283,7 @@ TEST(UninitializedMemoryHacks, simpleStringWChar) {
}
TEST(UninitializedMemoryHacks, simpleStringSChar) {
- testSimple<std::basic_string<signed char>>();
+ testSimple<std::basic_string<char>>();
}
TEST(UninitializedMemoryHacks, simpleVectorChar) {
@@ -307,7 +307,7 @@ TEST(UninitializedMemoryHacks, randomStringWChar) {
}
TEST(UninitializedMemoryHacks, randomStringSChar) {
- testRandom<std::basic_string<signed char>>();
+ testRandom<std::basic_string<char>>();
}
TEST(UninitializedMemoryHacks, randomVectorChar) {
@@ -323,5 +323,5 @@ TEST(UninitializedMemoryHacks, randomVectorInt) {
}
// We are deliberately putting this at the bottom to make sure it can follow use
-FOLLY_DECLARE_STRING_RESIZE_WITHOUT_INIT(signed char)
+//FOLLY_DECLARE_STRING_RESIZE_WITHOUT_INIT(char)
FOLLY_DECLARE_VECTOR_RESIZE_WITHOUT_INIT(int)

View File

@@ -0,0 +1,34 @@
From acccee8947977178f36d117cd9d3240cbdb5f018 Mon Sep 17 00:00:00 2001
From: ihb2032 <1355790728@qq.com>
Date: Wed, 10 Sep 2025 17:31:41 +0800
Subject: [PATCH] fix(folly): Replace `__type_pack_element` in
`ForeachTest.cpp` to support GCC 14
The use of the `__type_pack_element` compiler builtin directly in function signatures in `folly/container/test/ForeachTest.cpp` causes a build failure with GCC 14. This is because the builtin is not intended for use in contexts that affect name mangling.
This commit resolves the issue by replacing the direct usage of `__type_pack_element_t` with `std::tuple_element_t`. This is a standards-compliant library trait that provides the same functionality and is safe to use in function signatures.
This change ensures that `ForeachTest` continues to compile successfully with newer versions of GCC, maintaining compiler compatibility.
Signed-off-by: lyd1992 <liuyudong@iscas.ac.cn>
Signed-off-by: ihb2032 <1355790728@qq.com>
---
folly/container/test/ForeachTest.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/folly/container/test/ForeachTest.cpp b/folly/container/test/ForeachTest.cpp
index c055f26effe..3adec1a7371 100644
--- a/folly/container/test/ForeachTest.cpp
+++ b/folly/container/test/ForeachTest.cpp
@@ -314,8 +314,8 @@ TEST(ForEach, FetchTestPreferIterator) {
template <typename...>
struct LargeTuple {};
template <size_t I, typename... T>
-type_pack_element_t<I, T...>& get(LargeTuple<T...>&) {
- static type_pack_element_t<I, T...> elem;
+std::tuple_element_t<I, std::tuple<T...>>& get(LargeTuple<T...>&) {
+ static std::tuple_element_t<I, std::tuple<T...>> elem;
return elem;
}
namespace std {

View File

@@ -0,0 +1,22 @@
From dc06cc3162afb148c19cd0931d8fe489d639217a Mon Sep 17 00:00:00 2001
From: Uilian Ries <uilianries@gmail.com>
Date: Tue, 9 Sep 2025 16:48:26 +0200
Subject: [PATCH] Add missing header for std::runtime_error
Signed-off-by: Uilian Ries <uilianries@gmail.com>
---
folly/hash/Checksum.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/folly/hash/Checksum.cpp b/folly/hash/Checksum.cpp
index 1d42d6a6e5f..aeafdb20b1b 100644
--- a/folly/hash/Checksum.cpp
+++ b/folly/hash/Checksum.cpp
@@ -17,6 +17,7 @@
#include <folly/hash/Checksum.h>
#include <algorithm>
+#include <stdexcept>
#include <boost/crc.hpp>

View File

@@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecc11a7961..67a2b82b4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -489,8 +489,12 @@
${FOLLY_DIR}/test/DeterministicSchedule.cpp
${FOLLY_DIR}/json/JsonTestUtil.cpp
)
+auto_sources(test_certs "*.pem" "${FOLLY_DIR}/io/async/test/certs")
+install(FILES ${test_certs}
+ DESTINATION "${LIB_INSTALL_DIR}/folly/test-certs"
+)
target_compile_definitions(folly_test_util PUBLIC
- FOLLY_CERTS_DIR="${FOLLY_DIR}/io/async/test/certs"
+ FOLLY_CERTS_DIR="${LIB_INSTALL_DIR}/folly/test-certs"
)
set_property(TARGET folly_test_util PROPERTY VERSION ${PACKAGE_VERSION})
target_link_libraries(folly_test_util

View File

@@ -0,0 +1,242 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
ninja,
pkg-config,
double-conversion,
fast-float,
gflags,
glog,
libevent,
zlib,
openssl,
xz,
lz4,
zstd,
libiberty,
libunwind,
darwinMinVersionHook,
boost,
fmt,
ctestCheckHook,
gtest,
follyMobile ? false,
nix-update-script,
# for passthru.tests
python3,
watchman,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "folly";
version = "2025.09.15.00";
# split outputs to reduce downstream closure sizes
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "facebook";
repo = "folly";
tag = "v${finalAttrs.version}";
hash = "sha256-//gx081nMFXAcUgkHQToiFHhECfLW22Fl0eXEsObxUs=";
};
nativeBuildInputs = [
cmake
ninja
pkg-config
];
# See CMake/folly-deps.cmake in the Folly source tree.
buildInputs = [
boost
double-conversion
fast-float
gflags
glog
libevent
zlib
openssl
xz
lz4
zstd
libiberty
libunwind
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(darwinMinVersionHook "13.3")
];
propagatedBuildInputs = [
# `folly-config.cmake` pulls these in.
boost
fmt
];
nativeCheckInputs = [
ctestCheckHook
];
checkInputs = [
gtest
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
(lib.cmakeBool "BUILD_TESTS" finalAttrs.finalPackage.doCheck)
# Folly uses these instead of the standard CMake variables for some reason.
(lib.cmakeFeature "INCLUDE_INSTALL_DIR" "${placeholder "dev"}/include")
(lib.cmakeFeature "LIB_INSTALL_DIR" "${placeholder "out"}/lib")
(lib.cmakeFeature "CMAKE_INSTALL_DIR" "${placeholder "dev"}/lib/cmake/folly")
(lib.cmakeFeature "CMAKE_INSTALL_PREFIX" (placeholder "dev"))
];
env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " (
[
"-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}"
]
++ lib.optionals (stdenv.cc.isGNU && stdenv.hostPlatform.isAarch64) [
# /build/source/folly/algorithm/simd/Movemask.h:156:32: error: cannot convert '__Uint64x1_t' to '__Uint8x8_t'
"-flax-vector-conversions"
]
);
# https://github.com/facebook/folly/blob/main/folly/DiscriminatedPtr.h
# error: #error "DiscriminatedPtr is x64, arm64, ppc64 and riscv64 specific code."
doCheck =
stdenv.hostPlatform.isx86_64
|| stdenv.hostPlatform.isAarch64
|| stdenv.hostPlatform.isPower64
|| stdenv.hostPlatform.isRiscV64;
dontUseNinjaCheck = true;
patches = [
# Install the certificate files used by `libfolly_test_util` rather
# than leaving a dangling reference to the build directory in the
# `dev` outputs CMake files.
./install-test-certs.patch
# The base template for std::char_traits has been removed in LLVM 19
# https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html
./char_traits.patch
# <https://github.com/facebook/folly/issues/2171>
(fetchpatch {
name = "folly-fix-glog-0.7.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-cmake-find-glog.patch?h=folly&id=4b68f47338d4b20111e3ffa1291433120bb899f0";
hash = "sha256-QGNpS5UNEm+0PW9+agwUVILzpK9t020KXDGyP03OAwE=";
})
# Fix an upstream regression with libstdc++.
#
# See:
#
# * <https://github.com/facebook/folly/issues/2487>
# * <https://github.com/facebook/folly/commit/bdbb73e0069b4084c83b7dd9b02c3118d37e2a8d>
# * <https://github.com/facebook/folly/pull/2490>
# * <https://github.com/facebook/folly/pull/2497>
./fix-stdexcept-include.patch
# Fix a GCCincompatible use of a private trait.
#
# Per Follys own documentation:
#
# /// Under gcc, the builtin is available but does not mangle. Therefore, this
# /// trait must not be used anywhere it might be subject to mangling, such as in
# /// a return-type expression.
#
# See:
#
# * <https://github.com/facebook/folly/issues/2493>
# * <https://github.com/facebook/folly/pull/2499>
./fix-__type_pack_element.patch
];
# https://github.com/NixOS/nixpkgs/issues/144170
postPatch = ''
substituteInPlace CMake/libfolly.pc.in \
--replace-fail \
${lib.escapeShellArg "\${exec_prefix}/@LIB_INSTALL_DIR@"} \
'@CMAKE_INSTALL_FULL_LIBDIR@' \
--replace-fail \
${lib.escapeShellArg "\${prefix}/@CMAKE_INSTALL_INCLUDEDIR@"} \
'@CMAKE_INSTALL_FULL_INCLUDEDIR@'
'';
disabledTests = [
"io_async_ssl_session_test.SSLSessionTest.BasicTest"
"io_async_ssl_session_test.SSLSessionTest.NullSessionResumptionTest"
"singleton_thread_local_test.SingletonThreadLocalDeathTest.Overload"
# very strict timing constraints, will fail under load
"io_async_hh_wheel_timer_test.HHWheelTimerTest.CancelTimeout"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.DefaultTimeout"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.DeleteWheelInTimeout"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.DestroyTimeoutSet"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.FireOnce"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.GetTimeRemaining"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.IntrusivePtr"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.Level1"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.NegativeTimeout"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.ReschedTest"
"io_async_hh_wheel_timer_test.HHWheelTimerTest.SlowFast"
# In file included from /build/source/folly/lang/test/BitsTest.cpp:17:
# In member function 'constexpr bool folly::get_bit_at_fn::operator()(const Uint*, std::size_t) const [with Uint = short unsigned int]',
# inlined from 'void folly::BitsAllUintsTest_GetBitAtLE_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = short unsigned int]' at /build/source/folly/lang/test/BitsTest.cpp:640:5:
# /build/source/folly/lang/Bits.h:494:10: warning: 'in' is used uninitialized [-Wuninitialized]
"lang_bits_test.BitsAllUintsTest/*.GetBitAtLE"
]
++ lib.optionals stdenv.hostPlatform.isLinux [
"concurrency_cache_locality_test.CacheLocality.BenchmarkSysfs"
"concurrency_cache_locality_test.CacheLocality.LinuxActual"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# No idea why these fail.
"logging_xlog_test.XlogTest.perFileCategoryHandling"
"futures_future_test.Future.makeFutureFromMoveOnlyException"
];
passthru = {
inherit boost fmt;
updateScript = nix-update-script { };
tests = {
inherit watchman;
inherit (python3.pkgs) django pywatchman;
};
};
meta = {
description = "Open-source C++ library developed and used at Facebook";
homepage = "https://github.com/facebook/folly";
license = lib.licenses.asl20;
# 32bit is not supported: https://github.com/facebook/folly/issues/103
platforms = lib.platforms.unix;
badPlatforms = [ lib.systems.inspect.patterns.is32bit ];
maintainers = with lib.maintainers; [
pierreis
emily
techknowlogick
];
};
})

View File

@@ -0,0 +1,124 @@
{
electron,
fetchFromGitHub,
imagemagick,
lib,
makeDesktopItem,
makeWrapper,
nodejs,
pnpm_10,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "folo";
version = "0.6.3";
src = fetchFromGitHub {
owner = "RSSNext";
repo = "Folo";
tag = "v${version}";
hash = "sha256-huVk5KcsepDwtdWMm9pvn31GE1felbH1pR3mGqlSWRs=";
};
nativeBuildInputs = [
nodejs
pnpm_10.configHook
makeWrapper
imagemagick
];
pnpmDeps = pnpm_10.fetchDeps {
inherit pname version src;
fetcherVersion = 1;
hash = "sha256-6I10NSmTDd/wmL/HfAgLH+G2MDfuPmrTePNDDy08nRA=";
};
env = {
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
# This environment variables inject the production Vite config at build time.
# Copy from:
# 1. https://github.com/RSSNext/Folo/blob/v0.4.6/.github/workflows/build-desktop.yml#L27
# 2. And logs in the corresponding GitHub Actions: https://github.com/RSSNext/Folo/actions/workflows/build-desktop.yml
VITE_WEB_URL = "https://app.follow.is";
VITE_API_URL = "https://api.follow.is";
VITE_SENTRY_DSN = "https://e5bccf7428aa4e881ed5cb713fdff181@o4507542488023040.ingest.us.sentry.io/4507570439979008";
VITE_OPENPANEL_CLIENT_ID = "0e477ab4-d92d-4d6e-b889-b09d86ab908e";
VITE_OPENPANEL_API_URL = "https://openpanel.follow.is/api";
VITE_FIREBASE_CONFIG = builtins.toJSON {
apiKey = "AIzaSyDuM93019tp8VI7wsszJv8ChOs7b1EE5Hk";
authDomain = "follow-428106.firebaseapp.com";
projectId = "follow-428106";
storageBucket = "follow-428106.appspot.com";
messagingSenderId = "194977404578";
appId = "1:194977404578:web:1920bb0c9ea5e2373669fb";
measurementId = "G-SJE57D4F14";
};
};
dontCheckForBrokenSymlinks = true;
desktopItem = makeDesktopItem {
name = "folo";
desktopName = "Folo";
comment = "Next generation information browser";
icon = "follow";
exec = "follow";
categories = [ "Utility" ];
mimeTypes = [ "x-scheme-handler/follow" ];
};
icon = src + "/apps/desktop/resources/icon.png";
buildPhase = ''
runHook preBuild
pnpm run build:packages
# Build desktop app.
cd apps/desktop
pnpm --offline --no-inline-css build:electron-vite
cd ../..
# Remove dev dependencies.
CI=true pnpm --ignore-scripts prune --prod
# Clean up broken symlinks left behind by `pnpm prune`
find node_modules/.bin -xtype l -delete
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/{applications,follow}
cp -r . $out/share/follow
rm -rf $out/share/follow/{.vscode,.github}
makeWrapper "${electron}/bin/electron" "$out/bin/follow" \
--inherit-argv0 \
--add-flags $out/share/follow/apps/desktop \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
install -m 444 -D "${desktopItem}/share/applications/"* \
-t $out/share/applications/
for size in 16 24 32 48 64 128 256 512; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
convert -background none -resize "$size"x"$size" ${icon} $out/share/icons/hicolor/"$size"x"$size"/apps/follow.png
done
runHook postInstall
'';
meta = {
description = "Next generation information browser";
homepage = "https://github.com/RSSNext/Folo";
changelog = "https://github.com/RSSNext/Folo/releases/tag/${src.tag}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ iosmanthus ];
platforms = [ "x86_64-linux" ];
mainProgram = "follow";
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
bison,
cmake,
flex,
pkg-config,
readline,
zlib,
}:
stdenv.mkDerivation rec {
pname = "foma";
version = "0.10.0alpha-unstable-2024-03-13";
src = fetchFromGitHub {
owner = "mhulden";
repo = "foma";
rev = "e0d8122bda4bbd56f18510bdfe840617f9736ae7";
hash = "sha256-UbwuHTilKWo4sVD3igcSlTqH78N6JQFvRD35QwfoX10=";
};
sourceRoot = "${src.name}/foma";
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
bison
cmake
flex
pkg-config
];
buildInputs = [
readline
zlib
];
cmakeFlags = [
# the cmake package does not handle absolute CMAKE_INSTALL_XXXDIR
# correctly (setting it to an absolute path causes include files to go to
# $out/$out/include, because the absolute path is interpreted with root at
# $out).
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
];
meta = with lib; {
description = "Multi-purpose finite-state toolkit designed for applications ranging from natural language processing to research in automata theory";
homepage = "https://github.com/mhulden/foma";
license = licenses.asl20;
maintainers = [ maintainers.tckmn ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitLab,
fetchpatch2,
lv2,
lv2lint,
pkg-config,
meson,
ninja,
}:
stdenv.mkDerivation rec {
pname = "fomp";
version = "1.2.4";
src = fetchFromGitLab {
owner = "drobilla";
repo = "fomp";
tag = "v${version}";
hash = "sha256-8rkAV+RJS9vQV+9+swclAP0QBjBDT2tKeLWHxwpUrlk=";
};
patches = [
(fetchpatch2 {
url = "https://gitlab.com/drobilla/fomp/-/commit/f8e4e1e0b1abe3afd2ea17b13795bbe871fccece.patch";
hash = "sha256-uJpUwTEBOp0Zo7zKT9jekhtkg9okUvGTavLIQmNKutU=";
})
];
nativeBuildInputs = [
pkg-config
meson
ninja
lv2lint
];
buildInputs = [
lv2
];
strictDeps = true;
meta = with lib; {
homepage = "https://drobilla.net/software/fomp.html";
description = "LV2 port of the MCP, VCO, FIL, and WAH plugins by Fons Adriaensen";
license = licenses.gpl2Plus;
maintainers = [ maintainers.magnetophon ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
pantheon,
vala,
pkg-config,
meson,
ninja,
python3,
glib,
gsettings-desktop-schemas,
gtk3,
libgee,
libhandy,
libsoup_2_4,
json-glib,
glib-networking,
desktop-file-utils,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "fondo";
version = "1.6.1";
src = fetchFromGitHub {
owner = "calo001";
repo = "fondo";
rev = version;
sha256 = "sha256-JiDbkVs+EZRWRohSiuh8xFFgEhbnMYZfnZtz5Z4Wdb0=";
};
nativeBuildInputs = [
desktop-file-utils
meson
ninja
pkg-config
python3
vala
wrapGAppsHook3
];
buildInputs = [
glib
glib-networking
gsettings-desktop-schemas
gtk3
json-glib
libgee
libhandy
libsoup_2_4
pantheon.granite
];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://github.com/calo001/fondo";
description = "Find the most beautiful wallpapers for your desktop";
license = licenses.agpl3Plus;
teams = [ teams.pantheon ];
platforms = platforms.linux;
mainProgram = "com.github.calo001.fondo";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
version = "060102";
pname = "fondu";
src = fetchurl {
url = "http://fondu.sourceforge.net/fondu_src-${version}.tgz";
sha256 = "152prqad9jszjmm4wwqrq83zk13ypsz09n02nrk1gg0fcxfm7fr2";
};
postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace Makefile --replace /System/Library/Frameworks/CoreServices.framework/CoreServices "-framework CoreServices"
'';
makeFlags = [ "DESTDIR=$(out)" ];
hardeningDisable = [ "fortify" ];
meta = {
platforms = lib.platforms.unix;
license = lib.licenses.gpl3;
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
font-util,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-100dpi";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-100dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-tnr/RF4FYyjVP5cy05iE9V3Y0wP8Ja89u6M6i6NanM8=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
font-util
mkfontscale
];
buildInputs = [ font-util ];
configureFlags = [ "--with-fontrootdir=$(out)/share/fonts/X11" ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Adobe 100dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/adobe-100dpi";
license = lib.licenses.hpndSellVariant; # plus a trademark that doesn't change the license
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
font-util,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-75dpi";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-75dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-EoGmLb7e0WnklcrhpbSH4fM28rTZcdkpEcWcEDmZuRE=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
font-util
mkfontscale
];
buildInputs = [ font-util ];
configureFlags = [ "--with-fontrootdir=$(out)/share/fonts/X11" ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Adobe 75dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/adobe-75dpi";
license = lib.licenses.hpndSellVariant; # plus a trademark that doesn't change the license
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
font-util,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-utopia-100dpi";
version = "1.0.5";
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-utopia-100dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-+4TsKXqQaXNUjKWbfG2uqtISRL7F0/sefJPfXvQ7Aks=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
font-util
mkfontscale
];
buildInputs = [ font-util ];
configureFlags = [ "--with-fontrootdir=$(out)/share/fonts/X11" ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Adobe Utopia 100dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/adobe-utopia-100dpi";
license = lib.licenses.adobeUtopia;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
font-util,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-utopia-75dpi";
version = "1.0.5";
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-utopia-75dpi-${finalAttrs.version}.tar.xz";
hash = "sha256-pyYkWTLQck+gxTjJkoEdY9WX5fU5KPQEjpyvViN5d2A=";
};
strictDeps = true;
nativeBuildInputs = [
pkg-config
bdftopcf
font-util
mkfontscale
];
buildInputs = [ font-util ];
configureFlags = [ "--with-fontrootdir=$(out)/share/fonts/X11" ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Adobe Utopia 75dpi pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/adobe-utopia-75dpi";
license = lib.licenses.adobeUtopia;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-adobe-utopia-type1";
version = "1.0.5";
src = fetchurl {
url = "mirror://xorg/individual/font/font-adobe-utopia-type1-${finalAttrs.version}.tar.xz";
hash = "sha256-TLKAvEdpOwfF4A/Q5a1XIaq+vAVIw/BndOXMPLz3Vpc=";
};
strictDeps = true;
nativeBuildInputs = [ mkfontscale ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Adobe Utopia PostScript Type 1 fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/adobe-utopia-type1";
license = lib.licenses.adobeUtopia;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchFromGitLab,
gitUpdater,
autoreconfHook,
font-util,
util-macros,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-alias";
version = "1.0.5";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
group = "xorg";
owner = "font";
repo = "alias";
tag = "font-alias-${finalAttrs.version}";
hash = "sha256-qglRNSt/PgFprpsvOVCeLMA+YagJw8DZMAfFdZ0m0/s=";
};
nativeBuildInputs = [
autoreconfHook
font-util
util-macros
];
passthru = {
updateScript = gitUpdater {
rev-prefix = "font-alias-";
};
};
meta = {
description = "Common aliases for Xorg fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/alias";
license = with lib.licenses; [
cronyx
mit
];
maintainers = [ ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-bh-ttf";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-bh-ttf-${finalAttrs.version}.tar.xz";
hash = "sha256-haX5DQDEjCsG/RJeqK28i47pdCnjB1CByHEJJu/sOlY=";
};
strictDeps = true;
nativeBuildInputs = [ mkfontscale ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Luxi TrueType fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/bh-ttf";
license = lib.licenses.unfreeRedistributable;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-bh-type1";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-bh-type1-${finalAttrs.version}.tar.xz";
hash = "sha256-Gd7D7Aar3mvt0QCUV56Si+Dw/DvbT76T9MaczkBtcqY=";
};
strictDeps = true;
nativeBuildInputs = [ mkfontscale ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Luxi PostScript Type 1 fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/bh-type1";
license = lib.licenses.unfreeRedistributable;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,48 @@
{
stdenv,
lib,
fetchFromGitHub,
pkg-config,
gtk3,
xsettingsd,
}:
stdenv.mkDerivation rec {
pname = "font-config-info";
version = "1.0.0";
src = fetchFromGitHub {
owner = "derat";
repo = "font-config-info";
rev = "v${version}";
sha256 = "14z7hg9c7q8wliyqv68kp080mmk2rh6kpww6pn87hy7lwq20l2b7";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
gtk3
xsettingsd
];
postPatch = ''
substituteInPlace font-config-info.c --replace "dump_xsettings |" "${xsettingsd}/bin/dump_xsettings |"
'';
installPhase = ''
runHook preInstall
install -D -t $out/bin font-config-info
runHook postInstall
'';
meta = with lib; {
description = "Prints a Linux system's font configuration";
homepage = "https://github.com/derat/font-config-info";
license = with licenses; [ bsd3 ];
platforms = platforms.unix;
maintainers = with maintainers; [ romildo ];
mainProgram = "font-config-info";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-encodings";
version = "1.1.0";
src = fetchurl {
url = "mirror://xorg/individual/font/encodings-${finalAttrs.version}.tar.xz";
hash = "sha256-n/E8YhdWz6EulfMrpIpbI4Oej1d9AEi+2mbGfatN6XU=";
};
strictDeps = true;
nativeBuildInputs = [ mkfontscale ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname encodings \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Font encoding tables for libfontenc";
homepage = "https://gitlab.freedesktop.org/xorg/font/encodings";
license = lib.licenses.publicDomain;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,107 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
meson,
ninja,
gettext,
python3,
pkg-config,
libxml2,
json-glib,
sqlite,
itstool,
yelp-tools,
vala,
gsettings-desktop-schemas,
gtk4,
adwaita-icon-theme,
libarchive,
desktop-file-utils,
nix-update-script,
wrapGAppsHook4,
gobject-introspection,
# withWebkit enables the "webkit" feature, also known as Google Fonts
withWebkit ? true,
glib-networking,
libsoup_3,
webkitgtk_6_0,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-manager";
version = "0.9.4";
src = fetchFromGitHub {
owner = "FontManager";
repo = "font-manager";
tag = finalAttrs.version;
hash = "sha256-hggRvwMy/D2jc98CQPc7GChTV9+zYbYHPMENf/8Uq9s=";
};
patches = [
# TODO: drop this patch when updating beyond version 0.9.4
(fetchpatch {
name = "fix-reproducible-build-issue.patch";
url = "https://github.com/FontManager/font-manager/commit/cc0c148d90741e39615e3380d283f684a052dd94.patch";
hash = "sha256-bRn+jVjBu6ZqmQCErgcqxv6OyFa4hkPYB5bvK7rEibA=";
})
];
nativeBuildInputs = [
pkg-config
meson
ninja
gettext
python3
itstool
desktop-file-utils
vala
yelp-tools
wrapGAppsHook4
# For https://github.com/FontManager/master/blob/master/lib/unicode/meson.build
gobject-introspection
];
buildInputs = [
libxml2
json-glib
sqlite
gsettings-desktop-schemas # for font settings
gtk4
adwaita-icon-theme
libarchive
]
++ lib.optionals withWebkit [
glib-networking # for SSL so that Google Fonts can load
libsoup_3
webkitgtk_6_0
];
mesonFlags = [
"-Dreproducible=true" # Do not hardcode build directory…
(lib.mesonBool "webkit" withWebkit)
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
homepage = "https://fontmanager.github.io/";
changelog = "https://github.com/FontManager/font-manager/raw/refs/tags/${finalAttrs.version}/CHANGELOG";
description = "Simple font management for GTK desktop environments";
mainProgram = "font-manager";
longDescription = ''
Font Manager is intended to provide a way for average users to
easily manage desktop fonts, without having to resort to command
line tools or editing configuration files by hand. While designed
primarily with the Gnome Desktop Environment in mind, it should
work well with other GTK desktop environments.
Font Manager is NOT a professional-grade font management solution.
'';
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};
})

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchurl,
bdftopcf,
mkfontscale,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-mutt-misc";
version = "1.0.4";
src = fetchurl {
url = "mirror://xorg/individual/font/font-mutt-misc-${finalAttrs.version}.tar.xz";
hash = "sha256-sSNZ9OEsI7z8tEi5GCl+l1+pG+9Sk9iNPCU0PMdouyQ=";
};
strictDeps = true;
nativeBuildInputs = [
bdftopcf
mkfontscale
];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/font/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "ClearU pcf fonts";
homepage = "https://gitlab.freedesktop.org/xorg/font/mutt-misc";
license = lib.licenses.mit;
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitLab,
testers,
gitUpdater,
autoreconfHook,
util-macros,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "font-util";
version = "1.4.1";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
group = "xorg";
owner = "font";
repo = "util";
tag = "font-util-${finalAttrs.version}";
hash = "sha256-cv6Whex1s4+J7Ue4IOHdO9WtrarTgSpLEghWpbUl+0o=";
};
nativeBuildInputs = [
autoreconfHook
util-macros
];
passthru = {
updateScript = gitUpdater {
rev-prefix = "font-util-";
ignoredVersions = "1_0_1";
};
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
meta = {
description = "X.Org font package creation/installation utilities";
homepage = "https://gitlab.freedesktop.org/xorg/font/util";
license = with lib.licenses; [
mit
bsd2
bsdSourceCode
mitOpenGroup
# there is a bit of a diff, but i think its close enough
# it was probably just adapted a bit to fit to the repository structure
# or its an older version that the one on spdx
unicodeTOU
];
maintainers = [ ];
pkgConfigModules = [ "fontutil" ];
platforms = lib.platforms.unix;
};
})

3145
pkgs/by-name/fo/fontc/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "fontc";
version = "0.3.0";
src = fetchFromGitHub {
owner = "googlefonts";
repo = "fontc";
tag = "fontc-v${version}";
hash = "sha256-Zr2nJRNY1vLGhVOGC3KSWbd4cQReO/F8Wgzx3y/qPFc=";
};
buildAndTestSubdir = "fontc";
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"tidy-sys-0.8.2" = "sha256-Okt+mqakdwm0OlD4UXBtQIbO+Wmlk6jTMWi9Q5Y1M2o=";
};
};
meta = {
description = "Wherein we pursue oxidizing fontmake";
homepage = "https://github.com/googlefonts/fontc";
changelog = "https://github.com/googlefonts/fontc/releases/tag/${src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ shiphan ];
mainProgram = "fontc";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitHub,
cargo,
pkg-config,
rustPlatform,
rustc,
wrapGAppsHook3,
gdk-pixbuf,
gtk3,
libsoup_3,
webkitgtk_4_1,
}:
stdenv.mkDerivation rec {
pname = "fontfinder";
version = "2.1.0";
src = fetchFromGitHub {
owner = "mmstick";
repo = "fontfinder";
rev = version;
hash = "sha256-C4KqEdqToVnPXFPWvNkl/md9L2W4NxRd5jvZ4E7CtfA=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-g6PRGHrkHA0JTekKaQs+8mtyOCj99m0zPbgP8AnP7GU=";
};
nativeBuildInputs = [
cargo
pkg-config
rustPlatform.cargoSetupHook
rustc
wrapGAppsHook3
];
buildInputs = [
gdk-pixbuf
gtk3
libsoup_3
webkitgtk_4_1
];
makeFlags = [
"prefix=$(out)"
];
meta = with lib; {
description = "GTK application for browsing and installing fonts from Google's font archive";
homepage = "https://github.com/mmstick/fontfinder";
changelog = "https://github.com/mmstick/fontfinder/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "fontfinder-gtk";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
rustPlatform,
fetchFromGitHub,
cmake,
pkg-config,
expat,
fontconfig,
freetype,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "fontfor";
version = "0.4.3";
src = fetchFromGitHub {
owner = "7sDream";
repo = "fontfor";
rev = "v${version}";
hash = "sha256-gJl9SPL/KeYFzKIjwWPVR1iVy6h/W7OP7xE7krhYaY8=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
expat
fontconfig
freetype
];
cargoHash = "sha256-TOoNfGYQTr5UZeyasslJU9GRIAnH3p2a9UIFz8IJv7A=";
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Find fonts which can show a specified character and preview them in browser";
homepage = "https://github.com/7sDream/fontfor";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ shamilton ];
platforms = platforms.linux;
mainProgram = "fontfor";
};
}

View File

@@ -0,0 +1 @@
{ fontforge }: fontforge.override { withExtras = true; }

View File

@@ -0,0 +1,6 @@
{ fontforge }:
fontforge.override {
withSpiro = true;
withGTK = true;
}

View File

@@ -0,0 +1,144 @@
{
stdenv,
fetchFromGitHub,
lib,
fetchpatch,
replaceVars,
cmake,
pkg-config,
python3,
freetype,
zlib,
glib,
giflib,
libpng,
libjpeg,
libtiff,
libxml2,
cairo,
pango,
readline,
woff2,
zeromq,
withSpiro ? false,
libspiro,
withGTK ? false,
gtk3,
withGUI ? withGTK,
withPython ? true,
withExtras ? true,
}:
assert withGTK -> withGUI;
let
py = python3.withPackages (ps: with ps; [ setuptools ]);
in
stdenv.mkDerivation rec {
pname = "fontforge";
version = "20230101";
src = fetchFromGitHub {
owner = "fontforge";
repo = "fontforge";
rev = version;
sha256 = "sha256-/RYhvL+Z4n4hJ8dmm+jbA1Ful23ni2DbCRZC5A3+pP0=";
};
patches = [
(fetchpatch {
name = "CVE-2024-25081.CVE-2024-25082.patch";
url = "https://github.com/fontforge/fontforge/commit/216eb14b558df344b206bf82e2bdaf03a1f2f429.patch";
hash = "sha256-aRnir09FSQMT50keoB7z6AyhWAVBxjSQsTRvBzeBuHU=";
})
# Replace distutils use in the build script
(fetchpatch {
name = "replace-distutils.patch";
url = "https://github.com/fontforge/fontforge/commit/8c75293e924602ed09a9481b0eeb67ba6c623a81.patch";
includes = [ "pyhook/CMakeLists.txt" ];
hash = "sha256-3CEwC8vygmCztKRmeD45aZIqyoj8yk5CLwxX2SGP7z4=";
})
# Fixes translation compatibility with gettext 0.22
(fetchpatch {
name = "update-translation-compatibility.patch";
url = "https://github.com/fontforge/fontforge/commit/642d8a3db6d4bc0e70b429622fdf01ecb09c4c10.patch";
hash = "sha256-uO9uEhB64hkVa6O2tJKE8BLFR96m27d8NEN9UikNcvg=";
})
# Updates to new Python initialization API
(fetchpatch {
name = "modern-python-initialization-api.patch";
url = "https://github.com/fontforge/fontforge/commit/2f2ba54c15c5565acbde04eb6608868cbc871e01.patch";
hash = "sha256-qF4DqFpiZDbULi9+POPM73HF6pEot8BAFSVaVCNQrMU=";
})
# Provide a Nix-controlled location for the initial `sys.path` entry.
(replaceVars ./set-python-sys-path.patch { python = "${py}/${py.sitePackages}"; })
];
# use $SOURCE_DATE_EPOCH instead of non-deterministic timestamps
postPatch = ''
find . -type f -name '*.c' -exec sed -r -i 's#\btime\(&(.+)\)#if (getenv("SOURCE_DATE_EPOCH")) \1=atol(getenv("SOURCE_DATE_EPOCH")); else &#g' {} \;
sed -r -i 's#author\s*!=\s*NULL#& \&\& !getenv("SOURCE_DATE_EPOCH")#g' fontforge/cvexport.c fontforge/dumppfa.c fontforge/print.c fontforge/svg.c fontforge/splineutil2.c
sed -r -i 's#\bb.st_mtime#getenv("SOURCE_DATE_EPOCH") ? atol(getenv("SOURCE_DATE_EPOCH")) : &#g' fontforge/parsepfa.c fontforge/sfd.c fontforge/svg.c
sed -r -i 's#^\s*ttf_fftm_dump#if (!getenv("SOURCE_DATE_EPOCH")) ttf_fftm_dump#g' fontforge/tottf.c
sed -r -i 's#sprintf\(.+ author \);#if (!getenv("SOURCE_DATE_EPOCH")) &#g' fontforgeexe/fontinfo.c
'';
# do not use x87's 80-bit arithmetic, rounding errors result in very different font binaries
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isi686 "-msse2 -mfpmath=sse";
nativeBuildInputs = [
pkg-config
cmake
];
buildInputs = [
readline
woff2
zeromq
py
freetype
zlib
glib
giflib
libpng
libjpeg
libtiff
libxml2
]
++ lib.optionals withPython [ py ]
++ lib.optionals withSpiro [ libspiro ]
++ lib.optionals withGUI [
gtk3
cairo
pango
];
cmakeFlags = [
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
]
++ lib.optional (!withSpiro) "-DENABLE_LIBSPIRO=OFF"
++ lib.optional (!withGUI) "-DENABLE_GUI=OFF"
++ lib.optional (!withGTK) "-DENABLE_X11=ON"
++ lib.optional (!withPython) "-DENABLE_PYTHON_SCRIPTING=OFF"
++ lib.optional withExtras "-DENABLE_FONTFORGE_EXTRAS=ON";
preConfigure = ''
# The way $version propagates to $version of .pe-scripts (https://github.com/dejavu-fonts/dejavu-fonts/blob/358190f/scripts/generate.pe#L19)
export SOURCE_DATE_EPOCH=$(date -d ${version} +%s)
'';
meta = {
description = "Font editor";
homepage = "https://fontforge.github.io";
platforms = lib.platforms.all;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
philiptaron
ulysseszhan
];
};
}

View File

@@ -0,0 +1,21 @@
Author: Philip Taron <philip.taron@gmail.com>
Date: Sat Jan 4 12:22:38 2025 -0800
fontforge: add an initial value for `sys.path`
diff --git a/fontforge/python.c b/fontforge/python.c
index e18d77d43..2e312eeb4 100644
--- a/fontforge/python.c
+++ b/fontforge/python.c
@@ -19576,6 +19576,11 @@ void FontForge_InitializeEmbeddedPython(void) {
PyStatus status;
PyConfig_InitPythonConfig(&config);
+ status = PyConfig_SetBytesString(&config, &config.pythonpath_env, "@python@");
+ if (PyStatus_Exception(status)) {
+ fprintf(stderr, "Failed to set the Python search path: %s\n", status.err_msg);
+ }
+
status = PyConfig_SetBytesString(&config, &config.program_name,
"fontforge");
if (PyStatus_Exception(status)) {

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libsForQt5,
}:
stdenv.mkDerivation rec {
pname = "fontmatrix";
version = "0.9.100";
src = fetchFromGitHub {
owner = "fontmatrix";
repo = "fontmatrix";
rev = "v${version}";
sha256 = "sha256-DtajGhx79DiecglXHja9q/TKVq8Jl2faQdA5Ib/yT88=";
};
buildInputs = [
libsForQt5.qttools
libsForQt5.qtwebkit
];
nativeBuildInputs = [
cmake
libsForQt5.wrapQtAppsHook
];
meta = with lib; {
description = "Free/libre font explorer for Linux, Windows and Mac";
homepage = "https://github.com/fontmatrix/fontmatrix";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,59 @@
{
stdenv,
lib,
fetchFromGitHub,
makeWrapper,
xdotool,
fzf,
imagemagick,
sxiv,
getopt,
}:
stdenv.mkDerivation rec {
pname = "fontpreview";
version = "1.0.6";
src = fetchFromGitHub {
owner = "sdushantha";
repo = "fontpreview";
rev = version;
sha256 = "0g3i2k6n2yhp88rrcf0hp6ils7836db7hx73hw9qnpcbmckz0i4w";
};
nativeBuildInputs = [ makeWrapper ];
preInstall = "mkdir -p $out/bin";
installFlags = [ "PREFIX=$(out)" ];
postInstall = ''
wrapProgram $out/bin/fontpreview \
--prefix PATH : ${
lib.makeBinPath [
xdotool
fzf
imagemagick
sxiv
getopt
]
}
'';
meta = with lib; {
homepage = "https://github.com/sdushantha/fontpreview";
description = "Highly customizable and minimal font previewer written in bash";
longDescription = ''
fontpreview is a commandline tool that lets you quickly search for fonts
that are installed on your machine and preview them. The fuzzy search
feature is provided by fzf and the preview is generated with imagemagick
and then displayed using sxiv. This tool is highly customizable, almost
all of the variables in this tool can be changed using the commandline
flags or you can configure them using environment variables.
'';
license = licenses.mit;
platforms = platforms.unix;
maintainers = [ maintainers.erictapen ];
mainProgram = "fontpreview";
};
}

View File

@@ -0,0 +1,29 @@
diff --git a/PPD/Dell-1250c.ppd b/PPD/Dell-1250c.ppd
index 828ecd6..98f49e1 100644
--- a/PPD/Dell-1250c.ppd
+++ b/PPD/Dell-1250c.ppd
@@ -92,15 +92,15 @@
*FoomaticRIPOptionSetting Quality=normal: " "
*CloseUI: *Quality
-*OpenUI *ColorMode/Color Mode: PickOne
-*FoomaticRIPOption ColorMode: enum CmdLine A
-*OrderDependency: 120 AnySetup *ColorMode
-*DefaultColorMode: Monochrome
-*ColorMode Color/Color: "%% FoomaticRIPOptionSetting: ColorMode=Color"
-*FoomaticRIPOptionSetting ColorMode=Color: "-c "
-*ColorMode Monochrome/Monochrome: "%% FoomaticRIPOptionSetting: ColorMode=Monochrome"
-*FoomaticRIPOptionSetting ColorMode=Monochrome: " "
-*CloseUI: *ColorMode
+*OpenUI *ColorModel/Color Mode: PickOne
+*FoomaticRIPOption ColorModel: enum CmdLine A
+*OrderDependency: 120 AnySetup *ColorModel
+*DefaultColorModel: RGB
+*ColorModel RGB/Color: "%% FoomaticRIPOptionSetting: ColorMode=Color"
+*FoomaticRIPOptionSetting ColorModel=RGB: "-c "
+*ColorModel Gray/Monochrome: "%% FoomaticRIPOptionSetting: ColorMode=Monochrome"
+*FoomaticRIPOptionSetting ColorModel=Gray: " "
+*CloseUI: *ColorModel
*OpenUI *PageSize/Page Size: PickOne
*FoomaticRIPOption PageSize: enum CmdLine A

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,98 @@
#
#
# patch "hplj1000"
# from [d5336e74866d31735d97874191351a0dcc092b44]
# to [55102b37684ee5181674d19d866caec2cf603412]
#
============================================================
--- a/hplj1000 d5336e74866d31735d97874191351a0dcc092b44
+++ b/hplj1000 55102b37684ee5181674d19d866caec2cf603412
@@ -39,11 +39,6 @@ DEV=""
DEV=""
#
-# Directory to find downloadable HP firmware files sihpMMMM.dl
-#
-FWDIR=/usr/share/foo2zjs/firmware
-
-#
# Program used to determine USB printer id information
#
# NOTE: /usr/bin is NOT mounted at this point
@@ -83,57 +78,61 @@ case "$0" in
MODEL=P1005; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x3d17 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ DRIVER=foo2xqx
;;
*P1006)
MODEL=P1006; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x3e17 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ DRIVER=foo2xqx
;;
*P1007)
MODEL=P1007; FWMODEL=P1005 # Alias
USB1=0x03f0 #Vendor
USB2=0x4817 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ DRIVER=foo2xqx
;;
*P1008)
MODEL=P1008; FWMODEL=P1006 # Alias
USB1=0x03f0 #Vendor
USB2=0x4917 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ DRIVER=foo2xqx
;;
*P1505)
MODEL=P1505; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x3f17 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ DRIVER=foo2xqx
;;
*P1505n)
MODEL=P1505n; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x4017 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ DRIVER=foo2xqx
;;
*1000)
MODEL=1000; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x0517 #Model
+ DRIVER=foo2zjs
;;
*1005)
MODEL=1005; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x1317 #Model
+ DRIVER=foo2zjs
;;
*1018)
MODEL=1018; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x4117 #Model
+ DRIVER=foo2zjs
;;
*1020)
MODEL=1020; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x2b17 #Model
+ DRIVER=foo2zjs
;;
*)
log "Only HP LaserJet 100[05],1018,1020,P100[5678],P1505 are supported"
@@ -203,7 +202,7 @@ load1() {
#
load1() {
_dev="$1"
- fw="$FWDIR/sihp$FWMODEL.dl"
+ fw="${FOO2ZJS_DATADIR:-/usr/share}/$DRIVER/firmware/sihp$FWMODEL.dl"
if [ ! -f "$fw" ]; then
log "Missing HP LaserJet $MODEL firmware file $fw"
log "...read foo2zjs installation instructions and run ./getweb $MODEL"

View File

@@ -0,0 +1,97 @@
{
lib,
stdenv,
fetchurl,
foomatic-filters,
bc,
ghostscript,
systemd,
udevCheckHook,
vim,
time,
}:
stdenv.mkDerivation rec {
pname = "foo2zjs";
version = "20210116";
src = fetchurl {
url = "http://www.loegria.net/mirrors/foo2zjs/foo2zjs-${version}.tar.gz";
sha256 = "14x3wizvncdy0xgvmcx541qanwb7bg76abygqy17bxycn1zh5r1x";
};
nativeBuildInputs = [
bc
foomatic-filters
ghostscript
vim
udevCheckHook
];
buildInputs = [
systemd
];
patches = [
./no-hardcode-fw.diff
# Support HBPL1 printers. Updated patch based on
# https://www.dechifro.org/hbpl/
./hbpl1.patch
# Fix "Unimplemented paper code" error for hbpl1 printers
# https://github.com/mikerr/foo2zjs/pull/2
./papercode-format-fix.patch
# Fix AirPrint color printing for Dell 1250c
# See https://github.com/OpenPrinting/cups/issues/272
./dell1250c-color-fix.patch
];
makeFlags = [
"PREFIX=$(out)"
"APPL=$(out)/share/applications"
"PIXMAPS=$(out)/share/pixmaps"
"UDEVBIN=$(out)/bin"
"UDEVDIR=$(out)/etc/udev/rules.d"
"UDEVD=${systemd}/sbin/udevd"
"LIBUDEVDIR=$(out)/lib/udev/rules.d"
"USBDIR=$(out)/etc/hotplug/usb"
"FOODB=$(out)/share/foomatic/db/source"
"MODEL=$(out)/share/cups/model"
];
installFlags = [ "install-hotplug" ];
postPatch = ''
touch all-test
sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
sed -e "s@PREFIX=/usr@PREFIX=$out@" -i *-wrapper{,.in}
sed -e "s@/usr/share@$out/share@" -i hplj10xx_gui.tcl
sed -e "s@\[.*-x.*/usr/bin/logger.*\]@type logger >/dev/null 2>\&1@" -i *wrapper{,.in}
sed -e '/install-usermap/d' -i Makefile
sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
sed -e "s@/usr@$out@g" -i hplj1020.desktop
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
'';
nativeCheckInputs = [ time ];
doCheck = false; # fails to find its own binary. Also says "Tests will pass only if you are using ghostscript-8.71-16.fc14".
doInstallCheck = true;
preInstall = ''
mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver}
mkdir -pv $out/share/cups/model
mkdir -pv $out/share/{applications,pixmaps}
mkdir -pv "$out/bin"
cp -v getweb arm2hpdl "$out/bin"
'';
meta = with lib; {
description = "ZjStream printer drivers";
maintainers = with maintainers; [
raskin
];
platforms = platforms.linux;
license = licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,101 @@
From 29ac95ac76a9d9977561cef352f8b803579fea2a Mon Sep 17 00:00:00 2001
From: Shinbar <richard.shine@gmail.com>
Date: Thu, 26 Mar 2020 19:33:39 +0000
Subject: [PATCH 1/3] PPDs (e.g. Del-1660.ppd) are specifying paper sizes as
parameters e.g. -p1 which are then being picked up as an invalid paper size
In cups error_log manifesting as: foo2hbpl1-wrapper: Unimplemented paper code
1
Have amended foo2hbpl1-wrapper.in to intepret paper sizes
paper parameters are also now being interpreted.
This has fixed for a Dell 1660w printer, running on Ubuntu 18.04
---
foo2hbpl1-wrapper.in | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/foo2hbpl1-wrapper.in b/foo2hbpl1-wrapper.in
index 567e891..bb20ed5 100644
--- a/foo2hbpl1-wrapper.in
+++ b/foo2hbpl1-wrapper.in
@@ -341,20 +341,20 @@ Custom*)
# /usr/share/ghostscript/9.10/Resource/Init/gs_statd.ps
# foo2hbpl1 will provide the appropriate numeric value
-letter) DIM=5100x6600 ;;
-legal) DIM=5100x8400 ;;
-a4) DIM=4961x7016 ;;
-executive) DIM=4350x6300 ;;
-env10) DIM=2475x5700 ;;
-monarch) DIM=2325x4500 ;;
-c5) DIM=3827x5409 ;;
-envDL) DIM=2599x5197 ;;
-isob5|b5) DIM=4158x5906 ;;
-jisb5) DIM=4299x6071 ;;
-a5) DIM=3496x4961 ;;
-folio) DIM=5100x7800 ;;
-pa4) DIM=4961x6600 ;;
-archA) DIM=5400x7200 ;;
+4|letter|Letter) DIM=5100x6600 ;;
+7|legal|Legal) DIM=5100x8400 ;;
+1|a4|A4) DIM=4961x7016 ;;
+5|executive|Executive) DIM=4350x6300 ;;
+9|env10|Env10) DIM=2475x5700 ;;
+10|monarch|EnvMonarch) DIM=2325x4500 ;;
+11|c5|EnvC5) DIM=3827x5409 ;;
+12|envDL|EnvDL) DIM=2599x5197 ;;
+isob5|b5) DIM=4158x5906 ;;
+2|jisb5|B5jis) DIM=4299x6071 ;;
+a5) DIM=3496x4961 ;;
+6|folio|Folio) DIM=5100x7800 ;;
+pa4) DIM=4961x6600 ;;
+archA) DIM=5400x7200 ;;
*) error "Unimplemented paper code $PAPER";;
esac
From 289d55ded5af7d84a91b0ecf26bbea18f3cb2d9e Mon Sep 17 00:00:00 2001
From: Shinbar <richard.shine@gmail.com>
Date: Fri, 27 Mar 2020 09:19:40 +0000
Subject: [PATCH 2/3] Added A5 paper size parameter
---
foo2hbpl1-wrapper.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/foo2hbpl1-wrapper.in b/foo2hbpl1-wrapper.in
index bb20ed5..474972d 100644
--- a/foo2hbpl1-wrapper.in
+++ b/foo2hbpl1-wrapper.in
@@ -351,7 +351,7 @@ Custom*)
12|envDL|EnvDL) DIM=2599x5197 ;;
isob5|b5) DIM=4158x5906 ;;
2|jisb5|B5jis) DIM=4299x6071 ;;
-a5) DIM=3496x4961 ;;
+3|a5|A5) DIM=3496x4961 ;;
6|folio|Folio) DIM=5100x7800 ;;
pa4) DIM=4961x6600 ;;
archA) DIM=5400x7200 ;;
From 393f7a7c70bbf9fa0c39ac1504b220793670d201 Mon Sep 17 00:00:00 2001
From: Shinbar <richard.shine@gmail.com>
Date: Sun, 29 Mar 2020 10:01:31 +0100
Subject: [PATCH 3/3] Makefile now works in FreeBSD
---
osx-hotplug/Makefile | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/osx-hotplug/Makefile b/osx-hotplug/Makefile
index 4165085..a9aa06a 100644
--- a/osx-hotplug/Makefile
+++ b/osx-hotplug/Makefile
@@ -64,8 +64,5 @@ clean:
rm -f *.o *.1
uninstall:
- ( \
- echo "g/osx-hplj-hotplug/d"; \
- echo "w"; \
- ) | ex $(RC)
+ -(echo "g/osx-hplj-hotplug/d"; echo "w") | ex $(RC)
-rm -f $(BIN)/osx-hplj-hotplug

View File

@@ -0,0 +1,39 @@
{
lib,
rustPlatform,
fetchFromGitHub,
openssl,
pkg-config,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "foodfetch";
version = "0.1.1";
src = fetchFromGitHub {
owner = "noahfraiture";
repo = "foodfetch";
tag = "v${finalAttrs.version}";
hash = "sha256-TUgj3zS18lCtkyxYrG4f156YqFSCGXzfbK6b+Owacto=";
};
cargoHash = "sha256-ZPV6sDQHV+G0HxRAVlcilh4tCCQspTnxnH1aHxVP8tI=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/noahfraiture/foodfetch/releases/tag/v${finalAttrs.version}";
description = "Yet another fetch to quickly get recipes";
homepage = "https://github.com/noahfraiture/foodfetch";
license = lib.licenses.mit;
mainProgram = "foodfetch";
maintainers = with lib.maintainers; [ noahfraiture ];
};
})

View File

@@ -0,0 +1,105 @@
{
lib,
perlPackages,
fetchFromGitHub,
withCupsAccess ? false, # needed to access local cups server
cups,
cups-filters,
curl,
withSocketAccess ? false, # needed to access network printers
netcat-gnu,
withSMBAccess ? false, # needed to access SMB-connected printers
samba,
autoconf,
automake,
file,
makeWrapper,
}:
perlPackages.buildPerlPackage rec {
pname = "foomatic-db-engine";
version = "0-unstable-2024-02-10";
src = fetchFromGitHub {
# there is also a daily snapshot at the `downloadPage`,
# but it gets deleted quickly and would provoke 404 errors
owner = "OpenPrinting";
repo = "foomatic-db-engine";
rev = "a2b12271e145fe3fd34c3560d276a57e928296cb";
hash = "sha256-qM12qtGotf9C0cjO9IkmzlW9GWCkT2Um+6dU3mZm3DU=";
};
outputs = [ "out" ];
propagatedBuildInputs = [
perlPackages.Clone
perlPackages.DBI
perlPackages.XMLLibXML
];
buildInputs = [
curl
]
# provide some "cups-*" commands to `foomatic-{configure,printjob}`
# so that they can manage a local cups server (add queues, add jobs...)
++ lib.optionals withCupsAccess [
cups
cups-filters
]
# the commands `foomatic-{configure,getpjloptions}` need
# netcat if they are used to query or alter a network
# printer via AppSocket/HP JetDirect protocol
++ lib.optional withSocketAccess netcat-gnu
# `foomatic-configure` can be used to access printers that are
# shared via the SMB protocol, but it needs the `smbclient` binary
++ lib.optional withSMBAccess samba;
nativeBuildInputs = [
autoconf
automake
file
makeWrapper
];
# sed-substitute indirection is more robust against
# characters in paths that might need escaping
prePatch = ''
sed -Ei 's|^(S?BINSEARCHPATH=).+$|\1"@PATH@"|g' configure.ac
substituteInPlace configure.ac --subst-var PATH
touch Makefile.PL # `buildPerlPackage` fails unless this exists
'';
preConfigure = ''
./make_configure
'';
configureFlags = [
"--sysconfdir=${placeholder "out"}/etc"
"LIBDIR=${placeholder "out"}/share/foomatic"
"PERLPREFIX=${placeholder "out"}"
];
postFixup = ''
for bin in "${placeholder "out"}/bin"/*; do
test '!' -L "$bin" || continue # skip symlink
wrapProgram "$bin" --set PERL5LIB "$PERL5LIB"
done
'';
doCheck = false; # no tests, would fail
meta = {
changelog = "https://github.com/OpenPrinting/foomatic-db-engine/blob/${src.rev}/ChangeLog";
description = "OpenPrinting printer support database engine";
downloadPage = "https://www.openprinting.org/download/foomatic/";
homepage = "https://openprinting.github.io/projects/02-foomatic/";
license = lib.licenses.gpl2Only;
maintainers = [ lib.maintainers.yarny ];
longDescription = ''
Foomatic's database engine generates PPD files
from the data in Foomatic's XML database.
It also contains scripts to directly
generate print queues and handle jobs.
'';
};
}

View File

@@ -0,0 +1,92 @@
{
lib,
stdenv,
fetchFromGitHub,
autoconf,
automake,
perl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "foomatic-db-nonfree";
version = "0-unstable-2015-06-05";
src = fetchFromGitHub {
# there is also a daily snapshot at the `downloadPage`,
# but it gets deleted quickly and would provoke 404 errors
owner = "OpenPrinting";
repo = "foomatic-db-nonfree";
rev = "6ddae02ac89240c019f8b5026cfe70e30fd2b3db";
hash = "sha256-cRZH0CXg03FEqUJdxaNnPVXjf8+ct86PjhL59WQbw60=";
};
nativeBuildInputs = [
autoconf
automake
perl
];
# sed-substitute indirection is more robust against
# characters in paths that might need escaping
postPatch = ''
sed -Ei -e 's|^(S?BINSEARCHPATH=).+$|\1"@PATH@"|g' \
-e 's|^(DATASEARCHPATH=).+$|\1"@DATA@"|g' configure.ac
substituteInPlace configure.ac \
--subst-var PATH \
--subst-var-by DATA "${placeholder "out"}/share"
'';
preConfigure = ''
mkdir -p "${placeholder "out"}/share/foomatic/db/source"
./make_configure
'';
# make ppd files available to cups,
# use a package-specific subdirectory to avoid
# conflicts with other ppd-containing packages
postInstall = ''
if ! [[ -d "${placeholder "out"}/share/foomatic/db/source/PPD" ]]; then
echo "failed to create share/foomatic/db/source/PPD"
exit 1
fi
mkdir -p "${placeholder "out"}/share/cups/model"
ln -s "${placeholder "out"}/share/foomatic/db/source/PPD" \
"${placeholder "out"}/share/cups/model/foomatic-db-nonfree"
'';
# we might patch ppd file commands with `patchPpdFilesHook`,
# but the only command "rastertophaser6100" isn't packaged yet
# compress ppd files
postFixup = ''
echo 'compressing ppd files'
find -H "${placeholder "out"}/share/cups/model/foomatic-db-nonfree" -type f -iname '*.ppd' -print0 \
| xargs -0r -n 64 -P "$NIX_BUILD_CORES" gzip -9n
'';
meta = {
changelog = "https://github.com/OpenPrinting/foomatic-db-nonfree/blob/${finalAttrs.src.rev}/ChangeLog";
description = "OpenPrinting printer support database (unfree content)";
downloadPage = "https://www.openprinting.org/download/foomatic/";
homepage = "https://openprinting.github.io/projects/02-foomatic/";
license = lib.licenses.unfree;
maintainers = [ lib.maintainers.yarny ];
# list printer manufacturers here so people
# searching for ppd files can find this package
longDescription = ''
The collected knowledge about printers,
drivers, and driver options in XML files,
used by `foomatic-db-engine` to generate PPD files.
This is a package of PPD and Foomatic XML files
that may have restrictions that keep them
from being used on a variety of machines
for licensing and other non-technical reasons.
The XML files in this package enable `foomatic-db-ppds`
to create about 120 additional PPD files, for printer from
Dell, Genicom, Lexmark, Oce, Tektronix and Xerox.
Besides the XML files, this package contains
about 130 PPD files, for printers from
Dell, Genicom, Lexmark, Oce and Xerox.
'';
};
})

View File

@@ -0,0 +1,125 @@
{
lib,
foomatic-db,
foomatic-db-nonfree,
buildEnv,
foomatic-db-engine,
stdenv,
cups-filters,
ghostscript,
netpbm,
perl,
psutils,
patchPpdFilesHook,
withNonfreeDb ? false, # include foomatic-db-nonfree ppd files
}:
let
foomatic-db-packages = [ foomatic-db ] ++ lib.lists.optional withNonfreeDb foomatic-db-nonfree;
foomatic-db-combined = buildEnv {
name = "foomatic-db-combined";
paths = foomatic-db-packages;
pathsToLink = [ "/share/foomatic" ];
# `foomatic-db-combined` is a nativeBuildInput of `foomatic-db-ppds`.
# The setup hook defined here helps scripts in
# `foomatic-db-engine` to find the database.
postBuild = ''
mkdir -p "${placeholder "out"}"/{etc/cups,nix-support}
cat >> "${placeholder "out"}/nix-support/setup-hook" << eof
export FOOMATICDB="${placeholder "out"}/share/foomatic"
eof
'';
};
# the effective license is `free` if all database
# packages have free licenses, `unfree` otherwise
isFree = lib.trivial.pipe foomatic-db-packages [
(lib.lists.map (lib.attrsets.attrByPath [ "meta" "license" ] lib.licenses.unfree))
(lib.lists.all (lib.attrsets.attrByPath [ "free" ] true))
];
in
stdenv.mkDerivation {
pname = "foomatic-db-ppds";
# the effective version is simply the
# highest version of all database packages
version = lib.trivial.pipe foomatic-db-packages [
(lib.lists.map (lib.attrsets.getAttr "version"))
(lib.lists.sort lib.strings.versionOlder)
lib.lists.reverseList
lib.lists.head
];
buildInputs = [
cups-filters
ghostscript
netpbm
perl
psutils
];
nativeBuildInputs = [
foomatic-db-combined
foomatic-db-engine
patchPpdFilesHook
];
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p "${placeholder "out"}/share/cups/model"
foomatic-compiledb -j "$NIX_BUILD_CORES" -d "${placeholder "out"}/share/cups/model/foomatic-db-ppds"
runHook postInstall
'';
# Comments indicate the respective
# package the command is contained in.
ppdFileCommands = [
"cat"
"echo" # coreutils
"foomatic-rip" # cups-filters or foomatic-filters
"gs" # ghostscript
"pnmflip"
"pnmgamma"
"pnmnoraw" # netpbm
"perl" # perl
"psresize" # psutils
# These commands aren't packaged yet.
# ppd files using these likely won't work.
#"c2050" "c2070" "cjet" "lm1100"
#"pbm2l2030" "pbm2lwxl" "rastertophaser6100"
];
# compress ppd files
postFixup = ''
echo 'compressing ppd files'
find -H "${placeholder "out"}/share/cups/model/foomatic-db-ppds" -type f -iname '*.ppd' -print0 \
| xargs -0r -n 64 -P "$NIX_BUILD_CORES" gzip -9n
'';
meta = {
description = "OpenPrinting ppd files";
homepage = "https://openprinting.github.io/projects/02-foomatic/";
license = if isFree then lib.licenses.free else lib.licenses.unfree;
maintainers = [ lib.maintainers.yarny ];
# list printer manufacturers here so people
# searching for ppd files can find this package
longDescription = ''
All PPD files available in
OpenPrinting's Foomatic database.
This package contains about 8,800 PPD files,
for printers from
Alps, Anitech, Apollo, Apple, Avery, Brother, Canon,
Citizen, CItoh, Compaq, DEC, Dell, Dymo-CoStar, Epson,
Fujitsu, FujiXerox, Generic, Genicom, Gestetner,
Heidelberg, Hitachi, HP, IBM, Imagen, Imagistics,
InfoPrint, Infotec, Kodak, KONICAMINOLTA, Kyocera, Lanier,
Lexmark, Minolta, MinoltaQMS, Mitsubishi, NEC, NRG, Oce,
Oki, Olivetti, Panasonic, PCPI, Pentax, QMS, Raven, Ricoh,
Samsung, Savin, Seiko, Sharp, SiPix, Sony, Star, Tally,
Tektronix, TexasInstruments, Toshiba, Xante and Xerox.
'';
};
}

View File

@@ -0,0 +1,117 @@
{
lib,
stdenv,
fetchFromGitHub,
cups,
cups-filters,
ghostscript,
gnused,
perl,
autoconf,
automake,
patchPpdFilesHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "foomatic-db";
version = "0-unstable-2024-12-05";
src = fetchFromGitHub {
# there is also a daily snapshot at the `downloadPage`,
# but it gets deleted quickly and would provoke 404 errors
owner = "OpenPrinting";
repo = "foomatic-db";
rev = "9a7a08318598fea569cf073489709899c9af6143";
hash = "sha256-7vvJPhUa4oDe101Iv897LoChNIcdTa4LviLUndHxWtw=";
};
buildInputs = [
cups
cups-filters
ghostscript
gnused
perl
];
nativeBuildInputs = [
autoconf
automake
patchPpdFilesHook
perl
];
# sed-substitute indirection is more robust
# against characters in paths that might need escaping
postPatch = ''
sed -Ei -e 's|^(S?BINSEARCHPATH=).+$|\1"@PATH@"|g' \
-e 's|^(DATASEARCHPATH=).+$|\1"@DATA@"|g' configure.ac
substituteInPlace configure.ac \
--subst-var PATH \
--subst-var-by DATA "${placeholder "out"}/share"
'';
preConfigure = ''
mkdir -p "${placeholder "out"}/share/foomatic/db/source"
./make_configure
'';
# don't let the installer gzip ppd files as we would
# have to unzip them later in order to patch them
configureFlags = [ "--disable-gzip-ppds" ];
# make ppd files available to cups,
# use a package-specific subdirectory to avoid
# conflicts with other ppd-containing packages
postInstall = ''
if ! [[ -d "${placeholder "out"}/share/foomatic/db/source/PPD" ]]; then
echo "failed to create share/foomatic/db/source/PPD"
exit 1
fi
mkdir -p "${placeholder "out"}/share/cups/model"
ln -s "${placeholder "out"}/share/foomatic/db/source/PPD" \
"${placeholder "out"}/share/cups/model/foomatic-db"
'';
# Comments indicate the respective
# package the command is contained in.
ppdFileCommands = [
"cat"
"date"
"printf" # coreutils
"rastertohp" # cups
"foomatic-rip" # cups-filters or foomatic-filters
"gs" # ghostscript
"sed" # gnused
"perl" # perl
];
# compress ppd files
postFixup = ''
echo 'compressing ppd files'
find -H "${placeholder "out"}/share/cups/model/foomatic-db" -type f -iname '*.ppd' -print0 \
| xargs -0r -n 64 -P "$NIX_BUILD_CORES" gzip -9n
'';
meta = {
changelog = "https://github.com/OpenPrinting/foomatic-db/blob/${finalAttrs.src.rev}/ChangeLog";
description = "OpenPrinting printer support database (free content)";
downloadPage = "https://www.openprinting.org/download/foomatic/";
homepage = "https://openprinting.github.io/projects/02-foomatic/";
license = lib.licenses.free; # mostly GPL and MIT, see README in source dir
maintainers = [ lib.maintainers.yarny ];
# list printer manufacturers here so people
# searching for ppd files can find this package
longDescription = ''
The collected knowledge about printers,
drivers, and driver options in XML files,
used by `foomatic-db-engine` to generate PPD files.
PPD files generated from the XML files in this package
are contained in the package 'foomatic-db-ppds'.
Besides the XML files, this package contains
about 6,700 PPD files, for printers from
Brother, Canon, Epson, Gestetner, HP, InfoPrint,
Infotec, KONICA_MINOLTA, Kyocera, Lanier, Lexmark, NRG,
Oce, Oki, Ricoh, Samsung, Savin, Sharp, Toshiba and Utax.
'';
};
})

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchpatch,
fetchurl,
pkg-config,
perl,
cups,
dbus,
enscript,
}:
stdenv.mkDerivation rec {
pname = "foomatic-filters";
version = "4.0.17";
src = fetchurl {
url = "https://www.openprinting.org/download/foomatic/foomatic-filters-${version}.tar.gz";
sha256 = "1qrkgbm5jay2r7sh9qbyf0aiyrsl1mdc844hxf7fhw95a0zfbqm2";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
perl
cups
dbus
enscript
];
patches = [
(fetchpatch {
name = "CVE-2015-8327+CVE-2015-8560.patch";
url = "https://salsa.debian.org/debian/foomatic-filters/raw/a3abbef2d2f8c7e62d2fe64f64afe294563fdf8f/debian/patches/0500-r7406_also_consider_the_back_tick_as_an_illegal_shell_escape_character.patch";
sha256 = "055nwi3sjf578nk40bqsch3wx8m2h65hdih0wmxflb6l0hwkq4p4";
})
];
preConfigure = ''
substituteInPlace foomaticrip.c --replace /bin/bash ${stdenv.shell}
'';
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: foomatic_rip-options.o:/build/foomatic-filters-4.0.17/options.c:49: multiple definition of
# `cupsfilter'; foomatic_rip-foomaticrip.o:/build/foomatic-filters-4.0.17/foomaticrip.c:158: first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
installTargets = [ "install-cups" ];
installFlags = [
"CUPS_FILTERS=$(out)/lib/cups/filter"
"CUPS_BACKENDS=$(out)/lib/cups/backend"
];
meta = {
description = "Foomatic printing filters";
mainProgram = "foomatic-rip";
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,26 @@
From: =?utf-8?q?Timo_R=C3=B6hling?= <timo@gaussglocke.de>
Date: Wed, 2 Dec 2020 15:59:22 +0100
Subject: Use system doctest
Forwarded: not-needed
---
test/CMakeLists.txt | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 37359ea..f269cfb 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -8,11 +8,7 @@ target_link_libraries(foonathan_memory_profiling foonathan_memory)
target_include_directories(foonathan_memory_profiling PRIVATE
${FOONATHAN_MEMORY_SOURCE_DIR}/include/foonathan/memory)
-# Fetch doctest.
-message(STATUS "Fetching doctest")
-include(FetchContent)
-FetchContent_Declare(doctest URL https://github.com/doctest/doctest/archive/refs/tags/v2.4.12.zip)
-FetchContent_MakeAvailable(doctest)
+find_package(doctest REQUIRED)
set(tests
test_allocator.hpp

View File

@@ -0,0 +1,71 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
doctest,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "foonathan-memory";
version = "0.7-4";
src = fetchFromGitHub {
owner = "foonathan";
repo = "memory";
rev = "v${finalAttrs.version}";
hash = "sha256-qGbI7SL6lDbJzn2hkqaYw35QAyvSPxcZTb0ltDkPUSo=";
};
patches = [
# do not download doctest, use the system doctest instead
# originally from: https://sources.debian.org/data/main/f/foonathan-memory/0.7.3-2/debian/patches/0001-Use-system-doctest.patch
./0001-Use-system-doctest.patch.patch
];
outputs = [
"out"
"dev"
];
cmakeFlags = [
(lib.cmakeBool "FOONATHAN_MEMORY_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
];
nativeBuildInputs = [ cmake ];
doCheck = true;
checkInputs = [ doctest ];
# fix a circular dependency between "out" and "dev" outputs
postInstall = ''
mkdir -p $out/lib/cmake
mv $out/lib/foonathan_memory/cmake $out/lib/cmake/foonathan_memory
rmdir $out/lib/foonathan_memory
'';
meta = with lib; {
homepage = "https://memory.foonathan.net/";
changelog = "https://github.com/foonathan/memory/releases/tag/${finalAttrs.src.rev}";
description = "STL compatible C++ memory allocator library";
mainProgram = "nodesize_dbg";
longDescription = ''
The C++ STL allocator model has various flaws. For example, they are
fixed to a certain type, because they are almost necessarily required to
be templates. So you can't easily share a single allocator for multiple
types. In addition, you can only get a copy from the containers and not
the original allocator object. At least with C++11 they are allowed to be
stateful and so can be made object not instance based. But still, the
model has many flaws. Over the course of the years many solutions have
been proposed, for example EASTL. This library is another. But instead of
trying to change the STL, it works with the current implementation.
'';
license = licenses.zlib;
maintainers = with maintainers; [ panicgh ];
platforms = with platforms; unix ++ windows;
};
})

View File

@@ -0,0 +1,234 @@
{
stdenv,
lib,
fetchFromGitea,
fetchurl,
runCommand,
fcft,
freetype,
pixman,
libxkbcommon,
fontconfig,
wayland,
meson,
ninja,
ncurses,
scdoc,
tllist,
wayland-protocols,
wayland-scanner,
pkg-config,
utf8proc,
allowPgo ? !stdenv.hostPlatform.isMusl,
python3, # for PGO
# for clang stdenv check
foot,
llvmPackages,
}:
let
version = "1.24.0";
# build stimuli file for PGO build and the script to generate it
# independently of the foot's build, so we can cache the result
# and avoid unnecessary rebuilds as it can take relatively long
# to generate
#
# For every bump, make sure that the hash is still accurate.
stimulusGenerator = stdenv.mkDerivation {
name = "foot-generate-alt-random-writes";
src = fetchurl {
url = "https://codeberg.org/dnkl/foot/raw/tag/${version}/scripts/generate-alt-random-writes.py";
hash = "sha256-/KykHPqM0WQ1HO83bOrxJ88mvEAf0Ah3S8gSvKb3AJM=";
};
dontUnpack = true;
buildInputs = [ python3 ];
installPhase = ''
install -Dm755 $src $out
'';
};
stimuliFile = runCommand "pgo-stimulus-file" { } ''
${stimulusGenerator} \
--rows=67 --cols=135 \
--scroll --scroll-region \
--colors-regular --colors-bright --colors-256 --colors-rgb \
--attr-bold --attr-italic --attr-underline \
--sixel \
--seed=2305843009213693951 \
$out
'';
compilerName =
if stdenv.cc.isClang then
"clang"
else if stdenv.cc.isGNU then
"gcc"
else
"unknown";
# https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#performance-optimized-pgo
pgoCflags =
{
"clang" = "-O3 -Wno-ignored-optimization-argument";
"gcc" = "-O3";
}
."${compilerName}";
# ar with lto support
ar =
stdenv.cc.bintools.targetPrefix
+ {
"clang" = "llvm-ar";
"gcc" = "gcc-ar";
"unknown" = "ar";
}
."${compilerName}";
# PGO only makes sense if we are not cross compiling and
# using a compiler which foot's PGO build supports (clang or gcc)
doPgo = allowPgo && (stdenv.hostPlatform == stdenv.buildPlatform) && compilerName != "unknown";
terminfoDir = "${placeholder "terminfo"}/share/terminfo";
in
stdenv.mkDerivation {
pname = "foot";
inherit version;
src = fetchFromGitea {
domain = "codeberg.org";
owner = "dnkl";
repo = "foot";
tag = version;
hash = "sha256-uex2p28rKBwnqPjO1Pen1GA3a9mEnrcpIb1oIUJv/Lk=";
};
separateDebugInfo = true;
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
wayland-scanner
meson
ninja
ncurses
scdoc
pkg-config
]
++ lib.optionals (compilerName == "clang") [
stdenv.cc.cc.libllvm.out
];
buildInputs = [
tllist
wayland-protocols
fontconfig
freetype
pixman
wayland
libxkbcommon
fcft
utf8proc
];
# recommended build flags for performance optimized foot builds
# https://codeberg.org/dnkl/foot/src/branch/master/INSTALL.md#release-build
CFLAGS = if !doPgo then "-O3" else pgoCflags;
# ar with gcc plugins for lto objects
preConfigure = ''
export AR="${ar}"
'';
mesonBuildType = "release";
# See https://codeberg.org/dnkl/foot/src/tag/1.9.2/INSTALL.md#options
mesonFlags = [
# Use lto
"-Db_lto=true"
# “Build” and install terminfo db
"-Dterminfo=enabled"
# Ensure TERM=foot is used
"-Ddefault-terminfo=foot"
# Tell foot to set TERMINFO and where to install the terminfo files
"-Dcustom-terminfo-install-location=${terminfoDir}"
# Install systemd user units for foot-server
"-Dsystemd-units-dir=${placeholder "out"}/lib/systemd/user"
# Especially -Wunused-command-line-argument is a problem with clang
"-Dwerror=false"
];
# build and run binary generating PGO profiles,
# then reconfigure to build the normal foot binary utilizing PGO
preBuild =
lib.optionalString doPgo ''
meson configure -Db_pgo=generate
ninja
# make sure there is _some_ profiling data on all binaries
meson test
./footclient --version
./foot --version
./utils/xtgettcap
# generate pgo data of wayland independent code
./pgo ${stimuliFile} ${stimuliFile} ${stimuliFile}
meson configure -Db_pgo=use
''
+ lib.optionalString (doPgo && compilerName == "clang") ''
llvm-profdata merge default_*profraw --output=default.profdata
'';
# Install example themes which can be added to foot.ini via the include
# directive to a separate output to save a bit of space
postInstall = ''
moveToOutput share/foot/themes "$themes"
'';
doCheck = true;
strictDeps = true;
outputs = [
"out"
"terminfo"
"themes"
];
passthru = { inherit stimulusGenerator; };
passthru.updateScript = ./update.sh;
passthru.tests = {
clang-default-compilation = foot.override {
inherit (llvmPackages) stdenv;
};
noPgo = foot.override {
allowPgo = false;
};
# By changing name, this will get rebuilt everytime we change version,
# even if the hash stays the same. Consequently it'll fail if we introduce
# a hash mismatch when updating.
stimulus-script-is-current = stimulusGenerator.src.overrideAttrs (_: {
name = "generate-alt-random-writes-${version}.py";
});
};
meta = {
homepage = "https://codeberg.org/dnkl/foot/";
changelog = "https://codeberg.org/dnkl/foot/releases/tag/${version}";
description = "Fast, lightweight and minimalistic Wayland terminal emulator";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
sternenseemann
abbe
];
platforms = lib.platforms.linux;
mainProgram = "foot";
};
}

6
pkgs/by-name/fo/foot/update.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash
#!nix-shell -p nix-update
nix-update foot
nix-update --version=skip foot.stimulusGenerator

View File

@@ -0,0 +1,98 @@
{
lib,
stdenv,
fetchFromGitLab,
rustPlatform,
cargo,
rustc,
appstream-glib,
blueprint-compiler,
desktop-file-utils,
gettext,
glib,
gst_all_1,
gtk4,
libadwaita,
meson,
ninja,
pkg-config,
wrapGAppsHook4,
a52dec,
fdk_aac,
ffmpeg,
x264,
x265,
vo-aacenc,
svt-av1,
libmpeg2,
}:
stdenv.mkDerivation rec {
pname = "footage";
version = "1.3.2";
src = fetchFromGitLab {
owner = "adhami3310";
repo = "Footage";
rev = "refs/tags/v${version}";
hash = "sha256-VEL96JrJ5eJEoX2miiB4dqGUXizNlYWCUZkkYkh09B8=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-H8sv7faI/qbmcP7ir++/vIpN+cvRQ254rXmAvGyjdsY=";
};
nativeBuildInputs = [
cargo
rustc
appstream-glib
blueprint-compiler
desktop-file-utils
gettext
gtk4 # for gtk-update-icon-cache
glib # for glib-compile-schemas
meson
ninja
pkg-config
rustPlatform.cargoSetupHook
wrapGAppsHook4
];
buildInputs = [
glib
gtk4
libadwaita
a52dec
fdk_aac
ffmpeg
x264
x265
vo-aacenc
svt-av1
libmpeg2
]
++ (with gst_all_1; [
gst-plugins-base
gst-plugins-good
gst-plugins-rs
gst-plugins-good
gst-plugins-bad
gst-plugins-ugly
gstreamer
gst-editing-services
]);
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : "${lib.makeBinPath [ gst_all_1.gstreamer ]}"
)
'';
meta = {
description = "Video editing tool that allows you to trim, flip, rotate, and crop clips";
homepage = "https://gitlab.com/adhami3310/Footage";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ onny ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
hidapi,
udevCheckHook,
}:
stdenv.mkDerivation {
pname = "footswitch";
version = "unstable-2023-10-10";
src = fetchFromGitHub {
owner = "rgerganov";
repo = "footswitch";
rev = "b7493170ecc956ac87df2c36183253c945be2dcf";
hash = "sha256-vwjeWjIXQiFJ0o/wgEBrKP3hQi8Xa/azVS1IE/Q/MyY=";
};
nativeBuildInputs = [
pkg-config
udevCheckHook
];
buildInputs = [ hidapi ];
postPatch = ''
substituteInPlace Makefile \
--replace /usr/local $out \
--replace /usr/bin/install install \
--replace /etc/udev $out/lib/udev
'';
preInstall = ''
mkdir -p $out/bin $out/lib/udev/rules.d
'';
doInstallCheck = true;
meta = with lib; {
description = "Command line utlities for programming PCsensor and Scythe foot switches";
homepage = "https://github.com/rgerganov/footswitch";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ baloo ];
};
}

View File

@@ -0,0 +1,92 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
alsa-lib,
ffmpeg,
kdePackages,
kdsingleapplication,
pipewire,
taglib,
libebur128,
libvgm,
libsndfile,
libarchive,
libopenmpt,
game-music-emu,
SDL2,
icu,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fooyin";
version = "0.9.1";
src = fetchFromGitHub {
owner = "ludouzi";
repo = "fooyin";
tag = "v" + finalAttrs.version;
hash = "sha256-549AtdldAPFengQsVXMnZI0mVzUwgKgUKAfR0Ro3s2I=";
};
buildInputs = [
kdePackages.qcoro
kdePackages.qtbase
kdePackages.qtsvg
kdePackages.qtwayland
taglib
ffmpeg
icu
kdsingleapplication
# output plugins
alsa-lib
pipewire
SDL2
# input plugins
libebur128
libvgm
libsndfile
libarchive
libopenmpt
game-music-emu
];
nativeBuildInputs = [
cmake
pkg-config
kdePackages.qttools
kdePackages.wrapQtAppsHook
];
cmakeFlags = [
(lib.cmakeBool "BUILD_TESTING" finalAttrs.finalPackage.doCheck)
# we need INSTALL_FHS to be true as the various artifacts are otherwise just dumped in the root
# of $out and the fixupPhase cleans things up anyway
(lib.cmakeBool "INSTALL_FHS" true)
];
env.LANG = "C.UTF-8";
# Remove after next release
patches = [
(fetchpatch {
name = "multi-track-fix.patch";
url = "https://github.com/fooyin/fooyin/commit/cffe88058e96c44e563e927d8a4a903e28246020.patch";
hash = "sha256-qNAR3xHZHzI/4RCWKzBbv1mX39xs7KMo/TpaDUYvSvc=";
})
];
meta = {
description = "Customisable music player";
homepage = "https://www.fooyin.org/";
changelog = "https://github.com/fooyin/fooyin/blob/${finalAttrs.src.rev}/CHANGELOG.md";
downloadPage = "https://github.com/fooyin/fooyin";
mainProgram = "fooyin";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ peterhoeg ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,76 @@
{
lib,
fetchurl,
maven,
jre,
makeWrapper,
stripJavaArchivesHook,
}:
maven.buildMavenPackage rec {
pname = "fop";
version = "2.11";
src = fetchurl {
url = "https://dlcdn.apache.org/xmlgraphics/fop/source/fop-${version}-src.tar.gz";
hash = "sha256-uY6cUjmyuenfK3jAWvugsYa5qg8rbnvRZZ6qA/g2fZM=";
};
mvnHash = "sha256-EaOIAy0+YPrF+yGsFKKqcA4bt90bq1Z86V57P9rMatE=";
buildOffline = true;
doCheck = false;
nativeBuildInputs = [
makeWrapper
stripJavaArchivesHook
];
installPhase = ''
runHook preInstall
install -Dm644 fop*/target/*.jar -t "$out/lib"
install -Dm644 fop*/lib/*.jar -t "$out/lib"
install -Dm644 README -t "$out/share/doc/fop"
cp -r fop/examples/ "$out/share/doc/fop"
# There is a fop script in the source archive, but it has many impurities.
# Instead of patching out 90 % of the script, we write our own.
makeWrapper ${lib.getExe jre} "$out/bin/fop" \
--add-flags "-Djava.awt.headless=true" \
--add-flags "-classpath $out/lib/\*" \
--add-flags "org.apache.fop.cli.Main"
runHook postInstall
'';
meta = {
changelog = "https://xmlgraphics.apache.org/fop/changes.html";
description = "XML formatter driven by XSL Formatting Objects (XSL-FO)";
longDescription = ''
FOP is a Java application that reads a formatting object tree and then
turns it into a wide variety of output presentations (including AFP, PCL,
PDF, PNG, PostScript, RTF, TIFF, and plain text), or displays the result
on-screen.
The formatting object tree can be in the form of an XML document (output
by an XSLT engine like xalan) or can be passed in memory as a DOM
Document or (in the case of xalan) SAX events.
This package contains the fop command line tool.
'';
homepage = "https://xmlgraphics.apache.org/fop/";
license = lib.licenses.asl20;
mainProgram = "fop";
maintainers = with lib.maintainers; [
bjornfor
tomasajt
];
platforms = jre.meta.platforms;
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode # source bundles dependencies as jars
];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenvNoCC,
fetchurl,
autoPatchelfHook,
wrapGAppsHook3,
dbus-glib,
gtk3,
}:
stdenvNoCC.mkDerivation rec {
pname = "fopnu";
version = "1.68";
src = fetchurl {
url = "https://download2.fopnu.com/download/fopnu-${version}-1.x86_64.manualinstall.tar.gz";
hash = "sha256-q+nI0s4zu6+Lr8pdEyR8/zOkq5ULydYt2bntvzyalZo=";
};
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook3
];
buildInputs = [
dbus-glib
gtk3
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -D -m 0755 fopnu -t $out/bin
install -D -m 0444 fopnu.desktop -t $out/share/applications
install -D -m 0444 fopnu.png -t $out/share/icons/hicolor/48x48/apps
runHook postInstall
'';
meta = with lib; {
description = "P2P file sharing system";
homepage = "https://fopnu.com";
license = licenses.unfree;
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "fopnu";
maintainers = [ ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "forbidden";
version = "13.4";
pyproject = true;
src = fetchFromGitHub {
owner = "ivan-sincek";
repo = "forbidden";
tag = "v${version}";
hash = "sha256-eOf74JWDzYz73axY9+6bRcSfJAdHMh3H4+cuUojSU4A=";
};
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
alive-progress
bot-safe-agents
colorama
cryptography
pycurl
pyjwt
regex
requests
tabulate
termcolor
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "forbidden" ];
meta = {
description = "Tool to bypass 4xx HTTP response status code";
homepage = "https://github.com/ivan-sincek/forbidden";
changelog = "https://github.com/ivan-sincek/forbidden/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "forbidden";
};
}

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
# nativeBuildInputs
libcosmicAppHook,
just,
# buildInputs
openssl,
nix-update-script,
}:
rustPlatform.buildRustPackage {
pname = "forecast";
version = "0-unstable-2025-10-07";
src = fetchFromGitHub {
owner = "cosmic-utils";
repo = "forecast";
rev = "e384cacb53dc58656f56659409060fc16f6a2351";
hash = "sha256-BkL4B4RXcntDUjDy5UPUaxSglzcM3h3kKq5LsCtCukw=";
};
cargoHash = "sha256-aiKxgUnW711c2vhXDKVt0USTUZD6CyWB3tT6UzjqNSg=";
nativeBuildInputs = [
libcosmicAppHook
just
];
dontUseJustBuild = true;
dontUseJustCheck = true;
buildInputs = [ openssl ];
justFlags = [
"--set"
"prefix"
(placeholder "out")
"--set"
"bin-src"
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-ext-forecast"
];
passthru = {
updateScript = nix-update-script {
extraArgs = [
"--version"
"branch=HEAD"
];
};
};
meta = {
description = "Weather app written in rust and libcosmic";
homepage = "https://github.com/cosmic-utils/forecast";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
GaetanLepage
HeitorAugustoLN
];
platforms = lib.platforms.linux;
mainProgram = "cosmic-ext-forecast";
};
}

View File

@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "foreman"

View File

@@ -0,0 +1,17 @@
GEM
remote: https://rubygems.org/
specs:
foreman (0.87.2)
PLATFORMS
aarch64-darwin
aarch64-linux
ruby
x86_64-darwin
x86_64-linux
DEPENDENCIES
foreman
BUNDLED WITH
2.2.20

View File

@@ -0,0 +1,12 @@
{
foreman = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0szgxvnzwkzrfbq5dkwa98mig78aqglfy6irdsvq1gq045pbq9r7";
type = "gem";
};
version = "0.87.2";
};
}

View File

@@ -0,0 +1,20 @@
{
bundlerEnv,
lib,
ruby,
}:
bundlerEnv {
inherit ruby;
pname = "foreman";
gemdir = ./.;
meta = with lib; {
description = "Process manager for applications with multiple components";
homepage = "https://github.com/ddollar/foreman";
license = licenses.mit;
maintainers = with maintainers; [ zimbatm ];
platforms = ruby.meta.platforms;
mainProgram = "foreman";
};
}

View File

@@ -0,0 +1,32 @@
diff --git a/Makefile b/Makefile
index 1a20f4f..077acdb 100755
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-RAW_CC = gcc
+RAW_CC := $(CC)
RAW_FLAGS = -Wall -O2
LINK_OPT =
VERSION = 1.5.7
@@ -24,9 +24,9 @@ MAN_PAGES = $(NAME).8.gz
RAW_FLAGS += -DVERSION=\"$(VERSION)\"
# Where we get installed
-BIN = /usr/local/bin
-MAN = /usr/share/man/man8
-CONF= /usr/local/etc
+BIN = $(PREFIX)/bin
+MAN = $(PREFIX)/share/man/man8
+CONF= $(PREFIX)/etc
# Setup for compiling and cross-compiling for Windows
# The CR_ prefix refers to cross compiling from OSX to Windows
CR_CC = $(CR_BASE)/gcc
@@ -120,7 +120,6 @@ foremost: $(OBJ)
install: goals
install -m 755 $(NAME) $(BIN)
install -m 444 $(MAN_PAGES) $(MAN)
- install -m 444 foremost.conf $(CONF)
macinstall: BIN = /usr/local/bin/
macinstall: MAN = /usr/share/man/man1/
macinstall: CONF = /usr/local/etc/

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "foremost";
version = "1.5.7";
src = fetchurl {
sha256 = "0d2zxw0ijg8cd3ksgm8cf8jg128zr5x7z779jar90g9f47pm882h";
url = "https://foremost.sourceforge.net/pkg/${pname}-${version}.tar.gz";
};
patches = [ ./makefile.patch ];
# -fcommon: Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ "mac" ];
enableParallelBuilding = true;
hardeningDisable = [ "format" ];
preInstall = ''
mkdir -p $out/{bin,share/man/man8}
'';
meta = with lib; {
description = "Recover files based on their contents";
longDescription = ''
Foremost is a console program to recover files based on their headers,
footers, and internal data structures. Foremost can work on image files, such
as those generated by dd, Safeback, Encase, etc, or directly on a drive.
The headers and footers can be specified by a configuration file or you can
use command line switches to specify built-in file types. These built-in types
look at the data structures of a given file format allowing for a more
reliable and faster recovery.
'';
homepage = "https://foremost.sourceforge.net/";
license = licenses.publicDomain;
maintainers = [ maintainers.jiegec ];
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "foremost";
};
}

View File

@@ -0,0 +1,128 @@
diff --git a/forge-gui-desktop/pom.xml b/forge-gui-desktop/pom.xml
--- a/forge-gui-desktop/pom.xml
+++ b/forge-gui-desktop/pom.xml
@@ -71,62 +71,6 @@
</executions>
</plugin>
<plugin>
- <groupId>com.akathist.maven.plugins.launch4j</groupId>
- <artifactId>launch4j-maven-plugin</artifactId>
- <version>2.5.1</version>
- <executions>
- <execution>
- <id>l4j-gui</id>
- <phase>package</phase>
- <goals>
- <goal>launch4j</goal>
- </goals>
- <configuration>
- <headerType>gui</headerType>
- <outfile>${project.build.directory}/forge.exe</outfile>
- <jar>${project.build.finalName}-jar-with-dependencies.jar</jar>
- <dontWrapJar>true</dontWrapJar>
- <errTitle>forge</errTitle>
- <downloadUrl>https://bell-sw.com/pages/downloads/#jdk-17-lts</downloadUrl>
- <icon>src/main/config/forge.ico</icon>
- <classPath>
- <mainClass>forge.view.Main</mainClass>
- <addDependencies>false</addDependencies>
- <preCp>anything</preCp>
- </classPath>
- <jre>
- <minVersion>17</minVersion>
- <requiresJdk>true</requiresJdk>
- <maxHeapSize>4096</maxHeapSize>
- <opts>
- <opt>${mandatory.java.args}</opt>
- <opt>${addopen.java.args}</opt>
- </opts>
- </jre>
- <versionInfo>
- <fileVersion>
- ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.0
- </fileVersion>
- <txtFileVersion>
- ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.0
- </txtFileVersion>
- <fileDescription>Forge</fileDescription>
- <copyright>Forge</copyright>
- <productVersion>
- ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.0
- </productVersion>
- <txtProductVersion>
- ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.0
- </txtProductVersion>
- <productName>Forge</productName>
- <internalName>forge</internalName>
- <originalFilename>forge.exe</originalFilename>
- </versionInfo>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
diff --git a/forge-gui-mobile-dev/pom.xml b/forge-gui-mobile-dev/pom.xml
--- a/forge-gui-mobile-dev/pom.xml
+++ b/forge-gui-mobile-dev/pom.xml
@@ -61,57 +61,6 @@
</configuration>
</plugin>
<plugin>
- <groupId>com.akathist.maven.plugins.launch4j</groupId>
- <artifactId>launch4j-maven-plugin</artifactId>
- <version>2.5.1</version>
- <executions>
- <execution>
- <id>l4j-adv</id>
- <phase>package</phase>
- <goals>
- <goal>launch4j</goal>
- </goals>
- <configuration>
- <headerType>gui</headerType>
- <outfile>${project.build.directory}/forge-adventure.exe</outfile>
- <jar>${project.build.finalName}-jar-with-dependencies.jar</jar>
- <dontWrapJar>true</dontWrapJar>
- <errTitle>forge</errTitle>
- <downloadUrl>https://bell-sw.com/pages/downloads/#jdk-17-lts</downloadUrl>
- <icon>src/main/config/forge-adventure.ico</icon>
- <jre>
- <minVersion>17</minVersion>
- <requiresJdk>true</requiresJdk>
- <maxHeapSize>4096</maxHeapSize>
- <opts>
- <opt>${mandatory.java.args}</opt>
- </opts>
- </jre>
- <versionInfo>
- <fileVersion>
- 1.0.0.0
- </fileVersion>
- <txtFileVersion>
- 1.0.0.0
- </txtFileVersion>
- <fileDescription>Forge</fileDescription>
- <copyright>Forge</copyright>
- <productVersion>
- 1.0.0.0
- </productVersion>
- <txtProductVersion>
- 1.0.0.0
- </txtProductVersion>
- <productName>forge-adventure</productName>
- <internalName>forge-adventure</internalName>
- <originalFilename>forge-adventure.exe</originalFilename>
- </versionInfo>
- </configuration>
- </execution>
- <!--extra-->
- </executions>
- </plugin>
- <plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>

View File

@@ -0,0 +1,134 @@
{
coreutils,
fetchFromGitHub,
gnused,
lib,
maven,
makeWrapper,
openjdk,
libGL,
makeDesktopItem,
copyDesktopItems,
imagemagick,
nix-update-script,
}:
let
version = "2.0.05";
src = fetchFromGitHub {
owner = "Card-Forge";
repo = "forge";
rev = "forge-${version}";
hash = "sha256-71CZBI4FvN5X7peDjhv+0cdTYv8hWwzM8ePdvQSb6QI=";
};
# launch4j downloads and runs a native binary during the package phase.
patches = [ ./no-launch4j.patch ];
in
maven.buildMavenPackage {
pname = "forge-mtg";
inherit version src patches;
mvnHash = "sha256-krPOUaJTo5i3imkDvEkBJH3W01y1KypdvitqmZ5JMMA=";
doCheck = false; # Needs a running Xorg
nativeBuildInputs = [
makeWrapper
copyDesktopItems
imagemagick
];
desktopItems = [
(makeDesktopItem {
name = "forge";
exec = "forge";
actions = {
forge-adventure = {
exec = "forge-adventure";
name = "Play Adventure";
};
forge-adventure-editor = {
exec = "forge-adventure-editor";
name = "Adventure Editor";
};
forge-classic = {
exec = "forge";
name = "Play Classic";
};
};
icon = "forge-mtg";
comment = "Magic: the Gathering card game with rules enforcement";
desktopName = "Forge MTG";
genericName = "Card Game";
categories = [
"Game"
"BoardGame"
];
keywords = [
"Magic"
"MTG"
"Card Game"
"Trading Card Game"
"TCG"
];
})
];
mvnParameters = lib.escapeShellArgs [
"-pl"
":adventure-editor,:forge-gui-desktop,:forge-gui-mobile-dev" # forge-gui-mobile-dev is required for forge-adventure
"--also-make"
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/forge
cp -a \
forge-gui-desktop/target/forge.sh \
forge-gui-desktop/target/forge-gui-desktop-${version}-jar-with-dependencies.jar \
forge-gui-mobile-dev/target/forge-adventure.sh \
forge-gui-mobile-dev/target/forge-gui-mobile-dev-${version}-jar-with-dependencies.jar \
adventure-editor/target/adventure-editor-jar-with-dependencies.jar \
forge-gui/res \
$out/share/forge
cp adventure-editor/target/adventure-editor.sh $out/share/forge/forge-adventure-editor.sh
mkdir -p $out/share/icons/hicolor/128x128/apps
magick AppIcon.png -resize 128x128 $out/share/icons/hicolor/128x128/apps/forge-mtg.png
runHook postInstall
'';
preFixup = ''
for commandToInstall in forge forge-adventure forge-adventure-editor; do
chmod 555 $out/share/forge/$commandToInstall.sh
PREFIX_CMD=""
if [ "$commandToInstall" = "forge-adventure" ]; then
PREFIX_CMD="--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libGL ]}"
fi
makeWrapper $out/share/forge/$commandToInstall.sh $out/bin/$commandToInstall \
--prefix PATH : ${
lib.makeBinPath [
coreutils
openjdk
gnused
]
} \
--set JAVA_HOME ${openjdk}/lib/openjdk \
--set SENTRY_DSN "" \
$PREFIX_CMD
done
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Magic: the Gathering card game with rules enforcement";
homepage = "https://card-forge.github.io/forge";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ eigengrau ];
};
}

View File

@@ -0,0 +1,136 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p curl cacert nix-update jq gnused git
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
get_latest_version() {
local repo="$1"
curl -sfS ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} https://api.github.com/repos/$repo/releases/latest | jq -r .tag_name
}
download_and_extract_source() {
local repo="$1"
local version="$2"
local temp_dir=$(mktemp -d)
curl -sfSL "https://github.com/$repo/archive/$version.tar.gz" | tar -xz -C "$temp_dir"
echo $temp_dir
}
check_plugin_in_pom() {
local pom_file="$1"
local plugin_name="$2"
if [[ -f "$pom_file" ]]; then
grep -q "<artifactId>$plugin_name</artifactId>" "$pom_file" 2>/dev/null
else
return 1
fi
}
remove_plugin_from_pom() {
local pom_file="$1"
local plugin_name="$2"
if [[ ! -f "$pom_file" ]]; then
echo "Error: $pom_file does not exist" >&2
return 1
fi
awk -v plugin="$plugin_name" '
/<plugin>/ {
plugin_block = $0 "\n"
in_plugin = 1
skip = 0
next
}
in_plugin && /<\/plugin>/ {
plugin_block = plugin_block $0 "\n"
if (!skip) {
printf "%s", plugin_block
}
in_plugin = 0
plugin_block = ""
next
}
in_plugin {
plugin_block = plugin_block $0 "\n"
if (/<artifactId>/ && index($0, plugin) > 0) {
skip = 1
}
next
}
!in_plugin { print }
' "$pom_file" > "$pom_file.tmp" && mv "$pom_file.tmp" "$pom_file"
echo "Removed plugin blocks with artifactId '$plugin_name' from $pom_file"
}
update_patch() {
local source_dir="$1"
local plugin_name="$2"
local patch_file="$3"
if [[ ! -d "$source_dir" ]]; then
echo "Source directory $source_dir does not exist!"
exit 1
fi
local temp_dir=$(mktemp -d)
local plugin_found=false
local patch_content=""
echo "Checking for $plugin_name in pom.xml files..."
# Find all pom.xml files that contain the specified plugin
while IFS= read -r -d '' pom_file; do
if check_plugin_in_pom "$pom_file" "$plugin_name"; then
plugin_found=true
echo "Found $plugin_name in: $pom_file"
# Generate patch content for this file
local relative_path=$(echo "$pom_file" | sed "s|^$source_dir/||")
local temp_original="$temp_dir/original_$(basename "$pom_file")"
local temp_patched="$temp_dir/patched_$(basename "$pom_file")"
cp "$pom_file" "$temp_original"
cp "$pom_file" "$temp_patched"
remove_plugin_from_pom "$temp_patched" "$plugin_name"
# Generate diff for this file
if ! cmp -s "$temp_original" "$temp_patched"; then
local file_diff=$(diff -u "$temp_original" "$temp_patched" | sed "s|$temp_original|a/$relative_path|g; s|$temp_patched|b/$relative_path|g" | sed '1,2s/\t.*$//')
if [[ -n "$file_diff" ]]; then
patch_content+='diff --git a/'"$relative_path"' b/'"$relative_path"''$'\n'
patch_content+="$file_diff"$'\n'
fi
fi
fi
done < <(find "$source_dir" -name "pom.xml" -print0)
if [[ "$plugin_found" == "true" && -n "$patch_content" ]]; then
echo "Updating $patch_file..."
echo "$patch_content" > "$SCRIPT_DIR/$patch_file"
echo "Patch updated successfully!"
rm -rf "$temp_dir"
else
echo "No $plugin_name found on any pom.xml file. Patch not updated."
rm -rf "$temp_dir"
exit 1
fi
}
echo "Updating forge-mtg package..."
version=$(get_latest_version "Card-Forge/forge")
source_dir=$(download_and_extract_source "Card-Forge/forge" $version)/forge-$version
update_patch "$source_dir" "launch4j-maven-plugin" "no-launch4j.patch"
rm -rf "$(dirname "$source_dir")"
nix-update --version-regex=forge-'(.*)' forge-mtg

View File

@@ -0,0 +1,76 @@
{
lib,
blueprint-compiler,
desktop-file-utils,
fetchFromGitHub,
gjs,
glib,
glib-networking,
gtk4,
libadwaita,
libportal,
libsecret,
libsoup_3,
meson,
ninja,
nix-update-script,
pkg-config,
stdenv,
wrapGAppsHook4,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "forge-sparks";
version = "1.0.1";
src = fetchFromGitHub {
owner = "rafaelmardojai";
repo = "forge-sparks";
rev = finalAttrs.version;
hash = "sha256-4FzMhHE4601laKHYRN3NCZ7oBDH/2HaeCS9CdbmTNx0=";
fetchSubmodules = true;
};
patches = [
# XdpGtk4 is imported but not used so we remove it to avoid the dependence on libportal-gtk4
./remove-xdpgtk4-import.patch
];
postPatch = ''
patchShebangs troll/gjspack/bin/gjspack
'';
nativeBuildInputs = [
blueprint-compiler
desktop-file-utils
gjs
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
glib
glib-networking
gtk4
libadwaita
libportal
libsecret
libsoup_3
];
passthru = {
updateScript = nix-update-script { };
};
meta = {
changelog = "https://github.com/rafaelmardojai/forge-sparks/releases/tag/${finalAttrs.version}";
description = "Get Git forges notifications";
homepage = "https://github.com/rafaelmardojai/forge-sparks";
license = lib.licenses.mit;
mainProgram = "forge-sparks";
teams = [ lib.teams.gnome-circle ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,12 @@
diff --git a/src/util.js b/src/util.js
index d37e42f..9e57ad5 100644
--- a/src/util.js
+++ b/src/util.js
@@ -4,7 +4,6 @@ import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import Soup from 'gi://Soup';
import Xdp from 'gi://Xdp';
-import XdpGtk4 from 'gi://XdpGtk4';
import { gettext as _, ngettext } from 'gettext';
const Format = imports.format;

View File

@@ -0,0 +1,31 @@
diff --git a/CMakeModules/ForgeConfigureDepsVars.cmake b/CMakeModules/ForgeConfigureDepsVars.cmake
index ee5c2fc..2f75181 100644
--- a/CMakeModules/ForgeConfigureDepsVars.cmake
+++ b/CMakeModules/ForgeConfigureDepsVars.cmake
@@ -84,7 +84,7 @@ macro(fg_dep_check_and_populate dep_prefix)
URL ${fdcp_args_URI}
URL_HASH ${fdcp_args_REF}
DOWNLOAD_COMMAND \"\"
- UPDATE_DISCONNECTED ON
+ UPDATE_COMMAND \"\"
SOURCE_DIR "${Forge_SOURCE_DIR}/extern/${dep_prefix}-src"
BINARY_DIR "${Forge_BINARY_DIR}/extern/${dep_prefix}-build"
SUBBUILD_DIR "${Forge_BINARY_DIR}/extern/${dep_prefix}-subbuild"
@@ -94,7 +94,7 @@ macro(fg_dep_check_and_populate dep_prefix)
QUIET
URL ${fdcp_args_URI}
DOWNLOAD_COMMAND \"\"
- UPDATE_DISCONNECTED ON
+ UPDATE_COMMAND \"\"
SOURCE_DIR "${Forge_SOURCE_DIR}/extern/${dep_prefix}-src"
BINARY_DIR "${Forge_BINARY_DIR}/extern/${dep_prefix}-build"
SUBBUILD_DIR "${Forge_BINARY_DIR}/extern/${dep_prefix}-subbuild"
@@ -106,7 +106,7 @@ macro(fg_dep_check_and_populate dep_prefix)
GIT_REPOSITORY ${fdcp_args_URI}
GIT_TAG ${fdcp_args_REF}
DOWNLOAD_COMMAND \"\"
- UPDATE_DISCONNECTED ON
+ UPDATE_COMMAND \"\"
SOURCE_DIR "${Forge_SOURCE_DIR}/extern/${dep_prefix}-src"
BINARY_DIR "${Forge_BINARY_DIR}/extern/${dep_prefix}-build"
SUBBUILD_DIR "${Forge_BINARY_DIR}/extern/${dep_prefix}-subbuild"

View File

@@ -0,0 +1,86 @@
{
boost,
cmake,
expat,
fetchFromGitHub,
fontconfig,
freeimage,
freetype,
glfw3,
glm,
lib,
libGLU,
libGL,
libgbm,
opencl-clhpp,
pkg-config,
stdenv,
SDL2,
}:
stdenv.mkDerivation rec {
pname = "forge";
version = "1.0.8";
src = fetchFromGitHub {
owner = "arrayfire";
repo = "forge";
rev = "v1.0.8";
sha256 = "sha256-lSZAwcqAHiuZkpYcVfwvZCfNmEF3xGN9S/HuZQrGeKU=";
};
glad = fetchFromGitHub {
owner = "arrayfire";
repo = "glad";
rev = "b94680aee5b8ce01ae1644c5f2661769366c765a";
hash = "sha256-CrZy76gOGMpy9f1NuMK4tokZ57U//zYeNH5ZYY0SC2U=";
};
# This patch ensures that Forge does not try to fetch glad from GitHub and
# uses our sources that we've checked out via Nix.
patches = [ ./no-download-glad.patch ];
postPatch = ''
mkdir -p ./extern
cp -R --no-preserve=mode,ownership ${glad} ./extern/fg_glad-src
ln -s ${opencl-clhpp} ./extern/cl2hpp
'';
cmakeFlags = [ "-DFETCHCONTENT_FULLY_DISCONNECTED=ON" ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
boost.out
boost.dev
expat
fontconfig
freeimage
freetype
glfw3
glm
libGL
libGLU
opencl-clhpp
SDL2
libgbm
];
meta = with lib; {
description = "OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend";
longDescription = ''
An OpenGL interop library that can be used with ArrayFire or any other application using CUDA or OpenCL compute backend.
The goal of Forge is to provide high performance OpenGL visualizations for C/C++ applications that use CUDA/OpenCL.
Forge uses OpenGL >=3.3 forward compatible contexts, so please make sure you have capable hardware before trying it out.
'';
license = licenses.bsd3;
homepage = "https://arrayfire.com/";
platforms = platforms.linux;
maintainers = with maintainers; [
chessai
twesterhout
];
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitea,
pkg-config,
installShellFiles,
writableTmpDirAsHomeHook,
libgit2,
oniguruma,
openssl,
zlib,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "forgejo-cli";
version = "0.3.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "Cyborus";
repo = "forgejo-cli";
tag = "v${finalAttrs.version}";
hash = "sha256-8KPR7Fx26hj5glKDjczCLP6GgQBUsA5TpjhO5UZOpik=";
};
cargoHash = "sha256-kW7Pexydkosaufk1e8P5FaY+dgkeeTG5qgJxestWkVs=";
nativeBuildInputs = [
pkg-config
installShellFiles
writableTmpDirAsHomeHook # Needed for shell completions
];
buildInputs = [
libgit2
oniguruma
openssl
zlib
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
BUILD_TYPE = "nixpkgs";
};
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd fj \
--bash <($out/bin/fj completion bash) \
--fish <($out/bin/fj completion fish) \
--zsh <($out/bin/fj completion zsh)
'';
meta = {
description = "CLI application for interacting with Forgejo";
homepage = "https://codeberg.org/Cyborus/forgejo-cli";
changelog = "https://codeberg.org/Cyborus/forgejo-cli/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [
awwpotato
isabelroses
];
mainProgram = "fj";
};
})

View File

@@ -0,0 +1,106 @@
{
stdenv,
lib,
buildGoModule,
fetchFromGitea,
nixosTests,
versionCheckHook,
nix-update-script,
}:
let
# tests which assume network access in some form
disabledTests = [
"Test_runCreateRunnerFile"
"Test_ping"
# The following tests were introduced in 9.x with the inclusion of act
# the pkgs/by-name/ac/act/package.nix just sets doCheck = false;
# Requires running docker install
"TestDocker"
"TestJobExecutor"
"TestRunner"
"Test_validateCmd"
# Docker network request for image
"TestImageExistsLocally"
# Reaches out to different websites
"TestFindGitRemoteURL"
"TestGitFindRef"
"TestGitCloneExecutor"
"TestCloneIfRequired"
"TestActionCache"
"TestRunContext_GetGitHubContext"
# These tests rely on outbound IP address
"TestHandler"
"TestHandler_gcCache"
];
in
buildGoModule rec {
pname = "forgejo-runner";
version = "11.1.2";
src = fetchFromGitea {
domain = "code.forgejo.org";
owner = "forgejo";
repo = "runner";
rev = "v${version}";
hash = "sha256-/rkBrG8hRn52M1ybjbWtSDFYsJ4fHzw9qAoc5325g9A=";
};
vendorHash = "sha256-eVOmUozNLHRiNwIhbf7ebVNdRiMAtLMdYI7pnALvl8U=";
# See upstream Makefile
# https://code.forgejo.org/forgejo/runner/src/branch/main/Makefile
tags = [
"netgo"
"osusergo"
];
ldflags = [
"-s"
"-w"
"-X code.forgejo.org/forgejo/runner/v11/internal/pkg/ver.version=${src.rev}"
];
checkFlags = [
"-skip ${lib.concatStringsSep "|" disabledTests}"
];
postInstall = ''
# fix up go-specific executable naming derived from package name, upstream
# also calls it `forgejo-runner`
mv $out/bin/runner $out/bin/forgejo-runner
# provide old binary name for compatibility
ln -s $out/bin/forgejo-runner $out/bin/act_runner
'';
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
versionCheckProgramArg = "--version";
passthru = {
updateScript = nix-update-script { };
tests = lib.optionalAttrs stdenv.hostPlatform.isLinux {
sqlite3 = nixosTests.forgejo.sqlite3;
};
};
meta = with lib; {
description = "Runner for Forgejo based on act";
homepage = "https://code.forgejo.org/forgejo/runner";
changelog = "https://code.forgejo.org/forgejo/runner/releases/tag/${src.rev}";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
adamcstephens
emilylange
christoph-heiss
tebriel
];
mainProgram = "forgejo-runner";
};
}

View File

@@ -0,0 +1,207 @@
{
lts ? false,
version,
rev ? "refs/tags/v${version}",
hash,
npmDepsHash,
vendorHash,
nixUpdateExtraArgs ? [ ],
}:
{
bash,
brotli,
buildGoModule,
forgejo,
git,
gzip,
lib,
makeWrapper,
nix-update-script,
nixosTests,
openssh,
sqliteSupport ? true,
xorg,
runCommand,
stdenv,
fetchFromGitea,
buildNpmPackage,
}:
let
src = fetchFromGitea {
domain = "codeberg.org";
owner = "forgejo";
repo = "forgejo";
inherit rev hash;
};
frontend = buildNpmPackage {
pname = "forgejo-frontend";
inherit src version npmDepsHash;
buildPhase = ''
./node_modules/.bin/webpack
'';
# override npmInstallHook
installPhase = ''
mkdir $out
cp -R ./public $out/
'';
};
in
buildGoModule rec {
pname = "forgejo" + lib.optionalString lts "-lts";
inherit
version
src
vendorHash
;
subPackages = [
"."
"contrib/environment-to-ini"
];
outputs = [
"out"
"data"
];
nativeBuildInputs = [
makeWrapper
];
nativeCheckInputs = [
git
openssh
];
patches = [
./static-root-path.patch
];
postPatch = ''
substituteInPlace modules/setting/server.go --subst-var data
'';
tags = lib.optionals sqliteSupport [
"sqlite"
"sqlite_unlock_notify"
];
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
"-X 'main.Tags=${lib.concatStringsSep " " tags}'"
];
preConfigure = ''
export ldflags+=" -X main.ForgejoVersion=$(GITEA_VERSION=${version} make show-version-api)"
'';
preCheck = ''
# $HOME is required for ~/.ssh/authorized_keys and such
export HOME="$TMPDIR/home"
# expose and use the GO_TEST_PACKAGES var from the Makefile
# instead of manually copying over the entire list:
# https://codeberg.org/forgejo/forgejo/src/tag/v7.0.4/Makefile#L124
echo -e 'show-backend-tests:\n\t@echo ''${GO_TEST_PACKAGES}' >> Makefile
getGoDirs() {
make show-backend-tests
}
'';
checkFlags =
let
skippedTests = [
"TestPassword" # requires network: api.pwnedpasswords.com
"TestCaptcha" # requires network: hcaptcha.com
"TestDNSUpdate" # requires network: release.forgejo.org
"TestMigrateWhiteBlocklist" # requires network: gitlab.com (DNS)
"TestURLAllowedSSH/Pushmirror_URL" # requires network git.gay (DNS)
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
preInstall = ''
mv "$GOPATH/bin/forgejo.org" "$GOPATH/bin/forgejo"
'';
postInstall = ''
mkdir $data
cp -R ./{templates,options} ${frontend}/public $data
mkdir -p $out
cp -R ./options/locale $out/locale
wrapProgram $out/bin/forgejo \
--prefix PATH : ${
lib.makeBinPath [
bash
git
gzip
openssh
]
}
'';
# $data is not available in goModules.drv
overrideModAttrs = (
_: {
postPatch = null;
}
);
passthru = {
# allow nix-update to handle npmDepsHash
inherit (frontend) npmDeps;
data-compressed =
runCommand "forgejo-data-compressed"
{
nativeBuildInputs = [
brotli
xorg.lndir
];
}
''
mkdir $out
lndir ${forgejo.data}/ $out/
# Create static gzip and brotli files
find -L $out -type f -regextype posix-extended -iregex '.*\.(css|html|js|svg|ttf|txt)' \
-exec gzip --best --keep --force {} ';' \
-exec brotli --best --keep --no-copy-stat {} ';'
'';
tests = if lts then nixosTests.forgejo-lts else nixosTests.forgejo;
updateScript = nix-update-script {
extraArgs = nixUpdateExtraArgs ++ [
"--version-regex"
"v(${lib.versions.major version}\\.[0-9.]+)"
];
};
};
meta = {
description = "Self-hosted lightweight software forge";
homepage = "https://forgejo.org";
changelog = "https://codeberg.org/forgejo/forgejo/releases/tag/v${version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
emilylange
urandom
bendlas
adamcstephens
marie
pyrox0
tebriel
];
broken = stdenv.hostPlatform.isDarwin;
mainProgram = "forgejo";
};
}

View File

@@ -0,0 +1,11 @@
import ./generic.nix {
version = "11.0.6";
hash = "sha256-7rX0B1db0HbZa/em3hX+yzAi4rqsDysJPx3dIInGxpY=";
npmDepsHash = "sha256-1lY08jBTx3DRhoaup02076EL9n85y57WCsS/cNcM4aw=";
vendorHash = "sha256-Jh8u+iCBhYdKcLj4IzcKtJBnzvclvUeYbR/hjMN+cPs=";
lts = true;
nixUpdateExtraArgs = [
"--override-filename"
"pkgs/by-name/fo/forgejo/lts.nix"
];
}

View File

@@ -0,0 +1,11 @@
import ./generic.nix {
version = "12.0.4";
hash = "sha256-g6PNJYiGR7tUpurVL1gvGzJzDoMCLmkGiLLsSZfkbYQ=";
npmDepsHash = "sha256-V8FUoL9y36bagkg8Scttv/IzKg+MIIqp7witvT8bSWA=";
vendorHash = "sha256-GE3trnaWuAVSEfi11tZo5JXedWOYOMzcHQ3GFyISVTQ=";
lts = false;
nixUpdateExtraArgs = [
"--override-filename"
"pkgs/by-name/fo/forgejo/package.nix"
];
}

View File

@@ -0,0 +1,13 @@
diff --git a/modules/setting/server.go b/modules/setting/server.go
index c20dd1949d..c9bcdce99a 100644
--- a/modules/setting/server.go
+++ b/modules/setting/server.go
@@ -317,7 +317,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
RedirectorUseProxyProtocol = sec.Key("REDIRECTOR_USE_PROXY_PROTOCOL").MustBool(UseProxyProtocol)
OfflineMode = sec.Key("OFFLINE_MODE").MustBool(true)
if len(StaticRootPath) == 0 {
- StaticRootPath = AppWorkPath
+ StaticRootPath = "@data@"
}
StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(StaticRootPath)
StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)

View File

@@ -0,0 +1,41 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
let
version = "2.3.1";
in
buildGoModule {
name = "fork-cleaner";
inherit version;
src = fetchFromGitHub {
owner = "caarlos0";
repo = "fork-cleaner";
rev = "v${version}";
hash = "sha256-JNmpcDwmxR+s4regOWz8FAJllBNRfOCmVwkDs7tlChA=";
};
vendorHash = "sha256-QuIaXXkch5PCpX8P755X8j7MeNnbewWo7NB+Vue1/Pk=";
# allowGoReference adds the flag `-trimpath` which is also denoted by, fork-cleaner goreleaser config
# <https://github.com/caarlos0/fork-cleaner/blob/645345bf97d751614270de4ade698ddbc53509c1/goreleaser.yml#L38>
allowGoReference = true;
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.builtBy=nixpkgs"
];
meta = {
description = "Quickly clean up unused forks on your GitHub account";
homepage = "https://github.com/caarlos0/fork-cleaner";
changelog = "https://github.com/caarlos0/fork-cleaner/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ isabelroses ];
mainProgram = "fork-cleaner";
};
}

View File

@@ -0,0 +1,32 @@
{
stdenv,
lib,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "forkstat";
version = "0.04.00";
src = fetchFromGitHub {
owner = "ColinIanKing";
repo = "forkstat";
rev = "V${version}";
hash = "sha256-HHyGjhu8yaBvDncloW8ST2L4iUU2ik2ydW1z9pFhfrw=";
};
installFlags = [
"BINDIR=${placeholder "out"}/bin"
"MANDIR=${placeholder "out"}/share/man/man8"
"BASHDIR=${placeholder "out"}/share/bash-completion/completions"
];
meta = with lib; {
description = "Process fork/exec/exit monitoring tool";
mainProgram = "forkstat";
homepage = "https://github.com/ColinIanKing/forkstat";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ womfoo ];
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "forktty";
version = "1.3";
src = fetchurl {
url = "mirror://ibiblioPubLinux/utils/terminal/${pname}-${version}.tgz";
hash = "sha256-6xc5eshCuCIOsDh0r2DizKAeypGH0TRRotZ4itsvpVk=";
};
preBuild = ''
sed -e s@/usr/bin/ginstall@install@g -i Makefile
'';
preInstall = ''
mkdir -p "$out/bin"
mkdir -p "$out/share/man/man8"
'';
makeFlags = [
"prefix=$(out)"
"manprefix=$(out)/share/"
];
meta = with lib; {
description = "Tool to detach from controlling TTY and attach to another";
license = licenses.gpl2Only;
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
gmp,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
version = "4.3.1";
pname = "form";
src = fetchFromGitHub {
owner = "form-dev";
repo = "form";
tag = "v${finalAttrs.version}";
hash = "sha256-ZWpfPeTekHEALqXVF/nLkcNsrkt17AKm2B/uydUBfvo=";
};
nativeBuildInputs = [
autoreconfHook
];
buildInputs = [
gmp
zlib
];
meta = with lib; {
description = "Symbolic manipulation of very big expressions";
homepage = "https://www.nikhef.nl/~form/";
license = licenses.gpl3;
maintainers = [ maintainers.veprbl ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
fetchpatch,
}:
rustPlatform.buildRustPackage {
pname = "formatjson5";
version = "0.2.6";
src = fetchFromGitHub {
owner = "google";
repo = "json5format";
# Not tagged, see Cargo.toml.
rev = "056829990bab4ddc78c65a0b45215708c91b8628";
hash = "sha256-Lredw/Fez+2U2++ShZcKTFCv8Qpai9YUvqvpGjG5W0o=";
};
patches = [
(fetchpatch {
url = "https://github.com/google/json5format/commit/32914546e7088b3d9173ae9a2f307effa87917bf.patch";
hash = "sha256-kAbRUL/FuhnxkC9Xo4J2bXt9nkMOLeJvgMmOoKnSxKc=";
})
];
cargoHash = "sha256-1CSt9dPVHdOqfQXio7/eXiDLWt+iOe6Qj+VtWblwSDE=";
cargoBuildFlags = [ "--example formatjson5" ];
postInstall =
let
cargoTarget = rustPlatform.cargoInstallHook.targetSubdirectory;
in
''
install -D target/${cargoTarget}/release/examples/formatjson5 $out/bin/formatjson5
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "JSON5 formatter";
homepage = "https://github.com/google/json5format";
license = lib.licenses.bsd3;
mainProgram = "formatjson5";
maintainers = with lib.maintainers; [ katexochen ];
};
}

View File

@@ -0,0 +1,53 @@
diff --git a/src/Objects/DeviceFormatter.vala b/src/Objects/DeviceFormatter.vala
index cf6a3b8..0de10a9 100644
--- a/src/Objects/DeviceFormatter.vala
+++ b/src/Objects/DeviceFormatter.vala
@@ -62,42 +62,42 @@ namespace Formatter {
string drive_identifier = drive.get_identifier ("unix-device");
switch (filesystem) {
case Formatter.Filesystems.EXT4:
- spawn_args = {"pkexec", "mkfs.ext4", drive_identifier, "-F"};
+ spawn_args = {"pkexec", "@ext4@", drive_identifier, "-F"};
if (label != "") {
spawn_args += "-L";
spawn_args += label;
}
break;
case Formatter.Filesystems.EXFAT:
- spawn_args = {"pkexec", "mkfs.exfat", drive_identifier};
+ spawn_args = {"pkexec", "@exfat@", drive_identifier};
if (label != "") {
spawn_args += "-n";
spawn_args += label;
}
break;
case Formatter.Filesystems.FAT16:
- spawn_args = {"pkexec", "mkfs.fat", "-F16", "-I", drive_identifier};
+ spawn_args = {"pkexec", "@fat@", "-F16", "-I", drive_identifier};
if (label != "") {
spawn_args += "-n";
spawn_args += label;
}
break;
case Formatter.Filesystems.FAT32:
- spawn_args = {"pkexec", "mkfs.fat", "-F32", "-I", drive_identifier};
+ spawn_args = {"pkexec", "@fat@", "-F32", "-I", drive_identifier};
if (label != "") {
spawn_args += "-n";
spawn_args += label;
}
break;
case Formatter.Filesystems.NTFS:
- spawn_args = {"pkexec", "mkfs.ntfs", drive_identifier, "-f", "-F"};
+ spawn_args = {"pkexec", "@ntfs@", drive_identifier, "-f", "-F"};
if (label != "") {
spawn_args += "-L";
spawn_args += label;
}
break;
case Formatter.Filesystems.HFS_PLUS:
- spawn_args = {"pkexec", "mkfs.hfsplus", drive_identifier};
+ spawn_args = {"pkexec", "@hfsplus@", drive_identifier};
if (label != "") {
spawn_args += "-v";
spawn_args += label;

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
meson,
ninja,
vala,
pkg-config,
pantheon,
python3,
replaceVars,
glib,
gtk3,
dosfstools,
e2fsprogs,
exfat,
hfsprogs,
ntfs3g,
libgee,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "formatter";
version = "0.4.0";
src = fetchFromGitHub {
owner = "Djaler";
repo = "Formatter";
rev = version;
sha256 = "sha256-8lZ0jUwHuc3Kntz73Btj6dJvkW2bvShu2KWTSQszbJo=";
};
patches = [
(replaceVars ./fix-paths.patch {
ext4 = "${e2fsprogs}/bin/mkfs.ext4";
exfat = "${exfat}/bin/mkfs.exfat";
fat = "${dosfstools}/bin/mkfs.fat";
ntfs = "${ntfs3g}/bin/mkfs.ntfs";
hfsplus = "${hfsprogs}/bin/mkfs.hfsplus";
})
];
nativeBuildInputs = [
meson
ninja
vala
pkg-config
python3
wrapGAppsHook3
];
buildInputs = [
glib
gtk3
libgee
pantheon.granite
];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
'';
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Simple formatter designed for elementary OS";
homepage = "https://github.com/Djaler/Formatter";
maintainers = with maintainers; [ xiorcale ];
teams = [ teams.pantheon ];
platforms = platforms.linux;
license = licenses.lgpl2Plus;
mainProgram = "com.github.djaler.formatter";
};
}

View File

@@ -0,0 +1,65 @@
diff --git a/Src/CommandLine/CommandLine.csproj b/Src/CommandLine/CommandLine.csproj
index 2b6a4fe..5eee8c7 100644
--- a/Src/CommandLine/CommandLine.csproj
+++ b/Src/CommandLine/CommandLine.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
diff --git a/Src/Core/Core.csproj b/Src/Core/Core.csproj
index 8e79a00..db64e3a 100644
--- a/Src/Core/Core.csproj
+++ b/Src/Core/Core.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<ApplicationIcon />
<StartupObject />
<Platforms>AnyCPU;x64</Platforms>
diff --git a/Src/Extensions/FormulaCodeGeneratorTask/FormulaCodeGeneratorTaskDotNet.csproj b/Src/Extensions/FormulaCodeGeneratorTask/FormulaCodeGeneratorTaskDotNet.csproj
index daa042d..9290c12 100644
--- a/Src/Extensions/FormulaCodeGeneratorTask/FormulaCodeGeneratorTaskDotNet.csproj
+++ b/Src/Extensions/FormulaCodeGeneratorTask/FormulaCodeGeneratorTaskDotNet.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
diff --git a/Src/Kernel/InteractiveKernel/InteractiveKernel.csproj b/Src/Kernel/InteractiveKernel/InteractiveKernel.csproj
index ed3cde5..6c669cd 100644
--- a/Src/Kernel/InteractiveKernel/InteractiveKernel.csproj
+++ b/Src/Kernel/InteractiveKernel/InteractiveKernel.csproj
@@ -17,7 +17,7 @@
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ToolCommandName>dotnet-formula</ToolCommandName>
<AssemblyName>Microsoft.Jupyter.VUISIS.Formula</AssemblyName>
diff --git a/Src/Tests/Tests.csproj b/Src/Tests/Tests.csproj
index 8828a49..eebe401 100644
--- a/Src/Tests/Tests.csproj
+++ b/Src/Tests/Tests.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net6.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

View File

@@ -0,0 +1,532 @@
[
{
"pname": "Antlr4.Runtime.Standard",
"version": "4.7.2",
"hash": "sha256-BhWgy5MeAc43bANzOi1p1oPqRA3z4x/yt0A6iZ++ud4="
},
{
"pname": "Microsoft.NETCore.Platforms",
"version": "1.1.0",
"hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM="
},
{
"pname": "Microsoft.NETCore.Targets",
"version": "1.1.0",
"hash": "sha256-0AqQ2gMS8iNlYkrD+BxtIg7cXMnr9xZHtKAuN4bjfaQ="
},
{
"pname": "Microsoft.Win32.Primitives",
"version": "4.3.0",
"hash": "sha256-mBNDmPXNTW54XLnPAUwBRvkIORFM7/j0D0I2SyQPDEg="
},
{
"pname": "Microsoft.Z3.x64",
"version": "4.8.7",
"hash": "sha256-v1XK4bsYAvySTtScd9dsCC2exuTvaBEl36iX2pPgtPM="
},
{
"pname": "NETStandard.Library",
"version": "1.6.1",
"hash": "sha256-iNan1ix7RtncGWC9AjAZ2sk70DoxOsmEOgQ10fXm4Pw="
},
{
"pname": "runtime.any.System.Collections",
"version": "4.3.0",
"hash": "sha256-4PGZqyWhZ6/HCTF2KddDsbmTTjxs2oW79YfkberDZS8="
},
{
"pname": "runtime.any.System.Diagnostics.Tools",
"version": "4.3.0",
"hash": "sha256-8yLKFt2wQxkEf7fNfzB+cPUCjYn2qbqNgQ1+EeY2h/I="
},
{
"pname": "runtime.any.System.Diagnostics.Tracing",
"version": "4.3.0",
"hash": "sha256-dsmTLGvt8HqRkDWP8iKVXJCS+akAzENGXKPV18W2RgI="
},
{
"pname": "runtime.any.System.Globalization",
"version": "4.3.0",
"hash": "sha256-PaiITTFI2FfPylTEk7DwzfKeiA/g/aooSU1pDcdwWLU="
},
{
"pname": "runtime.any.System.Globalization.Calendars",
"version": "4.3.0",
"hash": "sha256-AYh39tgXJVFu8aLi9Y/4rK8yWMaza4S4eaxjfcuEEL4="
},
{
"pname": "runtime.any.System.IO",
"version": "4.3.0",
"hash": "sha256-vej7ySRhyvM3pYh/ITMdC25ivSd0WLZAaIQbYj/6HVE="
},
{
"pname": "runtime.any.System.Reflection",
"version": "4.3.0",
"hash": "sha256-ns6f++lSA+bi1xXgmW1JkWFb2NaMD+w+YNTfMvyAiQk="
},
{
"pname": "runtime.any.System.Reflection.Extensions",
"version": "4.3.0",
"hash": "sha256-Y2AnhOcJwJVYv7Rp6Jz6ma0fpITFqJW+8rsw106K2X8="
},
{
"pname": "runtime.any.System.Reflection.Primitives",
"version": "4.3.0",
"hash": "sha256-LkPXtiDQM3BcdYkAm5uSNOiz3uF4J45qpxn5aBiqNXQ="
},
{
"pname": "runtime.any.System.Resources.ResourceManager",
"version": "4.3.0",
"hash": "sha256-9EvnmZslLgLLhJ00o5MWaPuJQlbUFcUF8itGQNVkcQ4="
},
{
"pname": "runtime.any.System.Runtime",
"version": "4.3.0",
"hash": "sha256-qwhNXBaJ1DtDkuRacgHwnZmOZ1u9q7N8j0cWOLYOELM="
},
{
"pname": "runtime.any.System.Runtime.Handles",
"version": "4.3.0",
"hash": "sha256-PQRACwnSUuxgVySO1840KvqCC9F8iI9iTzxNW0RcBS4="
},
{
"pname": "runtime.any.System.Runtime.InteropServices",
"version": "4.3.0",
"hash": "sha256-Kaw5PnLYIiqWbsoF3VKJhy7pkpoGsUwn4ZDCKscbbzA="
},
{
"pname": "runtime.any.System.Text.Encoding",
"version": "4.3.0",
"hash": "sha256-Q18B9q26MkWZx68exUfQT30+0PGmpFlDgaF0TnaIGCs="
},
{
"pname": "runtime.any.System.Text.Encoding.Extensions",
"version": "4.3.0",
"hash": "sha256-6MYj0RmLh4EVqMtO/MRqBi0HOn5iG4x9JimgCCJ+EFM="
},
{
"pname": "runtime.any.System.Threading.Tasks",
"version": "4.3.0",
"hash": "sha256-agdOM0NXupfHbKAQzQT8XgbI9B8hVEh+a/2vqeHctg4="
},
{
"pname": "runtime.any.System.Threading.Timer",
"version": "4.3.0",
"hash": "sha256-BgHxXCIbicVZtpgMimSXixhFC3V+p5ODqeljDjO8hCs="
},
{
"pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-LXUPLX3DJxsU1Pd3UwjO1PO9NM2elNEDXeu2Mu/vNps="
},
{
"pname": "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-qeSqaUI80+lqw5MK4vMpmO0CZaqrmYktwp6L+vQAb0I="
},
{
"pname": "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-SrHqT9wrCBsxILWtaJgGKd6Odmxm8/Mh7Kh0CUkZVzA="
},
{
"pname": "runtime.native.System",
"version": "4.3.0",
"hash": "sha256-ZBZaodnjvLXATWpXXakFgcy6P+gjhshFXmglrL5xD5Y="
},
{
"pname": "runtime.native.System.IO.Compression",
"version": "4.3.0",
"hash": "sha256-DWnXs4vlKoU6WxxvCArTJupV6sX3iBbZh8SbqfHace8="
},
{
"pname": "runtime.native.System.Net.Http",
"version": "4.3.0",
"hash": "sha256-c556PyheRwpYhweBjSfIwEyZHnAUB8jWioyKEcp/2dg="
},
{
"pname": "runtime.native.System.Security.Cryptography.Apple",
"version": "4.3.0",
"hash": "sha256-2IhBv0i6pTcOyr8FFIyfPEaaCHUmJZ8DYwLUwJ+5waw="
},
{
"pname": "runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-Jy01KhtcCl2wjMpZWH+X3fhHcVn+SyllWFY8zWlz/6I="
},
{
"pname": "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-wyv00gdlqf8ckxEdV7E+Ql9hJIoPcmYEuyeWb5Oz3mM="
},
{
"pname": "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-zi+b4sCFrA9QBiSGDD7xPV27r3iHGlV99gpyVUjRmc4="
},
{
"pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple",
"version": "4.3.0",
"hash": "sha256-serkd4A7F6eciPiPJtUyJyxzdAtupEcWIZQ9nptEzIM="
},
{
"pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-gybQU6mPgaWV3rBG2dbH6tT3tBq8mgze3PROdsuWnX0="
},
{
"pname": "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-VsP72GVveWnGUvS/vjOQLv1U80H2K8nZ4fDAmI61Hm4="
},
{
"pname": "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-4yKGa/IrNCKuQ3zaDzILdNPD32bNdy6xr5gdJigyF5g="
},
{
"pname": "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-HmdJhhRsiVoOOCcUvAwdjpMRiyuSwdcgEv2j9hxi+Zc="
},
{
"pname": "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-pVFUKuPPIx0edQKjzRon3zKq8zhzHEzko/lc01V/jdw="
},
{
"pname": "runtime.unix.Microsoft.Win32.Primitives",
"version": "4.3.0",
"hash": "sha256-LZb23lRXzr26tRS5aA0xyB08JxiblPDoA7HBvn6awXg="
},
{
"pname": "runtime.unix.System.Console",
"version": "4.3.0",
"hash": "sha256-AHkdKShTRHttqfMjmi+lPpTuCrM5vd/WRy6Kbtie190="
},
{
"pname": "runtime.unix.System.Diagnostics.Debug",
"version": "4.3.0",
"hash": "sha256-ReoazscfbGH+R6s6jkg5sIEHWNEvjEoHtIsMbpc7+tI="
},
{
"pname": "runtime.unix.System.IO.FileSystem",
"version": "4.3.0",
"hash": "sha256-Pf4mRl6YDK2x2KMh0WdyNgv0VUNdSKVDLlHqozecy5I="
},
{
"pname": "runtime.unix.System.Net.Primitives",
"version": "4.3.0",
"hash": "sha256-pHJ+I6i16MV6m77uhTC6GPY6jWGReE3SSP3fVB59ti0="
},
{
"pname": "runtime.unix.System.Net.Sockets",
"version": "4.3.0",
"hash": "sha256-IvgOeA2JuBjKl5yAVGjPYMPDzs9phb3KANs95H9v1w4="
},
{
"pname": "runtime.unix.System.Private.Uri",
"version": "4.3.0",
"hash": "sha256-c5tXWhE/fYbJVl9rXs0uHh3pTsg44YD1dJvyOA0WoMs="
},
{
"pname": "runtime.unix.System.Runtime.Extensions",
"version": "4.3.0",
"hash": "sha256-l8S9gt6dk3qYG6HYonHtdlYtBKyPb29uQ6NDjmrt3V4="
},
{
"pname": "System.AppContext",
"version": "4.3.0",
"hash": "sha256-yg95LNQOwFlA1tWxXdQkVyJqT4AnoDc+ACmrNvzGiZg="
},
{
"pname": "System.Buffers",
"version": "4.3.0",
"hash": "sha256-XqZWb4Kd04960h4U9seivjKseGA/YEIpdplfHYHQ9jk="
},
{
"pname": "System.Collections",
"version": "4.3.0",
"hash": "sha256-afY7VUtD6w/5mYqrce8kQrvDIfS2GXDINDh73IjxJKc="
},
{
"pname": "System.Collections.Concurrent",
"version": "4.3.0",
"hash": "sha256-KMY5DfJnDeIsa13DpqvyN8NkReZEMAFnlmNglVoFIXI="
},
{
"pname": "System.Console",
"version": "4.3.0",
"hash": "sha256-Xh3PPBZr0pDbDaK8AEHbdGz7ePK6Yi1ZyRWI1JM6mbo="
},
{
"pname": "System.Diagnostics.Debug",
"version": "4.3.0",
"hash": "sha256-fkA79SjPbSeiEcrbbUsb70u9B7wqbsdM9s1LnoKj0gM="
},
{
"pname": "System.Diagnostics.DiagnosticSource",
"version": "4.3.0",
"hash": "sha256-OFJRb0ygep0Z3yDBLwAgM/Tkfs4JCDtsNhwDH9cd1Xw="
},
{
"pname": "System.Diagnostics.Tools",
"version": "4.3.0",
"hash": "sha256-gVOv1SK6Ape0FQhCVlNOd9cvQKBvMxRX9K0JPVi8w0Y="
},
{
"pname": "System.Diagnostics.Tracing",
"version": "4.3.0",
"hash": "sha256-hCETZpHHGVhPYvb4C0fh4zs+8zv4GPoixagkLZjpa9Q="
},
{
"pname": "System.Globalization",
"version": "4.3.0",
"hash": "sha256-caL0pRmFSEsaoeZeWN5BTQtGrAtaQPwFi8YOZPZG5rI="
},
{
"pname": "System.Globalization.Calendars",
"version": "4.3.0",
"hash": "sha256-uNOD0EOVFgnS2fMKvMiEtI9aOw00+Pfy/H+qucAQlPc="
},
{
"pname": "System.Globalization.Extensions",
"version": "4.3.0",
"hash": "sha256-mmJWA27T0GRVuFP9/sj+4TrR4GJWrzNIk2PDrbr7RQk="
},
{
"pname": "System.IO",
"version": "4.3.0",
"hash": "sha256-ruynQHekFP5wPrDiVyhNiRIXeZ/I9NpjK5pU+HPDiRY="
},
{
"pname": "System.IO.Compression",
"version": "4.3.0",
"hash": "sha256-f5PrQlQgj5Xj2ZnHxXW8XiOivaBvfqDao9Sb6AVinyA="
},
{
"pname": "System.IO.Compression.ZipFile",
"version": "4.3.0",
"hash": "sha256-WQl+JgWs+GaRMeiahTFUbrhlXIHapzcpTFXbRvAtvvs="
},
{
"pname": "System.IO.FileSystem",
"version": "4.3.0",
"hash": "sha256-vNIYnvlayuVj0WfRfYKpDrhDptlhp1pN8CYmlVd2TXw="
},
{
"pname": "System.IO.FileSystem.Primitives",
"version": "4.3.0",
"hash": "sha256-LMnfg8Vwavs9cMnq9nNH8IWtAtSfk0/Fy4s4Rt9r1kg="
},
{
"pname": "System.Linq",
"version": "4.3.0",
"hash": "sha256-R5uiSL3l6a3XrXSSL6jz+q/PcyVQzEAByiuXZNSqD/A="
},
{
"pname": "System.Linq.Expressions",
"version": "4.3.0",
"hash": "sha256-+3pvhZY7rip8HCbfdULzjlC9FPZFpYoQxhkcuFm2wk8="
},
{
"pname": "System.Net.Http",
"version": "4.3.0",
"hash": "sha256-UoBB7WPDp2Bne/fwxKF0nE8grJ6FzTMXdT/jfsphj8Q="
},
{
"pname": "System.Net.NameResolution",
"version": "4.3.0",
"hash": "sha256-eGZwCBExWsnirWBHyp2sSSSXp6g7I6v53qNmwPgtJ5c="
},
{
"pname": "System.Net.Primitives",
"version": "4.3.0",
"hash": "sha256-MY7Z6vOtFMbEKaLW9nOSZeAjcWpwCtdO7/W1mkGZBzE="
},
{
"pname": "System.Net.Sockets",
"version": "4.3.0",
"hash": "sha256-il7dr5VT/QWDg/0cuh+4Es2u8LY//+qqiY9BZmYxSus="
},
{
"pname": "System.ObjectModel",
"version": "4.3.0",
"hash": "sha256-gtmRkWP2Kwr3nHtDh0yYtce38z1wrGzb6fjm4v8wN6Q="
},
{
"pname": "System.Private.Uri",
"version": "4.3.0",
"hash": "sha256-fVfgcoP4AVN1E5wHZbKBIOPYZ/xBeSIdsNF+bdukIRM="
},
{
"pname": "System.Reflection",
"version": "4.3.0",
"hash": "sha256-NQSZRpZLvtPWDlvmMIdGxcVuyUnw92ZURo0hXsEshXY="
},
{
"pname": "System.Reflection.Emit",
"version": "4.3.0",
"hash": "sha256-5LhkDmhy2FkSxulXR+bsTtMzdU3VyyuZzsxp7/DwyIU="
},
{
"pname": "System.Reflection.Emit.ILGeneration",
"version": "4.3.0",
"hash": "sha256-mKRknEHNls4gkRwrEgi39B+vSaAz/Gt3IALtS98xNnA="
},
{
"pname": "System.Reflection.Emit.Lightweight",
"version": "4.3.0",
"hash": "sha256-rKx4a9yZKcajloSZHr4CKTVJ6Vjh95ni+zszPxWjh2I="
},
{
"pname": "System.Reflection.Extensions",
"version": "4.3.0",
"hash": "sha256-mMOCYzUenjd4rWIfq7zIX9PFYk/daUyF0A8l1hbydAk="
},
{
"pname": "System.Reflection.Primitives",
"version": "4.3.0",
"hash": "sha256-5ogwWB4vlQTl3jjk1xjniG2ozbFIjZTL9ug0usZQuBM="
},
{
"pname": "System.Reflection.TypeExtensions",
"version": "4.3.0",
"hash": "sha256-4U4/XNQAnddgQIHIJq3P2T80hN0oPdU2uCeghsDTWng="
},
{
"pname": "System.Resources.ResourceManager",
"version": "4.3.0",
"hash": "sha256-idiOD93xbbrbwwSnD4mORA9RYi/D/U48eRUsn/WnWGo="
},
{
"pname": "System.Runtime",
"version": "4.3.0",
"hash": "sha256-51813WXpBIsuA6fUtE5XaRQjcWdQ2/lmEokJt97u0Rg="
},
{
"pname": "System.Runtime.Extensions",
"version": "4.3.0",
"hash": "sha256-wLDHmozr84v1W2zYCWYxxj0FR0JDYHSVRaRuDm0bd/o="
},
{
"pname": "System.Runtime.Handles",
"version": "4.3.0",
"hash": "sha256-KJ5aXoGpB56Y6+iepBkdpx/AfaJDAitx4vrkLqR7gms="
},
{
"pname": "System.Runtime.InteropServices",
"version": "4.3.0",
"hash": "sha256-8sDH+WUJfCR+7e4nfpftj/+lstEiZixWUBueR2zmHgI="
},
{
"pname": "System.Runtime.InteropServices.RuntimeInformation",
"version": "4.3.0",
"hash": "sha256-MYpl6/ZyC6hjmzWRIe+iDoldOMW1mfbwXsduAnXIKGA="
},
{
"pname": "System.Runtime.Numerics",
"version": "4.3.0",
"hash": "sha256-P5jHCgMbgFMYiONvzmaKFeOqcAIDPu/U8bOVrNPYKqc="
},
{
"pname": "System.Security.Claims",
"version": "4.3.0",
"hash": "sha256-Fua/rDwAqq4UByRVomAxMPmDBGd5eImRqHVQIeSxbks="
},
{
"pname": "System.Security.Cryptography.Algorithms",
"version": "4.3.0",
"hash": "sha256-tAJvNSlczYBJ3Ed24Ae27a55tq/n4D3fubNQdwcKWA8="
},
{
"pname": "System.Security.Cryptography.Cng",
"version": "4.3.0",
"hash": "sha256-u17vy6wNhqok91SrVLno2M1EzLHZm6VMca85xbVChsw="
},
{
"pname": "System.Security.Cryptography.Csp",
"version": "4.3.0",
"hash": "sha256-oefdTU/Z2PWU9nlat8uiRDGq/PGZoSPRgkML11pmvPQ="
},
{
"pname": "System.Security.Cryptography.Encoding",
"version": "4.3.0",
"hash": "sha256-Yuge89N6M+NcblcvXMeyHZ6kZDfwBv3LPMDiF8HhJss="
},
{
"pname": "System.Security.Cryptography.OpenSsl",
"version": "4.3.0",
"hash": "sha256-DL+D2sc2JrQiB4oAcUggTFyD8w3aLEjJfod5JPe+Oz4="
},
{
"pname": "System.Security.Cryptography.Primitives",
"version": "4.3.0",
"hash": "sha256-fnFi7B3SnVj5a+BbgXnbjnGNvWrCEU6Hp/wjsjWz318="
},
{
"pname": "System.Security.Cryptography.X509Certificates",
"version": "4.3.0",
"hash": "sha256-MG3V/owDh273GCUPsGGraNwaVpcydupl3EtPXj6TVG0="
},
{
"pname": "System.Security.Principal",
"version": "4.3.0",
"hash": "sha256-rjudVUHdo8pNJg2EVEn0XxxwNo5h2EaYo+QboPkXlYk="
},
{
"pname": "System.Security.Principal.Windows",
"version": "4.3.0",
"hash": "sha256-mbdLVUcEwe78p3ZnB6jYsizNEqxMaCAWI3tEQNhRQAE="
},
{
"pname": "System.Text.Encoding",
"version": "4.3.0",
"hash": "sha256-GctHVGLZAa/rqkBNhsBGnsiWdKyv6VDubYpGkuOkBLg="
},
{
"pname": "System.Text.Encoding.Extensions",
"version": "4.3.0",
"hash": "sha256-vufHXg8QAKxHlujPHHcrtGwAqFmsCD6HKjfDAiHyAYc="
},
{
"pname": "System.Text.RegularExpressions",
"version": "4.3.0",
"hash": "sha256-VLCk1D1kcN2wbAe3d0YQM/PqCsPHOuqlBY1yd2Yo+K0="
},
{
"pname": "System.Threading",
"version": "4.3.0",
"hash": "sha256-ZDQ3dR4pzVwmaqBg4hacZaVenQ/3yAF/uV7BXZXjiWc="
},
{
"pname": "System.Threading.Tasks",
"version": "4.3.0",
"hash": "sha256-Z5rXfJ1EXp3G32IKZGiZ6koMjRu0n8C1NGrwpdIen4w="
},
{
"pname": "System.Threading.Tasks.Extensions",
"version": "4.3.0",
"hash": "sha256-X2hQ5j+fxcmnm88Le/kSavjiGOmkcumBGTZKBLvorPc="
},
{
"pname": "System.Threading.ThreadPool",
"version": "4.3.0",
"hash": "sha256-wW0QdvssRoaOfQLazTGSnwYTurE4R8FxDx70pYkL+gg="
},
{
"pname": "System.Threading.Timer",
"version": "4.3.0",
"hash": "sha256-pmhslmhQhP32TWbBzoITLZ4BoORBqYk25OWbru04p9s="
},
{
"pname": "System.Xml.ReaderWriter",
"version": "4.3.0",
"hash": "sha256-QQ8KgU0lu4F5Unh+TbechO//zaAGZ4MfgvW72Cn1hzA="
},
{
"pname": "System.Xml.XDocument",
"version": "4.3.0",
"hash": "sha256-rWtdcmcuElNOSzCehflyKwHkDRpiOhJJs8CeQ0l1CCI="
}
]

View File

@@ -0,0 +1,47 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
buildDotnetModule,
dotnetCorePackages,
unstableGitUpdater,
}:
buildDotnetModule (finalAttrs: {
pname = "formula-dotnet";
version = "2.0";
src = fetchFromGitHub {
owner = "VUISIS";
repo = "formula-dotnet";
rev = "8ee2e6abfd4ce038e1d9cb9c8602dec1ed6c0163";
hash = "sha256-2ulv//YV3OqrfFltgUCeDe4rOPC0qqJ+80/D2lIoih8=";
};
patches = [ ./dotnet-8-upgrade.patch ];
dotnet-sdk = dotnetCorePackages.sdk_8_0;
nugetDeps = ./nuget.json;
projectFile = "Src/CommandLine/CommandLine.csproj";
postFixup =
lib.optionalString stdenvNoCC.hostPlatform.isLinux ''
mv $out/bin/CommandLine $out/bin/formula
''
+ lib.optionalString stdenvNoCC.hostPlatform.isDarwin ''
makeWrapper ${dotnetCorePackages.runtime_8_0}/bin/dotnet $out/bin/formula \
--add-flags "$out/lib/formula-dotnet/CommandLine.dll" \
--prefix DYLD_LIBRARY_PATH : $out/lib/formula-dotnet/runtimes/macos/native
'';
passthru.updateScript = unstableGitUpdater { url = finalAttrs.meta.homepage; };
meta = with lib; {
description = "Formal Specifications for Verification and Synthesis";
homepage = "https://github.com/VUISIS/formula-dotnet";
license = licenses.mspl;
maintainers = with maintainers; [ siraben ];
platforms = platforms.unix;
mainProgram = "formula";
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
# nativeBuildInputs
cmake,
qt6,
python3,
# buildInputs
eigen,
parallel-hashmap,
readerwriterqueue,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "forscape";
version = "0.0.2-unstable-2025-04-28";
src = fetchFromGitHub {
owner = "JohnDTill";
repo = "Forscape";
rev = "1b6d82cdee7ed1ffeee8adffa56ca2b0a866cb34";
hash = "sha256-Ee3SAFZG8I0ZEbggLVViqTYu4SFjNJ62xLcpfLgFlR0=";
};
cmakeFlags = [
"-DUSE_CONAN=OFF"
];
# Relative to build directory
cmakeDir = "../app";
nativeBuildInputs = [
cmake
qt6.wrapQtAppsHook
python3
];
buildInputs = [
eigen
parallel-hashmap
readerwriterqueue
qt6.qtbase
qt6.qtsvg
];
meta = {
description = "Scientific computing language";
homepage = "https://github.com/JohnDTill/Forscape";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ doronbehar ];
mainProgram = "Forscape";
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,30 @@
{
lib,
fetchCrate,
rustPlatform,
pkg-config,
openssl_3,
protobuf,
}:
rustPlatform.buildRustPackage rec {
pname = "fortanix-sgx-tools";
version = "0.6.1";
nativeBuildInputs = [
pkg-config
protobuf
];
buildInputs = [ openssl_3 ];
src = fetchCrate {
inherit pname version;
hash = "sha256-IVkmZs3imzj8uN8kqEzN/Oio3H+Nqzu8ORjARNx1TpQ=";
};
cargoHash = "sha256-jYd9KRZgdBoVepmV4x4E3Y7h1SzSLv2clB0uPSWv8tE=";
meta = {
description = "Tools for building and running enclaves for the Fortanix SGX ABI";
homepage = "https://github.com/fortanix/rust-sgx";
maintainers = [ lib.maintainers.ozwaldorf ];
platforms = [ "x86_64-linux" ];
license = lib.licenses.mpl20;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation {
pname = "fortify-headers";
version = "1.1alpine3";
# upstream only accessible via git - unusable during bootstrap, hence
# extract from the alpine package
src = fetchurl {
url = "https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/fortify-headers-1.1-r3.apk";
name = "fortify-headers.tar.gz"; # ensure it's extracted as a .tar.gz
hash = "sha256-8A8JcKHIBgXpUuIP4zs3Q1yBs5jCGd5F3H2E8UN/S2g=";
};
patches = [
./wchar-imports-skip.patch
./restore-macros.patch
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r include/fortify $out/include
runHook postInstall
'';
meta = {
description = "Standalone header-based fortify-source implementation";
homepage = "https://git.2f30.org/fortify-headers";
license = lib.licenses.bsd0;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ ris ];
};
}

View File

@@ -0,0 +1,283 @@
restore #undef'ed macro values after we're done
some programs that define these miss them if removed
push_macro and pop_macro pragmas allegedly well supported
by gcc, clang and msvc
--- a/include/fortify/poll.h
+++ b/include/fortify/poll.h
@@ -29,6 +29,7 @@ __extension__
extern "C" {
#endif
+#pragma push_macro("poll")
#undef poll
_FORTIFY_FN(poll) int poll(struct pollfd * _FORTIFY_POS0 __f, nfds_t __n, int __s)
@@ -40,6 +41,8 @@ _FORTIFY_FN(poll) int poll(struct pollfd * _FORTIFY_POS0 __f, nfds_t __n, int __
return __orig_poll(__f, __n, __s);
}
+#pragma pop_macro("poll")
+
#ifdef __cplusplus
}
#endif
--- a/include/fortify/stdio.h
+++ b/include/fortify/stdio.h
@@ -29,12 +29,19 @@ __extension__
extern "C" {
#endif
+#pragma push_macro("fgets")
#undef fgets
+#pragma push_macro("fread")
#undef fread
+#pragma push_macro("fwrite")
#undef fwrite
+#pragma push_macro("vsprintf")
#undef vsprintf
+#pragma push_macro("vsnprintf")
#undef vsnprintf
+#pragma push_macro("snprintf")
#undef snprintf
+#pragma push_macro("sprintf")
#undef sprintf
_FORTIFY_FN(fgets) char *fgets(char * _FORTIFY_POS0 __s, int __n, FILE *__f)
@@ -140,6 +147,14 @@ _FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...)
#endif /* __has_builtin(__builtin_va_arg_pack) */
#endif /* defined(__has_builtin) */
+#pragma pop_macro("fgets")
+#pragma pop_macro("fread")
+#pragma pop_macro("fwrite")
+#pragma pop_macro("vsprintf")
+#pragma pop_macro("vsnprintf")
+#pragma pop_macro("snprintf")
+#pragma pop_macro("sprintf")
+
#ifdef __cplusplus
}
#endif
--- a/include/fortify/stdlib.h
+++ b/include/fortify/stdlib.h
@@ -38,7 +38,10 @@ extern "C" {
/* FIXME clang */
#if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__)
+
+#pragma push_macro("realpath")
#undef realpath
+
_FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r)
{
#ifndef PATH_MAX
@@ -60,6 +63,9 @@ _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r)
return __orig_realpath(__p, __r);
#endif
}
+
+#pragma pop_macro("realpath")
+
#endif
#ifdef __cplusplus
--- a/include/fortify/string.h
+++ b/include/fortify/string.h
@@ -29,12 +29,19 @@ __extension__
extern "C" {
#endif
+#pragma push_macro("memcpy")
#undef memcpy
+#pragma push_macro("memmove")
#undef memmove
+#pragma push_macro("memset")
#undef memset
+#pragma push_macro("strcat")
#undef strcat
+#pragma push_macro("strcpy")
#undef strcpy
+#pragma push_macro("strncat")
#undef strncat
+#pragma push_macro("strncpy")
#undef strncpy
_FORTIFY_FN(memcpy) void *memcpy(void * _FORTIFY_POS0 __od,
@@ -183,6 +190,14 @@ _FORTIFY_FN(strlcpy) size_t strlcpy(char * _FORTIFY_POS0 __d,
}
#endif
+#pragma pop_macro("memcpy")
+#pragma pop_macro("memmove")
+#pragma pop_macro("memset")
+#pragma pop_macro("strcat")
+#pragma pop_macro("strcpy")
+#pragma pop_macro("strncat")
+#pragma pop_macro("strncpy")
+
#ifdef __cplusplus
}
#endif
--- a/include/fortify/strings.h
+++ b/include/fortify/strings.h
@@ -29,8 +29,12 @@ extern "C" {
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_POSIX_SOURCE) \
|| (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE+0 < 200809L) \
|| (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
+
+#pragma push_macro("bcopy")
#undef bcopy
+#pragma push_macro("bzero")
#undef bzero
+
_FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s,
void * _FORTIFY_POS0 __d, size_t __n)
{
@@ -52,6 +56,9 @@ _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n)
}
#endif
+#pragma pop_macro("bcopy")
+#pragma pop_macro("bzero")
+
#ifdef __cplusplus
}
#endif
--- a/include/fortify/sys/socket.h
+++ b/include/fortify/sys/socket.h
@@ -29,9 +29,13 @@ __extension__
extern "C" {
#endif
+#pragma push_macro("recv")
#undef recv
+#pragma push_macro("recvfrom")
#undef recvfrom
+#pragma push_macro("send")
#undef send
+#pragma push_macro("sendto")
#undef sendto
_FORTIFY_FN(recv) ssize_t recv(int __f, void * _FORTIFY_POS0 __s, size_t __n,
@@ -76,6 +80,11 @@ _FORTIFY_FN(sendto) ssize_t sendto(int __f, const void * _FORTIFY_POS0 __s,
return __orig_sendto(__f, __s, __n, __fl, __a, __l);
}
+#pragma push_macro("recv")
+#pragma push_macro("recvfrom")
+#pragma push_macro("send")
+#pragma push_macro("sendto")
+
#ifdef __cplusplus
}
#endif
--- a/include/fortify/unistd.h
+++ b/include/fortify/unistd.h
@@ -29,16 +29,27 @@ __extension__
extern "C" {
#endif
+#pragma push_macro("confstr")
#undef confstr
+#pragma push_macro("getcwd")
#undef getcwd
+#pragma push_macro("getgroups")
#undef getgroups
+#pragma push_macro("gethostname")
#undef gethostname
+#pragma push_macro("getlogin_r")
#undef getlogin_r
+#pragma push_macro("pread")
#undef pread
+#pragma push_macro("read")
#undef read
+#pragma push_macro("readlink")
#undef readlink
+#pragma push_macro("readlinkat")
#undef readlinkat
+#pragma push_macro("ttyname_r")
#undef ttyname_r
+#pragma push_macro("write")
#undef write
_FORTIFY_FN(confstr) size_t confstr(int __n, char * _FORTIFY_POS0 __s, size_t __l)
@@ -158,6 +169,18 @@ _FORTIFY_FN(write) ssize_t write(int __f, const void * _FORTIFY_POS0 __s,
return __orig_write(__f, __s, __n);
}
+#pragma pop_macro("confstr")
+#pragma pop_macro("getcwd")
+#pragma pop_macro("getgroups")
+#pragma pop_macro("gethostname")
+#pragma pop_macro("getlogin_r")
+#pragma pop_macro("pread")
+#pragma pop_macro("read")
+#pragma pop_macro("readlink")
+#pragma pop_macro("readlinkat")
+#pragma pop_macro("ttyname_r")
+#pragma pop_macro("write")
+
#ifdef __cplusplus
}
#endif
--- a/include/fortify/wchar.h
+++ b/include/fortify/wchar.h
@@ -43,19 +43,33 @@ __extension__
extern "C" {
#endif
+#pragma push_macro("fgetws")
#undef fgetws
+#pragma push_macro("mbsrtowcs")
#undef mbsrtowcs
+#pragma push_macro("mbstowcs")
#undef mbstowcs
+#pragma push_macro("wcrtomb")
#undef wcrtomb
+#pragma push_macro("wcscat")
#undef wcscat
+#pragma push_macro("wcscpy")
#undef wcscpy
+#pragma push_macro("wcsncat")
#undef wcsncat
+#pragma push_macro("wcsncpy")
#undef wcsncpy
+#pragma push_macro("wcsrtombs")
#undef wcsrtombs
+#pragma push_macro("wcstombs")
#undef wcstombs
+#pragma push_macro("wctomb")
#undef wctomb
+#pragma push_macro("wmemcpy")
#undef wmemcpy
+#pragma push_macro("wmemmove")
#undef wmemmove
+#pragma push_macro("wmemset")
#undef wmemset
_FORTIFY_FN(fgetws) wchar_t *fgetws(wchar_t * _FORTIFY_POS0 __s,
@@ -269,6 +283,21 @@ _FORTIFY_FN(wmemset) wchar_t *wmemset(wchar_t * _FORTIFY_POS0 __s,
return __orig_wmemset(__s, __c, __n);
}
+#pragma pop_macro("fgetws")
+#pragma pop_macro("mbsrtowcs")
+#pragma pop_macro("mbstowcs")
+#pragma pop_macro("wcrtomb")
+#pragma pop_macro("wcscat")
+#pragma pop_macro("wcscpy")
+#pragma pop_macro("wcsncat")
+#pragma pop_macro("wcsncpy")
+#pragma pop_macro("wcsrtombs")
+#pragma pop_macro("wcstombs")
+#pragma pop_macro("wctomb")
+#pragma pop_macro("wmemcpy")
+#pragma pop_macro("wmemmove")
+#pragma pop_macro("wmemset")
+
#ifdef __cplusplus
}
#endif

View File

@@ -0,0 +1,41 @@
wchar.h: only include other headers if _FORTIFY_SOURCE is enabled
unexpectedly including other headers can cause problems with
sensitive/brittle code, particularly with alternative compilers
(clang) which are already operating on the margins of what's
supported/expected by some projects.
having a way to almost entirely short-circuit these headers (by
disabling _FORTIFY_SOURCE) is therefore important.
--- a/include/fortify/wchar.h
+++ b/include/fortify/wchar.h
@@ -20,21 +20,23 @@
#if !defined(__cplusplus) && !defined(__clang__)
__extension__
#endif
-#include_next <limits.h>
+#include_next <wchar.h>
+
+#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
+
#if !defined(__cplusplus) && !defined(__clang__)
__extension__
#endif
-#include_next <stdlib.h>
+#include_next <limits.h>
#if !defined(__cplusplus) && !defined(__clang__)
__extension__
#endif
-#include_next <string.h>
+#include_next <stdlib.h>
#if !defined(__cplusplus) && !defined(__clang__)
__extension__
#endif
-#include_next <wchar.h>
+#include_next <string.h>
-#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
#include "fortify-headers.h"
#ifdef __cplusplus

View File

@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchurl,
gfortran,
versionCheckHook,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "fortran-fpm";
version = "0.11.0";
src = fetchurl {
url = "https://github.com/fortran-lang/fpm/releases/download/v${finalAttrs.version}/fpm-${finalAttrs.version}.F90";
hash = "sha256-mIozF+4kSO5yB9CilBDwinnIa92sMxSyoXWAGpz1jSc=";
};
dontUnpack = true;
nativeBuildInputs = [ gfortran ];
buildPath = "build/bootstrap";
buildPhase = ''
runHook preBuild
mkdir -p ${finalAttrs.buildPath}
gfortran -J ${finalAttrs.buildPath} -o ${finalAttrs.buildPath}/fortran-fpm $src
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ${finalAttrs.buildPath}/fortran-fpm $out/bin
runHook postInstall
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Fortran Package Manager (fpm)";
homepage = "https://fpm.fortran-lang.org";
maintainers = [ lib.maintainers.proofconstruction ];
license = lib.licenses.mit;
platforms = lib.platforms.all;
mainProgram = "fortran-fpm";
};
})

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
libiconv,
makeBinaryWrapper,
installShellFiles,
fortuneAlias ? true,
}:
rustPlatform.buildRustPackage rec {
pname = "fortune-kind";
version = "0.1.13";
src = fetchFromGitHub {
owner = "cafkafk";
repo = "fortune-kind";
rev = "v${version}";
hash = "sha256-Tpg0Jq2EhkwQuz5ZOtv6Rb5YESSlmzLoJPTxYJNNgac=";
};
cargoHash = "sha256-Kp3pv9amEz9oFMDhz0IZDmhpsok5VgrvJZfwSPyz2X0=";
nativeBuildInputs = [
makeBinaryWrapper
installShellFiles
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
buildNoDefaultFeatures = true;
MAN_OUT = "./man";
preBuild = ''
mkdir -p "./$MAN_OUT";
'';
preInstall = ''
installManPage man/fortune-kind.1
installShellCompletion \
--fish man/fortune-kind.fish \
--bash man/fortune-kind.bash \
--zsh man/_fortune-kind
mkdir -p $out
cp -r $src/fortunes $out/fortunes;
'';
postInstall = ''
wrapProgram $out/bin/fortune-kind \
--set-default FORTUNE_DIR "$out/fortunes"
''
+ lib.optionalString fortuneAlias ''
ln -s fortune-kind $out/bin/fortune
'';
meta = {
description = "Kinder, curated fortune, written in rust";
longDescription = ''
Historically, contributions to fortune-mod have had a less-than ideal
quality control process, and as such, many of the fortunes that a user may
receive from the program read more like cryptic inside jokes, or at the
very worst, locker-room banter. One of the major goals of fortune-kind is
defining and applying a somewhat more rigorous moderation and editing
process to the fortune adoption workflow.
'';
homepage = "https://github.com/cafkafk/fortune-kind";
changelog = "https://github.com/cafkafk/fortune-kind/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
mainProgram = "fortune-kind";
maintainers = with lib.maintainers; [ cafkafk ];
platforms = lib.platforms.unix ++ lib.platforms.windows;
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
fetchurl,
cmake,
recode,
perl,
rinutils,
fortune,
withOffensive ? false,
}:
stdenv.mkDerivation rec {
pname = "fortune-mod";
version = "3.24.0";
# We use fetchurl instead of fetchFromGitHub because the release pack has some
# special files.
src = fetchurl {
url = "https://github.com/shlomif/fortune-mod/releases/download/fortune-mod-${version}/fortune-mod-${version}.tar.xz";
sha256 = "sha256-Hzh4dyVOleq2H5NyV7QmCfKbmU7wVxUxZVu/w6KsdKw=";
};
nativeBuildInputs = [
cmake
perl
rinutils
]
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
# "strfile" must be in PATH for cross-compiling builds.
fortune
];
buildInputs = [ recode ];
cmakeFlags = [
"-DLOCALDIR=${placeholder "out"}/share/fortunes"
]
++ lib.optional (!withOffensive) "-DNO_OFFENSIVE=true";
patches = [
(builtins.toFile "not-a-game.patch" ''
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 865e855..5a59370 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -154,7 +154,7 @@ ENDMACRO()
my_exe(
"fortune"
"fortune/fortune.c"
- "games"
+ "bin"
)
my_exe(
--
'')
];
postFixup = lib.optionalString (!withOffensive) ''
rm $out/share/games/fortunes/men-women*
'';
meta = with lib; {
mainProgram = "fortune";
description = "Program that displays a pseudorandom message from a database of quotations";
license = licenses.bsdOriginal;
platforms = platforms.unix;
maintainers = with maintainers; [ vonfry ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
iptables,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "gerbil";
version = "1.2.1";
src = fetchFromGitHub {
owner = "fosrl";
repo = "gerbil";
tag = version;
hash = "sha256-Pnti0agkohRBWQ42cqNOA5TnnSLP9JbOK1eyGf88cao=";
};
vendorHash = "sha256-Sz+49ViQUwJCy7wXDrQf7c76rOZbSGBCgB+Du8T6ug0=";
# patch out the /usr/sbin/iptables
postPatch = ''
substituteInPlace main.go \
--replace-fail '/usr/sbin/iptables' '${lib.getExe iptables}'
'';
meta = {
description = "Simple WireGuard interface management server";
mainProgram = "gerbil";
homepage = "https://github.com/fosrl/gerbil";
changelog = "https://github.com/fosrl/gerbil/releases/tag/${version}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
jackr
sigmasquadron
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "newt";
version = "1.5.1";
src = fetchFromGitHub {
owner = "fosrl";
repo = "newt";
tag = version;
hash = "sha256-CtE4Ug1659Xu90CRMIxXeqfVaw9kOK4WpsW/u3S0ztA=";
};
vendorHash = "sha256-VR5YOprMP3wvwb0lnW9KyUWGs/4Zm5GKBe4vnkN32cY=";
postPatch = ''
substituteInPlace main.go \
--replace-fail "version_replaceme" "${version}"
'';
nativeInstallCheckInputs = [ versionCheckHook ];
ldflags = [
"-s"
"-w"
];
doInstallCheck = true;
versionCheckProgramArg = [ "-version" ];
meta = {
description = "Tunneling client for Pangolin";
homepage = "https://github.com/fosrl/newt";
changelog = "https://github.com/fosrl/newt/releases/tag/${src.tag}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
fab
jackr
sigmasquadron
];
mainProgram = "newt";
};
}

Some files were not shown because too many files have changed in this diff Show More