Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagon: init @ 1.1.158 #297736

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15126,6 +15126,12 @@
githubId = 29493551;
name = "Josh Peters";
};
petertrotman = {
email = "petertrotman@gmail.com";
github = "petertrotman";
githubId = 8298307;
name = "Peter Trotman";
};
peterwilli = {
email = "peter@codebuffet.co";
github = "peterwilli";
Expand Down
72 changes: 72 additions & 0 deletions pkgs/by-name/di/diagon/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{ lib, stdenv, fetchFromGitHub, fetchurl
, boost184
, cmake
, jdk
}:

let

antlr = fetchFromGitHub {
owner = "antlr";
repo = "antlr4";
rev = "1cb4669f84cea5b59661fd44b0f80509fdacd3f9";
hash = "sha256-Wm9tdoxM/kXVMEx6c5DwRooF4MUG14ykF7WNGjHfSIQ=";
deepClone = true;
};

antlr-jar = fetchurl {
url = "http://www.antlr.org/download/antlr-4.11.1-complete.jar";
hash = "sha256-YpdeGStK8mIrcrXwExVT7jy86X923CpBYy3MVeJUc+E=";
};

json = fetchFromGitHub {
owner = "ArthurSonzogni";
repo = "nlohmann_json_cmake_fetchcontent";
rev = "v3.9.1";
hash = "sha256-5A18zFqbgDc99pqQUPcpwHi89WXb8YVR9VEwO18jH2I=";
};

kgt = fetchFromGitHub {
owner = "ArthurSonzogni";
repo = "kgt";
rev = "56c3f46cf286051096d9295118c048219fe0d776";
hash = "sha256-xH0htDZd2UihLn7PHKLjEYETzcBSeJFOMNredTqlCW8=";
};

in stdenv.mkDerivation rec {
pname = "diagon";
version = "1.1.158";

src = fetchFromGitHub {
owner = "ArthurSonzogni";
repo = "Diagon";
rev = "v${version}";
hash = "sha256-Qxk3+1T0IPmvB5v3jaqvBnESpss6L8bvoW+R1l5RXdQ=";
};

nativeBuildInputs = [
boost184
cmake
jdk
];
Comment on lines +47 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nativeBuildInputs = [
boost184
cmake
jdk
];
nativeBuildInputs = [
cmake
jdk
];
buildInputs = [
boost184
];


cmakeBuildDir = "build";
preConfigure = ''
mkdir -p $cmakeBuildDir
ln -s ${antlr-jar} $cmakeBuildDir/antlr.jar
'';

cmakeFlags = [
"-DFETCHCONTENT_SOURCE_DIR_JSON=${json}"
"-DFETCHCONTENT_SOURCE_DIR_ANTLR=${antlr}"
"-DFETCHCONTENT_SOURCE_DIR_KGT=${kgt}"
"-DFETCHCONTENT_FULLY_DISCONNECTED=true"
];

meta = src.meta // {
description = "An interactive interpreter that transforms markdown-style expression into an ascii-art representation";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.petertrotman ];
mainProgram = "diagon";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mainProgram = "diagon";
mainProgram = "diagon";
platforms = lib.platforms.unix;

};
}