Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 40 lines 1.1 kB view raw
1{ lib, nimPackages, fetchFromGitHub, fetchpatch, makeWrapper, pcre, tinycc }: 2 3nimPackages.buildNimPackage { 4 pname = "nrpl"; 5 version = "20150522"; 6 nimBinOnly = true; 7 8 src = fetchFromGitHub { 9 owner = "wheineman"; 10 repo = "nrpl"; 11 rev = "6d6c189ab7d1c905cc29dc678d66e9e132026f69"; 12 sha256 = "1cly9lhrawnc42r31b7r0p0i6hcx8r00aa17gv7w9pcpj8ngb4v2"; 13 }; 14 15 nativeBuildInputs = [ makeWrapper ]; 16 buildInputs = [ pcre ]; 17 18 patches = [ 19 (fetchpatch { 20 url = "https://patch-diff.githubusercontent.com/raw/wheineman/nrpl/pull/12.patch"; 21 name = "update_for_new_nim.patch"; 22 sha256 = "1zff7inhn3l1jnxcnidy705lzi3wqib1chf4rayh1g9i23an7wg1"; 23 }) 24 ]; 25 26 NIX_LDFLAGS = "-lpcre"; 27 28 postFixup = '' 29 wrapProgram $out/bin/nrpl \ 30 --prefix PATH : ${lib.makeBinPath [ nimPackages.nim tinycc ]} 31 ''; 32 33 meta = with lib; { 34 description = "REPL for the Nim programming language"; 35 homepage = "https://github.com/wheineman/nrpl"; 36 license = licenses.mit; 37 maintainers = with maintainers; [ peterhoeg ]; 38 platforms = with platforms; linux ++ darwin; 39 }; 40}