diff options
author | Peter Simons <simons@cryp.to> | 2015-01-23 11:52:08 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-01-23 13:24:40 +0100 |
commit | 3b35ae7a7318972517da3d9a43a1f4cd22d4c426 (patch) | |
tree | d198b1676239aa53f97878a37879caf5950b2b9a /pkgs/development | |
parent | 48a20a63ceeeee4471f129a8e22303f005ed5487 (diff) | |
download | nixpkgs-3b35ae7a7318972517da3d9a43a1f4cd22d4c426.tar nixpkgs-3b35ae7a7318972517da3d9a43a1f4cd22d4c426.tar.gz nixpkgs-3b35ae7a7318972517da3d9a43a1f4cd22d4c426.tar.bz2 nixpkgs-3b35ae7a7318972517da3d9a43a1f4cd22d4c426.tar.lz nixpkgs-3b35ae7a7318972517da3d9a43a1f4cd22d4c426.tar.xz nixpkgs-3b35ae7a7318972517da3d9a43a1f4cd22d4c426.tar.zst nixpkgs-3b35ae7a7318972517da3d9a43a1f4cd22d4c426.zip |
cryptol: update 2.x branch to version 2.1.0 and remove broken 1.x build
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/compilers/cryptol/1.8.x.nix | 119 | ||||
-rw-r--r-- | pkgs/development/compilers/cryptol/2.0.x.nix | 31 | ||||
-rw-r--r-- | pkgs/development/compilers/cryptol/fix-gitrev.patch | 44 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 6 | ||||
-rw-r--r-- | pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix | 26 |
5 files changed, 29 insertions, 197 deletions
diff --git a/pkgs/development/compilers/cryptol/1.8.x.nix b/pkgs/development/compilers/cryptol/1.8.x.nix deleted file mode 100644 index e6f04249f53..00000000000 --- a/pkgs/development/compilers/cryptol/1.8.x.nix +++ /dev/null @@ -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; - }; -} diff --git a/pkgs/development/compilers/cryptol/2.0.x.nix b/pkgs/development/compilers/cryptol/2.0.x.nix deleted file mode 100644 index 753dfb4f318..00000000000 --- a/pkgs/development/compilers/cryptol/2.0.x.nix +++ /dev/null @@ -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 ]; - }; -}) diff --git a/pkgs/development/compilers/cryptol/fix-gitrev.patch b/pkgs/development/compilers/cryptol/fix-gitrev.patch deleted file mode 100644 index ab9a789baf2..00000000000 --- a/pkgs/development/compilers/cryptol/fix-gitrev.patch +++ /dev/null @@ -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 - diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index cebbb17e298..0dd60f9e5a7 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -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"; diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix index d4eec32809a..2a1f47c1a90 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.6.x.nix @@ -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; + }; + } |