factor-lang: 0.101 -> 0.102

Switch to pcre2 and gtk4.

Mark old versions for removal in release after next release.
This commit is contained in:
Michael Raitza
2026-10-14 11:15:07 +02:00
parent 7694c4f6b8
commit c16cfa7202
12 changed files with 165 additions and 31 deletions

View File

@@ -317,6 +317,10 @@
- `extra-container` v0.17 now enforces assertions and warnings, and is hosted at [new org/repo extra-container/extra-container](https://github.com/extra-container/extra-container). Full changes: [CHANGELOG](https://github.com/extra-container/extra-container/blob/main/CHANGELOG.md)
- `factor-lang` has been updated to 0.102 introducing GTK4 and PCRE2 support.
Support of i686-linux (using GTK3) has also been added.
Subsequently `factor-lang-0_99` to `factor-lang-0_101` have been marked for removal in the next release, as they receive no updates from upstream.
- `buildPythonPackage` and `buildPythonApplication` now uses `meta.problems.unsupportedPython` to mark Python packages with unsupported Python interpreters.
- The `disabled` argument automatically converts to `meta.problems.unsupportedPython` with the default message.
- Overriding the `disabled` argument or the `passthru.disabled` attribute is deprecated.
@@ -409,6 +413,10 @@
- `macaulay2` no longer installs Emacs files.
Users can now get the files from an Emacs lisp package, like `emacs.pkgs.withPackages (epkgs: [ epkgs.m2 ])`.
- `factor-lang-*` packages silently switched from PCRE to PCRE2.
Thus, factor applications using extra/pcre must switch to extra/pcre2 or have to add the old pcre library back via the `extraLibs` attribute.
Upgrade to version 0.102 for full PCRE2 support via extra/pcre2 which is on par with extra/pcre from that release onwards.
- `navidrome`'s plugin infrastructure has significantly changed. `buildNavidromePlugin` is renamed to `buildNavidromeGoPlugin` to allow for other language types. Plugins must now be sourced from `pkgsCross.wasi32.navidromePlugins.<name>`.
- `navidromePlugins.apple-music` now uses a `bundleName` attribute which sets the plugin's name to match the plugin's documentation for easier use. You will need to update your Agent from `apple-music-plugin` to `apple-music` as noted in [their docs](https://github.com/navidrome/apple-music-plugin#installation).

View File

@@ -1,6 +1,6 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./unwrapped.nix (
(callPackage ./unwrapped.nix (
rec {
version = "0.100";
src = fetchurl {
@@ -12,4 +12,9 @@ callPackage ./unwrapped.nix (
"callPackage"
"fetchurl"
])
)
)).overrideAttrs
(oA: {
meta = (oA.meta or { }) // {
problems.removal.message = "Package to be removed in release following 26.11";
};
})

View File

@@ -1,6 +1,6 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./unwrapped.nix (
(callPackage ./unwrapped.nix (
rec {
version = "0.101";
src = fetchurl {
@@ -12,4 +12,9 @@ callPackage ./unwrapped.nix (
"callPackage"
"fetchurl"
])
)
)).overrideAttrs
(oA: {
meta = (oA.meta or { }) // {
problems.removal.message = "Package to be removed in release following 26.11";
};
})

View File

@@ -0,0 +1,15 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./unwrapped.nix (
rec {
version = "0.102";
src = fetchurl {
url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip";
hash = "sha256-bQDrq9sYWkCiUlELze0zGgW56DMMXckKGBpjVaMuOrU=";
};
}
// (builtins.removeAttrs args [
"callPackage"
"fetchurl"
])
)

View File

@@ -1,6 +1,6 @@
{ callPackage, fetchurl, ... }@args:
callPackage ./unwrapped.nix (
(callPackage ./unwrapped.nix (
rec {
version = "0.99";
src = fetchurl {
@@ -12,4 +12,9 @@ callPackage ./unwrapped.nix (
"callPackage"
"fetchurl"
])
)
)).overrideAttrs
(oA: {
meta = (oA.meta or { }) // {
problems.removal.message = "Package to be removed in release following 26.11";
};
})

View File

@@ -0,0 +1,24 @@
diff '--color=auto' -ru factor.orig/basis/io/standard-paths/unix/unix-tests.factor factor/basis/io/standard-paths/unix/unix-tests.factor
--- factor.orig/basis/io/standard-paths/unix/unix-tests.factor 2026-10-14 13:50:47.445394923 +0200
+++ factor/basis/io/standard-paths/unix/unix-tests.factor 2026-10-14 13:52:28.077933912 +0200
@@ -56,17 +56,17 @@
{ f } [ "" find-in-path ] unit-test
{ t } [
- "ls" find-in-path { "/bin/ls" "/usr/bin/ls" } member?
+ "ls" find-in-path not not
] unit-test
{ t } [
"/sbin:" "PATH" os-env append "PATH" [
"ps" find-in-path
- { "/bin/ps" "/sbin/ps" "/usr/bin/ps" } member?
+ not not
] with-os-env
] unit-test
{ t } [
"ls" find-in-standard-login-path
- { "/bin/ls" "/usr/bin/ls" } member?
+ not not
] unit-test

View File

@@ -0,0 +1,28 @@
diff '--color=auto' -ru factor.orig/basis/alien/libraries/finder/linux/linux.factor factor/basis/alien/libraries/finder/linux/linux.factor
--- factor.orig/basis/alien/libraries/finder/linux/linux.factor 2026-10-14 13:50:47.453225475 +0200
+++ factor/basis/alien/libraries/finder/linux/linux.factor 2026-10-14 14:03:13.204120995 +0200
@@ -33,16 +33,14 @@
] map ;
: load-ldconfig-cache ( -- seq )
- "ldconfig" find-in-path [
- { "/usr/sbin/ldconfig" "/sbin/ldconfig" }
- [ dup file-exists? [ file-executable? ] [ drop f ] if ] find nip
- ] unless*
- [
- "-p" 2array <process> swap >>command +closed+ >>stderr
- utf8 [ read-lines ] with-process-reader* nip 0 = [
- [ "=>" swap subseq? ] filter parse-ldconfig-lines
- ] [ drop { } ] if
- ] [ { } ] if* ;
+ "FACTOR_LD_SO_CACHE" os-env [
+ utf8 [ read-lines ] with-file-reader
+ ] [
+ { } clone
+ ] if*
+ [ { } ] [
+ [ "=>" swap subseq? ] filter parse-ldconfig-lines
+ ] if-empty ;
! Inspect, do not dlopen, discovery candidates: loading would execute their
! constructors. Also reject linker scripts and foreign-architecture DSOs.

View File

@@ -127,6 +127,7 @@ in
'';
__structuredAttrs = true;
strictDeps = true;
installPhase =
attrs.installPhase or /* bash */ ''

View File

@@ -20,6 +20,10 @@ drvArgs:
}@attrs:
{
inherit vocabName vocabRoot;
__structuredAttrs = true;
strictDeps = true;
installPhase =
# Default installer
# 1. If lib/factor/<vocabRoot>/<vocabName> exists, copy all vocab roots

View File

@@ -21,17 +21,31 @@ stdenv.mkDerivation (finalAttrs: {
pname = "factor-lang";
inherit src version;
__structuredAttrs = true;
strictDeps = true;
patches = [
# Use full path to image while bootstrapping
./staging-command-line-0.99-pre.patch
# Point work vocabulary root to a writable location
./workdir-0.99-pre.patch
# Patch hard-coded FHS paths
./adjust-paths-in-unit-tests.patch
# Avoid using /sbin/ldconfig
./ld.so.cache-from-env.patch
];
]
++ (
if (versionOlder finalAttrs.version "0.102") then
[
# Patch hard-coded FHS paths
./adjust-paths-in-unit-tests.patch
# Avoid using /sbin/ldconfig
./ld.so.cache-from-env.patch
]
else
[
# Patch hard-coded FHS paths
./adjust-paths-in-unit-tests-0.102.patch
# Avoid using /sbin/ldconfig
./ld.so.cache-from-env-0.102.patch
]
);
nativeBuildInputs = [
git
@@ -41,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: {
];
postPatch = ''
sed -ie '4i GIT_LABEL = heads/master-'$(< git-id) GNUmakefile
sed -i -e '/GIT_LABEL :=/c GIT_LABEL := heads/master-'$(< git-id) GNUmakefile
# Some other hard-coded paths to fix:
substituteInPlace extra/tzinfo/tzinfo.factor \
--replace-fail '/usr/share/zoneinfo' '${tzdata}/share/zoneinfo'

View File

@@ -13,10 +13,12 @@
freealut,
gdk-pixbuf,
glib,
gtk2-x11,
gtkglext,
gtk2-x11, # to be retired with <= 0.101
gtkglext, # to be retired with <= 0.101
libGL,
libGLU,
gtk4,
libepoxy,
librsvg,
graphviz,
libogg,
@@ -24,7 +26,7 @@
openal,
openssl,
pango,
pcre,
pcre2,
udis86,
zlib,
# Enable factor GUI support
@@ -53,7 +55,7 @@ let
libvorbis
openal
openssl
pcre
pcre2
udis86
zlib
];
@@ -62,19 +64,31 @@ let
defaultLibs
++ extraLibs
++ binPackages
++ (lib.flatten (map (v: v.extraLibs or [ ]) extraVocabs))
++ optionals guiSupport [
cairo
freealut
gdk-pixbuf
glib
gtk2-x11
gtkglext
libGL
libGLU
pango
];
bins = binPackages ++ defaultBins ++ (lib.flatten (map (v: v.extraPaths or [ ]) extraVocabs));
++ (builtins.concatMap (v: v.extraLibs or [ ]) extraVocabs)
++ optionals guiSupport (
[
cairo
freealut
gdk-pixbuf
glib
libGL
libGLU
pango
]
++ (
if (versionOlder factor-unwrapped.version "0.102") then
[
gtk2-x11
gtkglext
]
else
[
gtk4
libepoxy
]
)
);
bins = binPackages ++ defaultBins ++ (builtins.concatMap (v: v.extraPaths or [ ]) extraVocabs);
vocabTree = buildEnv {
name = "${factor-unwrapped.pname}-vocabs";
ignoreCollisions = true;
@@ -97,6 +111,9 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = optional guiSupport gdk-pixbuf;
__structuredAttrs = true;
strictDeps = true;
dontUnpack = true;
desktopItems = [
@@ -211,6 +228,8 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstallCheck
'';
dontStrip = true; # Have been stripped already
passthru = {
inherit
defaultLibs

View File

@@ -5452,12 +5452,18 @@ with pkgs;
stdenv = clangStdenv;
};
};
factorPackages = factorPackages-0_101;
factorPackages-0_102 = callPackage ./factor-packages.nix {
factor-unwrapped = callPackage ../development/compilers/factor-lang/0.102.nix {
stdenv = clangStdenv;
};
};
factorPackages = factorPackages-0_102;
factor-lang-0_99 = factorPackages-0_99.factor-lang;
factor-lang-0_100 = factorPackages-0_100.factor-lang;
factor-lang-0_101 = factorPackages-0_101.factor-lang;
factor-lang = factor-lang-0_101;
factor-lang-0_102 = factorPackages-0_102.factor-lang;
factor-lang = factor-lang-0_102;
inherit (callPackage ../development/libraries/ffmpeg { })
ffmpeg_4