forked from mirrors/nixpkgs
4b1da9ba67
The attached patch updates the Postiats nixpkgs expression to the latest released 0.3.0 version. From c89bfabd847ebd62c8dd77cb7385ea4effa929be Mon Sep 17 00:00:00 2001 From: Karn Kallio <kkallio@skami.org> Date: Sat, 21 Jan 2017 13:28:23 -0400 Subject: [PATCH] ats2 : update Postiats to the latest released 0.3.0 version.
60 lines
1.6 KiB
Nix
60 lines
1.6 KiB
Nix
{ stdenv, fetchurl, gmp
|
|
, withEmacsSupport ? true
|
|
, withContrib ? true }:
|
|
|
|
let
|
|
versionPkg = "0.3.0" ;
|
|
|
|
contrib = fetchurl {
|
|
url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz" ;
|
|
sha256 = "1s4yscisn9gsr692jmh4y5mz03012pv84cm7l5n51v83wc08fks0" ;
|
|
};
|
|
|
|
postInstallContrib = stdenv.lib.optionalString withContrib
|
|
''
|
|
local contribDir=$out/lib/ats2-postiats-*/ ;
|
|
mkdir -p $contribDir ;
|
|
tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
|
|
'';
|
|
|
|
postInstallEmacs = stdenv.lib.optionalString withEmacsSupport
|
|
''
|
|
local siteLispDir=$out/share/emacs/site-lisp/ats2 ;
|
|
mkdir -p $siteLispDir ;
|
|
install -m 0644 -v ./utils/emacs/*.el $siteLispDir ;
|
|
'';
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "ats2-${version}";
|
|
version = versionPkg;
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-${version}.tgz";
|
|
sha256 = "1knf03r8a5sis7n8rw54flf1lxfbr3prywxb1czcdp6hsbcd1v1d";
|
|
};
|
|
|
|
patches = [ ./install-postiats-contrib.patch ];
|
|
|
|
buildInputs = [ gmp ];
|
|
|
|
setupHook = with stdenv.lib;
|
|
let
|
|
hookFiles =
|
|
[ ./setup-hook.sh ]
|
|
++ optional withContrib ./setup-contrib-hook.sh;
|
|
in
|
|
builtins.toFile "setupHook.sh"
|
|
(concatMapStringsSep "\n" builtins.readFile hookFiles);
|
|
|
|
postInstall = postInstallContrib + postInstallEmacs;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Functional programming language with dependent types";
|
|
homepage = "http://www.ats-lang.org";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ thoughtpolice ttuegel ];
|
|
};
|
|
}
|