summary refs log tree commit diff
path: root/pkgs/tools/misc
diff options
context:
space:
mode:
authorMitsuhiro Nakamura <m.nacamura@gmail.com>2018-06-11 19:26:52 +0900
committerMitsuhiro Nakamura <m.nacamura@gmail.com>2018-06-12 00:42:25 +0900
commit3e766a56c4c2ef14ae734b56897aeb4b98c8998b (patch)
tree575ae673aa01b69c7299cb0555ca5890876b4756 /pkgs/tools/misc
parent55282f339b946fe7bf652dbe70120cd6ed46fe7e (diff)
downloadnixlib-3e766a56c4c2ef14ae734b56897aeb4b98c8998b.tar
nixlib-3e766a56c4c2ef14ae734b56897aeb4b98c8998b.tar.gz
nixlib-3e766a56c4c2ef14ae734b56897aeb4b98c8998b.tar.bz2
nixlib-3e766a56c4c2ef14ae734b56897aeb4b98c8998b.tar.lz
nixlib-3e766a56c4c2ef14ae734b56897aeb4b98c8998b.tar.xz
nixlib-3e766a56c4c2ef14ae734b56897aeb4b98c8998b.tar.zst
nixlib-3e766a56c4c2ef14ae734b56897aeb4b98c8998b.zip
trash-cli: enable darwin build
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r--pkgs/tools/misc/trash-cli/default.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix
index 77308ecf2ed8..113c7e127d4f 100644
--- a/pkgs/tools/misc/trash-cli/default.nix
+++ b/pkgs/tools/misc/trash-cli/default.nix
@@ -1,8 +1,6 @@
 { stdenv, fetchFromGitHub, fetchpatch, coreutils
 , python3, python3Packages, substituteAll }:
 
-assert stdenv.isLinux;
-
 python3Packages.buildPythonApplication rec {
   name = "trash-cli-${version}";
   version = "0.17.1.14";
@@ -19,7 +17,8 @@ python3Packages.buildPythonApplication rec {
     (substituteAll {
       src = ./nix-paths.patch;
       df = "${coreutils}/bin/df";
-      libc = "${stdenv.cc.libc.out}/lib/libc.so.6";
+      libc = let ext = if stdenv.isDarwin then ".dylib" else ".so.6";
+             in "${stdenv.cc.libc}/lib/libc${ext}";
     })
 
     # Fix build on Python 3.6.
@@ -37,7 +36,7 @@ python3Packages.buildPythonApplication rec {
     homepage = https://github.com/andreafrancia/trash-cli;
     description = "Command line tool for the desktop trash can";
     maintainers = [ maintainers.rycee ];
-    platforms = platforms.all;
+    platforms = platforms.unix;
     license = licenses.gpl2;
   };
 }