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

40 lines
957 B
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, perl, cf-private, AppKit, Cocoa, ScriptingBridge }:
2017-05-11 20:37:59 +02:00
stdenv.mkDerivation rec {
2018-07-11 21:07:22 +02:00
version = "0.9.1";
2017-05-11 20:37:59 +02:00
name = "trash-${version}";
src = fetchFromGitHub {
owner = "ali-rantakari";
repo = "trash";
2018-07-11 21:07:22 +02:00
rev = "v${version}";
2017-05-11 20:37:59 +02:00
sha256 = "0ylkf7jxfy1pj7i1s48w28kzqjdfd57m2pw0jycsgcj5bkzwll41";
};
buildInputs = [
2017-05-11 20:37:59 +02:00
perl
Cocoa AppKit ScriptingBridge
# Neded for OBJC_CLASS_$_NSMutableArray symbols.
cf-private
2017-05-11 20:37:59 +02: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;
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;
};
}