Merge pull request #308495 from natsukium/fastahack/init

fastahack: init at 1.0.0

authored by OTABI Tomoya and committed by GitHub 03b825b6 63593818

+43
+43
pkgs/by-name/fa/fastahack/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + runCommand, 6 + fastahack, 7 + }: 8 + 9 + stdenv.mkDerivation (finalAttrs: { 10 + pname = "fastahack"; 11 + version = "1.0.0"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "ekg"; 15 + repo = "fastahack"; 16 + rev = "refs/tags/v${finalAttrs.version}"; 17 + hash = "sha256-SWu2iRwNgdhsn4sH9/3jPNG3+l1xFAHXPq5/ODVd4WY="; 18 + }; 19 + 20 + installFlags = [ "PREFIX=${placeholder "out"}" ]; 21 + 22 + passthru.tests = { 23 + simple = runCommand "${finalAttrs.pname}-test" { } '' 24 + mkdir $out 25 + cp ${fastahack.src}/tests/* $out 26 + grep -v ERROR <(${lib.getExe fastahack} $out/correct.fasta 2>&1) 27 + grep -v ERROR <(${lib.getExe fastahack} $out/crlf.fasta 2>&1) 28 + grep "ERROR: embedded newline " <(${lib.getExe fastahack} $out/embedded_newline.fasta 2>&1) 29 + grep "ERROR: mismatched line lengths" <(${lib.getExe fastahack} $out/mismatched_lines.fasta 2>&1) 30 + grep -v ERROR <(${lib.getExe fastahack} $out/trailing_newlines.fasta 2>&1) 31 + ''; 32 + }; 33 + 34 + meta = { 35 + description = "Utilities for indexing and sequence extraction from FASTA files"; 36 + homepage = "https://github.com/ekg/fastahack"; 37 + changelog = "https://github.com/ekg/fastahack/releases/tag/v${finalAttrs.version}"; 38 + license = lib.licenses.mit; 39 + maintainers = with lib.maintainers; [ natsukium ]; 40 + mainProgram = "fastahack"; 41 + platforms = lib.platforms.unix; 42 + }; 43 + })