Compare commits
15 Commits
dependabot
...
fcitx5-tok
| Author | SHA1 | Date | |
|---|---|---|---|
| 03f6a67a0a | |||
| 12a5095325 | |||
| 53bf019e26 | |||
| e190dae46b | |||
| d3252333eb | |||
| 2d0874fd1d | |||
| 0dd41f4833 | |||
| 319dd9fc0a | |||
| 233479ab27 | |||
| 7a3eaf6788 | |||
| ed4942cd58 | |||
| 32fe0d26fa | |||
| 2c56bb6153 | |||
| 7bf331a498 | |||
| b95632af08 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
- name: Install nix
|
- name: Install nix
|
||||||
uses: cachix/install-nix-action@v31
|
uses: cachix/install-nix-action@v31
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -19,5 +19,7 @@
|
|||||||
lib.filterAttrs
|
lib.filterAttrs
|
||||||
(_: v: lib.isDerivation v)
|
(_: v: lib.isDerivation v)
|
||||||
self.legacyPackages.${system});
|
self.legacyPackages.${system});
|
||||||
|
|
||||||
|
overlays.default = import ./overlay.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ let
|
|||||||
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
isReserved = n: n == "lib" || n == "overlays" || n == "modules";
|
||||||
nameValuePair = n: v: { name = n; value = v; };
|
nameValuePair = n: v: { name = n; value = v; };
|
||||||
nurAttrs = import ./default.nix { pkgs = super; };
|
nurAttrs = import ./default.nix { pkgs = super; };
|
||||||
|
|
||||||
in
|
in
|
||||||
builtins.listToAttrs
|
builtins.listToAttrs
|
||||||
(map (n: nameValuePair n nurAttrs.${n})
|
(map (n: nameValuePair n nurAttrs.${n})
|
||||||
|
|||||||
41
pkgs/fcitx5-toki-pona/default.nix
Normal file
41
pkgs/fcitx5-toki-pona/default.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{ stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, kdePackages
|
||||||
|
, python3
|
||||||
|
, libime
|
||||||
|
, lib
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "fcitx5-toki-pona";
|
||||||
|
version = "git";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "msyds";
|
||||||
|
repo = "fcitx5-toki-pona";
|
||||||
|
rev = "4b4314d642c647bc714c8876460b6779facda89c";
|
||||||
|
# rev = "icons";
|
||||||
|
hash = "sha256-5Keg+7AYkELYAlJkPszcjHgJ6TwBxnwNd3cpxSOEbGc=";
|
||||||
|
};
|
||||||
|
# src = /home/msyds/git/fcitx5-toki-pona;
|
||||||
|
buildInputs = [
|
||||||
|
kdePackages.fcitx5-chinese-addons
|
||||||
|
];
|
||||||
|
nativeBuildInputs = [
|
||||||
|
python3
|
||||||
|
libime
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
runHook preBuild
|
||||||
|
python3 combine.py
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
install -Dm644 -t $out/share/fcitx5/table table/*
|
||||||
|
install -Dm644 -t $out/share/fcitx5/inputmethod confs/*
|
||||||
|
find icons -name '*.png' -exec install -Dm644 {} "$out/share/{}" \;
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
}
|
||||||
30
pkgs/gf-core/default.nix
Normal file
30
pkgs/gf-core/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ haskell
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, gf-pgf
|
||||||
|
, applyPatches
|
||||||
|
, compiler ? "ghc98"
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "3.12";
|
||||||
|
src = applyPatches rec {
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "GrammaticalFramework";
|
||||||
|
repo = "gf-core";
|
||||||
|
rev = "release-${version}";
|
||||||
|
hash = "sha256-9sB8tt2eOJT43kv2eaUYRQCzyBZOp6HvJdgGJQgiqks=";
|
||||||
|
};
|
||||||
|
patches = [
|
||||||
|
"${src}/nix/expose-all.patch"
|
||||||
|
"${src}/nix/revert-new-cabal-madness.patch"
|
||||||
|
./fix-cabal-syntax-error.patch
|
||||||
|
];
|
||||||
|
};
|
||||||
|
hpkgs = haskell.packages.${compiler};
|
||||||
|
pkg = hpkgs.callCabal2nixWithOptions "gf" src "--flag=-server" {};
|
||||||
|
in haskell.lib.overrideCabal pkg (prev: {
|
||||||
|
jailbreak = true;
|
||||||
|
configureFlags = [ "-f" "c-runtime" ];
|
||||||
|
librarySystemDepends = [ gf-pgf ];
|
||||||
|
})
|
||||||
13
pkgs/gf-core/fix-cabal-syntax-error.patch
Normal file
13
pkgs/gf-core/fix-cabal-syntax-error.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/runtime/haskell-bind/pgf2.cabal b/src/runtime/haskell-bind/pgf2.cabal
|
||||||
|
index d7a98489e..3ca7e816c 100644
|
||||||
|
--- a/src/runtime/haskell-bind/pgf2.cabal
|
||||||
|
+++ b/src/runtime/haskell-bind/pgf2.cabal
|
||||||
|
@@ -15,7 +15,7 @@ homepage: https://www.grammaticalframework.org/
|
||||||
|
bug-reports: https://github.com/GrammaticalFramework/gf-core/issues
|
||||||
|
author: Krasimir Angelov
|
||||||
|
extra-source-files: CHANGELOG.md, README.md
|
||||||
|
-tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4, GHC=9.6.6
|
||||||
|
+tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.10.4, GHC==9.6.6
|
||||||
|
|
||||||
|
library
|
||||||
|
exposed-modules:
|
||||||
11
pkgs/gf-pgf/default.nix
Normal file
11
pkgs/gf-pgf/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ gf-core
|
||||||
|
, stdenv
|
||||||
|
, autoreconfHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "gf-pgf";
|
||||||
|
inherit (gf-core) version meta;
|
||||||
|
src = "${gf-core.src}/src/runtime/c";
|
||||||
|
nativeBuildInputs = [autoreconfHook ];
|
||||||
|
}
|
||||||
25
pkgs/gf-rgl/default.nix
Normal file
25
pkgs/gf-rgl/default.nix
Normal 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
4
pkgs/gf/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Alias for `gf-core`
|
||||||
|
{ gf-core }:
|
||||||
|
|
||||||
|
gf-core
|
||||||
22
pkgs/gfWithPackages/default.nix
Normal file
22
pkgs/gfWithPackages/default.nix
Normal 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}
|
||||||
|
''
|
||||||
26
pkgs/gftest/default.nix
Normal file
26
pkgs/gftest/default.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ gf-core
|
||||||
|
, breakpointHook
|
||||||
|
, fetchFromGitHub
|
||||||
|
, compiler ? "ghc98"
|
||||||
|
, haskell
|
||||||
|
, pgf2-haskell
|
||||||
|
, gf-pgf
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "GrammaticalFramework";
|
||||||
|
repo = "gftest";
|
||||||
|
rev = "ef7c99143d84a29fb28bbc464f661566d44a6130";
|
||||||
|
hash = "sha256-t/LaG5+bdv7f0URcn/aFx6nUIvxSSEbpWeZS92/Gbog=";
|
||||||
|
};
|
||||||
|
hpkgs = haskell.packages.${compiler}.extend (final: prev: {
|
||||||
|
# PGF2, the Haskell bindings to the C library.
|
||||||
|
pgf2 = pgf2-haskell.override { inherit compiler; };
|
||||||
|
});
|
||||||
|
pkg = hpkgs.callCabal2nix "gftest" src {};
|
||||||
|
in pkg.overrideAttrs (final: prev: {
|
||||||
|
nativeBuildInputs = (prev.nativeBuildInputs or []) ++ [
|
||||||
|
breakpointHook
|
||||||
|
];
|
||||||
|
})
|
||||||
30
pkgs/iropke-batang/default.nix
Normal file
30
pkgs/iropke-batang/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
})
|
||||||
19
pkgs/pgf2-haskell/default.nix
Normal file
19
pkgs/pgf2-haskell/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ haskell
|
||||||
|
, compiler ? "ghc96"
|
||||||
|
, gf-pgf
|
||||||
|
, gf-core
|
||||||
|
, breakpointHook
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
src = "${gf-core.src}/src/runtime/haskell-bind";
|
||||||
|
hpkgs = haskell.packages.${compiler};
|
||||||
|
pkg = hpkgs.callCabal2nix "pgf2" src {
|
||||||
|
# gf-pgf provides both libpgf and libgu.
|
||||||
|
gu = gf-pgf;
|
||||||
|
};
|
||||||
|
in haskell.lib.overrideCabal pkg (prev: {
|
||||||
|
librarySystemDepends = (prev.librarySystemDepends or []) ++ [
|
||||||
|
gf-pgf
|
||||||
|
];
|
||||||
|
})
|
||||||
@@ -1,4 +1,12 @@
|
|||||||
{ stdenv, fetchNpmDeps, fetchFromGitHub, fetchzip, fetchurl, lib, imagemagick, nodejs_20 }:
|
{ stdenv
|
||||||
|
, fetchNpmDeps
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchzip
|
||||||
|
, fetchurl
|
||||||
|
, lib
|
||||||
|
, imagemagick
|
||||||
|
, nodejs_20
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
vendoredKatex = fetchzip {
|
vendoredKatex = fetchzip {
|
||||||
@@ -13,7 +21,7 @@ let
|
|||||||
url = "https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-window.prod.mjs.map";
|
url = "https://storage.googleapis.com/workbox-cdn/releases/7.0.0/workbox-window.prod.mjs.map";
|
||||||
hash = "sha256-tUBiVoiKi3OCT+wctUYl0FVnT7StsGBDx7EzculcF5I=";
|
hash = "sha256-tUBiVoiKi3OCT+wctUYl0FVnT7StsGBDx7EzculcF5I=";
|
||||||
};
|
};
|
||||||
rev = "9872f3f9265f92643387239e76042c8d3ffeb410";
|
rev = "1816fb788e4d315bf1dc30053a5e1646eb0af9b8";
|
||||||
in stdenv.mkDerivation (final: {
|
in stdenv.mkDerivation (final: {
|
||||||
pname = "quiver";
|
pname = "quiver";
|
||||||
version = lib.substring 0 7 rev;
|
version = lib.substring 0 7 rev;
|
||||||
@@ -22,11 +30,11 @@ in stdenv.mkDerivation (final: {
|
|||||||
owner = "varkor";
|
owner = "varkor";
|
||||||
repo = "quiver";
|
repo = "quiver";
|
||||||
inherit rev;
|
inherit rev;
|
||||||
hash = "sha256-wSyCzUSLUL5nzUe5E4RdWv44WGd4C9WO6udkKY9cyBs=";
|
hash = "sha256-29x2x0fLemkxhv+85wPnDrrlRW2h5qJtF/QTbGa6ghE=";
|
||||||
};
|
};
|
||||||
npmDeps = fetchNpmDeps {
|
npmDeps = fetchNpmDeps {
|
||||||
src = "${final.src}/service-worker";
|
src = "${final.src}/service-worker";
|
||||||
hash = "sha256-xlww7Yfle58Qdwn/IcA6E6Fy7ZvH/ltKdlk6hvcC4UM=";
|
hash = "sha256-1CdgZFvpyJFyh5x9ljTau6vrR7FeHRYZ1MG/ZOEoou8=";
|
||||||
};
|
};
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
cp -r $vendoredKatex src/KaTeX
|
cp -r $vendoredKatex src/KaTeX
|
||||||
|
|||||||
32
pkgs/syd-plex-latex/default.nix
Normal file
32
pkgs/syd-plex-latex/default.nix
Normal 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
|
||||||
|
'';
|
||||||
|
})
|
||||||
15
pkgs/syd-plex-latex/syd-plex.sty
Executable file
15
pkgs/syd-plex-latex/syd-plex.sty
Executable 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
|
||||||
Reference in New Issue
Block a user