From af66eb557f12309fe7c65ca7c0034692ce6b2c51 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 15 Dec 2024 21:34:53 +0100 Subject: [PATCH] fix(patches): Port necessary patches to nixos 24.11 --- REUSE.toml | 2 +- default.nix | 1 + patches/default.nix | 14 ++++++++++++++ patches/nixpkgs/03-crabfit-karla.patch | 24 ++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 patches/nixpkgs/03-crabfit-karla.patch diff --git a/REUSE.toml b/REUSE.toml index ec622fc..e5d3af8 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -20,7 +20,7 @@ precedence = "closest" [[annotations]] SPDX-FileCopyrightText = "2024 Tom Hubrecht " SPDX-License-Identifier = "EUPL-1.2" -path = ["machines/nixos/compute01/librenms/kanidm.patch", "machines/nixos/compute01/stirling-pdf/*.patch", "machines/nixos/vault01/k-radius/packages/01-python_path.patch", "machines/nixos/web01/crabfit/*.patch", "machines/nixos/web02/cas-eleves/01-pytest-cas.patch", "patches/lix/01-disable-installChecks.patch", "patches/nixpkgs/04-crabfit-karla.patch", "patches/nixpkgs/05-netbird-relay.patch"] +path = ["machines/nixos/compute01/librenms/kanidm.patch", "machines/nixos/compute01/stirling-pdf/*.patch", "machines/nixos/vault01/k-radius/packages/01-python_path.patch", "machines/nixos/web01/crabfit/*.patch", "machines/nixos/web02/cas-eleves/01-pytest-cas.patch", "patches/lix/01-disable-installChecks.patch", "patches/nixpkgs/03-crabfit-karla.patch", "patches/nixpkgs/04-crabfit-karla.patch", "patches/nixpkgs/05-netbird-relay.patch"] precedence = "closest" [[annotations]] diff --git a/default.nix b/default.nix index c51b474..5e8434a 100644 --- a/default.nix +++ b/default.nix @@ -90,6 +90,7 @@ let "machines/nixos/web01/crabfit/*.patch" "machines/nixos/web02/cas-eleves/01-pytest-cas.patch" "patches/lix/01-disable-installChecks.patch" + "patches/nixpkgs/03-crabfit-karla.patch" "patches/nixpkgs/04-crabfit-karla.patch" "patches/nixpkgs/05-netbird-relay.patch" ]; diff --git a/patches/default.nix b/patches/default.nix index 535f2ef..403c881 100644 --- a/patches/default.nix +++ b/patches/default.nix @@ -60,6 +60,20 @@ in } ]; + "nixos-24.11" = [ + # nixos/nextcloud: Rename autocreate (a no-op) to verify_bucket_exists + { + id = "275165"; + hash = "sha256-9a26V3Pi8yLD3N9+mC1kvJoruxRTp/qOHapnt6VX7pw="; + } + + # Crabfit: don't depend on all google-fonts + (local ./nixpkgs/03-crabfit-karla.patch) + + # netbox qrcode plugin + (local ./nixpkgs/06-netbox-qrcode.patch) + ]; + "nixos-unstable" = [ # netbox qrcode plugin (local ./nixpkgs/06-netbox-qrcode.patch) diff --git a/patches/nixpkgs/03-crabfit-karla.patch b/patches/nixpkgs/03-crabfit-karla.patch new file mode 100644 index 0000000..2e4e2f8 --- /dev/null +++ b/patches/nixpkgs/03-crabfit-karla.patch @@ -0,0 +1,24 @@ +diff --git a/pkgs/by-name/cr/crabfit-frontend/package.nix b/pkgs/by-name/cr/crabfit-frontend/package.nix +index 99d7be0fdeae..9f858e8a9a9e 100644 +--- a/pkgs/by-name/cr/crabfit-frontend/package.nix ++++ b/pkgs/by-name/cr/crabfit-frontend/package.nix +@@ -8,7 +8,7 @@ + nodejs, + yarn, + fixup-yarn-lock, +- google-fonts, ++ karla, + api_url ? "http://127.0.0.1:3000", + frontend_url ? "crab.fit", + }: +@@ -83,9 +83,7 @@ stdenv.mkDerivation (finalAttrs: { + patchShebangs node_modules + + mkdir -p src/app/fonts +- cp "${ +- google-fonts.override { fonts = [ "Karla" ]; } +- }/share/fonts/truetype/Karla[wght].ttf" src/app/fonts/karla.ttf ++ cp "${karla}/share/fonts/truetype/Karla-Regular.ttf" src/app/fonts/karla.ttf + + runHook postConfigure + '';