nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 47 lines 1.6 kB view raw
1{ stdenv, fetchFromGitHub, makeWrapper, clang, haskellPackages }: 2 3haskellPackages.mkDerivation rec { 4 5 pname = "carp"; 6 version = "unstable-2018-09-15"; 7 8 src = fetchFromGitHub { 9 owner = "carp-lang"; 10 repo = "Carp"; 11 rev = "cf9286c35cab1c170aa819f7b30b5871b9e812e6"; 12 sha256 = "1k6kdxbbaclhi40b9p3fgbkc1x6pc4v0029xjm6gny6pcdci2cli"; 13 }; 14 15 buildDepends = [ makeWrapper ]; 16 17 executableHaskellDepends = with haskellPackages; [ 18 HUnit blaze-markup blaze-html split cmdargs 19 ]; 20 21 isExecutable = true; 22 23 # The carp executable must know where to find its core libraries and other 24 # files. Set the environment variable CARP_DIR so that it points to the root 25 # of the Carp repo. See: 26 # https://github.com/carp-lang/Carp/blob/master/docs/Install.md#setting-the-carp_dir 27 # 28 # Also, clang must be available run-time because carp is compiled to C which 29 # is then compiled with clang. 30 postInstall = '' 31 wrapProgram $out/bin/carp \ 32 --set CARP_DIR $src \ 33 --prefix PATH : ${clang}/bin 34 wrapProgram $out/bin/carp-header-parse \ 35 --set CARP_DIR $src \ 36 --prefix PATH : ${clang}/bin 37 ''; 38 39 description = "A statically typed lisp, without a GC, for real-time applications"; 40 homepage = https://github.com/carp-lang/Carp; 41 license = stdenv.lib.licenses.asl20; 42 maintainers = with stdenv.lib.maintainers; [ jluttine ]; 43 44 # Windows not (yet) supported. 45 platforms = with stdenv.lib.platforms; unix ++ darwin; 46 47}