at 23.11-beta 41 lines 1.0 kB view raw
1{ lib, stdenv, fetchurl, unzip }: 2 3stdenv.mkDerivation (finalAttrs: { 4 pname = "xcodes"; 5 version = "1.4.1"; 6 7 src = fetchurl { 8 url = "https://github.com/XcodesOrg/xcodes/releases/download/${finalAttrs.version}/xcodes.zip"; 9 hash = "sha256-PtXF2eqNfEX29EtXlcjdxrUs7BPn/YurUuFFeLpXwrk="; 10 }; 11 12 nativeBuildInputs = [ unzip ]; 13 14 unpackPhase = '' 15 runHook preUnpack 16 unzip -q $src 17 runHook postUnpack 18 ''; 19 20 dontPatch = true; 21 dontConfigure = true; 22 dontBuild = true; 23 24 installPhase = '' 25 runHook preInstall 26 mkdir -p $out/bin 27 install -m755 xcodes $out/bin/xcodes 28 runHook postInstall 29 ''; 30 31 dontFixup = true; 32 33 meta = with lib; { 34 changelog = "https://github.com/XcodesOrg/xcodes/releases/tag/${finalAttrs.version}"; 35 description = "Command-line tool to install and switch between multiple versions of Xcode"; 36 homepage = "https://github.com/XcodesOrg/xcodes"; 37 license = licenses.mit; 38 maintainers = with maintainers; [ _0x120581f ]; 39 platforms = platforms.darwin; 40 }; 41})