mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 04:04:06 +01:00
Merge remote-tracking branch 'origin/master' into staging-next
This commit is contained in:
commit
daeb684bfa
25 changed files with 452 additions and 136 deletions
|
|
@ -2136,7 +2136,7 @@ The following rules are desired to be respected:
|
|||
* `pythonImportsCheck` is set. This is still a good smoke test even if `pytestCheckHook` is set.
|
||||
* `meta.platforms` takes the default value in many cases.
|
||||
It does not need to be set explicitly unless the package requires a specific platform.
|
||||
* The file is formatted with `nixfmt-rfc-style`.
|
||||
* The file is formatted correctly (e.g., `nix-shell --run treefmt`).
|
||||
* Commit names of Python libraries must reflect that they are Python
|
||||
libraries (e.g. `python3Packages.numpy: 1.11 -> 1.12` rather than `numpy: 1.11 -> 1.12`).
|
||||
See also [`pkgs/README.md`](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#commit-conventions).
|
||||
|
|
|
|||
|
|
@ -167,6 +167,8 @@
|
|||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
||||
- `balatro` now supports the Google Play and Xbox PC versions of the game. Pass the `apk` or `Assets.zip` as `balatro.override { src = "…" }`.
|
||||
|
||||
- `uptime-kuma` has been updated to v2, which requires an automated migration that can take a few hours. **A backup is highly recommended.**
|
||||
If your SQLite database is corrupted, the migration might fail and require [manual intervention](https://github.com/louislam/uptime-kuma/issues/5281).
|
||||
See the [migration guide](https://github.com/louislam/uptime-kuma/wiki/Migration-From-v1-To-v2) for more information.
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ in
|
|||
|
||||
Enabling system-wide PipeWire is however not recommended and disabled
|
||||
by default according to
|
||||
https://github.com/PipeWire/pipewire/blob/master/NEWS
|
||||
https://github.com/PipeWire/pipewire/blob/0.3.11/NEWS#L14-L16
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
* When adding a new extension, place its definition in a `default.nix` file in a directory with the extension's ID (e.g. `publisher.extension-name/default.nix`) and refer to it in `./default.nix`, e.g. `publisher.extension-name = callPackage ./publisher.extension-name { };`.
|
||||
|
||||
* Currently `nixfmt-rfc-style` formatter is being used to format the VSCode extensions.
|
||||
* Use `nix-shell --run treefmt` to format the VSCode extensions.
|
||||
|
||||
* Respect `alphabetical order` whenever adding extensions. If out of order, please kindly open a PR re-establishing the order.
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ rec {
|
|||
allowSubstitutes ? false,
|
||||
preferLocalBuild ? true,
|
||||
derivationArgs ? { },
|
||||
}:
|
||||
}@args:
|
||||
assert lib.assertMsg (destination != "" -> (lib.hasPrefix "/" destination && destination != "/")) ''
|
||||
destination must be an absolute path, relative to the derivation's out path,
|
||||
got '${destination}' instead.
|
||||
|
|
@ -125,6 +125,7 @@ rec {
|
|||
runCommand name
|
||||
(
|
||||
{
|
||||
pos = builtins.unsafeGetAttrPos "name" args;
|
||||
inherit
|
||||
text
|
||||
executable
|
||||
|
|
@ -333,7 +334,7 @@ rec {
|
|||
Type: Bool
|
||||
*/
|
||||
inheritPath ? true,
|
||||
}:
|
||||
}@args:
|
||||
writeTextFile {
|
||||
inherit
|
||||
name
|
||||
|
|
@ -613,6 +614,13 @@ rec {
|
|||
"failOnMissing"
|
||||
]
|
||||
// {
|
||||
# Allow getting the proper position of the output derivation.
|
||||
# Since one of these are required, it should be fairly accurate.
|
||||
pos =
|
||||
if args_ ? pname then
|
||||
builtins.unsafeGetAttrPos "pname" args_
|
||||
else
|
||||
builtins.unsafeGetAttrPos "name" args_;
|
||||
inherit preferLocalBuild allowSubstitutes;
|
||||
paths = mapPaths (path: "${path}${stripPrefix}") paths;
|
||||
passAsFile = [ "paths" ];
|
||||
|
|
@ -675,6 +683,14 @@ rec {
|
|||
in
|
||||
runCommand name
|
||||
{
|
||||
# Get the position from the `entries` attrset if it exists.
|
||||
# This is the best we can do since the other attrs are either defined here, or curried values that
|
||||
# we cannot extract a position from
|
||||
pos =
|
||||
if lib.isAttrs entries then
|
||||
builtins.unsafeGetAttrPos (builtins.head (builtins.attrNames entries)) entries
|
||||
else
|
||||
null;
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
passthru.entries = entries';
|
||||
|
|
@ -744,12 +760,15 @@ rec {
|
|||
meta ? { },
|
||||
passthru ? { },
|
||||
substitutions ? { },
|
||||
}:
|
||||
}@args:
|
||||
script:
|
||||
runCommand name
|
||||
(
|
||||
substitutions
|
||||
// {
|
||||
# Make the position of the derivation accurate.
|
||||
# Since not having `name` is deprecated, this should be fairly accurate.
|
||||
pos = lib.unsafeGetAttrPos "name" args;
|
||||
# TODO(@Artturin:) substitutions should be inside the env attrset
|
||||
# but users are likely passing non-substitution arguments through substitutions
|
||||
# turn off __structuredAttrs to unbreak substituteAll
|
||||
|
|
@ -1002,76 +1021,70 @@ rec {
|
|||
];
|
||||
}
|
||||
*/
|
||||
applyPatches =
|
||||
{
|
||||
src,
|
||||
name ?
|
||||
(
|
||||
if builtins.typeOf src == "path" then
|
||||
baseNameOf src
|
||||
else if builtins.isAttrs src && builtins.hasAttr "name" src then
|
||||
src.name
|
||||
else
|
||||
throw "applyPatches: please supply a `name` argument because a default name can only be computed when the `src` is a path or is an attribute set with a `name` attribute."
|
||||
)
|
||||
+ "-patched",
|
||||
patches ? [ ],
|
||||
prePatch ? "",
|
||||
postPatch ? "",
|
||||
...
|
||||
}@args:
|
||||
assert lib.assertMsg (
|
||||
!args ? meta
|
||||
) "applyPatches will not merge 'meta', change it in 'src' instead";
|
||||
assert lib.assertMsg (
|
||||
!args ? passthru
|
||||
) "applyPatches will not merge 'passthru', change it in 'src' instead";
|
||||
if patches == [ ] && prePatch == "" && postPatch == "" then
|
||||
src # nothing to do, so use original src to avoid additional drv
|
||||
else
|
||||
applyPatches = lib.extendMkDerivation {
|
||||
constructDrv = stdenvNoCC.mkDerivation;
|
||||
|
||||
extendDrvArgs =
|
||||
finalAttrs:
|
||||
{
|
||||
src,
|
||||
...
|
||||
}@args:
|
||||
assert lib.assertMsg (
|
||||
!args ? meta
|
||||
) "applyPatches will not merge 'meta', change it in 'src' instead";
|
||||
assert lib.assertMsg (
|
||||
!args ? passthru
|
||||
) "applyPatches will not merge 'passthru', change it in 'src' instead";
|
||||
let
|
||||
keepAttrs = names: lib.filterAttrs (name: val: lib.elem name names);
|
||||
# enables tools like nix-update to determine what src attributes to replace
|
||||
extraPassthru = lib.optionalAttrs (lib.isAttrs src) (
|
||||
extraPassthru = lib.optionalAttrs (lib.isAttrs finalAttrs.src) (
|
||||
keepAttrs [
|
||||
"rev"
|
||||
"tag"
|
||||
"url"
|
||||
"outputHash"
|
||||
"outputHashAlgo"
|
||||
] src
|
||||
] finalAttrs.src
|
||||
);
|
||||
in
|
||||
stdenvNoCC.mkDerivation (
|
||||
{
|
||||
inherit
|
||||
name
|
||||
src
|
||||
patches
|
||||
prePatch
|
||||
postPatch
|
||||
;
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
phases = "unpackPhase patchPhase installPhase";
|
||||
installPhase = "cp -R ./ $out";
|
||||
}
|
||||
{
|
||||
name =
|
||||
args.name or (
|
||||
if builtins.isPath finalAttrs.src then
|
||||
baseNameOf finalAttrs.src + "-patched"
|
||||
else if builtins.isAttrs finalAttrs.src && (finalAttrs.src ? name) then
|
||||
let
|
||||
srcName = builtins.parseDrvName finalAttrs.src.name;
|
||||
in
|
||||
"${srcName.name}-patched${lib.optionalString (srcName.version != "") "-${srcName.version}"}"
|
||||
else
|
||||
throw "applyPatches: please supply a `name` argument because a default name can only be computed when the `src` is a path or is an attribute set with a `name` attribute."
|
||||
);
|
||||
|
||||
# Manually setting `name` can mess up positioning.
|
||||
# This should fix it.
|
||||
pos = builtins.unsafeGetAttrPos "src" args;
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
|
||||
installPhase = "cp -R ./ $out";
|
||||
|
||||
# passthru the git and hash info for nix-update, as well
|
||||
# as all the src's passthru attrs.
|
||||
passthru = extraPassthru // finalAttrs.src.passthru or { };
|
||||
|
||||
# Carry (and merge) information from the underlying `src` if present.
|
||||
// (optionalAttrs (src ? meta) {
|
||||
inherit (src) meta;
|
||||
})
|
||||
// (optionalAttrs (extraPassthru != { } || src ? passthru) {
|
||||
passthru = extraPassthru // src.passthru or { };
|
||||
})
|
||||
# Forward any additional arguments to the derivation
|
||||
// (removeAttrs args [
|
||||
"src"
|
||||
"name"
|
||||
"patches"
|
||||
"prePatch"
|
||||
"postPatch"
|
||||
])
|
||||
);
|
||||
# If there is not src.meta, this meta block will be blank regardless.
|
||||
meta = lib.optionalAttrs (finalAttrs.src ? meta) removeAttrs finalAttrs.src.meta [ "position" ];
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: move docs to Nixpkgs manual
|
||||
# An immutable file in the store with a length of 0 bytes.
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@
|
|||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "app2unit";
|
||||
version = "1.2.1";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Vladimir-csp";
|
||||
repo = "app2unit";
|
||||
tag = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-DZ0W7SygOUmjIO0+K8hS9K1U+gSp1gA6Q15eXr6rOmo=";
|
||||
sha256 = "sha256-HkwcYYGNReDtPxZumnz3ZDb1sr1JcngAOqs/inO/350=";
|
||||
};
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
|
|
|||
229
pkgs/by-name/ba/balatro/bridge_detour.lua
Normal file
229
pkgs/by-name/ba/balatro/bridge_detour.lua
Normal file
|
|
@ -0,0 +1,229 @@
|
|||
--[[
|
||||
The game Balatro is implemented in Lua, with the standard LÖVE SDK. However,
|
||||
each store that it's sold on (Steam, Google Play, Xbox PC, etc.) has its own SDK
|
||||
to provide features like cloud saving and achievement unlocking.
|
||||
|
||||
To allow the same platform-agnostic Lua codebase to be deployed in all these
|
||||
contexts, each one has a custom bridge - `love.platform`. This allows the game
|
||||
to call `writeSaveFile` and trust that it will be handled appropriately for
|
||||
whatever platform the player has available. Unfortunately, that bridge is not
|
||||
supplied by LÖVE, and is therefore missing from Nix's `pkgs.love`.
|
||||
|
||||
This file implements the functions that would otherwise utilize that missing
|
||||
bridge. It was created by finding all of the `love.platform` callsites in the
|
||||
Balatro codebase, putting them in this file, and asking Gemini to implement a
|
||||
Linux version.
|
||||
]]
|
||||
|
||||
love.platform = love.platform or {}
|
||||
package.loaded["love.platform"] = love.platform
|
||||
|
||||
local FileOperationStatus = {
|
||||
SUCCESS = 0,
|
||||
FETCH_ERROR = 1,
|
||||
CLOUD_SAVE_ERROR = 2,
|
||||
CONFLICT = 3,
|
||||
OFFLINE = 4,
|
||||
LOAD_ERROR = 5,
|
||||
NOT_FOUND = 6
|
||||
}
|
||||
|
||||
function love.platform.init(onInitSuccess, onInitFailure)
|
||||
love.filesystem.setIdentity("balatro")
|
||||
|
||||
if onInitSuccess then
|
||||
onInitSuccess(love.system.getOS(), love.platform.getLocalPlayerName())
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function love.platform.setOnPlatformStatusChangedCallback(callback)
|
||||
if callback then
|
||||
callback(false, "Cloud unavailable.")
|
||||
end
|
||||
end
|
||||
|
||||
function love.platform.earlyInit() end
|
||||
function love.platform.update(dt) end
|
||||
function love.platform.shutdown() end
|
||||
|
||||
|
||||
function love.platform.getPlatformId()
|
||||
return love.system.getOS()
|
||||
end
|
||||
|
||||
function love.platform.getLocalPlayerName()
|
||||
return os.getenv("USER") or os.getenv("LOGNAME") or "Player"
|
||||
end
|
||||
|
||||
function love.platform.getLocalPlayerAvatar()
|
||||
return nil
|
||||
end
|
||||
|
||||
function love.platform.isPremium()
|
||||
return true
|
||||
end
|
||||
|
||||
function love.platform.isArcade()
|
||||
return false
|
||||
end
|
||||
|
||||
function love.platform.isFirstTimePlaying()
|
||||
return not love.platform.saveGameExists("1", "profile.jkr")
|
||||
end
|
||||
|
||||
function love.platform.isOffline()
|
||||
-- If the game ever uses this for more than showing the offline warning, we
|
||||
-- should set this back to true
|
||||
return false
|
||||
end
|
||||
|
||||
function love.platform.getNotchPosition()
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
-- Different builds use different file APIs; therefore, we implement both the
|
||||
-- thin wrapper around the framework's filesystem module and the more complex
|
||||
-- signatures with individual save slots.
|
||||
love.platform.localGetInfo = love.filesystem.getInfo
|
||||
love.platform.localRead = love.filesystem.read
|
||||
love.platform.localWrite = love.filesystem.write
|
||||
love.platform.localRemove = love.filesystem.remove
|
||||
love.platform.localCreateDirectory = love.filesystem.createDirectory
|
||||
|
||||
|
||||
-- some versions store their settings files in `common/`
|
||||
function love.filesystem.getInfo(filename, ...)
|
||||
local info = love.platform.localGetInfo(filename, ...)
|
||||
|
||||
if not info then
|
||||
info = love.platform.localGetInfo("common/" .. filename, ...)
|
||||
end
|
||||
|
||||
return info
|
||||
end
|
||||
|
||||
function love.filesystem.read(filename, ...)
|
||||
local content, size = love.platform.localRead(filename, ...)
|
||||
|
||||
if not content then
|
||||
content, size = love.platform.localRead("common/" .. filename, ...)
|
||||
end
|
||||
|
||||
return content, size
|
||||
end
|
||||
|
||||
|
||||
function love.platform.writeSaveGame(profile, filename, data)
|
||||
local parent = tostring(profile)
|
||||
|
||||
if not love.platform.localGetInfo(parent) then
|
||||
love.platform.localCreateDirectory(parent)
|
||||
end
|
||||
|
||||
return love.platform.localWrite(parent .. "/" .. filename, data)
|
||||
end
|
||||
|
||||
function love.platform.loadSaveGame(profile, filename)
|
||||
local parent = tostring(profile)
|
||||
return love.platform.localRead(parent .. "/" .. filename)
|
||||
end
|
||||
|
||||
function love.platform.saveGameExists(profile, filename)
|
||||
local parent = tostring(profile)
|
||||
return love.platform.localGetInfo(parent .. "/" .. filename) ~= nil
|
||||
end
|
||||
|
||||
function love.platform.deleteSaveGameFile(profile, filename)
|
||||
local parent = tostring(profile)
|
||||
return love.platform.localRemove(parent .. "/" .. filename)
|
||||
end
|
||||
|
||||
function love.platform.deleteSaveGame(profile)
|
||||
local parent = tostring(profile)
|
||||
return love.platform.localRemove(parent)
|
||||
end
|
||||
|
||||
local load_game_callback
|
||||
local save_game_callback
|
||||
|
||||
function love.platform.setLoadGameCallback(callback)
|
||||
load_game_callback = callback
|
||||
end
|
||||
|
||||
function love.platform.loadGameFile(filename)
|
||||
local content, size = love.filesystem.read(filename)
|
||||
|
||||
if load_game_callback then
|
||||
if content then
|
||||
load_game_callback(filename, FileOperationStatus.SUCCESS, "", content, nil, nil)
|
||||
else
|
||||
load_game_callback(filename, FileOperationStatus.NOT_FOUND, "File not found", nil, nil, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function love.platform.setOnSaveInitializedCallback(callback)
|
||||
if callback then
|
||||
callback()
|
||||
end
|
||||
end
|
||||
|
||||
function love.platform.setSaveGameCallback(callback)
|
||||
save_game_callback = callback
|
||||
end
|
||||
|
||||
function love.platform.saveGameFile(filename, data)
|
||||
local success, msg = love.filesystem.write(filename, data)
|
||||
if save_game_callback then
|
||||
if success then
|
||||
save_game_callback(filename, FileOperationStatus.SUCCESS, "", data, nil, nil)
|
||||
else
|
||||
save_game_callback(filename, FileOperationStatus.CLOUD_SAVE_ERROR, msg, nil, nil, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- no-ops when there's no cloud saving
|
||||
function love.platform.runLoadGameCallbacks() end
|
||||
function love.platform.runSaveGameCallbacks() end
|
||||
function love.platform.resolveConflict(file, content, conflictId) end
|
||||
|
||||
|
||||
function love.platform.unlockAchievement(achievementId)
|
||||
love.filesystem.append(
|
||||
"unlock_awards.lua",
|
||||
string.format("love.platform.unlockAchievement(%q)\n", achievementId)
|
||||
)
|
||||
end
|
||||
|
||||
function love.platform.unlockAward(awardName)
|
||||
love.filesystem.append(
|
||||
"unlock_awards.lua",
|
||||
string.format("love.platform.unlockAward(%q)\n", awardName)
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
function love.platform.event(name, ...) end
|
||||
function love.platform.hideSplashScreen() end
|
||||
function love.platform.anyButtonPressed() return false end
|
||||
|
||||
--[[ these are checked before they're used by the game, so we don't have to
|
||||
-- support them
|
||||
function love.platform.requestReview() end
|
||||
function love.platform.requestTrackingPermission() end
|
||||
function love.platform.setProfileButtonActive(active) end
|
||||
function love.platform.authenticateLocalPlayer() end
|
||||
]]
|
||||
|
||||
if love.graphics then
|
||||
if love.graphics.isActive and not love.graphics.checkActive then
|
||||
love.graphics.checkActive = love.graphics.isActive
|
||||
end
|
||||
|
||||
love.graphics.beginFrame = love.graphics.beginFrame or function() end
|
||||
end
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- result/share/balatro/globals.lua 1970-01-01 01:00:01.000000000 +0100
|
||||
+++ result/share/balatro/globals.lua 1970-01-01 01:00:01.000000000 +0100
|
||||
@@ -56,6 +56,12 @@ function Game:set_globals()
|
||||
self.F_CRASH_REPORTS = false
|
||||
end
|
||||
|
||||
+ if love.system.getOS() == 'Linux' then
|
||||
+ self.F_SAVE_TIMER = 5
|
||||
+ self.F_DISCORD = true
|
||||
+ self.F_ENGLISH_ONLY = false
|
||||
+ end
|
||||
+
|
||||
if love.system.getOS() == 'Nintendo Switch' then
|
||||
self.F_HIDE_BETA_LANGS = true
|
||||
self.F_BASIC_CREDITS = true
|
||||
|
|
@ -4,24 +4,62 @@
|
|||
lib,
|
||||
love,
|
||||
lovely-injector,
|
||||
curl,
|
||||
p7zip,
|
||||
copyDesktopItems,
|
||||
makeWrapper,
|
||||
makeDesktopItem,
|
||||
requireFile,
|
||||
src ? null,
|
||||
withMods ? true,
|
||||
withBridgePatch ? true,
|
||||
withLinuxPatch ? true,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "balatro";
|
||||
version = "1.0.1o";
|
||||
|
||||
src = requireFile {
|
||||
name = "Balatro-${finalAttrs.version}.exe";
|
||||
url = "https://store.steampowered.com/app/2379780/Balatro/";
|
||||
# Use `nix --extra-experimental-features nix-command hash file --sri --type sha256` to get the correct hash
|
||||
hash = "sha256-DXX+FkrM8zEnNNSzesmHiN0V8Ljk+buLf5DE5Z3pP0c=";
|
||||
};
|
||||
src =
|
||||
if src != null then
|
||||
src
|
||||
else
|
||||
requireFile {
|
||||
name = "Balatro-${finalAttrs.version}.exe";
|
||||
url = "https://store.steampowered.com/app/2379780/Balatro/";
|
||||
message = ''
|
||||
You must own Balatro in order to install it with Nix. The Steam,
|
||||
Google Play, and Xbox PC versions are supported.
|
||||
|
||||
- If you have the Steam version, you can use Balatro.exe. Find it in
|
||||
|
||||
~/.local/share/Steam/steamapps/common/Balatro/
|
||||
|
||||
and run
|
||||
|
||||
nix-store --add-fixed sha256 Balatro.exe
|
||||
|
||||
- If you have the Google Play version, you'll need to pull base.apk from
|
||||
your device:
|
||||
|
||||
adb shell pm path com.playstack.balatro.android
|
||||
adb pull ( path from above )/base.apk ~/Downloads/com.playstack.balatro.android.apk
|
||||
|
||||
and add it to /nix/store:
|
||||
|
||||
nix-prefetch-url file:///home/deck/Downloads/com.playstack.balatro.android.apk
|
||||
|
||||
- If you have the Xbox PC version, you can do the same with Assets.zip.
|
||||
|
||||
If you've used nix-prefetch-url to add it to your store, you'll need to
|
||||
pass the resulting path to override:
|
||||
|
||||
balatro.override {
|
||||
src = /nix/store/g44bp7ymc7qlkfv5f03b55cgs1wdmkzl-com.playstack.balatro.android.apk;
|
||||
}
|
||||
'';
|
||||
# Use `nix --extra-experimental-features nix-command hash file --sri --type sha256` to get the correct hash
|
||||
hash = "sha256-DXX+FkrM8zEnNNSzesmHiN0V8Ljk+buLf5DE5Z3pP0c=";
|
||||
};
|
||||
|
||||
srcIcon = fetchurl {
|
||||
name = "balatro.png";
|
||||
|
|
@ -34,8 +72,17 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
copyDesktopItems
|
||||
makeWrapper
|
||||
];
|
||||
buildInputs = [ love ] ++ lib.optional withMods lovely-injector;
|
||||
|
||||
buildInputs = [
|
||||
love
|
||||
]
|
||||
++ lib.optionals withMods [
|
||||
lovely-injector
|
||||
curl
|
||||
];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "balatro";
|
||||
|
|
@ -46,27 +93,60 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
icon = "balatro";
|
||||
})
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
7z x ${finalAttrs.src} -o$tmpdir -y
|
||||
${if withLinuxPatch then "patch $tmpdir/globals.lua -i ${./globals.patch}" else ""}
|
||||
patchedExe=$(mktemp -u).zip
|
||||
7z a $patchedExe $tmpdir/*
|
||||
|
||||
${lib.optionalString withBridgePatch ''
|
||||
cp ${./bridge_detour.lua} $tmpdir/bridge_detour.lua
|
||||
|
||||
for file in main.lua engine/load_manager.lua engine/save_manager.lua; do
|
||||
if [ -f "$tmpdir/$file" ]; then
|
||||
sed -i '1i require("bridge_detour")' "$tmpdir/$file"
|
||||
fi
|
||||
done
|
||||
''}
|
||||
|
||||
${
|
||||
let
|
||||
patchMarker = "if love.system.getOS() == 'Nintendo Switch' then";
|
||||
in
|
||||
lib.optionalString withLinuxPatch ''
|
||||
substituteInPlace "$tmpdir/globals.lua" --replace-fail \
|
||||
"${patchMarker}" \
|
||||
"if love.system.getOS() == 'Linux' then
|
||||
self.F_SAVE_TIMER = 5
|
||||
self.F_DISCORD = true
|
||||
self.F_ENGLISH_ONLY = false
|
||||
end
|
||||
|
||||
${patchMarker}"
|
||||
''
|
||||
}
|
||||
|
||||
loveFile=game.love
|
||||
7z a -tzip $loveFile $tmpdir/*
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
# The `cat` bit is a hack suggested by whitelje (https://github.com/ethangreen-dev/lovely-injector/pull/66#issuecomment-2319615509)
|
||||
# to make it so that lovely will pick up Balatro as the game name. The `LD_PRELOAD` bit is used to load lovely and it is the
|
||||
# 'official' way of doing it.
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm644 $srcIcon $out/share/icons/hicolor/scalable/apps/balatro.png
|
||||
|
||||
cat ${lib.getExe love} $patchedExe > $out/share/Balatro
|
||||
# Packaging the love file into the executable ensures lovely finds the game's name
|
||||
# https://github.com/ethangreen-dev/lovely-injector/pull/66#issuecomment-2319615509
|
||||
cat ${lib.getExe love} $loveFile > $out/share/Balatro
|
||||
chmod +x $out/share/Balatro
|
||||
|
||||
makeWrapper $out/share/Balatro $out/bin/balatro ${lib.optionalString withMods "--prefix LD_PRELOAD : '${lovely-injector}/lib/liblovely.so'"}
|
||||
makeWrapper $out/share/Balatro $out/bin/balatro ${lib.optionalString withMods ''
|
||||
--prefix LD_PRELOAD : '${lovely-injector}/lib/liblovely.so' \
|
||||
--prefix LD_LIBRARY_PATH : '${lib.makeLibraryPath [ curl ]}''}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@
|
|||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "cargo-expand";
|
||||
version = "1.0.119";
|
||||
version = "1.0.120";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dtolnay";
|
||||
repo = "cargo-expand";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-N48BUPnVnMJSiM3EzpSiDNLGZNWFW05toHRhokNO5gI=";
|
||||
hash = "sha256-KXnAKv8202Trkkr9D9HRmxTOZ67M2Jt4dhZ9o7D86uI=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-a8swmPQ+JuE/tqRYbV+kekZV8TloxszYq9k8VOGRBrM=";
|
||||
cargoHash = "sha256-eCDjGKLPy98SuknzzIE2GZEsxFjNZKuV30Y5nBQao3s=";
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
bundlerEnv {
|
||||
pname = "cfn-nag";
|
||||
version = "0.8.10";
|
||||
|
||||
inherit ruby;
|
||||
gemdir = ./.;
|
||||
|
|
|
|||
|
|
@ -5,22 +5,30 @@
|
|||
makeWrapper,
|
||||
ffmpeg,
|
||||
vlc,
|
||||
vlc' ? vlc.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [ x264 ];
|
||||
}),
|
||||
jq,
|
||||
x264,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gopro-tool";
|
||||
version = "0-unstable-2024-04-18";
|
||||
version = "1.18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "juchem";
|
||||
repo = "gopro-tool";
|
||||
rev = "a678f0ea65e24dca9b8d848b245bd2d487d3c8ca";
|
||||
sha256 = "0sh3s38m17pci24x4kdlmlhn0gwgm28aaa6p7qs16wysk0q0h6wz";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-nxsIMJjacxM0PtcopZCojz9gIa20TdKJiOyeUNHQA2o=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
strictDeps = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src/gopro-tool $out/bin/gopro-tool
|
||||
|
|
@ -30,16 +38,20 @@ stdenv.mkDerivation {
|
|||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
ffmpeg
|
||||
vlc
|
||||
vlc'
|
||||
jq
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) gopro-tool;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Tool to control GoPro webcam mode in Linux (requires v4l2loopback kernel module and a firewall rule)";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ ZMon3y ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ in
|
|||
# as bootloader for various platforms and corresponding binary and helper files.
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "limine";
|
||||
version = "10.6.6";
|
||||
version = "10.7.0";
|
||||
|
||||
# We don't use the Git source but the release tarball, as the source has a
|
||||
# `./bootstrap` script performing network access to download resources.
|
||||
# Packaging that in Nix is very cumbersome.
|
||||
src = fetchurl {
|
||||
url = "https://codeberg.org/Limine/Limine/releases/download/v${finalAttrs.version}/limine-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-xU0uygvqeWfsy5FsYQQAEwc0H15j8amW0097Fojw1DM=";
|
||||
hash = "sha256-1gwgzyISeOj4QE8hZ/KDCVW8qCQYvpQE6lf/N1jt0J4=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "mediainfo";
|
||||
version = "25.10";
|
||||
version = "26.01";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://mediaarea.net/download/source/mediainfo/${finalAttrs.version}/mediainfo_${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-NmsyUQGrGppO55+9uOPdnni8wKIcD5sZZjE6rtPTNQI=";
|
||||
hash = "sha256-FQZWytiO9O+k6Cmc/CTZt6cjVFdqaTSZIFiKzuLMPHY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@
|
|||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "moonlight";
|
||||
version = "1.3.39";
|
||||
version = "2026.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "moonlight-mod";
|
||||
repo = "moonlight";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-85W5OrP9Ju4ZJRUEZLpBreKxgUrHgxxZEv7KzcpqNDo=";
|
||||
hash = "sha256-BpTN9AdQEDD2XnEUsUxgkoq+EPGhtnYgJhLKF4GVZoc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
pnpmDeps = fetchPnpmDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
fetcherVersion = 3;
|
||||
hash = "sha256-+wGup5wJIqTzkr4mTo/CxofffQmUz3JD2s/s/oY0viM=";
|
||||
hash = "sha256-b3d8VcfQjCkcJThebXJ2yvKZfU8u4QnpZgNyqP6XIu0=";
|
||||
};
|
||||
|
||||
env = {
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@
|
|||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ndcurves";
|
||||
version = "2.1.0";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "loco-3d";
|
||||
repo = "ndcurves";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-VHxGm6fzoS51PtTj/qeZumz58ZHtxy28ihbzbnoHvHg=";
|
||||
hash = "sha256-YnpC2yYEe9VNcHHDyv+glLrue/J/HXbK/VP7DTAE/q0=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ treefmtWithConfig.overrideAttrs {
|
|||
You can achieve similar results by manually configuring `treefmt`:
|
||||
```nix
|
||||
pkgs.treefmt.withConfig {
|
||||
runtimeInputs = [ pkgs.nixfmt-rfc-style ];
|
||||
runtimeInputs = [ pkgs.nixfmt ];
|
||||
|
||||
settings = {
|
||||
# Log level for files treefmt won't format
|
||||
|
|
|
|||
|
|
@ -6,16 +6,16 @@
|
|||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "wit-bindgen";
|
||||
version = "0.52.0";
|
||||
version = "0.53.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bytecodealliance";
|
||||
repo = "wit-bindgen";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-S3iOmkAg1H6sEcXhC/7cQcrwH5OwR5ZROn0iPkUrwEY=";
|
||||
hash = "sha256-TTSc4T8QR7cmAPAFzoV/9oBfKrUzVs20qMP3rwjELr4=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-RqDlBpwCxwwoG+u7zUz8j4t5JXonTe7mvAk8PxU7Gdc=";
|
||||
cargoHash = "sha256-SybsgrOlxh27CQ73IXVYlTROTRR0MU3O7Sieh5pYeHw=";
|
||||
|
||||
# Some tests fail because they need network access to install the `wasm32-unknown-unknown` target.
|
||||
# However, GitHub Actions ensures a proper build.
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
harfbuzz,
|
||||
icu,
|
||||
dbus,
|
||||
expat,
|
||||
libdrm,
|
||||
zlib,
|
||||
minizip,
|
||||
|
|
@ -231,6 +232,7 @@ qtModule {
|
|||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
dbus
|
||||
expat
|
||||
zlib
|
||||
minizip
|
||||
snappy
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
(truename "imported.nix")))
|
||||
|
||||
(defun run-nix-formatter ()
|
||||
(uiop:run-program '("nixfmt" "imported.nix")))
|
||||
(uiop:run-program '("treefmt" "imported.nix")))
|
||||
|
||||
(defun main ()
|
||||
(format t "~%")
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
let
|
||||
pkgs = import ../../../. { };
|
||||
inherit (pkgs) mkShellNoCC sbcl nixfmt;
|
||||
# Use CI-pinned (Hydra-cached) packages and formatter,
|
||||
# rather than the local nixpkgs checkout.
|
||||
inherit (import ../../../ci { }) pkgs fmt;
|
||||
inherit (pkgs) mkShellNoCC sbcl;
|
||||
in
|
||||
mkShellNoCC {
|
||||
packages = [
|
||||
nixfmt
|
||||
fmt.pkg
|
||||
(sbcl.withPackages (
|
||||
ps:
|
||||
builtins.attrValues {
|
||||
|
|
|
|||
|
|
@ -7,15 +7,15 @@
|
|||
jupyter-collaboration,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "jupyter-docprovider";
|
||||
version = "2.2.0";
|
||||
version = "2.2.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "jupyter_docprovider";
|
||||
inherit version;
|
||||
hash = "sha256-UZwPhBJsb7qWIOUYm+9t8GfX14nRJt69czAapLiN/Qw=";
|
||||
inherit (finalAttrs) version;
|
||||
hash = "sha256-2Ko7XbO5tAHeBRWd+No24th0hebc31l6IOWMkh9wXdo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
@ -41,4 +41,4 @@ buildPythonPackage rec {
|
|||
license = lib.licenses.bsd3;
|
||||
teams = [ lib.teams.jupyter ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
bundlerEnv {
|
||||
pname = "compass";
|
||||
version = "1.0.3";
|
||||
|
||||
inherit ruby;
|
||||
gemdir = ./.;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
bundlerEnv {
|
||||
pname = "license_finder";
|
||||
version = "7.0.1";
|
||||
|
||||
inherit ruby;
|
||||
gemdir = ./.;
|
||||
|
|
|
|||
|
|
@ -4374,12 +4374,6 @@ with pkgs;
|
|||
|
||||
dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix { });
|
||||
|
||||
gopro-tool = callPackage ../by-name/go/gopro-tool/package.nix {
|
||||
vlc = vlc.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [ x264 ];
|
||||
});
|
||||
};
|
||||
|
||||
gwe = callPackage ../tools/misc/gwe {
|
||||
nvidia_x11 = linuxPackages.nvidia_x11;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue