74 lines
1.4 KiB
Nix
74 lines
1.4 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, makeWrapper
|
|
, openssl
|
|
, gtk3
|
|
, wayland
|
|
, libxkbcommon
|
|
, libGL
|
|
, vulkan-loader
|
|
, libx11
|
|
, libxcursor
|
|
, libxrandr
|
|
, libxi
|
|
}:
|
|
|
|
let
|
|
runtimeLibs = [
|
|
wayland
|
|
libxkbcommon
|
|
libGL
|
|
vulkan-loader
|
|
libx11
|
|
libxcursor
|
|
libxrandr
|
|
libxi
|
|
];
|
|
in
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "oryxis";
|
|
version = "0.8.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wilsonglasser";
|
|
repo = "oryxis";
|
|
rev = "v${version}";
|
|
hash = "sha256-lc8tUUiH6DzGgKQHFPA7WkuCaOGQTSzddUeAwyazK+c=";
|
|
};
|
|
|
|
cargoHash = "sha256-6PWrHvXU9r9b3/4LZtYgHmg+5qBz6IDriLf8Kc5xhLE=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
makeWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
gtk3
|
|
wayland
|
|
libxkbcommon
|
|
];
|
|
|
|
# Use the system openssl (from buildInputs) rather than vendoring it.
|
|
OPENSSL_NO_VENDOR = 1;
|
|
|
|
postInstall = ''
|
|
install -Dm644 resources/oryxis.desktop $out/share/applications/oryxis.desktop
|
|
install -Dm644 resources/logo.svg $out/share/icons/hicolor/scalable/apps/oryxis.svg
|
|
for size in 64 128 256; do
|
|
install -Dm644 resources/logo_$size.png \
|
|
$out/share/icons/hicolor/''${size}x''${size}/apps/oryxis.png
|
|
done
|
|
'';
|
|
|
|
postFixup = ''
|
|
for bin in $out/bin/*; do
|
|
wrapProgram "$bin" \
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath runtimeLibs}"
|
|
done
|
|
'';
|
|
}
|