mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
tmsu: migrate to buildGoModule
This commit is contained in:
parent
de7943c942
commit
d7fb6a3c96
2 changed files with 23 additions and 60 deletions
39
pkgs/by-name/tm/tmsu/deps.nix
generated
39
pkgs/by-name/tm/tmsu/deps.nix
generated
|
@ -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";
|
||||
};
|
||||
}
|
||||
]
|
|
@ -1,42 +1,44 @@
|
|||
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoPackage rec {
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue