cryptol: update 2.x branch to version 2.1.0 and remove broken 1.x build
This commit is contained in:
parent
48a20a63ce
commit
3b35ae7a73
@ -1,119 +0,0 @@
|
||||
{ stdenv, requireFile, gmp4, ncurses, zlib, clang_33, makeWrapper }:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
let
|
||||
name = "cryptol-${version}-${rev}";
|
||||
version = "1.8.27";
|
||||
rev = "1";
|
||||
lss-ver = "lss-0.2d";
|
||||
jss-ver = "jss-0.4";
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath
|
||||
[ stdenv.cc.libc
|
||||
stdenv.cc.gcc
|
||||
gmp4
|
||||
ncurses
|
||||
zlib
|
||||
] + ":${stdenv.cc.gcc}/lib64";
|
||||
|
||||
cryptol-bin =
|
||||
if stdenv.system == "i686-linux"
|
||||
then requireFile {
|
||||
url = "http://cryptol.net";
|
||||
name = "${name}-i386-centos6-linux.tar.gz";
|
||||
sha256 = "131jkj3nh29rwwq5w5sfdf5jrb3c7ayjp4709v1zh84q4d6b35nf";
|
||||
}
|
||||
else requireFile {
|
||||
url = "http://cryptol.net";
|
||||
name = "${name}-x86_64-centos6-linux.tar.gz";
|
||||
sha256 = "1dmkns8s6r2d6pvh176w8k3891frik6hmcr2ibghk4l6qr6gwarx";
|
||||
};
|
||||
|
||||
lss-bin =
|
||||
if stdenv.system == "i686-linux"
|
||||
then requireFile {
|
||||
url = "http://cryptol.net";
|
||||
name = "${lss-ver}-centos6-32.tar.gz";
|
||||
sha256 = "015ssw3v523wwzkma0qbpj3jnyzckab5q00ypdz0gr3kjcxn5rxg";
|
||||
}
|
||||
else requireFile {
|
||||
url = "http://cryptol.net";
|
||||
name = "${lss-ver}-centos6-64.tar.gz";
|
||||
sha256 = "1zjy4xi8v3m6g8ydm9q6dgzg5xn0xc3a4zsll5plbhngprgwxcxm";
|
||||
};
|
||||
|
||||
jss-bin =
|
||||
if stdenv.system == "i686-linux"
|
||||
then requireFile {
|
||||
url = "http://cryptol.net";
|
||||
name = "${jss-ver}-centos5-32.tar.gz";
|
||||
sha256 = "1rlj14fbh9k3yvals8jsarczwl51fh6zjaic0pnhpc9s4p0pnjbr";
|
||||
}
|
||||
else requireFile {
|
||||
url = "http://cryptol.net";
|
||||
name = "${jss-ver}-centos5-64.tar.gz";
|
||||
sha256 = "0smarm2pi3jz4c8jas9gwcbghc6vc375vrwxbdj1mqx4awlhnz1n";
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
inherit name version cryptol-bin jss-bin lss-bin;
|
||||
|
||||
src = [ cryptol-bin lss-bin jss-bin ];
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
unpackPhase = ''
|
||||
tar xf ${cryptol-bin}
|
||||
tar xf ${lss-bin}
|
||||
tar xf ${jss-bin}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share $out/libexec
|
||||
|
||||
# Move Cryptol
|
||||
mv cryptol-${version}/bin $out
|
||||
mv cryptol-${version}/lib $out
|
||||
mv cryptol-${version}/man $out/share
|
||||
rm -f $out/bin/cryptol-2
|
||||
|
||||
# Move JSS
|
||||
# Create a wrapper for jss to keep the .jar out of the way
|
||||
mv ${jss-ver}/bin/jss $out/libexec
|
||||
mv ${jss-ver}/bin/galois.jar $out/libexec
|
||||
makeWrapper $out/libexec/jss $out/bin/jss --run "cd $out/libexec"
|
||||
mv ${jss-ver}/doc/jss.1 $out/share/man/man1
|
||||
|
||||
# Move LSS
|
||||
mv ${lss-ver}/bin/lss $out/bin
|
||||
mv ${lss-ver}/sym-api $out/include
|
||||
|
||||
# Create a convenient 'lss-clang' wrapper pointing to a valid Clang verison
|
||||
ln -s ${clang_33}/bin/clang $out/bin/lss-clang
|
||||
|
||||
# Hack around lack of libtinfo in NixOS
|
||||
ln -s ${ncurses}/lib/libncursesw.so.5.9 $out/lib/libtinfo.so.5
|
||||
ln -s ${stdenv.cc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
|
||||
'';
|
||||
|
||||
fixupPhase = ''
|
||||
for x in bin/cryptol bin/edif2verilog bin/copy-iverilog bin/symbolic_netlist bin/jaig bin/vvp-galois bin/lss libexec/jss; do
|
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$out/lib:${libPath}" $out/$x
|
||||
patchelf --shrink-rpath $out/$x
|
||||
done
|
||||
'';
|
||||
|
||||
phases = "unpackPhase installPhase fixupPhase";
|
||||
|
||||
meta = {
|
||||
description = "Cryptol: The Language of Cryptography";
|
||||
homepage = "https://cryptol.net";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
broken = true;
|
||||
};
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
{ cabal, cabalInstall, Cabal, alex, ansiTerminal, deepseq, executablePath
|
||||
, filepath, graphSCC, happy, haskeline, monadLib, mtl, presburger, QuickCheck
|
||||
, random, smtLib, syb, text, transformers, utf8String, process, fetchgit
|
||||
}:
|
||||
|
||||
cabal.mkDerivation (self: {
|
||||
pname = "cryptol";
|
||||
version = "2.0.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/GaloisInc/cryptol.git";
|
||||
rev = "refs/tags/v2.0.0";
|
||||
sha256 = "6af3499d7c6f034446f6665660f7a66dd592e81281e34b0cee3e55bc03597e6b";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
|
||||
patches = [ ./fix-gitrev.patch ];
|
||||
buildDepends = [
|
||||
ansiTerminal deepseq executablePath filepath graphSCC haskeline
|
||||
monadLib mtl presburger QuickCheck random smtLib syb text
|
||||
transformers utf8String process Cabal
|
||||
];
|
||||
buildTools = [ alex happy cabalInstall ];
|
||||
meta = {
|
||||
description = "Cryptol: The Language of Cryptography";
|
||||
homepage = "https://cryptol.net";
|
||||
license = self.stdenv.lib.licenses.bsd3;
|
||||
platforms = self.ghc.meta.platforms;
|
||||
maintainers = [ self.stdenv.lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
})
|
@ -1,44 +0,0 @@
|
||||
From 3ceec293f8e68314d872909b7de1d4a2c3ecba49 Mon Sep 17 00:00:00 2001
|
||||
From: Austin Seipp <aseipp@pobox.com>
|
||||
Date: Fri, 25 Apr 2014 00:24:39 -0500
|
||||
Subject: [PATCH] Add GitRev.hs to signify v2.0.0 release
|
||||
|
||||
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
||||
---
|
||||
cryptol.cabal | 2 +-
|
||||
src/GitRev.hs | 10 ++++++++++
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/GitRev.hs
|
||||
|
||||
diff --git a/cryptol.cabal b/cryptol.cabal
|
||||
index 2ba6e56..9acd1ef 100644
|
||||
--- a/cryptol.cabal
|
||||
+++ b/cryptol.cabal
|
||||
@@ -6,7 +6,7 @@ Author: Galois, Inc.
|
||||
Maintainer: cryptol@galois.com
|
||||
Copyright: 2013-2014 Galois Inc.
|
||||
Category: Language
|
||||
-Build-type: Configure
|
||||
+Build-type: Simple
|
||||
Cabal-version: >= 1.18
|
||||
|
||||
data-files: lib/Cryptol.cry
|
||||
diff --git a/src/GitRev.hs b/src/GitRev.hs
|
||||
new file mode 100644
|
||||
index 0000000..1c767dc
|
||||
--- /dev/null
|
||||
+++ b/src/GitRev.hs
|
||||
@@ -0,0 +1,10 @@
|
||||
+module GitRev (hash, branch, dirty) where
|
||||
+
|
||||
+hash :: String
|
||||
+hash = "bd578915eaba8c56fadc29fe30f5dcd212c63374"
|
||||
+
|
||||
+branch :: String
|
||||
+branch = "Unknown"
|
||||
+
|
||||
+dirty :: Bool
|
||||
+dirty = False
|
||||
--
|
||||
1.8.3.2
|
||||
|
@ -376,9 +376,9 @@ self: super: {
|
||||
# https://github.com/rrnewton/haskell-lockfree/issues/44
|
||||
chaselev-deque = markBrokenVersion "0.5.0.3" super.chaselev-deque;
|
||||
|
||||
}
|
||||
// {
|
||||
# Not on Hackage yet.
|
||||
} // {
|
||||
|
||||
# Not on Hackage.
|
||||
cabal2nix = self.mkDerivation {
|
||||
pname = "cabal2nix";
|
||||
version = "2.0";
|
||||
|
@ -63,4 +63,30 @@ self: super: {
|
||||
# Choose appropriate flags for our version of 'bytestring'.
|
||||
bytestring-builder = disableCabalFlag super.bytestring-builder "bytestring_has_builder";
|
||||
|
||||
} // {
|
||||
|
||||
# Not on Hackage.
|
||||
cryptol = self.mkDerivation rec {
|
||||
pname = "cryptol";
|
||||
version = "2.1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "GaloisInc";
|
||||
repo = "cryptol";
|
||||
rev = "v${version}";
|
||||
sha256 = "00bmad3qc7h47j26xp7hbrlb0qv0f7k9spxgsc1f6lsmpgq9axr3";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
buildDepends = with self; [
|
||||
ansi-terminal array async base containers deepseq directory
|
||||
executable-path filepath GraphSCC haskeline monadLib mtl old-time
|
||||
presburger pretty process QuickCheck random smtLib syb text
|
||||
tf-random transformers utf8-string
|
||||
];
|
||||
buildTools = with self; [ alex happy Cabal_1_22_0_0 ];
|
||||
patchPhase = "sed -i -e 's|process .*,|process,|' cryptol.cabal";
|
||||
description = "Cryptol: The Language of Cryptography";
|
||||
license = pkgs.stdenv.lib.licenses.bsd3;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -3113,15 +3113,7 @@ let
|
||||
|
||||
compcert = callPackage ../development/compilers/compcert {};
|
||||
|
||||
cryptol1 = lowPrio (callPackage ../development/compilers/cryptol/1.8.x.nix {});
|
||||
cryptol2 = with haskellPackages_ghc763; callPackage ../development/compilers/cryptol/2.0.x.nix {
|
||||
Cabal = Cabal_1_18_1_3;
|
||||
cabalInstall = cabalInstall_1_18_0_3.override {
|
||||
network = network_2_5_0_0;
|
||||
HTTP = HTTP.override { network = network_2_5_0_0; };
|
||||
};
|
||||
process = process_1_2_0_0;
|
||||
};
|
||||
cryptol = haskell-ng.packages.ghc763.cryptol;
|
||||
|
||||
cython = pythonPackages.cython;
|
||||
cython3 = python3Packages.cython;
|
||||
|
Loading…
Reference in New Issue
Block a user