mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
factor-lang: 0.100 -> 0.101
Fixes issues with the help browser by copying vocabulary roots instead of symlinking them. Although, I am convinced that this is an issue that should be fixed upstream, eventually. Fixes #469242 Fixes #474869
This commit is contained in:
@@ -22,6 +22,8 @@ The package is defined in `pkgs/development/compilers/factor-lang/wrapper.nix` a
|
||||
|
||||
The package also passes through several attributes listing the wrapped libraries and binaries, namely, `extraLibs` and `binPackages` as well as `defaultLibs` and `defaultBins`.
|
||||
Additionally, all `runtimeLibs` is the concatenation of all the above for the purpose of providing all necessary dynamic libraries as "`propagatedBuildInputs`".
|
||||
Lastly, `extraVocabs` is passed through as is for stacked composition, and the fully composed `vocabTree` is passed through as a store path.
|
||||
This makes it easier for external plugins (e.g. for editors and IDEs) to refer to the Factor vocabulary roots.
|
||||
|
||||
`factorPackages` provides pre-configured Factor packages:
|
||||
- `factorPackages.factor-lang` is the default package with GUI support and several default library bindings (e.g. openssl, openal etc.).
|
||||
|
||||
@@ -9,6 +9,17 @@
|
||||
- Node.js default version has been updated from 22 LTS to 24 LTS.
|
||||
This introduces some breaking changes; Refer to the [upstream migration article](https://nodejs.org/en/blog/migrations/v22-to-v24) for details.
|
||||
|
||||
- The Factor programming language has been updated to Version 0.101 bringing various improvements to UI rendering and HiDPI support as well as support for Unicode 17.0.0.
|
||||
Starting from Version 0.100, the Factor VM is compiled with Clang.
|
||||
|
||||
This brings along some backwards compatibility issues in the language further detailed [here](https://re.factorcode.org/2025/12/factor-0-101-now-available.html).
|
||||
Additionally, the FUEL Emacs module is no longer part of the `factor-lang` package.
|
||||
It is part of the MELPA package set for a while already and must be taken from there.
|
||||
This *does not affect* `factor-lang` packages Version 0.99 and 0.100.
|
||||
Using the official MELPA package now puts the burden of providing the path to `/lib/factor` in `factor-root-dir` on the user.
|
||||
Make sure to use the `extraVocabs` package attribute to compose a special vocabulary tree if necessary.
|
||||
You can refer to the generated tree of vocabulary roots via the newly exposed `vocabTree` attribute, as described in the [documentation](#ssec-factor-dev-env).
|
||||
|
||||
- Nixpkgs configuration, specified for NixOS using `nixpkgs.config`, or using the `config` argument when importing nixpkgs, has learned to accept a `lib` argument as well as `pkgs`, which allows the configuration to be computed without depending on the `pkgs` fixed point. If you are referencing licenses in `lib.licenses` by having this configuration be a function taking a `pkgs` arg, you may wish to change to using `lib` for faster computation and to avoid infinite recursion errors if pkgs depends on parts of the computed configuration in future.
|
||||
|
||||
For example, if you currently have configuration that looks like this:
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
{ callPackage, fetchurl }:
|
||||
{ callPackage, fetchurl, ... }@args:
|
||||
|
||||
callPackage ./unwrapped.nix rec {
|
||||
version = "0.100";
|
||||
src = fetchurl {
|
||||
url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip";
|
||||
hash = "sha256-ei1x6mgEoDVe1mKfoWSGC9RgZCONovAPYfIdAlOGi+0=";
|
||||
};
|
||||
}
|
||||
callPackage ./unwrapped.nix (
|
||||
rec {
|
||||
version = "0.100";
|
||||
src = fetchurl {
|
||||
url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip";
|
||||
hash = "sha256-ei1x6mgEoDVe1mKfoWSGC9RgZCONovAPYfIdAlOGi+0=";
|
||||
};
|
||||
}
|
||||
// (builtins.removeAttrs args [
|
||||
"callPackage"
|
||||
"fetchurl"
|
||||
])
|
||||
)
|
||||
|
||||
15
pkgs/development/compilers/factor-lang/0.101.nix
Normal file
15
pkgs/development/compilers/factor-lang/0.101.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ callPackage, fetchurl, ... }@args:
|
||||
|
||||
callPackage ./unwrapped.nix (
|
||||
rec {
|
||||
version = "0.101";
|
||||
src = fetchurl {
|
||||
url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip";
|
||||
hash = "sha256-uIuk309xZt+sV7WUza/tpeJRA6CnXAajL15X6S6vtFY=";
|
||||
};
|
||||
}
|
||||
// (builtins.removeAttrs args [
|
||||
"callPackage"
|
||||
"fetchurl"
|
||||
])
|
||||
)
|
||||
@@ -1,9 +1,15 @@
|
||||
{ callPackage, fetchurl }:
|
||||
{ callPackage, fetchurl, ... }@args:
|
||||
|
||||
callPackage ./unwrapped.nix rec {
|
||||
version = "0.99";
|
||||
src = fetchurl {
|
||||
url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip";
|
||||
sha256 = "f5626bb3119bd77de9ac3392fdbe188bffc26557fab3ea34f7ca21e372a8443e";
|
||||
};
|
||||
}
|
||||
callPackage ./unwrapped.nix (
|
||||
rec {
|
||||
version = "0.99";
|
||||
src = fetchurl {
|
||||
url = "https://downloads.factorcode.org/releases/${version}/factor-src-${version}.zip";
|
||||
sha256 = "f5626bb3119bd77de9ac3392fdbe188bffc26557fab3ea34f7ca21e372a8443e";
|
||||
};
|
||||
}
|
||||
// (builtins.removeAttrs args [
|
||||
"callPackage"
|
||||
"fetchurl"
|
||||
])
|
||||
)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
makeWrapper,
|
||||
curl,
|
||||
git,
|
||||
@@ -14,6 +13,10 @@
|
||||
src,
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) optionalString versionOlder;
|
||||
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "factor-lang";
|
||||
|
||||
@@ -45,7 +48,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
substituteInPlace extra/terminfo/terminfo.factor \
|
||||
--replace-fail '/usr/share/terminfo' '${ncurses.out}/share/terminfo'
|
||||
|
||||
''
|
||||
+ optionalString (versionOlder finalAttrs.version "0.101") ''
|
||||
# update default paths in fuel-listener.el for fuel mode
|
||||
substituteInPlace misc/fuel/fuel-listener.el \
|
||||
--replace-fail '(defcustom fuel-factor-root-dir nil' "(defcustom fuel-factor-root-dir \"$out/lib/factor\""
|
||||
@@ -74,12 +78,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/lib/factor $out/share/emacs/site-lisp
|
||||
mkdir -p $out/lib/factor
|
||||
cp -r factor factor.image libfactor.a libfactor-ffi-test.so \
|
||||
boot.*.image LICENSE.txt README.md basis core extra misc \
|
||||
boot.unix-*.image LICENSE.txt README.md basis core extra misc \
|
||||
$out/lib/factor
|
||||
|
||||
''
|
||||
+ optionalString (versionOlder finalAttrs.version "0.101") ''
|
||||
# install fuel mode for emacs
|
||||
mkdir -p $out/share/emacs/site-lisp
|
||||
ln -r -s $out/lib/factor/misc/fuel/*.el $out/share/emacs/site-lisp
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
stdenv,
|
||||
makeWrapper,
|
||||
buildEnv,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
factor-unwrapped,
|
||||
cairo,
|
||||
freealut,
|
||||
@@ -35,7 +37,13 @@
|
||||
doInstallCheck ? true,
|
||||
}:
|
||||
let
|
||||
inherit (lib) optional optionals optionalString;
|
||||
inherit (lib)
|
||||
optional
|
||||
optionals
|
||||
optionalString
|
||||
versionOlder
|
||||
versionAtLeast
|
||||
;
|
||||
# missing from lib/strings
|
||||
escapeNixString = s: lib.escape [ "$" ] (builtins.toJSON s);
|
||||
toFactorArgs = x: lib.concatStringsSep " " (map escapeNixString x);
|
||||
@@ -82,34 +90,62 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "${factor-unwrapped.pname}-env";
|
||||
inherit (factor-unwrapped) version;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
makeWrapper
|
||||
];
|
||||
buildInputs = optional guiSupport gdk-pixbuf;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "Factor";
|
||||
desktopName = "Factor";
|
||||
comment = "A practical stack language";
|
||||
exec = "factor";
|
||||
icon = "factor";
|
||||
categories = [
|
||||
"Development"
|
||||
"IDE"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
''
|
||||
+ optionalString guiSupport ''
|
||||
# Set Gdk pixbuf loaders file to the one from the build dependencies here
|
||||
unset GDK_PIXBUF_MODULE_FILE
|
||||
# Defined in gdk-pixbuf setup hook
|
||||
findGdkPixbufLoaders "${librsvg}"
|
||||
makeWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
|
||||
''
|
||||
+ optionalString guiSupport (
|
||||
''
|
||||
# Set Gdk pixbuf loaders file to the one from the build dependencies here
|
||||
unset GDK_PIXBUF_MODULE_FILE
|
||||
# Defined in gdk-pixbuf setup hook
|
||||
findGdkPixbufLoaders "${librsvg}"
|
||||
makeWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
|
||||
''
|
||||
+ optionalString (versionAtLeast finalAttrs.version "0.101") ''
|
||||
mkdir -p $out/share/applications $out/share/icons/hicolor/scalable/apps
|
||||
cp ${factor-unwrapped}/lib/factor/misc/icons/icon.svg $out/share/icons/hicolor/scalable/apps/factor.svg
|
||||
cp ${factor-unwrapped}/lib/factor/misc/icons/icon.ico $out/share/icons/hicolor/scalable/apps/factor.ico
|
||||
for i in 16 32 48 64 128 256 512; do
|
||||
mkdir -p $out/share/icons/hicolor/''${i}x''${i}/apps
|
||||
cp ${factor-unwrapped}/lib/factor/misc/icons/icon_''${i}x''${i}.png $out/share/icons/hicolor/''${i}x''${i}/apps/factor.png
|
||||
done
|
||||
''
|
||||
)
|
||||
+ ''
|
||||
makeWrapperArgs+=(
|
||||
--prefix LD_LIBRARY_PATH : /run/opengl-driver/lib:${lib.makeLibraryPath runtimeLibs}
|
||||
--prefix PATH : ${lib.makeBinPath bins})
|
||||
mkdir -p "$out/bin" "$out/share"
|
||||
mkdir -p "$out/bin"
|
||||
cp -r "${factor-unwrapped}/lib" "$out/"
|
||||
cp -r "${factor-unwrapped}/share/emacs" "$out/share/"
|
||||
chmod -R u+w "$out/lib" "$out/share"
|
||||
chmod -R u+w "$out/lib"
|
||||
rm -rf "$out/lib/factor/misc"
|
||||
(
|
||||
cd ${vocabTree}
|
||||
for f in "lib/factor/"* ; do
|
||||
rm -r "$out/$f"
|
||||
ln -s "${vocabTree}/$f" "$out/$f"
|
||||
cp -rL "${vocabTree}/$f" "$out/$f"
|
||||
done
|
||||
)
|
||||
|
||||
@@ -136,9 +172,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Emacs fuel expects the image being named `factor.image` in the factor base dir
|
||||
ln -rs $out/lib/factor/.factor-wrapped.image $out/lib/factor/factor.image
|
||||
|
||||
''
|
||||
+ optionalString (versionOlder finalAttrs.version "0.101") ''
|
||||
mkdir -p "$out/share/emacs/site-lisp"
|
||||
cp -r "${factor-unwrapped}/lib/factor/misc/fuel/"*.el "$out/share/emacs/site-lisp"
|
||||
chmod -R u+wr "$out/share/emacs"
|
||||
# Update default paths in fuel-listener.el to new output
|
||||
sed -E -i -e 's#(\(defcustom fuel-factor-root-dir ").*(")#'"\1$out/lib/factor\2#" \
|
||||
"$out/share/emacs/site-lisp/fuel-listener.el"
|
||||
''
|
||||
+ ''
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
@@ -175,6 +218,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
runtimeLibs
|
||||
binPackages
|
||||
extraVocabs
|
||||
vocabTree
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
@@ -6769,13 +6769,21 @@ with pkgs;
|
||||
factor-unwrapped = callPackage ../development/compilers/factor-lang/0.99.nix { };
|
||||
};
|
||||
factorPackages-0_100 = callPackage ./factor-packages.nix {
|
||||
factor-unwrapped = callPackage ../development/compilers/factor-lang/0.100.nix { };
|
||||
factor-unwrapped = callPackage ../development/compilers/factor-lang/0.100.nix {
|
||||
stdenv = clangStdenv;
|
||||
};
|
||||
};
|
||||
factorPackages-0_101 = callPackage ./factor-packages.nix {
|
||||
factor-unwrapped = callPackage ../development/compilers/factor-lang/0.101.nix {
|
||||
stdenv = clangStdenv;
|
||||
};
|
||||
};
|
||||
factorPackages = factorPackages-0_100;
|
||||
|
||||
factor-lang-0_99 = factorPackages-0_99.factor-lang;
|
||||
factor-lang-0_100 = factorPackages-0_100.factor-lang;
|
||||
factor-lang = factor-lang-0_100;
|
||||
factor-lang-0_101 = factorPackages-0_101.factor-lang;
|
||||
factor-lang = factor-lang-0_101;
|
||||
|
||||
farstream = callPackage ../development/libraries/farstream {
|
||||
inherit (gst_all_1)
|
||||
|
||||
Reference in New Issue
Block a user