about summary refs log tree commit diff
path: root/pkgs/by-name/tm
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2024-06-11 09:25:08 +0200
committerJörg Thalheim <joerg@thalheim.io>2024-06-11 09:44:48 +0200
commitde7943c94280d85b918302757c48a4c908620791 (patch)
tree777b105b3ce2be71ae605ad3449bdf6d1467f24d /pkgs/by-name/tm
parent8e5bca2ebf8d62f8cb15270874fa1d565a6a8d9f (diff)
tsmu: move to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/tm')
-rw-r--r--pkgs/by-name/tm/tmsu/deps.nix39
-rw-r--r--pkgs/by-name/tm/tmsu/package.nix42
2 files changed, 81 insertions, 0 deletions
diff --git a/pkgs/by-name/tm/tmsu/deps.nix b/pkgs/by-name/tm/tmsu/deps.nix
new file mode 100644
index 0000000000000..7dee6324b672f
--- /dev/null
+++ b/pkgs/by-name/tm/tmsu/deps.nix
@@ -0,0 +1,39 @@
+# 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";
+    };
+  }
+]
diff --git a/pkgs/by-name/tm/tmsu/package.nix b/pkgs/by-name/tm/tmsu/package.nix
new file mode 100644
index 0000000000000..93fcbfd57b3e8
--- /dev/null
+++ b/pkgs/by-name/tm/tmsu/package.nix
@@ -0,0 +1,42 @@
+{ 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;
+  };
+}