bin.nix (1258B)
1 { 2 lib, 3 stdenv, 4 fetchfromgh, 5 undmg, 6 }: 7 8 let 9 arch = 10 { 11 "aarch64-darwin" = "arm64"; 12 "x86_64-darwin" = "x64"; 13 } 14 .${stdenv.hostPlatform.system}; 15 hash = 16 { 17 "aarch64-darwin" = "sha256-3+Lib7gWF03UrIKRcyzHw9aX79aebkCQscAPdKAf6z0="; 18 "x86_64-darwin" = "sha256-miIw5xsL6GSHC+sX3JNxktfwhY5tkLrLCNdHHUwdtdY="; 19 } 20 .${stdenv.hostPlatform.system}; 21 in 22 stdenv.mkDerivation (finalAttrs: { 23 pname = "podman-desktop"; 24 version = "1.7.0"; 25 26 src = fetchfromgh { 27 owner = "containers"; 28 repo = "podman-desktop"; 29 name = "podman-desktop-${finalAttrs.version}-${arch}.dmg"; 30 version = "v${finalAttrs.version}"; 31 inherit hash; 32 }; 33 34 nativeBuildInputs = [ undmg ]; 35 36 sourceRoot = "."; 37 38 installPhase = '' 39 runHook preInstall 40 mkdir -p $out/Applications 41 cp -R *.app $out/Applications 42 runHook postInstall 43 ''; 44 45 meta = { 46 description = "A graphical tool for developing on containers and Kubernetes"; 47 homepage = "https://podman-desktop.io/"; 48 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 49 license = lib.licenses.asl20; 50 platforms = [ 51 "aarch64-darwin" 52 "x86_64-darwin" 53 ]; 54 maintainers = [ lib.maintainers.sikmir ]; 55 skip.ci = true; 56 }; 57 })