Merge branch 'master' of github.com:hectic-lab/util.nix
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
{ stdenv, patchelf, gcc, lib, bash, inotify-tools }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hectic";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
doCheck = true;
|
||||
|
||||
nativeBuildInputs = [ gcc inotify-tools ];
|
||||
nativeBuildInputs = [gcc inotify-tools];
|
||||
|
||||
buildPhase = ''
|
||||
ls
|
||||
@@ -86,4 +85,4 @@ EOF
|
||||
description = "hectic";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
8
package/c/hemar/.gitignore
vendored
8
package/c/hemar/.gitignore
vendored
@@ -1,2 +1,8 @@
|
||||
<<<<<<< HEAD:package/c/hemar/.gitignore
|
||||
hemar.o
|
||||
hemar.so
|
||||
hemar.so
|
||||
=======
|
||||
package/c/postgreact/postgreact.control
|
||||
package/c/postgreact/postgreact.o
|
||||
package/c/postgreact/postgreact.so
|
||||
>>>>>>> 016db3d06ae814e0f0cc8f39cd4e5af729bb39ac:package/c/postgreact/.gitignore
|
||||
|
||||
@@ -12,4 +12,5 @@ PG_LDFLAGS += -Wl,-rpath,$(shell $(HECTIC_CONFIG) --libdir)
|
||||
SHLIB_LINK += $(shell $(HECTIC_CONFIG) --libs)
|
||||
|
||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||
include $(PGXS)
|
||||
|
||||
include $(PGXS)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
# --color Pass -fdiagnostics-color=always to compiler.
|
||||
# help, --help Show this help message.
|
||||
|
||||
set -u
|
||||
|
||||
check_dependencies() {
|
||||
for dep in gcc pg_config; do
|
||||
if ! command -v "$dep" >/dev/null 2>&1; then
|
||||
@@ -105,4 +107,4 @@ case "$MODE" in
|
||||
print_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
12
package/c/hemar/postgreact--1.0.sql
Normal file
12
package/c/hemar/postgreact--1.0.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
||||
\echo Use "CREATE EXTENSION postgreact" to load this file. \quit
|
||||
|
||||
-- Define the hello function that uses our C implementation
|
||||
CREATE FUNCTION hello()
|
||||
RETURNS
|
||||
TEXT
|
||||
STRICT VOLATILE
|
||||
LANGUAGE C
|
||||
AS
|
||||
'MODULE_PATHNAME', 'hello'
|
||||
;
|
||||
4
package/c/hemar/postgreact.control.in
Normal file
4
package/c/hemar/postgreact.control.in
Normal file
@@ -0,0 +1,4 @@
|
||||
comment = '@EXTENSION_COMMENT@'
|
||||
default_version = '@EXTENSION_VERSION@'
|
||||
module_pathname = '$libdir/@EXTENSION@'
|
||||
relocatable = false
|
||||
16
package/c/hemar/postgreact.h
Normal file
16
package/c/hemar/postgreact.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef POSTGREACT_H
|
||||
#define POSTGREACT_H
|
||||
|
||||
#include "postgres.h"
|
||||
|
||||
#ifdef PG_MODULE_MAGIC
|
||||
PG_MODULE_MAGIC;
|
||||
#endif
|
||||
|
||||
void _PG_init(void);
|
||||
void _PG_fini(void);
|
||||
|
||||
Datum hello(PG_FUNCTION_ARGS);
|
||||
PG_FUNCTION_INFO_V1(hello);
|
||||
|
||||
#endif // POSTGREACT_H
|
||||
@@ -1,12 +1,17 @@
|
||||
{ stdenv, gcc, lib, bash, c-hectic }:
|
||||
|
||||
{
|
||||
stdenv,
|
||||
gcc,
|
||||
lib,
|
||||
bash,
|
||||
c-hectic,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "prettify";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = [ gcc c-hectic ];
|
||||
nativeBuildInputs = [gcc c-hectic];
|
||||
|
||||
buildPhase = ''
|
||||
ls
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
{ stdenv, gcc, lib, bash, gdb }:
|
||||
|
||||
{
|
||||
stdenv,
|
||||
gcc,
|
||||
lib,
|
||||
bash,
|
||||
gdb,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "watch";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = [ gcc gdb ];
|
||||
nativeBuildInputs = [gcc gdb];
|
||||
|
||||
buildPhase = ''
|
||||
${bash}/bin/sh ./make.sh build
|
||||
@@ -25,4 +30,4 @@ stdenv.mkDerivation {
|
||||
description = "watch";
|
||||
license = lib.licenses.mit;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user