Loading pkgs/by-name/sw/swiftformat/package.nix +29 −26 Original line number Diff line number Diff line Loading @@ -2,48 +2,51 @@ stdenv, lib, fetchFromGitHub, swift, swiftformat, swiftpm, testers, versionCheckHook, nix-update-script, }: # This derivation is impure: it relies on an Xcode toolchain being installed # and available in the expected place. The values of sandboxProfile and # hydraPlatforms are copied pretty directly from the MacVim derivation, which # is also impure. stdenv.mkDerivation rec { swift.stdenv.mkDerivation rec { pname = "swiftformat"; version = "0.47.10"; version = "0.55.4"; src = fetchFromGitHub { owner = "nicklockwood"; repo = "SwiftFormat"; rev = version; sha256 = "1gqxpymbhpmap0i2blg9akarlql4mkzv45l4i212gsxcs991b939"; sha256 = "sha256-0Dk2SgfPozgbdhyQa74NZkd/kA6JleSfpHDn4NuQdEo="; }; preConfigure = "LD=$CC"; buildPhase = '' /usr/bin/xcodebuild -project SwiftFormat.xcodeproj \ -scheme "SwiftFormat (Command Line Tool)" \ CODE_SIGN_IDENTITY= SYMROOT=build OBJROOT=build ''; nativeBuildInputs = [ swift swiftpm ]; installPhase = '' install -D -m 0555 build/Release/swiftformat $out/bin/swiftformat install -D "$(swiftpmBinPath)/swiftformat" $out/bin/swiftformat ''; sandboxProfile = '' (allow file-read* file-write* process-exec mach-lookup) ; block homebrew dependencies (deny file-read* file-write* process-exec mach-lookup (subpath "/usr/local") (with no-log)) ''; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; passthru = { updateScript = nix-update-script { }; }; meta = with lib; { meta = { description = "Code formatting and linting tool for Swift"; homepage = "https://github.com/nicklockwood/SwiftFormat"; license = licenses.mit; maintainers = [ maintainers.bdesham ]; platforms = platforms.darwin; hydraPlatforms = [ ]; license = lib.licenses.mit; maintainers = with lib.maintainers; [ bdesham DimitarNestorov ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; }; } Loading
pkgs/by-name/sw/swiftformat/package.nix +29 −26 Original line number Diff line number Diff line Loading @@ -2,48 +2,51 @@ stdenv, lib, fetchFromGitHub, swift, swiftformat, swiftpm, testers, versionCheckHook, nix-update-script, }: # This derivation is impure: it relies on an Xcode toolchain being installed # and available in the expected place. The values of sandboxProfile and # hydraPlatforms are copied pretty directly from the MacVim derivation, which # is also impure. stdenv.mkDerivation rec { swift.stdenv.mkDerivation rec { pname = "swiftformat"; version = "0.47.10"; version = "0.55.4"; src = fetchFromGitHub { owner = "nicklockwood"; repo = "SwiftFormat"; rev = version; sha256 = "1gqxpymbhpmap0i2blg9akarlql4mkzv45l4i212gsxcs991b939"; sha256 = "sha256-0Dk2SgfPozgbdhyQa74NZkd/kA6JleSfpHDn4NuQdEo="; }; preConfigure = "LD=$CC"; buildPhase = '' /usr/bin/xcodebuild -project SwiftFormat.xcodeproj \ -scheme "SwiftFormat (Command Line Tool)" \ CODE_SIGN_IDENTITY= SYMROOT=build OBJROOT=build ''; nativeBuildInputs = [ swift swiftpm ]; installPhase = '' install -D -m 0555 build/Release/swiftformat $out/bin/swiftformat install -D "$(swiftpmBinPath)/swiftformat" $out/bin/swiftformat ''; sandboxProfile = '' (allow file-read* file-write* process-exec mach-lookup) ; block homebrew dependencies (deny file-read* file-write* process-exec mach-lookup (subpath "/usr/local") (with no-log)) ''; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; passthru = { updateScript = nix-update-script { }; }; meta = with lib; { meta = { description = "Code formatting and linting tool for Swift"; homepage = "https://github.com/nicklockwood/SwiftFormat"; license = licenses.mit; maintainers = [ maintainers.bdesham ]; platforms = platforms.darwin; hydraPlatforms = [ ]; license = lib.licenses.mit; maintainers = with lib.maintainers; [ bdesham DimitarNestorov ]; platforms = lib.platforms.linux ++ lib.platforms.darwin; }; }