10 system = stdenv.hostPlatform.system;
13 x86_64-linux = "linux-amd64";
14 aarch64-linux = "linux-aarch64";
15 x86_64-darwin = "macos-amd64";
16 aarch64-darwin = "macos-aarch64";
17 }.${system} or (throw "Unsupported system: ${system}");
20 x86_64-linux = "sha256-LHiLkZ+VN+wPnq6OukXozQWKh7ewNaFor1ndCUlCBtU=";
21 aarch64-linux = "sha256-1+rLGnm+LhbYigYUcmuLICLFXUk3wjOkmxuCuuI+Xqc=";
22 x86_64-darwin = "sha256-mJA3VXfNr6578Q2xw0xOZccloQpeCIsjn3dVdlsnTVs=";
23 aarch64-darwin = "sha256-FNl3UefJWA8yJ2B44GUEK6py7DLikJrygIwsqdIjW9c=";
24 }.${system} or (throw "Unsupported system: ${system}");
26 in stdenv.mkDerivation rec {
27 pname = "fermyon-spin";
30 # Use fetchurl rather than fetchzip as these tarballs are built by the project
31 # and not by GitHub (and thus are stable) - this simplifies the update script
32 # by allowing it to use the output of `nix store prefetch-file`.
34 url = "https://github.com/fermyon/spin/releases/download/v${version}/spin-v${version}-${platform}.tar.gz";
40 nativeBuildInputs = lib.optionals stdenv.isLinux [
59 description = "Framework for building, deploying, and running fast, secure, and composable cloud microservices with WebAssembly.";
60 homepage = "https://github.com/fermyon/spin";
61 license = with licenses; [ asl20 ];
63 maintainers = with maintainers; [ mglolenstine ];
64 platforms = platforms.linux ++ platforms.darwin;