nixpkgs/pkgs/tools/filesystems/tmsu/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

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