11 system = stdenv.hostPlatform.system;
15 x86_64-linux = "linux-amd64";
16 aarch64-linux = "linux-aarch64";
17 x86_64-darwin = "macos-amd64";
18 aarch64-darwin = "macos-aarch64";
20 .${system} or (throw "Unsupported system: ${system}");
22 # TODO: It'd be nice to write an update script that would update all of these
26 x86_64-linux = "sha256-r/F3Tj3WeeL2R27ussX+ebFWpW+8z2e7tdBK4MHFMpk=";
27 aarch64-linux = "sha256-BSFxDJeY7fOOxDqAV+6FJf0hup1Y5IJ/czqwc4W7qSA=";
28 x86_64-darwin = "sha256-T6J9IjfXdt9DnZksndAmZRkYyH/5H60J7V6xU0ltD2A=";
29 aarch64-darwin = "sha256-6x+0PB5/2oqYDVNiNhc0xcs/ESCLvvSsWtm2KlTIeBo=";
31 .${system} or (throw "Unsupported system: ${system}");
34 stdenv.mkDerivation rec {
35 pname = "fermyon-spin";
38 # Use fetchurl rather than fetchzip as these tarballs are built by the project
39 # and not by GitHub (and thus are stable) - this simplifies the update script
40 # by allowing it to use the output of `nix store prefetch-file`.
42 url = "https://github.com/fermyon/spin/releases/download/v${version}/spin-v${version}-${platform}.tar.gz";
48 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
67 description = "Framework for building, deploying, and running fast, secure, and composable cloud microservices with WebAssembly";
68 homepage = "https://github.com/fermyon/spin";
69 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
70 license = with licenses; [ asl20 ];
72 maintainers = with maintainers; [ mglolenstine ];
73 platforms = platforms.linux ++ platforms.darwin;