From 0a6f3244a4a98cba73d385f6bc083273e682444b Mon Sep 17 00:00:00 2001 From: Julia Mertz Date: Sun, 13 Oct 2024 05:40:40 +0200 Subject: [PATCH] formatter formatter --- flake.lock | 6 +- flake.nix | 16 +- glove80.keymap | 435 ++++++++++++++------------------------------ packages/dtsfmt.nix | 17 ++ 4 files changed, 174 insertions(+), 300 deletions(-) create mode 100644 packages/dtsfmt.nix diff --git a/flake.lock b/flake.lock index 99b598c..15fb526 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1728669404, - "narHash": "sha256-Xzmntcqn7L1PO3HQQmt6Ic8M/OWguVND0/X9lVACqko=", + "lastModified": 1728740666, + "narHash": "sha256-uob2suzN85bHNWhk2MkDhvMw1ydRs7eKwiKDZsuKT28=", "owner": "juliamertz", "repo": "glove80-firmware-updater", - "rev": "e2650202a20e757db773f921a952be4c778dd5df", + "rev": "e9938f848dae2eaebbd5c7586c6dfa9b9dc78adb", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 80152bb..50cb4ef 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,6 @@ url = "github:juliamertz/glove80-firmware-updater"; inputs.nixpkgs.follows = "nixpkgs"; }; - keymap-drawer = { url = "github:caksoylar/keymap-drawer"; flake = false; @@ -46,7 +45,9 @@ let inherit (pkgs) callPackage writeShellScriptBin; inherit (config) packages; + firmwareLoader = firmware-loader.packages.${system}.default; + dtsfmt = callPackage ./packages/dtsfmt.nix { }; in { packages.firmware = callPackage ./packages/firmware.nix { inherit inputs; }; @@ -54,6 +55,19 @@ packages.flash = writeShellScriptBin "flash" '' ${lib.getExe firmwareLoader} --file ${packages.firmware}/glove80.uf2 --mount ''; + packages.format = + let + dtsfmtrc = + pkgs.writeText ".dtsfmtrc.toml" # toml + '' + layout = "moergo:glove80" + ''; + in + writeShellScriptBin "dtsfmt" '' + ${lib.getExe dtsfmt} --config-file ${dtsfmtrc} $@ + ''; + + devShells.default = pkgs.mkShell { packages = [ packages.format ]; }; packages.default = packages.firmware; apps.default = { diff --git a/glove80.keymap b/glove80.keymap index f4bfaff..eaacd06 100644 --- a/glove80.keymap +++ b/glove80.keymap @@ -4,18 +4,18 @@ #include #include #include - #define LAYER_Base 0 #define LAYER_Lower 1 #define LAYER_Magic 2 #define LAYER_Gaming 3 / { - underglow-layer { - compatible = "zmk,underglow-layer"; + underglow-layer { + compatible = "zmk,underglow-layer"; - lower { - bindings = < + lower { + // dtsfmt-ignore + bindings = < ______ ______ ______ ______ ______ 0x8A2BE2 0xa966e8 0xcba8ec ______ ______ ______ ______ ______ ______ ______ ______ ______ GOLD ORANGE ORANGE ORANGE ______ ______ ______ ______ RED ______ ______ ______ YELLOW YELLOW YELLOW ORANGE ______ @@ -23,314 +23,157 @@ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ YELLOW YELLOW YELLOW RED ______ ______ ______ ______ ______ ______ ______ ______ GREEN ______ ______ ______ YELLOW YELLOW YELLOW RED ______ >; - layer-id = ; - }; - - gaming { - bindings = < - ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ - ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ - ______ ______ ______ PINK ______ ______ ______ ______ ______ ______ ______ ______ - ______ GREEN PINK PINK PINK ______ ______ ______ ______ ______ ______ ______ - ______ ______ ______ ______ ______ ______ ______ ______ RED ______ ______ ______ ______ ______ ______ ______ ______ ______ - ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ + layer-id = ; + }; + gaming { + // dtsfmt-ignore + bindings = < + ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ + ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ + ______ ______ ______ PINK ______ ______ ______ ______ ______ ______ ______ ______ + ______ GREEN PINK PINK PINK ______ ______ ______ ______ ______ ______ ______ + ______ ______ ______ ______ ______ ______ ______ ______ RED ______ ______ ______ ______ ______ ______ ______ ______ ______ + ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ ______ >; - layer-id = ; - }; + layer-id = ; }; + }; }; - / { - behaviors { - // For the "layer" key, it'd nice to be able to use it as either a shift or a toggle. - // Configure it as a tap dance, so the first tap (or hold) is a &mo and the second tap is a &to - lower: lower { - compatible = "zmk,behavior-tap-dance"; - label = "LAYER_TAP_DANCE"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&mo LAYER_Lower>, <&to LAYER_Lower>; - }; + behaviors { + lower: lower { + compatible = "zmk,behavior-tap-dance"; + label = "LAYER_TAP_DANCE"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&mo LAYER_Lower>, <&to LAYER_Lower>; }; + }; }; - / { - macros { - rgb_ug_status_macro: rgb_ug_status_macro { - label = "RGB_UG_STATUS"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&rgb_ug RGB_STATUS>; - }; + macros { + rgb_ug_status_macro: rgb_ug_status_macro { + label = "RGB_UG_STATUS"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&rgb_ug RGB_STATUS>; }; + }; }; - - / { -#ifdef BT_DISC_CMD - behaviors { - bt_0: bt_0 { - compatible = "zmk,behavior-tap-dance"; - label = "BT_0"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&bt_select_0>, <&bt BT_DISC 0>; - }; - bt_1: bt_1 { - compatible = "zmk,behavior-tap-dance"; - label = "BT_1"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&bt_select_1>, <&bt BT_DISC 1>; - }; - bt_2: bt_2 { - compatible = "zmk,behavior-tap-dance"; - label = "BT_2"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&bt_select_2>, <&bt BT_DISC 2>; - }; - bt_3: bt_3 { - compatible = "zmk,behavior-tap-dance"; - label = "BT_3"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&bt_select_3>, <&bt BT_DISC 3>; - }; - }; - macros { - bt_select_0: bt_select_0 { - label = "BT_SELECT_0"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 0>; - }; - bt_select_1: bt_select_1 { - label = "BT_SELECT_1"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 1>; - }; - bt_select_2: bt_select_2 { - label = "BT_SELECT_2"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 2>; - }; - bt_select_3: bt_select_3 { - label = "BT_SELECT_3"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 3>; - }; - }; -#else - macros { - bt_0: bt_0 { - label = "BT_0"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 0>; - }; - bt_1: bt_1 { - label = "BT_1"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 1>; - }; - bt_2: bt_2 { - label = "BT_2"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 2>; - }; - bt_3: bt_3 { - label = "BT_3"; - compatible = "zmk,behavior-macro"; - #binding-cells = <0>; - bindings - = <&out OUT_BLE>, - <&bt BT_SEL 3>; - }; + behaviors { + magic: magic { + compatible = "zmk,behavior-hold-tap"; + label = "MAGIC_HOLD_TAP"; + #binding-cells = <2>; + flavor = "tap-preferred"; + tapping-term-ms = <200>; + bindings = <&mo>, <&rgb_ug_status_macro>; }; -#endif + }; }; - +// Bluetooth behaviors / { - behaviors { - magic: magic { - compatible = "zmk,behavior-hold-tap"; - label = "MAGIC_HOLD_TAP"; - #binding-cells = <2>; - flavor = "tap-preferred"; - tapping-term-ms = <200>; - bindings = <&mo>, <&rgb_ug_status_macro>; - }; + behaviors { + bt_0: bt_0 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_0"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_0>, <&bt BT_DISC 0>; }; -}; - -/* #define for key positions */ -#define POS_LH_T1 52 -#define POS_LH_T2 53 -#define POS_LH_T3 54 -#define POS_LH_T4 69 -#define POS_LH_T5 70 -#define POS_LH_T6 71 -#define POS_LH_C1R2 15 -#define POS_LH_C1R3 27 -#define POS_LH_C1R4 39 -#define POS_LH_C1R5 51 -#define POS_LH_C2R1 4 -#define POS_LH_C2R2 14 -#define POS_LH_C2R3 26 -#define POS_LH_C2R4 38 -#define POS_LH_C2R5 50 -#define POS_LH_C2R6 68 -#define POS_LH_C3R1 3 -#define POS_LH_C3R2 13 -#define POS_LH_C3R3 25 -#define POS_LH_C3R4 37 -#define POS_LH_C3R5 49 -#define POS_LH_C3R6 67 -#define POS_LH_C4R1 2 -#define POS_LH_C4R2 12 -#define POS_LH_C4R3 24 -#define POS_LH_C4R4 36 -#define POS_LH_C4R5 48 -#define POS_LH_C4R6 66 -#define POS_LH_C5R1 1 -#define POS_LH_C5R2 11 -#define POS_LH_C5R3 23 -#define POS_LH_C5R4 35 -#define POS_LH_C5R5 47 -#define POS_LH_C5R6 65 -#define POS_LH_C6R1 0 -#define POS_LH_C6R2 10 -#define POS_LH_C6R3 22 -#define POS_LH_C6R4 34 -#define POS_LH_C6R5 46 -#define POS_LH_C6R6 64 -#define POS_RH_T1 57 -#define POS_RH_T2 56 -#define POS_RH_T3 55 -#define POS_RH_T4 74 -#define POS_RH_T5 73 -#define POS_RH_T6 72 -#define POS_RH_C1R2 16 -#define POS_RH_C1R3 28 -#define POS_RH_C1R4 40 -#define POS_RH_C1R5 58 -#define POS_RH_C2R1 5 -#define POS_RH_C2R2 17 -#define POS_RH_C2R3 29 -#define POS_RH_C2R4 41 -#define POS_RH_C2R5 59 -#define POS_RH_C2R6 75 -#define POS_RH_C3R1 6 -#define POS_RH_C3R2 18 -#define POS_RH_C3R3 30 -#define POS_RH_C3R4 42 -#define POS_RH_C3R5 60 -#define POS_RH_C3R6 76 -#define POS_RH_C4R1 7 -#define POS_RH_C4R2 19 -#define POS_RH_C4R3 31 -#define POS_RH_C4R4 43 -#define POS_RH_C4R5 61 -#define POS_RH_C4R6 77 -#define POS_RH_C5R1 8 -#define POS_RH_C5R2 20 -#define POS_RH_C5R3 32 -#define POS_RH_C5R4 44 -#define POS_RH_C5R5 62 -#define POS_RH_C5R6 78 -#define POS_RH_C6R1 9 -#define POS_RH_C6R2 21 -#define POS_RH_C6R3 33 -#define POS_RH_C6R4 45 -#define POS_RH_C6R5 63 -#define POS_RH_C6R6 79 - -/* Custom Defined Behaviors */ -/ { - -}; - -/ { - macros { - + bt_1: bt_1 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_1"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_1>, <&bt BT_DISC 1>; }; -}; - -/ { - combos { - compatible = "zmk,combos"; + bt_2: bt_2 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_2"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_2>, <&bt BT_DISC 2>; + }; + bt_3: bt_3 { + compatible = "zmk,behavior-tap-dance"; + label = "BT_3"; + #binding-cells = <0>; + tapping-term-ms = <200>; + bindings = <&bt_select_3>, <&bt BT_DISC 3>; + }; + }; + macros { + bt_select_0: bt_select_0 { + label = "BT_SELECT_0"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&out OUT_BLE>, <&bt BT_SEL 0>; }; + bt_select_1: bt_select_1 { + label = "BT_SELECT_1"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&out OUT_BLE>, <&bt BT_SEL 1>; + }; + bt_select_2: bt_select_2 { + label = "BT_SELECT_2"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&out OUT_BLE>, <&bt BT_SEL 2>; + }; + bt_select_3: bt_select_3 { + label = "BT_SELECT_3"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&out OUT_BLE>, <&bt BT_SEL 3>; + }; + }; }; - / { - keymap { - compatible = "zmk,keymap"; - - - layer_Base { - bindings = < - &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 - &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH - &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT - &kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LCTRL &trans &kp RALT &kp RCTRL &kp RSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp PG_UP - &magic LAYER_Magic 0 &tog 3 &kp END &kp LEFT &kp RIGHT &kp SPACE &kp LGUI &lower &kp RGUI &kp RET &kp BSPC &kp UP &kp DOWN &kp LBKT &kp RBKT &kp PG_DN - >; - }; - - layer_Lower { - bindings = < - &kp C_BRI_DN &kp C_BRI_UP &kp C_PREV &kp C_NEXT &kp C_PP &kp C_MUTE &kp C_VOL_DN &kp C_VOL_UP &none &kp PAUSE_BREAK - &kp F11 &kp DEL &none &none &none &kp HOME &kp LEFT_PARENTHESIS &kp KP_NUM &kp KP_EQUAL &kp KP_SLASH &kp KP_MULTIPLY &kp PRINTSCREEN - &trans &none &none &kp UP_ARROW &none &kp END &kp RIGHT_PARENTHESIS &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp SCROLLLOCK - &trans &none &kp LEFT_ARROW &kp DOWN_ARROW &kp RIGHT_ARROW &kp PG_UP &kp PERCENT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &none - &trans &kp K_APP &none &kp F11 &kp F12 &kp PG_DN &trans &trans &to 0 &trans &trans &trans &kp COMMA &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &trans - &magic LAYER_Magic 0 &kp CAPS &kp INS &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans - >; - }; - - layer_Magic { - bindings = < - &bt BT_CLR &none &none &none &none &none &none &none &none &bt BT_CLR_ALL - &none &none &none &none &none &none &none &none &none &none &none &none - &none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none - &bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader - &sys_reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &sys_reset - &none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &to 2 - >; - }; - - layer_Gaming { - bindings = < - &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 - &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS - &kp TAB &trans &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P - &kp ESC &kp LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI - &kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LGUI &tog 3 &kp RALT &kp RCTRL &kp RSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp PG_UP - &trans &kp HOME &kp END &kp LEFT &kp RIGHT &kp SPACE &kp LCTRL &kp RET &kp RGUI &kp RET &kp BSPC &kp UP &kp DOWN &kp LBKT &kp RBKT &kp PG_DN - >; - }; + keymap { + compatible = "zmk,keymap"; + + layer_Base { + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH + &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT + &kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LCTRL &trans &kp RALT &kp RCTRL &kp RSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp PG_UP + &magic LAYER_Magic 0 &tog 3 &kp END &kp LEFT &kp RIGHT &kp SPACE &kp LGUI &lower &kp RGUI &kp RET &kp BSPC &kp UP &kp DOWN &kp LBKT &kp RBKT &kp PG_DN + >; }; + layer_Lower { + bindings = < + &kp C_BRI_DN &kp C_BRI_UP &kp C_PREV &kp C_NEXT &kp C_PP &kp C_MUTE &kp C_VOL_DN &kp C_VOL_UP &none &kp PAUSE_BREAK + &kp F11 &kp DEL &none &none &none &kp HOME &kp LEFT_PARENTHESIS &kp KP_NUM &kp KP_EQUAL &kp KP_SLASH &kp KP_MULTIPLY &kp PRINTSCREEN + &trans &none &none &kp UP_ARROW &none &kp END &kp RIGHT_PARENTHESIS &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp SCROLLLOCK + &trans &none &kp LEFT_ARROW &kp DOWN_ARROW &kp RIGHT_ARROW &kp PG_UP &kp PERCENT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &none + &trans &kp K_APP &none &kp F11 &kp F12 &kp PG_DN &trans &trans &to 0 &trans &trans &trans &kp COMMA &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &trans + &magic LAYER_Magic 0 &kp CAPS &kp INS &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans + >; + }; + layer_Magic { + bindings = < + &bt BT_CLR &none &none &none &none &none &none &none &none &bt BT_CLR_ALL + &none &none &none &none &none &none &none &none &none &none &none &none + &none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none + &bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader + &sys_reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &sys_reset + &none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &to 2 + >; + }; + layer_Gaming { + bindings = < + &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 + &kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS + &kp TAB &trans &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P + &kp ESC &kp LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI + &kp GRAVE &kp Z &kp X &kp C &kp V &kp B &kp LSHFT &kp LGUI &tog 3 &kp RALT &kp RCTRL &kp RSHFT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp PG_UP + &trans &kp HOME &kp END &kp LEFT &kp RIGHT &kp SPACE &kp LCTRL &kp RET &kp RGUI &kp RET &kp BSPC &kp UP &kp DOWN &kp LBKT &kp RBKT &kp PG_DN + >; + }; + }; }; - diff --git a/packages/dtsfmt.nix b/packages/dtsfmt.nix new file mode 100644 index 0000000..403d22e --- /dev/null +++ b/packages/dtsfmt.nix @@ -0,0 +1,17 @@ +{ + fetchgit, + rustPlatform, + ... +}: +rustPlatform.buildRustPackage rec { + pname = "dtsfmt"; + version = "v0.3.1"; + src = fetchgit { + url = "https://github.com/juliamertz/${pname}.git"; + rev = "185183378999bd4eb9750332ee555574faeb2bd8"; + hash = "sha256-/ZhClMrWHqpihiuK5yhJ390aQ+/77FfoBfzyLcyeztc="; + }; + deepClone = true; + meta.mainProgram = "dtsfmt"; + cargoHash = "sha256-5fMoMaDHAAhfaTEdFwMqzD6N2zheh+AIjgCmaZZex84="; +}