parsav  Check-in [df4ae251ef]

Overview
Comment:add nix build file
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: df4ae251ef4234f6ac9144b5ab6861eeec7fe831743c35a92132857f9b9654fb
User & Date: lexi on 2020-12-16 08:46:15
Other Links: manifest | tags
Context
2020-12-21
01:08
continued iteration check-in: 25e05466d5 user: lexi tags: trunk
2020-12-16
08:46
add nix build file check-in: df4ae251ef user: lexi tags: trunk
08:46
iterating check-in: 59e1d7d56a user: lexi tags: trunk
Changes

Added default.nix version [69636ff762].

            1  +let pkg = import <nixpkgs> {};
            2  +in {stdenv          ? pkg.stdenv,
            3  +	fetchFromGitHub ? pkg.fetchFromGitHub,
            4  +	terra           ? pkg.terra-modern,
            5  +	pkgconfig       ? pkg.pkgconfig,
            6  +	json_c          ? pkg.json_c,
            7  +	postgresql      ? pkg.postgresql.lib,
            8  +	mbedtls         ? pkg.mbedtls,
            9  +	mongoose        ? null
           10  +}:
           11  +let mgsrc = if mongoose != null then mongoose
           12  +			else fetchFromGitHub {
           13  +				owner = "cesanta";
           14  +				repo = "mongoose";
           15  +				rev = "369f44adfa38e0d8fa9667e9d6bafd7e0e3c6231";
           16  +				sha256 = "17rkd7ydic39cw9sfh11mcil02vmi6jjyj2ncbxan6psak09xbrc";
           17  +			};
           18  +	pkv = val: p: "parsav_pkg_${p}_${val}";
           19  +	pkp = pkv "prefix";
           20  +in stdenv.mkDerivation {
           21  +	name = "parsav";
           22  +	version = "dev";
           23  +	nativeBuildInputs = [terra json_c pkgconfig mbedtls];
           24  +	src = ./.;
           25  +
           26  +	${pkp "json-c"} = "${json_c}";
           27  +	${pkp "libpq"} = "${postgresql}";
           28  +	${pkp "mbedtls"} = "${mbedtls}";
           29  +
           30  +	parsav_target_os = "linux";
           31  +	parsav_dist = "nixos";
           32  +	configurePhase = ''
           33  +		cp -r ${mgsrc} lib/mongoose
           34  +	'';
           35  +	installPhase = ''
           36  +		make prefix=$prefix install
           37  +	'';
           38  +	
           39  +	meta = {
           40  +		description = "lightweight fediverse server";
           41  +		homepage = https://c.hale.su/parsav;
           42  +		license = stdenv.lib.licenses.agpl3;
           43  +		platforms = stdenv.lib.platforms.unix;
           44  +	};
           45  +}