shortwave: port away from buildRustPackage

The new setup hooks compose better with Meson setup hooks.

Had to add Git since mkDerivation does not bring it in any more.
This commit is contained in:
Jan Tojnar
2021-03-14 17:48:27 +01:00
parent 4853c6369d
commit e3b0f976d4
+13 -13
View File
@@ -1,10 +1,11 @@
{ lib { stdenv
, lib
, fetchFromGitLab , fetchFromGitLab
, cargo
, dbus , dbus
, desktop-file-utils , desktop-file-utils
, gdk-pixbuf , gdk-pixbuf
, gettext , gettext
, gitMinimal
, glib , glib
, gst_all_1 , gst_all_1
, gtk3 , gtk3
@@ -14,13 +15,12 @@
, openssl , openssl
, pkg-config , pkg-config
, python3 , python3
, rustc
, rustPlatform , rustPlatform
, sqlite , sqlite
, wrapGAppsHook , wrapGAppsHook
}: }:
rustPlatform.buildRustPackage rec { stdenv.mkDerivation rec {
pname = "shortwave"; pname = "shortwave";
version = "1.1.1"; version = "1.1.1";
@@ -32,18 +32,24 @@ rustPlatform.buildRustPackage rec {
sha256 = "1vlhp2ss06j41simjrrjg38alp85jddhqyvccy6bhfzm0gzynwld"; sha256 = "1vlhp2ss06j41simjrrjg38alp85jddhqyvccy6bhfzm0gzynwld";
}; };
cargoSha256 = "181699rlpr5dszc18wg0kbss3gfskxaz9lpxpgsc4yfb6ip89qnk"; cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-0+KEbjTLecL0u/3S9FWf2r2h9ZrgcRTY163kS3NKJqA=";
};
nativeBuildInputs = [ nativeBuildInputs = [
cargo
desktop-file-utils desktop-file-utils
gettext gettext
gitMinimal
glib # for glib-compile-schemas glib # for glib-compile-schemas
meson meson
ninja ninja
pkg-config pkg-config
python3 python3
rustc rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
wrapGAppsHook wrapGAppsHook
]; ];
@@ -62,12 +68,6 @@ rustPlatform.buildRustPackage rec {
gst-plugins-bad gst-plugins-bad
]); ]);
# Don't use buildRustPackage phases, only use it for rust deps setup
configurePhase = null;
buildPhase = null;
checkPhase = null;
installPhase = null;
postPatch = '' postPatch = ''
patchShebangs build-aux/meson/postinstall.py patchShebangs build-aux/meson/postinstall.py
''; '';