git.iko.soy/typeable/nixpkgs
on master help sign in
quaternion: Darwin support, fix dependencies and installed outputs
commit07eebd36293dae40057368580f38f34d3a825bf1 authorAndrew Childs <lorne@cons.org.nz> dateSat 18 Aug 2018, 20:33 (8 years ago) parent5da1d01
1 file changed+15−3
pkgs/applications/networking/instant-messengers/quaternion/default.nix+15−3
pkgs/applications/networking/instant-messengers/quaternion/default.nix+15−3
@@ -1,4 +1,4 @@
1−{ stdenv, lib, fetchFromGitHub, qtbase, qtquickcontrols, cmake, libqmatrixclient }:
1+{ stdenv, lib, fetchFromGitHub, fetchpatch, qtbase, qtquickcontrols, cmake, libqmatrixclient }:
22
33stdenv.mkDerivation rec {
44 name = "quaternion-${version}";
@@ -11,10 +11,18 @@ stdenv.mkDerivation rec {
1111 sha256 = "0zrr4khbbdf5ziq65gi0cb1yb1d0y5rv18wld22w1x96f7fkmrib";
1212 };
1313
14− buildInputs = [ qtbase qtquickcontrols libqmatrixclient ];
14+ buildInputs = [ qtbase qtquickcontrols ];
1515
1616 nativeBuildInputs = [ cmake ];
1717
18+ patches = [
19+ # https://github.com/QMatrixClient/Quaternion/pull/400
20+ (fetchpatch {
21+ url = "https://github.com/QMatrixClient/Quaternion/commit/6cb29834efc343dc2bcf1db62cfad2dc4c121c54.patch";
22+ sha256 = "0n7mgzzrvx9sa657rfb99i0mjh1k0sn5br344mknqy3wgqdr7s3x";
23+ })
24+ ];
25+
1826 # libqmatrixclient is now compiled as a dynamic library but quarternion cannot use it yet
1927 # https://github.com/QMatrixClient/Quaternion/issues/239
2028 postPatch = ''
@@ -22,7 +30,11 @@ stdenv.mkDerivation rec {
2230 ln -s ${libqmatrixclient.src} lib
2331 '';
2432
25− postInstall = ''
33+ postInstall = if stdenv.isDarwin then ''
34+ mkdir -p $out/Applications
35+ mv $out/bin/quaternion.app $out/Applications
36+ rmdir $out/bin || :
37+ '' else ''
2638 substituteInPlace $out/share/applications/quaternion.desktop \
2739 --replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
2840 '';