git.iko.soy/typeable/nixpkgs
on master help sign in
ats2 : update to latest stable release 0.2.11
commitdf5ffdc4c16131068b994447b5d0c227f478d1d6 authorKarn Kallio <kkallio@skami.org> dateSun 23 Oct 2016, 20:28 (10 years ago) parent6a2fd22
3 files changed+137−5
pkgs/development/compilers/ats2/default.nix+37−5 pkgs/development/compilers/ats2/installed-lib-directory-version.patch+99 pkgs/development/compilers/ats2/setup-contrib-hook.sh+1
pkgs/development/compilers/ats2/default.nix+37−5
@@ -1,17 +1,49 @@
1−{ stdenv, fetchurl, gmp }:
1+{ stdenv, fetchurl, gmp
2+, withEmacsSupport ? true
3+, withContrib ? true }:
4+
5+let
6+ versionPkg = "0.2.11" ;
7+
8+ contrib = fetchurl {
9+ url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz" ;
10+ sha256 = "0kc4nx1904745c1rkj9yfbayidw7rks1mwq0lxmvsgghn98dxwjn" ;
11+ };
12+in
213
314stdenv.mkDerivation rec {
415 name = "ats2-${version}";
5− version = "0.2.7";
16+ version = versionPkg;
617
7− src = fetchurl {
18+ src = fetchurl {
819 url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-${version}.tgz";
9− sha256 = "1w9cncahv0vkqsj4vlfnn7bn61jvgxgjhk7wbppcm3yhb48pkmda";
20+ sha256 = "140xy129fr11bdf4bj6qya9mf0fhnv2x7ksb9j46pf2yzrsrks8g";
1021 };
1122
1223 buildInputs = [ gmp ];
1324
14− setupHook = ./setup-hook.sh;
25+ setupHook = let
26+ hookFiles = [ ./setup-hook.sh ] ++ stdenv.lib.optionals withContrib [ ./setup-contrib-hook.sh ] ;
27+ in
28+ builtins.toFile "setupHook.sh" (stdenv.lib.concatMapStringsSep "\n" builtins.readFile hookFiles) ;
29+
30+ patches = [ ./installed-lib-directory-version.patch ];
31+
32+ postInstallContrib = stdenv.lib.optionalString withContrib
33+ ''
34+ local contribDir=$out/lib/ats2-postiats-*/ ;
35+ mkdir -p $contribDir ;
36+ tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
37+ '';
38+
39+ postInstallEmacs = stdenv.lib.optionalString withEmacsSupport
40+ ''
41+ local siteLispDir=$out/share/emacs/site-lisp/ats2 ;
42+ mkdir -p $siteLispDir ;
43+ install -m 0644 -v ./utils/emacs/*.el $siteLispDir ;
44+ '';
45+
46+ postInstall = postInstallContrib + postInstallEmacs;
1547
1648 meta = with stdenv.lib; {
1749 description = "Functional programming language with dependent types";
pkgs/development/compilers/ats2/installed-lib-directory-version.patchnew file+99
@@ -0,0 +1,99 @@
1+Change the name of the library directory to match the version of the package.
2+
3+diff -Naur ATS2-Postiats-0.2.11/configure postiats-new/configure
4+--- ATS2-Postiats-0.2.11/configure 2016-10-13 12:03:20.000000000 -0400
5++++ postiats-new/configure 2016-10-23 20:17:29.912579618 -0400
6+@@ -1,6 +1,6 @@
7+ #! /bin/sh
8+ # Guess values for system-dependent variables and create Makefiles.
9+-# Generated by GNU Autoconf 2.69 for ATS2/Postiats 0.2.10.
10++# Generated by GNU Autoconf 2.69 for ATS2/Postiats 0.2.11.
11+ #
12+ # Report bugs to <gmpostiats@gmail.com>.
13+ #
14+@@ -580,8 +580,8 @@
15+ # Identity of this package.
16+ PACKAGE_NAME='ATS2/Postiats'
17+ PACKAGE_TARNAME='ats2-postiats'
18+-PACKAGE_VERSION='0.2.10'
19+-PACKAGE_STRING='ATS2/Postiats 0.2.10'
20++PACKAGE_VERSION='0.2.11'
21++PACKAGE_STRING='ATS2/Postiats 0.2.11'
22+ PACKAGE_BUGREPORT='gmpostiats@gmail.com'
23+ PACKAGE_URL=''
24+
25+@@ -1242,7 +1242,7 @@
26+ # Omit some internal or obsolete options to make the list less imposing.
27+ # This message is too long to be a string in the A/UX 3.1 sh.
28+ cat <<_ACEOF
29+-\`configure' configures ATS2/Postiats 0.2.10 to adapt to many kinds of systems.
30++\`configure' configures ATS2/Postiats 0.2.11 to adapt to many kinds of systems.
31+
32+ Usage: $0 [OPTION]... [VAR=VALUE]...
33+
34+@@ -1304,7 +1304,7 @@
35+
36+ if test -n "$ac_init_help"; then
37+ case $ac_init_help in
38+- short | recursive ) echo "Configuration of ATS2/Postiats 0.2.10:";;
39++ short | recursive ) echo "Configuration of ATS2/Postiats 0.2.11:";;
40+ esac
41+ cat <<\_ACEOF
42+
43+@@ -1384,7 +1384,7 @@
44+ test -n "$ac_init_help" && exit $ac_status
45+ if $ac_init_version; then
46+ cat <<\_ACEOF
47+-ATS2/Postiats configure 0.2.10
48++ATS2/Postiats configure 0.2.11
49+ generated by GNU Autoconf 2.69
50+
51+ Copyright (C) 2012 Free Software Foundation, Inc.
52+@@ -1936,7 +1936,7 @@
53+ This file contains any messages produced by compilers while
54+ running configure, to aid debugging if configure makes a mistake.
55+
56+-It was created by ATS2/Postiats $as_me 0.2.10, which was
57++It was created by ATS2/Postiats $as_me 0.2.11, which was
58+ generated by GNU Autoconf 2.69. Invocation command line was
59+
60+ $ $0 $@
61+@@ -4226,7 +4226,7 @@
62+ # report actual input values of CONFIG_FILES etc. instead of their
63+ # values after options handling.
64+ ac_log="
65+-This file was extended by ATS2/Postiats $as_me 0.2.10, which was
66++This file was extended by ATS2/Postiats $as_me 0.2.11, which was
67+ generated by GNU Autoconf 2.69. Invocation command line was
68+
69+ CONFIG_FILES = $CONFIG_FILES
70+@@ -4288,7 +4288,7 @@
71+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
72+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
73+ ac_cs_version="\\
74+-ATS2/Postiats config.status 0.2.10
75++ATS2/Postiats config.status 0.2.11
76+ configured by $0, generated by GNU Autoconf 2.69,
77+ with options \\"\$ac_cs_config\\"
78+
79+diff -Naur ATS2-Postiats-0.2.11/src/CBOOT/config.h postiats-new/src/CBOOT/config.h
80+--- ATS2-Postiats-0.2.11/src/CBOOT/config.h 2016-10-13 12:03:20.000000000 -0400
81++++ postiats-new/src/CBOOT/config.h 2016-10-23 20:16:34.613836556 -0400
82+@@ -44,7 +44,7 @@
83+ #define PACKAGE_NAME "ATS2/Postiats"
84+
85+ /* Define to the full name and version of this package. */
86+-#define PACKAGE_STRING "ATS2/Postiats 0.2.10"
87++#define PACKAGE_STRING "ATS2/Postiats 0.2.11"
88+
89+ /* Define to the one symbol short name of this package. */
90+ #define PACKAGE_TARNAME "ats2-postiats"
91+@@ -53,7 +53,7 @@
92+ #define PACKAGE_URL ""
93+
94+ /* Define to the version of this package. */
95+-#define PACKAGE_VERSION "0.2.10"
96++#define PACKAGE_VERSION "0.2.11"
97+
98+ /* The size of `void*', as computed by sizeof. */
99+ #define SIZEOF_VOIDP 8
pkgs/development/compilers/ats2/setup-contrib-hook.shnew file+1
@@ -0,0 +1 @@
1+export PATSHOMERELOC=@out@/lib/ats2-postiats-@version@