Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 45 lines 936 B view raw
1{ 2 lib, 3 buildNimPackage, 4 fetchFromGitHub, 5 openssl, 6 pcre, 7}: 8 9buildNimPackage (finalAttrs: { 10 pname = "min"; 11 version = "0.45.0"; 12 13 src = fetchFromGitHub { 14 owner = "h3rald"; 15 repo = "min"; 16 rev = "v${finalAttrs.version}"; 17 hash = "sha256-Uw03aSFn3EV3H2SkYoYzM5S/WLhEmLV8s3mRF3oT8ro="; 18 }; 19 20 lockFile = ./lock.json; 21 22 buildInputs = [ 23 openssl 24 pcre 25 ]; 26 27 prePatch = '' 28 # remove vendorabilities 29 find . -name '*.a' -delete 30 find minpkg/lib -name '*.nim' \ 31 -exec sed 's|{\.passL:.*\.}|discard|g' -i {} \; 32 ''; 33 34 NIX_LDFLAGS = [ "-lpcre" ]; 35 36 meta = { 37 description = "Functional, concatenative programming language with a minimalist syntax"; 38 homepage = "https://min-lang.org/"; 39 changelog = "https://github.com/h3rald/min/releases/tag/${finalAttrs.src.rev}"; 40 license = lib.licenses.mit; 41 mainProgram = "min"; 42 maintainers = with lib.maintainers; [ ehmry ]; 43 }; 44 45})