quaternion: Darwin support, fix dependencies and installed outputs
This commit is contained in:
parent
5da1d01bf2
commit
07eebd3629
1 changed files with 15 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, lib, fetchFromGitHub, qtbase, qtquickcontrols, cmake, libqmatrixclient }:
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, qtbase, qtquickcontrols, cmake, libqmatrixclient }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "quaternion-${version}";
|
||||
|
@ -11,10 +11,18 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0zrr4khbbdf5ziq65gi0cb1yb1d0y5rv18wld22w1x96f7fkmrib";
|
||||
};
|
||||
|
||||
buildInputs = [ qtbase qtquickcontrols libqmatrixclient ];
|
||||
buildInputs = [ qtbase qtquickcontrols ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
patches = [
|
||||
# https://github.com/QMatrixClient/Quaternion/pull/400
|
||||
(fetchpatch {
|
||||
url = "https://github.com/QMatrixClient/Quaternion/commit/6cb29834efc343dc2bcf1db62cfad2dc4c121c54.patch";
|
||||
sha256 = "0n7mgzzrvx9sa657rfb99i0mjh1k0sn5br344mknqy3wgqdr7s3x";
|
||||
})
|
||||
];
|
||||
|
||||
# libqmatrixclient is now compiled as a dynamic library but quarternion cannot use it yet
|
||||
# https://github.com/QMatrixClient/Quaternion/issues/239
|
||||
postPatch = ''
|
||||
|
@ -22,7 +30,11 @@ stdenv.mkDerivation rec {
|
|||
ln -s ${libqmatrixclient.src} lib
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
postInstall = if stdenv.isDarwin then ''
|
||||
mkdir -p $out/Applications
|
||||
mv $out/bin/quaternion.app $out/Applications
|
||||
rmdir $out/bin || :
|
||||
'' else ''
|
||||
substituteInPlace $out/share/applications/quaternion.desktop \
|
||||
--replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue