nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 40 lines 1.4 kB view raw
1{ lib, stdenv, nixosTests, fetchFromGitHub, rustPlatform, libiconv, Security }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "agate"; 5 version = "3.3.0"; 6 7 src = fetchFromGitHub { 8 owner = "mbrubeck"; 9 repo = "agate"; 10 rev = "v${version}"; 11 hash = "sha256-B0hbXar/RulfBJUR1Jtczf3p1H6Zj5OVCXVCaj5zf/U="; 12 }; 13 cargoHash = "sha256-6Z+mcQAJwW7tm4SBbrHwHIwiqlFV+PIa5I2onU2rPts="; 14 15 buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security ]; 16 17 doInstallCheck = true; 18 installCheckPhase = '' 19 runHook preInstallCheck 20 $out/bin/agate --help 21 $out/bin/agate --version 2>&1 | grep "agate ${version}" 22 runHook postInstallCheck 23 ''; 24 25 passthru.tests = { inherit (nixosTests) agate; }; 26 27 meta = with lib; { 28 homepage = "https://github.com/mbrubeck/agate"; 29 changelog = "https://github.com/mbrubeck/agate/blob/master/CHANGELOG.md"; 30 description = "Very simple server for the Gemini hypertext protocol"; 31 longDescription = '' 32 Agate is a server for the Gemini network protocol, built with the Rust 33 programming language. Agate has very few features, and can only serve 34 static files. It uses async I/O, and should be quite efficient even when 35 running on low-end hardware and serving many concurrent requests. 36 ''; 37 license = with licenses; [ asl20 /* or */ mit ]; 38 maintainers = with maintainers; [ jk ]; 39 }; 40}