Skip to content

Commit

Permalink
tmsu: migrate to buildGoModule
Browse files Browse the repository at this point in the history
  • Loading branch information
luftmensch-luftmensch authored and Mic92 committed Jun 11, 2024
1 parent de7943c commit d7fb6a3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 61 deletions.
39 changes: 0 additions & 39 deletions pkgs/by-name/tm/tmsu/deps.nix

This file was deleted.

46 changes: 24 additions & 22 deletions pkgs/by-name/tm/tmsu/package.nix
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:

buildGoPackage rec {
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:

buildGoModule {
pname = "tmsu";
version = "0.7.5";
goPackagePath = "github.com/oniony/TMSU";
version = "0.7.5-unstable-2024-06-08";

src = fetchFromGitHub {
owner = "oniony";
repo = "tmsu";
rev = "v${version}";
sha256 = "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq";
rev = "0bf4b8031cbeffc0347007d85647062953e90571";
sha256 = "sha256-5Rmelgiqs7YkdDBZNXZW4sBf0l/bwiq0xxB2tWpm1s8=";
};

goDeps = ./deps.nix;
vendorHash = "sha256-r2wzVkPTsxWdVPFLO84tJgl3VJonoU7kNKLOBgHHdF8=";

nativeBuildInputs = [ installShellFiles ];

preBuild = ''
mv go/src/${goPackagePath} src
mv src/src/${goPackagePath} go/src/${goPackagePath}
export GOPATH=$PWD:$GOPATH
'';

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/
installManPage src/misc/man/tmsu.1
installShellCompletion --zsh src/misc/zsh/_tmsu
installManPage misc/man/tmsu.1
installShellCompletion --bash misc/bash/tmsu
installShellCompletion --zsh misc/zsh/_tmsu
'';

meta = with lib; {
homepage = "http://www.tmsu.org";
meta = {
homepage = "https://www.tmsu.org";
description = "Tool for tagging your files using a virtual filesystem";
maintainers = with maintainers; [ pSub ];
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with lib.maintainers; [
luftmensch-luftmensch
pSub
];
mainProgram = "tmsu";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
};
}

0 comments on commit d7fb6a3

Please sign in to comment.