3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #78562 from fgaz/lobster/init

lobster: init at unstable-2020-01-22
This commit is contained in:
Ryan Mulligan 2020-09-22 21:42:23 -07:00 committed by GitHub
commit cc7d3ff153
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,66 @@
{ stdenv
, fetchFromGitHub
, cmake
, callPackage
# Linux deps
, libGL
, xorg
# Darwin deps
, cf-private
, Cocoa
, AudioToolbox
, OpenGL
, Foundation
, ForceFeedback
}:
stdenv.mkDerivation rec {
pname = "lobster";
version = "unstable-2020-07-27";
src = fetchFromGitHub {
owner = "aardappel";
repo = pname;
rev = "9d68171494a79c83931426b624a0249a9c51882c";
sha256 = "0d4gn71jym662i00rdmynv53ng1lgl81s5lw1sdddgn41wzs28dd";
};
nativeBuildInputs = [ cmake ];
buildInputs = if stdenv.isDarwin
then [
cf-private
Cocoa
AudioToolbox
OpenGL
Foundation
ForceFeedback
]
else [
libGL
xorg.libX11
xorg.libXext
];
preConfigure = "cd dev";
enableParallelBuilding = true;
passthru.tests = {
can-run-hello-world = callPackage ./test-can-run-hello-world.nix {};
};
meta = with stdenv.lib; {
homepage = "http://strlen.com/lobster";
description = "The Lobster programming language";
longDescription = ''
Lobster is a programming language that tries to combine the advantages of
very static typing and memory management with a very lightweight,
friendly and terse syntax, by doing most of the heavy lifting for you.
'';
license = licenses.asl20;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,13 @@
{ stdenv, lobster }:
stdenv.mkDerivation {
name = "lobster-test-can-run-hello-world";
meta.timeout = 10;
buildCommand = ''
${lobster}/bin/lobster \
${lobster}/share/Lobster/samples/rosettacode/hello_world_test.lobster \
| grep 'Goodbye, World!'
touch $out
'';
}

View file

@ -9378,6 +9378,12 @@ in
lizardfs = callPackage ../tools/filesystems/lizardfs { };
lobster = callPackage ../development/compilers/lobster {
inherit (darwin) cf-private;
inherit (darwin.apple_sdk.frameworks)
Cocoa AudioToolbox OpenGL Foundation ForceFeedback;
};
lld = llvmPackages.lld;
lld_5 = llvmPackages_5.lld;
lld_6 = llvmPackages_6.lld;