nixpkgs/pkgs/os-specific/darwin/trash/default.nix

35 lines
859 B
Nix
Raw Normal View History

2019-06-20 16:33:52 +00:00
{ stdenv, fetchFromGitHub, perl, AppKit, Cocoa, ScriptingBridge }:
2017-05-11 18:37:59 +00:00
stdenv.mkDerivation rec {
2019-06-04 19:58:40 +00:00
version = "0.9.2";
pname = "trash";
2017-05-11 18:37:59 +00:00
src = fetchFromGitHub {
owner = "ali-rantakari";
repo = "trash";
2018-07-11 19:07:22 +00:00
rev = "v${version}";
2019-06-04 19:58:40 +00:00
sha256 = "1d3rc03vgz32faj7qi18iiggxvxlqrj9lsk5jkpa9r1mcs5d89my";
2017-05-11 18:37:59 +00:00
};
2019-06-20 16:33:52 +00:00
buildInputs = [ perl Cocoa AppKit ScriptingBridge ];
2017-05-11 18:37:59 +00:00
patches = [ ./trash.diff ];
buildPhase = ''make all docs'';
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 = {
homepage = "https://github.com/ali-rantakari/trash";
2017-05-11 18:37:59 +00:00
description = "Small command-line program for OS X that moves files or
folders to the trash.";
platforms = stdenv.lib.platforms.darwin;
license = stdenv.lib.licenses.mit;
};
}