tmsu: add darwin build

Additionally,

- remove libfuse dependency

  TMSU doesn't depend on libfuse and instead uses go-fuse, a pure go
  reimplementation.

- upgrade go-fuse

  The latest go-fuse release added support for recent versions of
  macFUSE.
This commit is contained in:
midchildan 2021-03-28 00:11:52 +09:00
parent 15204342ee
commit cdc642f008
No known key found for this signature in database
GPG Key ID: D9A5748BACC6E3C2
2 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
{ lib, buildGoPackage, fetchFromGitHub, fuse, installShellFiles }: { lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
buildGoPackage rec { buildGoPackage rec {
pname = "tmsu"; pname = "tmsu";
@ -14,7 +14,6 @@ buildGoPackage rec {
goDeps = ./deps.nix; goDeps = ./deps.nix;
buildInputs = [ fuse ];
nativeBuildInputs = [ installShellFiles ]; nativeBuildInputs = [ installShellFiles ];
preBuild = '' preBuild = ''
@ -24,7 +23,10 @@ buildGoPackage rec {
''; '';
postInstall = '' postInstall = ''
mv $out/bin/{TMSU,tmsu} # 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/ cp src/misc/bin/* $out/bin/
installManPage src/misc/man/tmsu.1 installManPage src/misc/man/tmsu.1
installShellCompletion --zsh src/misc/zsh/_tmsu installShellCompletion --zsh src/misc/zsh/_tmsu
@ -34,7 +36,7 @@ buildGoPackage rec {
homepage = "http://www.tmsu.org"; homepage = "http://www.tmsu.org";
description = "A tool for tagging your files using a virtual filesystem"; description = "A tool for tagging your files using a virtual filesystem";
maintainers = with maintainers; [ pSub ]; maintainers = with maintainers; [ pSub ];
license = licenses.gpl3; license = licenses.gpl3Plus;
platforms = platforms.linux; platforms = platforms.unix;
}; };
} }

View File

@ -5,8 +5,8 @@
fetch = { fetch = {
type = "git"; type = "git";
url = "https://github.com/hanwen/go-fuse"; url = "https://github.com/hanwen/go-fuse";
rev = "730713460d4fc41afdc2533bd37ff60c94c0c586"; rev = "0f728ba15b38579efefc3dc47821882ca18ffea7";
sha256 = "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03"; sha256 = "05ymw2pp58avf19wvi0cgdzqf3d88k1jdf6ldj4hmhbkm3waqf7l";
}; };
} }
{ {