20 rustPlatform.buildRustPackage rec {
24 src = fetchFromGitHub {
25 owner = "fables-tales";
28 hash = "sha256-IIHPU6iwFwQ5cOAtOULpMSjexFtTelSd/LGLuazdmUo=";
29 fetchSubmodules = true;
43 ] ++ lib.optionals stdenv.isDarwin [
53 pushd librubyfmt/ruby_checkout
54 autoreconf --install --force --verbose
60 # Avoid checking whether ruby gitsubmodule is up-to-date.
61 ./0002-remove-dependency-on-git.patch
64 cargoHash = "sha256-QZ26GmsKyENkzdCGg2peie/aJhEt7KQAF/lwsibonDk=";
66 env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fdeclspec";
69 mv $out/bin/rubyfmt{-main,}
73 description = "A Ruby autoformatter";
74 homepage = "https://github.com/fables-tales/rubyfmt";
75 license = licenses.mit;
76 maintainers = with maintainers; [ bobvanderlinden ];
77 # = note: Undefined symbols for architecture x86_64:
78 # "_utimensat", referenced from:
79 # _utime_internal in librubyfmt-3c969812b3b27083.rlib(file.o)
80 broken = stdenv.isDarwin && stdenv.isx86_64;
81 mainProgram = "rubyfmt";