Skip to content

Commit

Permalink
make: easier installation with git submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-chavez committed Dec 21, 2023
1 parent 7946dee commit cf91235
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
*.lex.c
results/
.history
*.so
*.bc
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "mustach"]
path = mustach
url = git@gitlab.com:jobol/mustach
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,34 @@ select show_cat('Mr. Sleepy', false);

## Installation

Install https://gitlab.com/jobol/mustach, then on this repo:
Clone the repo and submodules:

```
$ make && make install
git clone --recurse-submodules https://github.com/PostgREST/plmustache
```

Tested on Postgres 12, 13, 14, 15, 16.
Build mustach:

```
cd mustach
make && sudo make install
```

Build plmustache:

```
cd ..
make && sudo make install
```

Then on SQL you can do:

```sql
CREATE EXTENSION plmustache;
```

plmustache is tested on Postgres 12, 13, 14, 15, 16.

## Development

Expand Down
1 change: 1 addition & 0 deletions mustach
Submodule mustach added at bd8a41
9 changes: 2 additions & 7 deletions nix/mustach.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitLab, pkg-config }:
{ lib, stdenv, pkg-config }:

stdenv.mkDerivation rec {
pname = "mustach";
Expand All @@ -8,10 +8,5 @@ stdenv.mkDerivation rec {

makeFlags = [ "PREFIX=$(out)" "VERSION=${version}"];

src = fetchFromGitLab {
owner = "jobol";
repo = pname;
rev = "bd8a41030099c079aff57fcdfb1f5c0aa08cdbaf";
sha256 = "sha256-3kdXLp40QZo1+JoQUQNHOxuh/9cHhWvpz/ZFQ2MFXW8=";
};
src = ../mustach;
}

0 comments on commit cf91235

Please sign in to comment.