generated from srid/rib-sample
-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from srid/pandoc-ast
MMark -> Pandoc AST
- Loading branch information
Showing
118 changed files
with
2,002 additions
and
678 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ result | |
.shake | ||
|
||
guide/.neuron | ||
|
||
neuron.prof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
packages: neuron.cabal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1 @@ | ||
let | ||
# To upgrade rib, go to https://github.com/srid/rib/commits/master, select the | ||
# revision you would like to upgrade to and set it here. Consult rib's | ||
# ChangeLog.md to check any notes on API migration. | ||
ribRevision = "b38ee96"; | ||
# We are using the same nixpkgs rev used by rib. Ideally this should be done | ||
# automatically. | ||
nixpkgsRev = "05f0934825c2"; | ||
projectRoot = ./.; | ||
in { | ||
# Rib library source to use | ||
rib ? builtins.fetchTarball "https://github.com/srid/rib/archive/${ribRevision}.tar.gz" | ||
# Cabal project root | ||
, root ? "" | ||
# Cabal project name | ||
, name ? "neuron" | ||
, gitRev ? "" | ||
, source-overrides ? {} | ||
, pkgs ? import (builtins.fetchTarball "https://github.com/nixos/nixpkgs/archive/${nixpkgsRev}.tar.gz") {} | ||
, ... | ||
}: | ||
|
||
let | ||
inherit (import (builtins.fetchTarball "https://github.com/hercules-ci/gitignore/archive/7415c4f.tar.gz") { inherit (pkgs) lib; }) | ||
gitignoreSource; | ||
neuronSearchScript = pkgs.runCommand "neuron-search" { buildInputs = [ pkgs.makeWrapper ]; } '' | ||
mkdir -p $out/bin | ||
makeWrapper ${./.}/src-bash/neuron-search $out/bin/neuron-search --prefix 'PATH' ':' \ | ||
"${pkgs.fzf}/bin:${pkgs.ripgrep}/bin:${pkgs.gawk}/bin:${pkgs.bat}/bin:${pkgs.findutils}/bin:${pkgs.envsubst}/bin"''; | ||
additional-packages = pkgs: | ||
[ neuronSearchScript | ||
]; | ||
excludeContent = path: typ: | ||
let d = baseNameOf (toString path); | ||
in !(d == "guide" && typ == "directory"); | ||
neuronSrc = gitignoreSource projectRoot; | ||
gitDescribe = pkgs.runCommand "neuron-gitDescribe" | ||
{ buildInputs = [ pkgs.git ]; } | ||
'' | ||
mkdir $out | ||
git -C ${projectRoot} describe --long --always --dirty | tr -d '\n' > $out/output | ||
''; | ||
neuronRev = if gitRev == "" then builtins.readFile (gitDescribe + /output) else gitRev; | ||
# Overwrite src/Neuron/Version.hs as git won't be available in the Nix derivation. | ||
neuronRoot = pkgs.runCommand "neuron" { buildInputs = [ neuronSrc ]; } | ||
'' | ||
mkdir $out | ||
cp -r -p ${neuronSrc}/* $out/ | ||
chmod -R u+w $out/ | ||
cat << EOF > $out/src/app/Neuron/Version/RepoVersion.hs | ||
{-# LANGUAGE OverloadedStrings #-} | ||
{-# LANGUAGE NoImplicitPrelude #-} | ||
module Neuron.Version.RepoVersion (version) where | ||
import Relude | ||
version :: Maybe Text | ||
version = Just "${neuronRev}" | ||
EOF | ||
''; | ||
sources = { | ||
dsum = builtins.fetchTarball "https://github.com/obsidiansystems/dependent-sum/archive/73ab6cb.tar.gz"; | ||
# https://github.com/obsidiansystems/aeson-gadt-th/pull/22 | ||
aeson-gadt-th = builtins.fetchTarball "https://github.com/srid/aeson-gadt-th/archive/ece1007.tar.gz"; | ||
}; | ||
|
||
in import rib { | ||
inherit name additional-packages; | ||
root = if root == "" then neuronRoot else root; | ||
source-overrides = { | ||
neuron = neuronRoot; | ||
# Until https://github.com/obsidiansystems/which/pull/6 is merged | ||
which = builtins.fetchTarball "https://github.com/srid/which/archive/5061a97.tar.gz"; | ||
dependent-sum = sources.dsum + "/dependent-sum"; | ||
dependent-sum-template = sources.dsum + "/dependent-sum-template"; | ||
aeson-gadt-th = sources.aeson-gadt-th; | ||
} // source-overrides; | ||
overrides = self: super: with pkgs.haskell.lib; { | ||
# We must add neuron-search as a runtime dependency to the 'neuron' | ||
# Haskell package so that other apps `import`ing this defafult.nix would | ||
# know where to find when building the neuron library dependency through | ||
# cabal (instead of directly via nix). | ||
neuron = super.neuron.overrideDerivation (drv: { | ||
propagatedBuildInputs = drv.propagatedBuildInputs ++ [neuronSearchScript]; | ||
}); | ||
}; | ||
} | ||
(import ./project.nix {}).ghc.neuron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "haskell-hvr", | ||
"repo": "HsYAML", | ||
"branch": "0.2", | ||
"private": false, | ||
"rev": "cb98cb15cf40cbb7504c6e2d2faa80cbbe4673bc", | ||
"sha256": "048cryn3zwb2kc6ryyk2vq8q37ls3x454zvspvz62b3n2c1rsm19" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
These dependencies are to be managed by the `ob thunk` command from obelisk, and not hand-edited. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "snowleopard", | ||
"repo": "alga", | ||
"branch": "heads/v0.5", | ||
"private": false, | ||
"rev": "408849340506b856a63bcb2ef7d912940ccb3bd7", | ||
"sha256": "11rqzn88snrj22jifvxls7qjjvhsv13idlc4nzbkv7nqmgdcpsyq" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "sebastiaanvisser", | ||
"repo": "clay", | ||
"branch": "master", | ||
"private": false, | ||
"rev": "dcc4fc6d8b55af4814bd3f9bbb6d32e2fa2751a8", | ||
"sha256": "1dm71z1q7yaq0kl2yb0vr0lsbd8byq5qkdb2kvr26jq48nfq2xdc" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "jgm", | ||
"repo": "commonmark-hs", | ||
"branch": "master", | ||
"private": false, | ||
"rev": "c9afe7c1ca25dbc1f0580187bb422bd1681ae1b5", | ||
"sha256": "0dhj554jfa5m4s4dfbwnbrkxfnk22b7bgrsjdl5fijw3m6lslfyk" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "jgm", | ||
"repo": "doclayout", | ||
"branch": "master", | ||
"private": false, | ||
"rev": "7454b04674b647e3e4fc3977a13dad9db365f55e", | ||
"sha256": "01c16gq31wbf9y4jrzs52ggf680nwz65f9j0818n8pkk671xsjxv" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "jgm", | ||
"repo": "doctemplates", | ||
"branch": "master", | ||
"private": false, | ||
"rev": "f116210025fd8af48b864b875dfe880a722be737", | ||
"sha256": "07k6211d3i9firmnf4j7s9ipyk9k6fxncbqiw11dqf2zll6ngcck" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "jgm", | ||
"repo": "emojis", | ||
"branch": "master", | ||
"private": false, | ||
"rev": "74bcd7b19fb572ac920e691c7587665f0c175710", | ||
"sha256": "0jl6xvfnchkxkwrkrlxzgwn39srscgarpdk3iplr2lwmcz2xr81w" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "hslua", | ||
"repo": "hslua", | ||
"branch": "master", | ||
"private": false, | ||
"rev": "b72a6e5efec158327a4c33e8c5dafaf8b424b222", | ||
"sha256": "0g19f7j2983kknp77xagldfikbis779cn9d9k2f39slrnnfqhwqh" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }: | ||
if !fetchSubmodules && !private then builtins.fetchTarball { | ||
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256; | ||
} else (import <nixpkgs> {}).fetchFromGitHub { | ||
inherit owner repo rev sha256 fetchSubmodules private; | ||
}; | ||
json = builtins.fromJSON (builtins.readFile ./github.json); | ||
in fetch json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# DO NOT HAND-EDIT THIS FILE | ||
import (import ./thunk.nix) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"owner": "tarleb", | ||
"repo": "jira-wiki-markup", | ||
"branch": "master", | ||
"private": false, | ||
"rev": "cab6c8e058a4f0966bfa0679f65ef806ef1055f3", | ||
"sha256": "1hq048ffd07a7jir66455682473rhza6lv8jl0g0fxlld1dh30r4" | ||
} |
Oops, something went wrong.