Context:
I have 2 laptops, both running NixOS. I set up a folder I call “cuneiform-fonts”, which I call when I installed fonts:
fonts.packages = with pkgs; [
font-awesome
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
ipafont # japanese
kochi-substitute # japanese
(callPackage ./cuneiform-fonts { })
];
Within the cuneiform-fonts folder, I have a flake.nix and default.nix:
### flake.nix
{
inputs.flake-utils = {
url = "github:numtide/flake-utils";
follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
{
packages.default = nixpkgs.legacyPackages.${system}.callPackage ./default.nix {};
}
);
}
### default.nix
{ stdenv
, fetchzip
, fetchurl
, lib
}:
stdenv.mkDerivation rec {
pname = "cuneiform-fonts";
version = "2023.08.23-20:06pdt";
base_url = "https://www.hethport.uni-wuerzburg.de/cuneifont/download";
srcs = [
# old babylonian
(fetchzip {
url = "${base_url}/Santakku.zip";
sha256 = "sha256-eBmZT0rn6sew76Qgs+nOWJHQHehRcepLjeQDzS0gzqc=";
stripRoot = false;
#sha256 = lib.fakeSha256; stripRoot=false; # both needed
})
# hittite
(fetchzip {
url = "${base_url}/Ullikummi.zip";
sha256 = "sha256-RdJ/UgOXLfBNsNMnWVsJqcNgOeOTdcCs+GrEyB6qvkg=";
stripRoot = false;
})
# neo-assyrian
(fetchzip {
url = "${base_url}/Assurbanipal.zip";
sha256 = "sha256-g7LXO9rnSsEd5cTRgaBlMGmt5pR7FcDi7u+sdEv+TlQ=";
stripRoot = false;
})
# neo-babylonian
(fetchurl {
url = "${base_url}/Esagil.ttf";
sha256 = "sha256-znFvi9KOqg9tJd8Cs3ENxBszmikiHV/wFNhTggH98YA=";
})
# old persian
(fetchzip {
url = "${base_url}/OldPersian.zip";
sha256 = "sha256-0VlejElgsm/xDIFqF7LiQ/dOfTytDpXhFBOlo45wBw0=";
stripRoot = false;
})
];
dontUnpack = true;
installPhase = ''
mkdir -p $out/usr/share/fonts/OTF $out/usr/share/fonts/TTF
if find $srcs | grep 'otf' >&/dev/null; then
find $srcs -name '*.otf' | grep -v MACOS | xargs -I{} cp {} $out/usr/share/fonts/TTF
fi
if find $srcs | grep 'ttf' >&/dev/null; then
find $srcs -name '*.ttf' | grep -v MACOS | xargs -I{} cp {} $out/usr/share/fonts/TTF
fi
'';
}
This has installed successfully on machine 1 for a while now. I tried adding it on machine 2, which has nearly an identical system flake and imported files/modules. However, I get this error:
error: function 'anonymous lambda' called with unexpected argument 'inputs'
I tried adding
, ...
But end up with a recursion error:
error: infinite recursion encountered
I have tried searching for similar situations but have come up empty.