2021-03-27 15:11:52 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
2014-12-13 22:48:28 +00:00
|
|
|
|
2020-04-22 16:00:09 +01:00
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tmsu";
|
2020-04-22 16:00:09 +01:00
|
|
|
version = "0.7.5";
|
|
|
|
goPackagePath = "github.com/oniony/TMSU";
|
2014-12-13 22:48:28 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oniony";
|
|
|
|
repo = "tmsu";
|
|
|
|
rev = "v${version}";
|
2020-04-22 16:00:09 +01:00
|
|
|
sha256 = "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq";
|
2014-12-13 22:48:28 +00:00
|
|
|
};
|
|
|
|
|
2020-04-22 16:00:09 +01:00
|
|
|
goDeps = ./deps.nix;
|
2014-12-13 22:48:28 +00:00
|
|
|
|
2020-04-22 16:00:09 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2014-12-13 22:48:28 +00:00
|
|
|
|
2020-04-22 16:00:09 +01:00
|
|
|
preBuild = ''
|
|
|
|
mv go/src/${goPackagePath} src
|
|
|
|
mv src/src/${goPackagePath} go/src/${goPackagePath}
|
|
|
|
export GOPATH=$PWD:$GOPATH
|
2014-12-13 22:48:28 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-22 16:00:09 +01:00
|
|
|
postInstall = ''
|
2021-03-27 15:11:52 +00:00
|
|
|
# can't do "mv TMSU tmsu" on case-insensitive filesystems
|
|
|
|
mv $out/bin/{TMSU,tmsu.tmp}
|
|
|
|
mv $out/bin/{tmsu.tmp,tmsu}
|
|
|
|
|
2020-05-11 06:42:46 +01:00
|
|
|
cp src/misc/bin/* $out/bin/
|
2020-04-22 16:00:09 +01:00
|
|
|
installManPage src/misc/man/tmsu.1
|
|
|
|
installShellCompletion --zsh src/misc/zsh/_tmsu
|
2014-12-13 22:48:28 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.tmsu.org";
|
2014-12-13 22:48:28 +00:00
|
|
|
description = "A tool for tagging your files using a virtual filesystem";
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
2021-03-27 15:11:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
2014-12-13 22:48:28 +00:00
|
|
|
};
|
2015-02-08 10:44:20 +00:00
|
|
|
}
|