-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Init nix flakes #208
base: master
Are you sure you want to change the base?
Init nix flakes #208
Conversation
f72a60b
to
b374fbb
Compare
I made a mistake. For now this PR should be draft |
Commit hash: 3c58c0c I build Simula with below diff and diff --git a/.gitmodules b/.gitmodules
index 2cb9882..271bbcd 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -4,8 +4,8 @@
shallow = true
[submodule "submodules/wlroots"]
path = submodules/wlroots
- url = https://github.com/SimulaVR/wlroots
- branch = simula
+ url = https://github.com/haruki7049/wlroots-simula
+ branch = edit-nix-files
shallow = true
[submodule "submodules/godot"]
path = submodules/godot
@@ -41,4 +41,4 @@
[submodule "submodules/monado"]
path = submodules/monado
url = https://github.com/SimulaVR/monado-xv.git
- branch = xr50
\ No newline at end of file
+ branch = xr50
diff --git a/Simula.nix b/Simula.nix
index 5166a0f..b62b1c0 100644
--- a/Simula.nix
+++ b/Simula.nix
@@ -23,7 +23,7 @@ let
wayland-protocols-dev = wayland-protocols.overrideAttrs (oldAttrs: {
stdenv = stdenvRes;
});
- wlroots-dev = callPackage ./submodules/wlroots/wlroots.nix { stdenv = stdenvRes; };
+ wlroots-dev = callPackage ./submodules/wlroots { stdenv = stdenvRes; };
vulkan-loader-custom = if onNixOS then vulkan-loader else (callPackage ./nix/vulkan-loader.nix { });
glibc-locales = glibcLocales;
godot = callPackage ./submodules/godot/godot.nix { devBuild = devBuild; onNixOS = onNixOS; };
diff --git a/submodules/wlroots b/submodules/wlroots
index 017c7ca..7a3d488 160000
--- a/submodules/wlroots
+++ b/submodules/wlroots
@@ -1 +1 @@
-Subproject commit 017c7ca435e2198fab6fde16db918b64aa0d6232
+Subproject commit 7a3d48833ad58a19fed81f87744a0e69f505f3f5 |
This means that SimulaVR can be built with Nix flakes if SimulaVR/wlroots#1 merged into SimulaVR/wlroots |
Commit hash: b539685 I am so sad, because I understand that we cannot use Git submodules in nix build .?submodules=1#devBuild-onNixOS |
I can do these things but I cannot judge whether I should do in this PR or not:
I also can do these things but I don't think that I should do in this PR:
|
TODO:
|
I'll do some more work... |
|
nix-profile
support #169This PR creates
/flake.nix
and/flake.lock
files.Changes
/flake.nix
and/flake.lock
/pinned-nixpkgs.nix
externalSrc
attribute andlocalSrc
declaration. Useoverride
function to overridesrc
attribute.godot_headers
wlroots
andgodot
submoduleMy environment
$ nix-shell -p nix-info --run "nix-info -m" - system: `"x86_64-linux"` - host os: `Linux 6.6.62, NixOS, 25.05 (Warbler), 25.05beta710087.23e89b7da85c` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.24.10` - channels(root): `"nixos"` - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`