From d65677d41dbd3e7c6fc047ae3d911b2da57debc7 Mon Sep 17 00:00:00 2001 From: Kye Shi Date: Sat, 8 May 2021 14:29:31 -0700 Subject: [PATCH] New package: elm-0.19.1 --- srcpkgs/elm/template | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 srcpkgs/elm/template diff --git a/srcpkgs/elm/template b/srcpkgs/elm/template new file mode 100644 index 000000000000..4b62c76ca447 --- /dev/null +++ b/srcpkgs/elm/template @@ -0,0 +1,34 @@ +# Template file for 'elm' +pkgname=elm +version=0.19.1 +revision=1 +archs="x86_64 x86_64-musl" +wrksrc="compiler-${version}" +hostmakedepends="cabal-install pkg-config" +makedepends="zlib-devel ncurses-devel" +short_desc="Delightful language for reliable web applications" +maintainer="Kye Shi " +license="BSD-3-Clause" +homepage="https://elm-lang.org" +distfiles="https://github.com/elm/compiler/archive/refs/tags/${version}.tar.gz" +checksum="aa161caca775cef1bbb04bcdeb4471d3aabcf87b6d9d9d5b0d62d3052e8250b1" +nocross="yes" +nopie_files="/usr/bin/elm" + +do_build() { + # `worker` contains code for an Elm website web server & is not needed for + # building the Elm compiler/CLI itself. In fact, if `worker` is present, + # `cabal new-build` appears to detect and build the `Main.hs` under `worker` + # instead of the one under `terminal` (the compiler executable, which is what + # we actually want), messing up the build. So we have to remove `worker` + # before building. + rm -rf 'worker' + HOME="$PWD" cabal new-update + HOME="$PWD" cabal new-build "${makejobs}" +} + +do_install() { + # eval needed to expand glob + eval vbin "dist-newstyle/build"/*/*/"elm-${version}/x/elm/build/elm/elm" + vlicense LICENSE +}