Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console-setup: init at 1.234 #375929

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

console-setup: init at 1.234 #375929

wants to merge 2 commits into from

Conversation

ners
Copy link
Member

@ners ners commented Jan 22, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

pkgs/by-name/co/console-setup/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/co/console-setup/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/co/console-setup/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/co/console-setup/package.nix Outdated Show resolved Hide resolved
@ners ners requested a review from Defelo February 1, 2025 21:01
@Defelo
Copy link
Member

Defelo commented Feb 1, 2025

When I try to build this on x86_64-linux the logs contain a lot of warnings like WARNING: U+FB8B: truncating width and WARNING: U+01F9: no glyph defined. Is this something that can be fixed on our side?

@ners ners changed the title console-setup: init at 1.233 console-setup: init at 1.234 Feb 4, 2025
@ners
Copy link
Member Author

ners commented Feb 4, 2025

@Defelo I don't know enough about the tools used here to be able to fix these warnings, or to know if they are indeed problematic. I know that the produced font files are good enough for console use.

Comment on lines 45 to 46
make -j$NIX_BUILD_CORES bdf
make -j$NIX_BUILD_CORES build-linux
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use makeTargets here?

Copy link
Member Author

@ners ners Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great question, I was hoping it would come up because maybe I'm missing something.

The problem is that the build-linux target requires files that are not present in the source tree. One such file is Fonts/unifont.bdf which I bring from the unifont package, and then there's a bunch of DejaVu Mono fonts that we can pull in from the dejavu_mono package and convert using make bdf.

Unfortunately, the build-linux target does not itself depend on bdf.

I've tried the following:

  • makeTargets = [ "bdf" "build-linux" ]
  • substituteInPlace rules.mk --replace-fail 'build-common:' 'build-common: bdf'

Neither works, because Make does not fully finish building the bdf files before trying to run build-linux. I assume that's because the bdf target is phony.

It does work with enableParallelBuilding = false;, but that'd be unfortunate to give up, because the build parallelises wonderfully. Instead of giving up on parallel building, I think it'd be better to fix the dependency somehow.

Another compromise could be preBuild = "make -j$NIX_BUILD_CORES bdf";

Copy link
Member Author

@ners ners Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: I don't think buildTargets and makeTargets are actually used; I can't see them referenced anywhere in pkgs/stdenv.

If I set them to a non-existent target, e.g. "foobar", the build does not fail.

@@ -20,6 +20,11 @@ stdenv.mkDerivation rec {
hash = "sha256-AqP+EZlNPNrx1L1dK2tglzXmgj4BdkroO3BOAuwvZA0=";
};

bdf = fetchurl {
url = "mirror://gnu/unifont/${pname}-${version}/${pname}-${version}.bdf.gz";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
url = "mirror://gnu/unifont/${pname}-${version}/${pname}-${version}.bdf.gz";
url = "mirror://gnu/unifont/unifont-${version}/unifont-${version}.bdf.gz";

Copy link
Member Author

@ners ners Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you like me to change the other two as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants