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