From 16e4883e3d74fc6365e9c8e3eb6632c741737dcb Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 14 Jun 2016 14:48:32 +0200 Subject: fixed dead link --- custom/luaSha2.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/custom/luaSha2.nix b/custom/luaSha2.nix index 622635a3..2270c48a 100644 --- a/custom/luaSha2.nix +++ b/custom/luaSha2.nix @@ -1,5 +1,5 @@ { stdenv -, fetchgit +, fetchurl , pkgs }: @@ -7,11 +7,23 @@ let lua = pkgs.lua51Packages.lua; in pkgs.lua51Packages.buildLuaPackage { name = "luaSha2"; - src = fetchgit { - url = "https://code.google.com/archive/p/sha2"; - rev = "02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee"; - sha256 = "57ca5f1fb63b00aba7bcbb6e153a7878bc855a0cc6fb539abba33933da727c6f"; + src = fetchurl { + url = "https://luarocks.org/manifests/luarocks/sha2-0.2.0-1.src.rock"; + sha256 = "1h0mlkrr42acysxpdfk81rw695rdbr7b9khfjcxd5d4731irjs6j"; }; + # src = fetchgit { + # url = "https://code.google.com/archive/p/sha2"; + # rev = "02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee"; + # sha256 = "57ca5f1fb63b00aba7bcbb6e153a7878bc855a0cc6fb539abba33933da727c6f"; + # }; + buildInputs = with pkgs; [ unzip ]; + unpackPhase = '' + unzip $src + rm sha2-0.2.0-1.rockspec + unzip sha2-0.2.0.zip + rm sha2-0.2.0.zip + mv -v sha2-0.2.0/* . + ''; buildPhase = '' gcc -L${lua}/lib -I$LUA_INC -I. sha2.c sha2lib.c -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN -llua -shared -o sha2.so ''; -- cgit v1.2.3