@@ -1,8 +1,6 @@
11{ stdenv, fetchFromGitHub, fetchpatch, coreutils
22, python3, python3Packages, substituteAll }:
33
4−assert stdenv.isLinux;
5−
64python3Packages.buildPythonApplication rec {
75 name = "trash-cli-${version}";
86 version = "0.17.1.14";
@@ -19,7 +17,8 @@ python3Packages.buildPythonApplication rec {
1917 (substituteAll {
2018 src = ./nix-paths.patch;
2119 df = "${coreutils}/bin/df";
22− libc = "${stdenv.cc.libc.out}/lib/libc.so.6";
20+ libc = let ext = if stdenv.isDarwin then ".dylib" else ".so.6";
21+ in "${stdenv.cc.libc}/lib/libc${ext}";
2322 })
2423
2524 # Fix build on Python 3.6.
@@ -37,7 +36,7 @@ python3Packages.buildPythonApplication rec {
3736 homepage = https://github.com/andreafrancia/trash-cli;
3837 description = "Command line tool for the desktop trash can";
3938 maintainers = [ maintainers.rycee ];
40− platforms = platforms.all;
39+ platforms = platforms.unix;
4140 license = licenses.gpl2;
4241 };
4342}