hi there,
i’m trying out writing a package to get familiar with nix flakes, but i seem to not find similar examples somehow.
i’m writing a flake.nix
as follows:
{
description = "HachiMaruPop is a cute font that was popular among young Japanese girls in the 1970s and 1980s";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages = {
hachimarupop = pkgs.stdenvNoCC.mkDerivation rec {
name = "hachimarupop";
src = fetchGithub {
owner = "noriokanisawa";
repo = "HachiMaruPop";
rev = "67d96c274032f5a2e1d33c1ec53498fde9110079";
sha256 = "sha256-XoGuzcnzYQUzeQakTRvZKo7X8k5N9luhYkf+VWQ83XI=";
};
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm644 fonts/ttf/*.ttf -t $out/share/fonts/opentype
runHook postInstall
'';
};
};
defaultPackage = packages.hachimarupop;
});
}
however, a nix flake check
here fails stating undefined variable 'fetchGithub'
, understandably.
i thought one might imports this thru e.g. pkgs.lib.fetchGithub
or the like, but these seem to fail as well.
what am i missing here?