nix: fix desktop entry, update nixpkgs, small fixes

This commit is contained in:
71rd 2025-01-11 19:10:17 +00:00
parent b8d5acb31d
commit 4a20ed95e7
2 changed files with 16 additions and 26 deletions

View file

@ -1,13 +1,12 @@
{ lib
, stdenv
, self ? null
, buildType ? "release"
, platform ? "linux"
, enableWayland ? true
, enableXorg ? true
, enableWayland ? stdenv.hostPlatform.isLinux
, enableXorg ? stdenv.hostPlatform.isUnix
, enableOpenGL ? true
, enableVulkan ? true
, rustPlatform
, makeDesktopItem
, pkg-config
, libxkbcommon
, alsa-lib
@ -21,8 +20,8 @@
, ...
}:
assert (platform == "linux" ) -> (enableWayland || enableXorg);
assert (platform == "linux" ) -> (enableVulkan || enableOpenGL);
assert ( stdenv.hostPlatform.isUnix ) -> (enableWayland || enableXorg);
assert ( enableVulkan || enableOpenGL);
rustPlatform.buildRustPackage rec {
name = "outfly";
@ -45,25 +44,16 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ pkg-config ];
doCheck = false;
postInstall = ''
install -Dm644 doc/branding/logo.png $out/share/pixmaps/outfly.png
install -Dm644 build/linux/outfly.desktop $out/share/applications/outfly.desktop
'';
postFixup = ''
patchelf $out/bin/outfly \
--add-rpath ${lib.makeLibraryPath runtimeInputs}
'';
postPatch = ''
find ../cargo-vendor-dir -name Cargo.toml -exec sed -i 's/^workspace = true//' {} +
'';
cargoLock = { lockFile = ./../../Cargo.lock; };
desktopItems = [
(makeDesktopItem {
name = "outfly";
exec = "outfly";
desktopName = "OutFly";
categories = [ "Game" ];
})
];
}

12
build/nix/flake.lock generated
View file

@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1722185531,
"narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=",
"lastModified": 1736344531,
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d",
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912",
"type": "github"
},
"original": {