Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nix flake support #73

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fa2f110
added nix flakes
nonono697 Mar 27, 2024
d807518
working flake probably
beh-10257 Mar 27, 2024
92dcf05
fixed version numbers
beh-10257 Mar 27, 2024
1c3fdd7
yeah removed git dependency since its not needed
beh-10257 Mar 28, 2024
76814ee
moved contrib to packaging since I didn't notice that was used
beh-10257 Mar 28, 2024
0f83d7a
docs: fix typo after project rename
R1kaB3rN Mar 28, 2024
2fe8732
docs: update comment after implementation change
R1kaB3rN Mar 28, 2024
7371829
umu_run: be smarter when handling exceptions or exiting
R1kaB3rN Mar 28, 2024
cc901ce
umu_run: enforce not running the script as root
R1kaB3rN Mar 28, 2024
d749cfe
umu_run: update error message for _v2-entry-point
R1kaB3rN Mar 28, 2024
e71198a
Support copying files for immutable distributions
R1kaB3rN Mar 29, 2024
9678521
umu_test: add test when copying read-only files
R1kaB3rN Mar 29, 2024
218fed9
Merge pull request #75 from R1kaB3rN/immutable-distros
R1kaB3rN Mar 29, 2024
449f6fa
fixed UMU_LOG variable name in man pages
beh-10257 Mar 29, 2024
af39f7b
include NixOS in README
beh-10257 Mar 29, 2024
175d2e8
added nix flakes
nonono697 Mar 27, 2024
666a9aa
working flake probably
beh-10257 Mar 27, 2024
6444c01
fixed version numbers
beh-10257 Mar 27, 2024
6d35659
yeah removed git dependency since its not needed
beh-10257 Mar 28, 2024
5897844
moved contrib to packaging since I didn't notice that was used
beh-10257 Mar 28, 2024
e85a921
fixed UMU_LOG variable name in man pages
beh-10257 Mar 29, 2024
ab3625f
include NixOS in README
beh-10257 Mar 29, 2024
922bfac
added nix flakes
nonono697 Mar 27, 2024
fca4144
working flake probably
beh-10257 Mar 27, 2024
52c2fba
fixed version numbers
beh-10257 Mar 27, 2024
597e0b3
yeah removed git dependency since its not needed
beh-10257 Mar 28, 2024
8f9d714
moved contrib to packaging since I didn't notice that was used
beh-10257 Mar 28, 2024
5a995e3
fixed a typo in NixOS
beh-10257 Mar 29, 2024
af18f06
Merge branch 'main' of https://github.com/beh-10257/umu-launcher-nix …
beh-10257 Mar 29, 2024
d79a158
made nixos instreuctions more Formal (I still need to make it more
beh-10257 Mar 29, 2024
12438e5
remove capital
beh-10257 Mar 29, 2024
c6be922
I will just remove the obvious section
beh-10257 Mar 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,26 @@ You will need to add `$HOME/.local/bin` in your `$PATH` to be able to run umu th
export PATH="$HOME/.local/bin:$PATH"
```

# Packages:
## NisOS
beh-10257 marked this conversation as resolved.
Show resolved Hide resolved
if you want to add umu-launcher as a flake add this to your inputs in flake.nix
```nix
inputs = {
umu= {
url = "git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1";
inputs.nixpkgs.follows = "nixpkgs";
};
}
```
and in your configuration.nix (or obv any file in your config)
beh-10257 marked this conversation as resolved.
Show resolved Hide resolved
```nix
{inputs, pkgs, ... }:
{
environment.systemPackages = [ inputs.umu.packages.${pkgs.system}.umu ];
}
```
if there is any problem with the flake feel free to open a bug report and tag any of the maintainers
> maintainers: @beh-10257

# Usage notes:

Expand Down
4 changes: 2 additions & 2 deletions docs/umu.1.scd
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ $ WINEPREFIX= GAMEID=0 PROTONPATH= PROTON_VERB=waitforexitandrun umu-run ~/foo.e

```
# Shows environment variables and command at this level
# Valid values for umu_LOG include: 1, warn, debug
$ umu_LOG=1 WINEPREFIX= GAMEID=0 PROTONPATH= umu-run ~/foo.exe
# Valid values for UMU_LOG include: 1, warn, debug
$ UMU_LOG=1 WINEPREFIX= GAMEID=0 PROTONPATH= umu-run ~/foo.exe
```

*Example 9. Run a game and set a Proton by its version name*
Expand Down
11 changes: 11 additions & 0 deletions packaging/nix/combine.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ env, package, symlinkJoin }:
symlinkJoin {
name = "umu-combine";
paths = [
env
package
];
postBuild = ''
rm $out/bin/umu-run
'';
}
27 changes: 27 additions & 0 deletions packaging/nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions packaging/nix/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
description = "umu universal game launcher";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
umu-package = nixpkgs.legacyPackages.x86_64-linux.callPackage ./umu-launcher.nix { umu-launcher=( builtins.toPath "${self}/../../"); };
umu-run = nixpkgs.legacyPackages.x86_64-linux.callPackage ./umu-run.nix { package=umu-package; };
in{
packages.x86_64-linux.umu = nixpkgs.legacyPackages.x86_64-linux.callPackage ./combine.nix { env=umu-run; package=umu-package; };
};
}
16 changes: 16 additions & 0 deletions packaging/nix/umu-launcher.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{stdenv , umu-launcher, pkgs, ...}:
stdenv.mkDerivation {
pname = "umu-launcher";
version = "0.1";
src = umu-launcher;
depsBuildBuild = [
pkgs.meson
pkgs.ninja
pkgs.scdoc
];
dontUseMesonConfigure = true;
dontUseNinjaBuild = true;
dontUseNinjaInstall = true;
dontUseNinjaCheck = true;
configureScript = "./configure.sh";
}
14 changes: 14 additions & 0 deletions packaging/nix/umu-run.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ package, lib,stdenv, buildFHSEnv, writeShellScript, ...}:
let
ldPath = lib.optionals stdenv.is64bit [ "/lib64" ] ++ [ "/lib32" ];
exportLDPath = ''
export LD_LIBRARY_PATH=${lib.concatStringsSep ":" ldPath}''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
'';
in
buildFHSEnv {
name = "umu";
runScript = writeShellScript "umu-env" ''
${exportLDPath}
${package}/bin/umu-run "$@"
'';
}