From 398cb8c16556ba3db44fff6ca22d35f312ea33c9 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 9 Jan 2025 22:50:56 +0100 Subject: [PATCH] update flake, use correct nix dependencies instead of non-default fontkit features --- Cargo.lock | 11 ----------- Cargo.toml | 9 +-------- flake.lock | 14 +++++++------- flake.nix | 26 +++++++++++++++++++------- 4 files changed, 27 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ae800fc..dc1aa90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -648,7 +648,6 @@ dependencies = [ "dirs", "dwrote", "float-ord", - "freetype", "freetype-sys", "lazy_static", "libc", @@ -687,16 +686,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" -[[package]] -name = "freetype" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a440748e063798e4893ceb877151e84acef9bea9a8c6800645cf3f1b3a7806e" -dependencies = [ - "freetype-sys", - "libc", -] - [[package]] name = "freetype-sys" version = "0.20.1" diff --git a/Cargo.toml b/Cargo.toml index 867a007..0cbb3de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ clap = { version = "4.5", features = ["derive"] } pixels = "0.14" # I should not need this as a direct dependency, but then I cannot spell the types needed to use font-kit... pathfinder_geometry = "0.5.1" +font-kit = "0.14.2" [dependencies.servicepoint] version = "0.12.0" @@ -24,11 +25,3 @@ version = "0.30" features = ["rwh_05"] default-features = true -[target.'cfg(target_os = "linux")'.dependencies.font-kit] -version = "0.14.2" -features = ["loader-freetype-default", "source-fontconfig-dlopen"] -default-features = false - -[target.'cfg(target_os = "macos")'.dependencies.font-kit] -version = "0.14.2" -default-features = true diff --git a/flake.lock b/flake.lock index 82ca3f7..dfb3db6 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1721727458, - "narHash": "sha256-r/xppY958gmZ4oTfLiHN0ZGuQ+RSTijDblVgVLFi1mw=", + "lastModified": 1736429655, + "narHash": "sha256-BwMekRuVlSB9C0QgwKMICiJ5EVbLGjfe4qyueyNQyGI=", "owner": "nix-community", "repo": "naersk", - "rev": "3fb418eaf352498f6b6c30592e3beb63df42ef11", + "rev": "0621e47bd95542b8e1ce2ee2d65d6a1f887a13ce", "type": "github" }, "original": { @@ -37,16 +37,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1732749044, - "narHash": "sha256-T38FQOg0BV5M8FN1712fovzNakSOENEYs+CSkg31C9Y=", + "lastModified": 1736200483, + "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0c5b4ecbed5b155b705336aa96d878e55acd8685", + "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index d1d2542..98e613f 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Flake for servicepoint-simulator"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nix-filter.url = "github:numtide/nix-filter"; naersk = { url = "github:nix-community/naersk"; @@ -70,13 +70,25 @@ with pkgs; [ xe - lzma + xz ] - ++ (lib.optionals pkgs.stdenv.isLinux ( + ++ lib.optionals pkgs.stdenv.isLinux ( with pkgs; [ - libxkbcommon + # gpu libGL + vulkan-headers + vulkan-loader + vulkan-tools vulkan-tools-lunarg + vulkan-extension-layer + vulkan-validation-layers + + # keyboard + libxkbcommon + + # font loading + fontconfig + freetype # WINIT_UNIX_BACKEND=wayland wayland @@ -88,15 +100,15 @@ xorg.libX11 xorg.libX11.dev ] - )) - ++ (lib.optionals pkgs.stdenv.isDarwin ( + ) + ++ lib.optionals pkgs.stdenv.isDarwin ( with pkgs.darwin.apple_sdk.frameworks; [ Carbon QuartzCore AppKit ] - )); + ); postInstall = '' wrapProgram $out/bin/servicepoint-simulator \