Skip to content

Commit 1cb0ef4

Browse files
committed
feat: add patches to change pico-key manufacturer name and url
1 parent 4cc9493 commit 1cb0ef4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ stdenvNoCC.mkDerivation (finalAttrs: {
3434
fetchSubmodules = true;
3535
};
3636

37-
# --- FIX: Manually fetch the fork containing 'eddsa.c' ---
3837
mbedtlsFork = fetchFromGitHub {
3938
owner = "polhenarejos";
4039
repo = "mbedtls";
@@ -55,10 +54,15 @@ stdenvNoCC.mkDerivation (finalAttrs: {
5554

5655
postPatch = ''
5756
echo "--- Patching: Neutralizing Git Commands (Global) ---"
58-
5957
find . -name "*.cmake" -o -name "CMakeLists.txt" -print0 | xargs -0 sed -i 's/git submodule update/echo "Nix: Skipped git submodule update"/g'
6058
find . -name "*.cmake" -o -name "CMakeLists.txt" -print0 | xargs -0 sed -i 's/git checkout/echo "Nix: Skipped git checkout"/g'
6159
60+
echo "--- Patching: Applying Libre Keys Branding ---"
61+
# 1. Change Manufacturer Name
62+
sed -i 's/"Pol Henarejos"/"Libre Keys"/g' pico-keys-sdk/src/usb/usb_descriptors.c
63+
# 2. Change URL
64+
sed -i 's|"www.picokeys.com"|"www.github.com/librekeys/picoforge"|g' pico-keys-sdk/src/usb/usb_descriptors.c
65+
6266
${lib.optionalString eddsa ''
6367
echo "--- Patching: Injecting EdDSA mbedtls fork (eddsa=true) ---"
6468
rm -rf pico-keys-sdk/mbedtls

0 commit comments

Comments
 (0)