1 { lib, buildNimPackage, fetchFromGitHub, openssl, pcre }:
3 buildNimPackage (finalAttrs: {
7 src = fetchFromGitHub {
10 rev = "v${finalAttrs.version}";
11 hash = "sha256-4coeasFZrbwYQ6FM0ENkh/pPcvN3rCuheUpmHr1f3wM=";
14 lockFile = ./lock.json;
16 buildInputs = [ openssl pcre ];
19 # substitude our code for their code for data
20 substituteInPlace min.nimble \
21 --replace-fail 'import' "" \
22 --replace-warn 'minpkg/core/meta' "" \
23 --replace-warn 'pkgVersion' '"${finalAttrs.version}"' \
24 --replace-warn 'pkgAuthor' '""' \
25 --replace-warn 'pkgDescription' '""' \
26 --replace-warn 'pkgName' '"${finalAttrs.pname}"' \
28 # remove vendorabilities
29 find . -name '*.a' -delete
30 find minpkg/lib -name '*.nim' \
31 -exec sed 's|{\.passL:.*\.}|discard|g' -i {} \;
34 NIX_LDFLAGS = [ "-lpcre" ];
38 "A functional, concatenative programming language with a minimalist syntax";
39 homepage = "https://min-lang.org/";
40 changelog = "https://github.com/h3rald/min/releases/tag/${finalAttrs.src.rev}";
41 license = lib.licenses.mit;
43 maintainers = with lib.maintainers; [ ehmry ];