weylus: build from source and fix desktop shortcut (#161052)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
1454380313
commit
73d9e53ff3
2 changed files with 56 additions and 39 deletions
|
@ -1,64 +1,80 @@
|
||||||
{ lib
|
{ lib
|
||||||
, dbus
|
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, rustPlatform
|
||||||
|
, fetchFromGitHub
|
||||||
|
, dbus
|
||||||
|
, ffmpeg
|
||||||
|
, x264
|
||||||
|
, libva
|
||||||
, gst_all_1
|
, gst_all_1
|
||||||
, xorg
|
, xorg
|
||||||
, libdrm
|
, libdrm
|
||||||
, libva
|
, pkg-config
|
||||||
, fetchzip
|
, pango
|
||||||
, copyDesktopItems
|
, cmake
|
||||||
, fontconfig
|
, autoconf
|
||||||
, libpng
|
, libtool
|
||||||
, pipewire
|
, nodePackages
|
||||||
, makeWrapper
|
, ApplicationServices
|
||||||
, autoPatchelfHook
|
, Carbon
|
||||||
|
, Cocoa
|
||||||
|
, VideoToolbox
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "weylus";
|
pname = "weylus";
|
||||||
version = "0.11.4";
|
version = "0.11.4";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/H-M-H/Weylus/releases/download/v${version}/linux.zip";
|
owner = "H-M-H";
|
||||||
sha256 = "sha256-EW3TdI4F4d4X/BeSqI05QtS77ym1U5jdswFfNtSFyFk=";
|
repo = pname;
|
||||||
stripRoot = false;
|
rev = "v${version}";
|
||||||
|
sha256 = "0gq2czxvahww97j4i3k18np29zl6wx85f8253wn3ibqrpfnklz6l";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -Dm755 ./weylus $out/bin/weylus
|
|
||||||
copyDesktopItems ./weylus.desktop
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libpng
|
ffmpeg
|
||||||
|
x264
|
||||||
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
|
ApplicationServices
|
||||||
|
Carbon
|
||||||
|
Cocoa
|
||||||
|
VideoToolbox
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
dbus
|
dbus
|
||||||
libdrm
|
|
||||||
fontconfig
|
|
||||||
libva
|
libva
|
||||||
gst_all_1.gst-plugins-base
|
gst_all_1.gst-plugins-base
|
||||||
pipewire
|
xorg.libXext
|
||||||
# autoPatchelfHook complains if these are missing, even on wayland
|
|
||||||
xorg.libXft
|
xorg.libXft
|
||||||
xorg.libXinerama
|
xorg.libXinerama
|
||||||
xorg.libXcursor
|
xorg.libXcursor
|
||||||
|
xorg.libXrender
|
||||||
|
xorg.libXfixes
|
||||||
|
xorg.libXtst
|
||||||
xorg.libXrandr
|
xorg.libXrandr
|
||||||
xorg.libXcomposite
|
xorg.libXcomposite
|
||||||
xorg.libXtst
|
xorg.libXi
|
||||||
|
xorg.libXv
|
||||||
|
pango
|
||||||
|
libdrm
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ copyDesktopItems autoPatchelfHook makeWrapper ];
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
nodePackages.typescript
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
pkg-config
|
||||||
|
autoconf
|
||||||
|
libtool
|
||||||
|
];
|
||||||
|
|
||||||
postFixup = let
|
cargoSha256 = "1pigmch0sy9ipsafd83b8q54xwqjxdaif363n1q8n46arq4v81j0";
|
||||||
GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
|
|
||||||
gst_all_1.gst-plugins-base
|
cargoBuildFlags = [ "--features=ffmpeg-system" ];
|
||||||
pipewire
|
cargoTestFlags = [ "--features=ffmpeg-system" ];
|
||||||
];
|
|
||||||
in ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/weylus --prefix GST_PLUGIN_PATH : ${GST_PLUGIN_PATH}
|
install -vDm755 weylus.desktop $out/share/applications/weylus.desktop
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -66,6 +82,5 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://github.com/H-M-H/Weylus";
|
homepage = "https://github.com/H-M-H/Weylus";
|
||||||
license = with licenses; [ agpl3Only ];
|
license = with licenses; [ agpl3Only ];
|
||||||
maintainers = with maintainers; [ lom ];
|
maintainers = with maintainers; [ lom ];
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1054,7 +1054,9 @@ with pkgs;
|
||||||
|
|
||||||
weidu = callPackage ../tools/games/weidu { };
|
weidu = callPackage ../tools/games/weidu { };
|
||||||
|
|
||||||
weylus = callPackage ../applications/graphics/weylus { };
|
weylus = callPackage ../applications/graphics/weylus {
|
||||||
|
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa VideoToolbox;
|
||||||
|
};
|
||||||
|
|
||||||
gfshare = callPackage ../tools/security/gfshare { };
|
gfshare = callPackage ../tools/security/gfshare { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue