2013-03-15 23:58:35 +00:00
|
|
|
{ stdenv, fetchurl, fetchhg, go, sqlite}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-03-18 21:45:16 +00:00
|
|
|
name = "storebrowse-20130318212204";
|
2013-03-15 23:58:35 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-03-18 21:45:16 +00:00
|
|
|
url = "http://viric.name/cgi-bin/storebrowse/tarball/storebrowse-775928f68e53.tar.gz?uuid=775928f68e53";
|
2013-03-15 23:58:35 +00:00
|
|
|
name = "${name}.tar.gz";
|
2013-03-18 21:45:16 +00:00
|
|
|
sha256 = "1yb8qbw95d9561s10k12a6lwv3my8h52arsbfcpizx74dwfsv7in";
|
2013-03-15 23:58:35 +00:00
|
|
|
};
|
|
|
|
|
2013-03-18 21:45:16 +00:00
|
|
|
# This source has license BSD
|
2013-03-15 23:58:35 +00:00
|
|
|
srcGoSqlite = fetchhg {
|
|
|
|
url = "https://code.google.com/p/gosqlite/";
|
2014-06-28 19:33:28 +01:00
|
|
|
rev = "5baefb109e18";
|
2013-03-15 23:58:35 +00:00
|
|
|
sha256 = "0mqfnx06jj15cs8pq9msny2z18x99hgk6mchnaxpg343nzdiz4zk";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
PATH=${go}/bin:$PATH
|
|
|
|
mkdir $TMPDIR/go
|
|
|
|
export GOPATH=$TMPDIR/go
|
|
|
|
|
2018-08-20 20:11:29 +01:00
|
|
|
${stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "export GOARM=5"}
|
2013-03-18 21:45:16 +00:00
|
|
|
|
2013-03-15 23:58:35 +00:00
|
|
|
GOSQLITE=$GOPATH/src/code.google.com/p/gosqlite
|
|
|
|
mkdir -p $GOSQLITE
|
|
|
|
cp -R $srcGoSqlite/* $GOSQLITE/
|
2015-10-13 21:30:30 +01:00
|
|
|
export CGO_CFLAGS=-I${sqlite.dev}/include
|
|
|
|
export CGO_LDFLAGS=-L${sqlite.out}/lib
|
|
|
|
go build -ldflags "-r ${sqlite.out}/lib" -o storebrowse
|
2013-03-15 23:58:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-06-30 13:56:10 +01:00
|
|
|
mkdir -p $out/bin
|
2013-03-15 23:58:35 +00:00
|
|
|
cp storebrowse $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://viric.name/cgi-bin/storebrowse";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.agpl3Plus;
|
2016-06-09 21:09:07 +01:00
|
|
|
broken = true;
|
2013-03-15 23:58:35 +00:00
|
|
|
};
|
|
|
|
}
|