From 2a7fc4b6ef7a47d906659f5dda252bd2abf42b33 Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 5 Jul 2024 13:27:19 +0900 Subject: [PATCH] freesasa: init at 2.1.2 --- pkgs/by-name/fr/freesasa/package.nix | 60 ++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pkgs/by-name/fr/freesasa/package.nix diff --git a/pkgs/by-name/fr/freesasa/package.nix b/pkgs/by-name/fr/freesasa/package.nix new file mode 100644 index 000000000000..a20ace885373 --- /dev/null +++ b/pkgs/by-name/fr/freesasa/package.nix @@ -0,0 +1,60 @@ +{ + lib, + stdenv, + fetchFromGitHub, + fetchpatch, + autoreconfHook, + libtool, + pkg-config, + libxml2, + json_c, + testers, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "freesasa"; + version = "2.1.2"; + + src = fetchFromGitHub { + owner = "mittinatten"; + repo = "freesasa"; + rev = "refs/tags/${finalAttrs.version}"; + fetchSubmodules = true; + hash = "sha256-OH1/GGFtMBnHuoOu3pdR+ohVO1m0I/jmCZbxPQ0C0jo="; + }; + + patches = [ + (fetchpatch { + # https://github.com/mittinatten/freesasa/issues/85 + name = "fix-linker-error.patch"; + url = "https://github.com/mittinatten/freesasa/commit/d5898c13af0f272697726c567a22f1c48af53d62.patch"; + includes = [ "src/Makefile.am" ]; + hash = "sha256-NA4jMue9ATxP+A0tYIptwz0qCXTmAqoMRBsi5d5uv3E="; + }) + ]; + + nativeBuildInputs = [ + autoreconfHook + libtool + pkg-config + ]; + + buildInputs = [ + json_c + libxml2 + ]; + + passthru.tests = { + version = testers.testVersion { package = finalAttrs.finalPackage; }; + }; + + meta = { + description = "C-library for calculating Solvent Accessible Surface Areas"; + homepage = "https://github.com/mittinatten/freesasa"; + changelog = "https://github.com/mittinatten/freesasa/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ natsukium ]; + mainProgram = "freesasa"; + platforms = lib.platforms.unix; + }; +})