2014-12-13 22:48:28 +00:00
|
|
|
{ stdenv, fetchgit, fetchFromGitHub, go, fuse }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tmsu";
|
2019-01-24 21:24:57 +00:00
|
|
|
version = "0.7.4";
|
2014-12-13 22:48:28 +00:00
|
|
|
|
|
|
|
go-sqlite3 = fetchgit {
|
|
|
|
url = "git://github.com/mattn/go-sqlite3";
|
|
|
|
rev = "c9a0db5d8951646743317f0756da0339fe144dd5";
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "1m0q9869fis0dhg34g5wc5xi6pby491spfxi23w461h29higbrqh";
|
2014-12-13 22:48:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
go-fuse = fetchgit {
|
|
|
|
url = "git://github.com/hanwen/go-fuse";
|
|
|
|
rev = "8c85ded140ac1889372a0e22d8d21e3d10a303bd";
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "1iph2hpvby2mfwqg9pp39xjqdl9a09h4442yfdn5l67pznljh2bi";
|
2014-12-13 22:48:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oniony";
|
|
|
|
repo = "tmsu";
|
|
|
|
rev = "v${version}";
|
2019-01-24 21:24:57 +00:00
|
|
|
sha256 = "1g9gxlll2g4qkqbrshq3888sy1lgw6p5dvcrl5qyh6w73yimi1cq";
|
2014-12-13 22:48:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ go fuse ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
mkdir -p src/github.com/mattn/go-sqlite3/
|
|
|
|
ln -s ${go-sqlite3}/* src/github.com/mattn/go-sqlite3
|
|
|
|
|
|
|
|
mkdir -p src/github.com/hanwen/go-fuse
|
|
|
|
ln -s ${go-fuse}/* src/github.com/hanwen/go-fuse
|
|
|
|
|
|
|
|
mkdir -p src/github.com/oniony/tmsu
|
|
|
|
ln -s ${src}/* src/github.com/oniony/tmsu
|
|
|
|
|
2015-11-23 09:44:52 +00:00
|
|
|
patchShebangs tests/.
|
|
|
|
|
2014-12-13 22:48:28 +00:00
|
|
|
export GOPATH=$PWD
|
2019-01-24 21:24:57 +00:00
|
|
|
export GOCACHE=$TMPDIR/go-cache
|
2014-12-13 22:48:28 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/sbin
|
2019-02-08 22:16:22 +00:00
|
|
|
mkdir -p $out/share/man/man1
|
2014-12-13 22:48:28 +00:00
|
|
|
mkdir -p $out/share/zsh/site-functions
|
|
|
|
make install INSTALL_DIR=$out/bin \
|
|
|
|
MOUNT_INSTALL_DIR=$out/sbin \
|
2019-02-08 22:16:22 +00:00
|
|
|
MAN_INSTALL_DIR=$out/share/man/man1 \
|
2014-12-13 22:48:28 +00:00
|
|
|
ZSH_COMP_INSTALL_DIR=$out/share/zsh/site-functions
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.tmsu.org;
|
|
|
|
description = "A tool for tagging your files using a virtual filesystem";
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
license = licenses.gpl3;
|
2018-03-09 17:47:05 +00:00
|
|
|
platforms = platforms.linux;
|
2014-12-13 22:48:28 +00:00
|
|
|
};
|
2015-02-08 10:44:20 +00:00
|
|
|
}
|