2021-01-15 15:45:37 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, perl, AppKit, Cocoa, ScriptingBridge }:
|
2018-11-07 19:15:43 +01:00
|
|
|
|
2017-05-11 20:37:59 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-04 21:58:40 +02:00
|
|
|
version = "0.9.2";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "trash";
|
2017-05-11 20:37:59 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ali-rantakari";
|
|
|
|
repo = "trash";
|
2018-07-11 21:07:22 +02:00
|
|
|
rev = "v${version}";
|
2019-06-04 21:58:40 +02:00
|
|
|
sha256 = "1d3rc03vgz32faj7qi18iiggxvxlqrj9lsk5jkpa9r1mcs5d89my";
|
2017-05-11 20:37:59 +02:00
|
|
|
};
|
|
|
|
|
2019-06-20 18:33:52 +02:00
|
|
|
buildInputs = [ perl Cocoa AppKit ScriptingBridge ];
|
2017-05-11 20:37:59 +02:00
|
|
|
|
|
|
|
patches = [ ./trash.diff ];
|
|
|
|
|
2021-01-24 10:19:10 +01:00
|
|
|
buildPhase = "make all docs";
|
2017-05-11 20:37:59 +02:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
install -m 0755 trash $out/bin
|
|
|
|
install -m 0444 trash.1 $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ali-rantakari/trash";
|
2017-05-11 20:37:59 +02:00
|
|
|
description = "Small command-line program for OS X that moves files or
|
|
|
|
folders to the trash.";
|
2021-01-15 15:45:37 +01:00
|
|
|
platforms = lib.platforms.darwin;
|
|
|
|
license = lib.licenses.mit;
|
2017-05-11 20:37:59 +02:00
|
|
|
};
|
|
|
|
}
|