mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
Merge pull request #86183 from Mic92/tmsu
This commit is contained in:
commit
c83f7b89c9
|
@ -1,55 +1,33 @@
|
|||
{ stdenv, fetchgit, fetchFromGitHub, go, fuse }:
|
||||
{ stdenv, buildGoPackage, fetchgit, fetchFromGitHub, go, fuse, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
buildGoPackage rec {
|
||||
pname = "tmsu";
|
||||
version = "0.7.4";
|
||||
|
||||
go-sqlite3 = fetchgit {
|
||||
url = "git://github.com/mattn/go-sqlite3";
|
||||
rev = "c9a0db5d8951646743317f0756da0339fe144dd5";
|
||||
sha256 = "1m0q9869fis0dhg34g5wc5xi6pby491spfxi23w461h29higbrqh";
|
||||
};
|
||||
|
||||
go-fuse = fetchgit {
|
||||
url = "git://github.com/hanwen/go-fuse";
|
||||
rev = "8c85ded140ac1889372a0e22d8d21e3d10a303bd";
|
||||
sha256 = "1iph2hpvby2mfwqg9pp39xjqdl9a09h4442yfdn5l67pznljh2bi";
|
||||
};
|
||||
version = "0.7.5";
|
||||
goPackagePath = "github.com/oniony/TMSU";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "oniony";
|
||||
repo = "tmsu";
|
||||
rev = "v${version}";
|
||||
sha256 = "1g9gxlll2g4qkqbrshq3888sy1lgw6p5dvcrl5qyh6w73yimi1cq";
|
||||
sha256 = "0834hah7p6ad81w60ifnxyh9zn09ddfgrll04kwjxwp7ypbv38wq";
|
||||
};
|
||||
|
||||
buildInputs = [ go fuse ];
|
||||
goDeps = ./deps.nix;
|
||||
|
||||
buildInputs = [ fuse ];
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
preBuild = ''
|
||||
mkdir -p src/github.com/mattn/go-sqlite3/
|
||||
ln -s ${go-sqlite3}/* src/github.com/mattn/go-sqlite3
|
||||
|
||||
mkdir -p src/github.com/hanwen/go-fuse
|
||||
ln -s ${go-fuse}/* src/github.com/hanwen/go-fuse
|
||||
|
||||
mkdir -p src/github.com/oniony/tmsu
|
||||
ln -s ${src}/* src/github.com/oniony/tmsu
|
||||
|
||||
patchShebangs tests/.
|
||||
|
||||
export GOPATH=$PWD
|
||||
export GOCACHE=$TMPDIR/go-cache
|
||||
mv go/src/${goPackagePath} src
|
||||
mv src/src/${goPackagePath} go/src/${goPackagePath}
|
||||
export GOPATH=$PWD:$GOPATH
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/sbin
|
||||
mkdir -p $out/share/man/man1
|
||||
mkdir -p $out/share/zsh/site-functions
|
||||
make install INSTALL_DIR=$out/bin \
|
||||
MOUNT_INSTALL_DIR=$out/sbin \
|
||||
MAN_INSTALL_DIR=$out/share/man/man1 \
|
||||
ZSH_COMP_INSTALL_DIR=$out/share/zsh/site-functions
|
||||
postInstall = ''
|
||||
mv $bin/bin/{TMSU,tmsu}
|
||||
cp src/misc/bin/* $bin/bin/
|
||||
installManPage src/misc/man/tmsu.1
|
||||
installShellCompletion --zsh src/misc/zsh/_tmsu
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
39
pkgs/tools/filesystems/tmsu/deps.nix
generated
Normal file
39
pkgs/tools/filesystems/tmsu/deps.nix
generated
Normal file
|
@ -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 = "730713460d4fc41afdc2533bd37ff60c94c0c586";
|
||||
sha256 = "1y44d08fxyis99s6jxdr6dbbw5kv3wb8lkhq3xmr886i4w41lz03";
|
||||
};
|
||||
}
|
||||
{
|
||||
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";
|
||||
};
|
||||
}
|
||||
]
|
Loading…
Reference in a new issue