Merge pull request #318316 from luftmensch-luftmensch/tmsu_update

tmsu: migrate to buildGoModule
This commit is contained in:
Jörg Thalheim 2024-06-11 11:09:38 +02:00 committed by GitHub
commit a8fc2bbb65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 44 additions and 83 deletions

View File

@ -0,0 +1,44 @@
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule {
pname = "tmsu";
version = "0.7.5-unstable-2024-06-08";
src = fetchFromGitHub {
owner = "oniony";
repo = "tmsu";
rev = "0bf4b8031cbeffc0347007d85647062953e90571";
sha256 = "sha256-5Rmelgiqs7YkdDBZNXZW4sBf0l/bwiq0xxB2tWpm1s8=";
};
vendorHash = "sha256-r2wzVkPTsxWdVPFLO84tJgl3VJonoU7kNKLOBgHHdF8=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
# can't do "mv TMSU tmsu" on case-insensitive filesystems
mv $out/bin/{TMSU,tmsu.tmp}
mv $out/bin/{tmsu.tmp,tmsu}
installManPage misc/man/tmsu.1
installShellCompletion --bash misc/bash/tmsu
installShellCompletion --zsh misc/zsh/_tmsu
'';
meta = {
homepage = "https://www.tmsu.org";
description = "Tool for tagging your files using a virtual filesystem";
maintainers = with lib.maintainers; [
luftmensch-luftmensch
pSub
];
mainProgram = "tmsu";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
};
}

View File

@ -1,42 +0,0 @@
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
buildGoPackage rec {
pname = "tmsu";
version = "0.7.5";
goPackagePath = "github.com/oniony/TMSU";
src = fetchFromGitHub {
owner = "oniony";
repo = "tmsu";
rev = "v${version}";
sha256 = "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq";
};
goDeps = ./deps.nix;
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
'';
meta = with lib; {
homepage = "http://www.tmsu.org";
description = "Tool for tagging your files using a virtual filesystem";
maintainers = with maintainers; [ pSub ];
license = licenses.gpl3Plus;
platforms = platforms.unix;
};
}

View File

@ -1,39 +0,0 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
[
{
goPackagePath = "github.com/hanwen/go-fuse";
fetch = {
type = "git";
url = "https://github.com/hanwen/go-fuse";
rev = "0f728ba15b38579efefc3dc47821882ca18ffea7";
sha256 = "05ymw2pp58avf19wvi0cgdzqf3d88k1jdf6ldj4hmhbkm3waqf7l";
};
}
{
goPackagePath = "github.com/mattn/go-sqlite3";
fetch = {
type = "git";
url = "https://github.com/mattn/go-sqlite3";
rev = "98a44bcf5949f178c8116fa30e62c9ac2ef65927";
sha256 = "108rk74ringkkyx05zlq5khh32fsfi0przyzrpsr1r5j57xrhxj0";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "3c4aac89819a5fdc28d906456729d3423fd46969";
sha256 = "16q9ay6bl28zrnb377p8lvrs2nd98h7i6y3yi8ccjwzg1czbfdsi";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "1957bb5e6d1f523308b49060df02171d06ddfc77";
sha256 = "0imqk4l9785rw7ddvywyf8zn7k3ga6f17ky8rmf8wrri7nknr03f";
};
}
]

View File

@ -13606,8 +13606,6 @@ with pkgs;
pkgs = pkgs.__splicedPackages; pkgs = pkgs.__splicedPackages;
}); });
tmsu = callPackage ../tools/filesystems/tmsu { };
tncattach = callPackage ../applications/radio/tncattach { }; tncattach = callPackage ../applications/radio/tncattach { };
to-html = callPackage ../tools/text/to-html { }; to-html = callPackage ../tools/text/to-html { };