11 Commits

Author SHA1 Message Date
d3252333eb gfWithPackages: init
Some checks failed
Build and populate cache / tests (sydpkgs, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz, sydpkgs) (push) Has been cancelled
2026-02-15 21:01:13 -07:00
2d0874fd1d gf-rgl: init 2026-02-15 20:45:55 -07:00
0dd41f4833 gf: rename to gf-core
Some checks failed
Build and populate cache / tests (sydpkgs, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz, sydpkgs) (push) Has been cancelled
2026-02-15 20:39:36 -07:00
319dd9fc0a gf: init
Some checks failed
Build and populate cache / tests (sydpkgs, nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixpkgs-unstable.tar.gz, sydpkgs) (push) Has been cancelled
2026-02-15 20:32:23 -07:00
233479ab27 quiver: bump 2026-01-09 09:15:57 -07:00
7a3eaf6788 feat(syd-plex-latex): cjk 2025-12-28 15:55:38 -07:00
ed4942cd58 fix(syd-plex-latex): oops 2025-12-28 15:34:47 -07:00
32fe0d26fa feat: overlay 2025-12-28 15:20:50 -07:00
2c56bb6153 feat(syd-plex-latex): uhh 2025-12-28 15:20:24 -07:00
7bf331a498 feat(syd-plex-latex): init 2025-12-16 12:43:54 -07:00
b95632af08 feat(iropke-batang): init 2025-12-14 13:06:44 -07:00
10 changed files with 174 additions and 5 deletions

View File

@@ -19,5 +19,7 @@
lib.filterAttrs
(_: v: lib.isDerivation v)
self.legacyPackages.${system});
overlays.default = import ./overlay.nix;
};
}

View File

@@ -7,7 +7,6 @@ let
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
nameValuePair = n: v: { name = n; value = v; };
nurAttrs = import ./default.nix { pkgs = super; };
in
builtins.listToAttrs
(map (n: nameValuePair n nurAttrs.${n})

32
pkgs/gf-core/default.nix Normal file
View File

@@ -0,0 +1,32 @@
{ haskell
, haskellPackages
, stdenv
, fetchFromGitHub
, autoreconfHook
}:
let
version = "3.12";
src = fetchFromGitHub {
owner = "GrammaticalFramework";
repo = "gf-core";
rev = "release-${version}";
hash = "sha256-9sB8tt2eOJT43kv2eaUYRQCzyBZOp6HvJdgGJQgiqks=";
};
pkg = haskellPackages.callCabal2nixWithOptions "gf" src "--flag=-server" {};
gf-pgf = stdenv.mkDerivation {
pname = "gf-pgf";
version = "0.0.1";
src = "${src}/src/runtime/c";
nativeBuildInputs = [ autoreconfHook ];
};
in haskell.lib.overrideCabal pkg (prev: {
patches = [
"${src}/nix/expose-all.patch"
"${src}/nix/revert-new-cabal-madness.patch"
];
jailbreak = true;
configureFlags = [ "-f" "c-runtime" ];
librarySystemDepends = [ gf-pgf ];
passthru = { inherit gf-pgf; };
})

25
pkgs/gf-rgl/default.nix Normal file
View File

@@ -0,0 +1,25 @@
{ stdenv
, ghc
, gf-core
, fetchFromGitHub
}:
stdenv.mkDerivation (finalAttrs: {
name = "gf-rgl";
version = "20250812";
src = fetchFromGitHub {
owner = "GrammaticalFramework";
repo = "gf-rgl";
tag = finalAttrs.version;
hash = "sha256-rqN5MV/XxChXC+Vs4aLIhRtyPQZNk0LQZ2TCdbd6wUw=";
};
buildInputs = [ ghc gf-core ];
LC_ALL = "C.UTF-8";
buildPhase = ''
runghc Setup.hs build
'';
installPhase = ''
mkdir -p $out/share/gf/lib
runghc Setup.hs copy --dest=$out/share/gf/lib
'';
})

4
pkgs/gf/default.nix Normal file
View File

@@ -0,0 +1,4 @@
# Alias for `gf-core`
{ gf-core }:
gf-core

View File

@@ -0,0 +1,22 @@
{ lib
, stdenv
, gf-core
, makeWrapper
, runCommandLocal
}:
packages:
let
opts = {
passthru = {
preferLocalBuild = true;
inherit (gf-core) version meta;
};
};
paths = lib.makeSearchPath "share/gf/lib" packages;
in runCommandLocal "gf-with-rgl" opts ''
. ${makeWrapper}/nix-support/setup-hook
makeWrapper ${gf-core}/bin/gf $out/bin/gf \
--prefix GF_LIB_PATH : ${paths}
''

View File

@@ -0,0 +1,30 @@
{ stdenvNoCC
, fetchFromGitHub
, lib
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "iropke-batang";
version = "1.2";
src = fetchFromGitHub {
owner = "iropke";
repo = "font-iropke-batang";
rev = "v${finalAttrs.version}";
hash = "sha256-wsu7JK0hHYn9aegaMeNV9fWvQ6KoMzHwOFWymWHYvxo=";
};
installPhase = ''
runHook preInstall
find . -type f -name '*.otf' \
-exec install -Dm644 {} -t $out/share/fonts/opentype \;
runHook postInstall
'';
meta = {
description = "Korean serif font";
homepage = "http://font.iropke.com/batang/";
changelog = "https://github.com/iropke/font-iropke-batang/releases";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
};
})

View File

@@ -1,4 +1,12 @@
{ stdenv, fetchNpmDeps, fetchFromGitHub, fetchzip, fetchurl, lib, imagemagick, nodejs_20 }:
{ stdenv
, fetchNpmDeps
, fetchFromGitHub
, fetchzip
, fetchurl
, lib
, imagemagick
, nodejs_20
}:
let
vendoredKatex = fetchzip {
@@ -13,7 +21,7 @@ let
url = "https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-window.prod.mjs.map";
hash = "sha256-tUBiVoiKi3OCT+wctUYl0FVnT7StsGBDx7EzculcF5I=";
};
rev = "9872f3f9265f92643387239e76042c8d3ffeb410";
rev = "1816fb788e4d315bf1dc30053a5e1646eb0af9b8";
in stdenv.mkDerivation (final: {
pname = "quiver";
version = lib.substring 0 7 rev;
@@ -22,11 +30,11 @@ in stdenv.mkDerivation (final: {
owner = "varkor";
repo = "quiver";
inherit rev;
hash = "sha256-wSyCzUSLUL5nzUe5E4RdWv44WGd4C9WO6udkKY9cyBs=";
hash = "sha256-29x2x0fLemkxhv+85wPnDrrlRW2h5qJtF/QTbGa6ghE=";
};
npmDeps = fetchNpmDeps {
src = "${final.src}/service-worker";
hash = "sha256-xlww7Yfle58Qdwn/IcA6E6Fy7ZvH/ltKdlk6hvcC4UM=";
hash = "sha256-1CdgZFvpyJFyh5x9ljTau6vrR7FeHRYZ1MG/ZOEoou8=";
};
preBuild = ''
cp -r $vendoredKatex src/KaTeX

View File

@@ -0,0 +1,32 @@
{ stdenvNoCC
, texlive
}:
stdenvNoCC.mkDerivation (final: {
pname = "syd-plex-latex";
version = "1.0.0";
src = ./.;
nativeBuildInputs = [ texlive.combined.scheme-small ];
passthru = {
pkgs = [ final.finalPackage ];
tlDeps = with texlive; [
plex
plex-otf
fontaxes
unicode-math
xetex
fontspec
xltxtra
realscripts
xecjk
];
tlType = "run";
};
installPhase = ''
runHook preInstall
dir="$out/tex/latex/syd-plex"
mkdir -p "$dir"
mv syd-plex.sty "$dir"
runHook postInstall
'';
})

View File

@@ -0,0 +1,15 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{syd-plex}[2025/12/01 Configure IBM Plex fonts]
% Redefine some commands to make unicode-math work lol. See §3.1 of the
% unicode-math manual.
\renewcommand*{\mathrm}[1]{\symup{#1}}
\RequirePackage{plex-otf}
\RequirePackage{xeCJK}
\setmathfont{IBM Plex Math}
\setmainfont{IBM Plex Serif}
\setCJKmainfont{IBM Plex Sans KR}
% Use sans-serif for \operatorname
\setoperatorfont\mathsf