package.nix (1546B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 perl, 7 libevent, 8 openssl, 9 testers, 10 }: 11 12 stdenv.mkDerivation (finalAttrs: { 13 pname = "aprsc"; 14 version = "2.1.20"; 15 16 __structuredAttrs = true; 17 18 src = fetchFromGitHub { 19 owner = "hessu"; 20 repo = "aprsc"; 21 tag = "release/${finalAttrs.version}"; 22 hash = "sha256-LhXo/B4zoq71SZGwfn9AZmNtCSQzpuqvjQ3xrc0k/mY="; 23 }; 24 25 patches = [ 26 (fetchpatch { 27 url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/54cc4cc6eaed14e3d495ca3a3b6f86f3f429b991/net/aprsc/files/patch-Makefile.in"; 28 hash = "sha256-lxnE/9fgnxZxIcb9bNcq4PoOIBntIdyVYJa5rPIx26s="; 29 }) 30 ]; 31 patchFlags = [ "-p0" ]; 32 33 sourceRoot = "${finalAttrs.src.name}/src"; 34 35 nativeBuildInputs = [ perl ]; 36 37 buildInputs = [ 38 libevent 39 openssl 40 ]; 41 42 preConfigure = "LD=$CC"; 43 configureFlags = [ 44 (lib.withFeature true "openssl") 45 "--mandir=$(out)/share/man" 46 ]; 47 48 makeFlags = [ 49 "GIT_CMD:=" 50 "GITVERSION:=release" 51 "DATE:=1970-01-01T00:00:00+0000" 52 "BUILD_TIME:=1970-01-01T00:00:00+0000" 53 "BUILD_USER:=nixbld" 54 ]; 55 56 installFlags = [ "PREFIX=$(out)" ]; 57 58 passthru.tests.version = testers.testVersion { 59 package = finalAttrs.finalPackage; 60 command = "! aprsc -h"; 61 version = "${finalAttrs.version}-release"; 62 }; 63 64 meta = { 65 description = "A core APRS-IS server"; 66 homepage = "http://he.fi/aprsc/"; 67 license = lib.licenses.bsd3; 68 maintainers = [ lib.maintainers.sikmir ]; 69 platforms = lib.platforms.linux; 70 skip.ci = stdenv.isDarwin; 71 }; 72 })
