-
-
Notifications
You must be signed in to change notification settings - Fork 82
Ensure git exists in Steam's FHSEnv/Various fixes and additions for the Flake #487
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
base: main
Are you sure you want to change the base?
Ensure git exists in Steam's FHSEnv/Various fixes and additions for the Flake #487
Conversation
Can't request a review but @Sk7Str1p3, it seems you're the maintainer for the flake? |
No @Sk7Str1p3 is the sole maintainer of all things nix. We need more nix maintainers. |
After bumping the submodule version of assets/ or sdk/, running `nix run .#update-pnpm-hashes` should automatically update the hashes in `nix/assets.nix` and `nix/typescript/shims.nix`
0dcc8b0
to
77e837d
Compare
@Neubulae when you get a chance, can you test this PR as well and see if it's working for you? |
@Trivaris oh, I figured out what the problem is, your hashes are correct if the flake.lock in this repo is updated (see the 2 commits above). You must have missed a commit updating the flake in your fork when making your PR. I think this contains everything from both PRs now, once we get confirmations that everything in this PR is working I think it should be good to be merged @shdwmtr. |
I put this in my flake: millennium = {
url = "git+https://github.com/DrymarchonShaun/Millennium.git?ref=nix-add-git-dep&shallow=1";
}; and then built.
|
How about after running EDIT- You also don't have |
I just I shall try updating.
I do not. |
It took me quite a few days to realize I cannot find Millenium's settings in my menu, even tho Millenium seems injected judging from the logs.
is this normal? |
Oh I didnt notice the conversation continued in this pr, please let me know if I should test anything! |
If you can verify that everything builds and functions for you, that would be great. |
does anyone know anything about flake.lock If so do they need to be in the root directory of the repository? |
flake.lock and flake.nix do, yes. Technically .envrc does too, but I don't know that's it's really necessary for this repo. It is possible to move shell.nix into the nix/ folder. |
Ah okay, because I'm in the progress of re-organizing the repo in this branch I imagine it needs fixing though as I've just thrown the nix stuff in /pkgs/nix. Nothing annoys me more than a repo with so many top level files you have to scroll noticeably far to get to the README |
Apparentally there is a |
There might be, I've never seen that used anywhere though. |
yes, that syntax does exist, for example that syntax is basically just shorthand for https addresses and can be used for inputs in other flakes, so no problem there |
Another problem that I've just noticed in python = {
millennium = pkgs.callPackage ./nix/python/millennium.nix { };
core-utils = pkgs.callPackage ./nix/python/core-utils.nix { };
}; Packages in flake outputs always have to be top level attributes. I suggest changing them to something like |
I'm currently experimenting with migrating the git submodules to flake inputs and it's going well so far |
This is optional. Many packages in nixpkgs are part of attrSet, for example |
Yes, flake.nix is root of flake. Lockfile pins inputs commits. Shell.nix is development shell so contributors can develop without installing dependencies globally; .envrc is used by direnv to launch devshell automatically, it also integrates with vscode and other IDEs |
So I did a little bit of reading and it turns out that you need to signal to the flake that that is an attrset with python = lib.recurseIntoAttrs {
millennium = pkgs.callPackage ./nix/python/millennium.nix { };
core-utils = pkgs.callPackage ./nix/python/core-utils.nix { };
}; else EDIT: Its not the usage of lib.recurseIntoAttrs, but the usage of |
I opened #499 in which I changed the usage of relative paths to the respective git submodules into usage of flake inputs, which should provide a cleaner way of managing versions. |
Are you sure? AFAIK you can build nixpkgs package (which is part of |
So whats the status of this? |
AFAIK everything here is working. IIRC I was waiting for @Trivaris to verify it was working for them before i considered it ready to merge. |
my Millennium still doesn't show up in the menu, does anybody have this issue or it's due to this PR's Millennium being an older version? |
The error is likely caused by a fail earlier in the log |
Do I have ways to extract something more detailed? Plus my console is spammed by libmillennium.so elf related errors which might be a visual clutter |
Usually I just keep a terminal window open with you can also pipe into grep like |
I tried looking into the log and found it complaining about |
So, originally this was just going to be a PR to add git to steam's
extraPkgs
because its not included by default and if the user doesn't have it installed (or steam is launched from somewhere that doesn't have git included in thePATH
, like a systemd service), GitPython freaks out because it can't find thegit
executable and Millennium's core plugin fails to load.As I was adding that, a few other small things jumped out at me, (ie, the pnpmDeps hash for the SDK was out of date since the sdk has been updated) so I've included them here to avoid spamming PRs.
I also saw the TODO for automating the pnpmDeps hashes, I'm not sure the best/easiest way to fully automate it, but I put together a script that should update both hashes just by running
nix run .#update-pnpm-hashes
(althoughnix-update
does seem rather inconsistent so YMMV.)Each of the various changes has its own commit, if anything needs to be changed or removed LMK.