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

ngs: init at 0.2.16 #345886

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
73 changes: 73 additions & 0 deletions pkgs/by-name/ng/ngs/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
lib,
stdenv,
cmake,
fetchurl,
fetchFromGitHub,
pkg-config,
libffi,
pandoc,
pcre,
json_c,
boehmgc,
}:

let
version = "0.2.16";
peg-homepage = "http://piumarta.com/software/peg/";
peg-pname = "peg";
peg-version = "0.1.19";
# peg v0.1.20 (latest) causes a compilation error against syntax.legs
# ref: https://github.com/ngs-lang/ngs/issues/662
peg-0-1-19 = stdenv.mkDerivation {
pname = peg-pname;
version = peg-version;
src = fetchurl {
url = "${peg-homepage}/${peg-pname}-${peg-version}.tar.gz";
sha256 = "sha256-ABPdg6Zzl3hEWmS87T10ufUMB1U/hupDMzrl+rXCu7Q=";
};
preBuild = "makeFlagsArray+=( PREFIX=$out )";
meta = {
homepage = peg-homepage;
license = lib.licenses.mit;
};
};
src = fetchFromGitHub {
owner = "ngs-lang";
repo = "ngs";
rev = "refs/tags/v${version}";
hash = "sha256-hIjhy62HB5WyT3VUZP+kZWhE9PdP1cT4lGMEQiFIZdI=";
};
in
stdenv.mkDerivation {
pname = "ngs";
inherit version src;

nativeBuildInputs = [
cmake
pkg-config
];

buildInputs = [
libffi
pandoc
Copy link
Member

Choose a reason for hiding this comment

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

pandoc also goes in native, unless ngs uses it at runtime.

peg-0-1-19
pcre
json_c
boehmgc
];

postPatch = ''
patchShebangs build-scripts
'';

meta = {
description = "Next Generation Shell (NGS)";
homepage = "https://ngs-lang.org/";
changelog = "https://github.com/ngs-lang/ngs/releases/tag/${src.rev}";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.all;
mainProgram = "ngs";
maintainers = with lib.maintainers; [ momeemt ];
};
}