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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
let pkg = import <nixpkgs> {};
in {stdenv          ? pkg.stdenv,
	fetchFromGitHub ? pkg.fetchFromGitHub,
	terra           ? pkg.terra-modern,
	pkgconfig       ? pkg.pkgconfig,
	json_c          ? pkg.json_c,
	postgresql      ? pkg.postgresql.lib,
	mbedtls         ? pkg.mbedtls,
	mongoose        ? null
}:
let mgsrc = if mongoose != null then mongoose
			else fetchFromGitHub {
				owner = "cesanta";
				repo = "mongoose";
				rev = "369f44adfa38e0d8fa9667e9d6bafd7e0e3c6231";
				sha256 = "17rkd7ydic39cw9sfh11mcil02vmi6jjyj2ncbxan6psak09xbrc";
			};
	pkv = val: p: "parsav_pkg_${p}_${val}";
	pkp = pkv "prefix";
in stdenv.mkDerivation {
	name = "parsav";
	version = "dev";
	nativeBuildInputs = [terra json_c pkgconfig mbedtls];
	src = ./.;

	${pkp "json-c"} = "${json_c}";
	${pkp "libpq"} = "${postgresql}";
	${pkp "mbedtls"} = "${mbedtls}";

	parsav_target_os = "linux";
	parsav_dist = "nixos";
	configurePhase = ''
		cp -r ${mgsrc} lib/mongoose
	'';
	installPhase = ''
		make prefix=$prefix install
	'';
	
	meta = {
		description = "lightweight fediverse server";
		homepage = https://c.hale.su/parsav;
		license = stdenv.lib.licenses.agpl3;
		platforms = stdenv.lib.platforms.unix;
	};
}