nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 43 lines 1.2 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 nix-update-script, 5 rustPlatform, 6 versionCheckHook, 7}: 8 9rustPlatform.buildRustPackage (finalAttrs: { 10 pname = "gdscript-formatter"; 11 version = "0.18.2"; 12 13 src = fetchFromGitHub { 14 owner = "GDQuest"; 15 repo = "GDScript-formatter"; 16 tag = finalAttrs.version; 17 hash = "sha256-V9zrL2Aku5e+9McXpXdXvsGJKjqVXIIaAsoAF2xHB4g="; 18 # Needed due to .gitattributes being used for the Godot addon and export-ignoring all files 19 deepClone = true; 20 # Avoid hash differences due to differences in .git 21 leaveDotGit = false; 22 }; 23 24 cargoHash = "sha256-xqGmv/e1Ch/EqutIb2claiJ8fQGDDdOriOZdt8SR8mw="; 25 26 cargoBuildFlags = [ 27 "--bin=gdscript-formatter" 28 ]; 29 30 nativeInstallCheckInputs = [ versionCheckHook ]; 31 doInstallCheck = true; 32 33 passthru.updateScript = nix-update-script { }; 34 35 meta = { 36 description = "Fast code formatter for GDScript and Godot 4"; 37 homepage = "https://github.com/GDQuest/GDScript-formatter"; 38 changelog = "https://github.com/GDQuest/GDScript-formatter/blob/${finalAttrs.version}/CHANGELOG.md"; 39 license = lib.licenses.mit; 40 mainProgram = "gdscript-formatter"; 41 maintainers = with lib.maintainers; [ squarepear ]; 42 }; 43})