Nix: revert to github: input url

This commit is contained in:
Mihai Fufezan 2024-10-10 18:13:46 +03:00
parent 52f23cf5c6
commit 028b419026
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
6 changed files with 22 additions and 22 deletions

View file

@ -15,13 +15,21 @@ A debug build is already provided through
Most hyprwm apps also provide their own `-debug` versions. For those that don't, Most hyprwm apps also provide their own `-debug` versions. For those that don't,
one can build the debug version from the CLI by using one can build the debug version from the CLI by using
[overrideAttrs](../Options-Overrides/#using-nix-repl) with [overrideAttrs](../Options-Overrides/#using-nix-repl) with
`cmakeBuildType = "debug";`. `cmakeBuildType = "debug";` or `mesonBuildType = "debug";`, depending on the
program.
## Bisecting an issue ## Bisecting an issue
Follow the Follow the
[Bisecting an issue](https://wiki.hyprland.org/Crashes-and-Bugs/#bisecting-an-issue) [Bisecting an issue](https://wiki.hyprland.org/Crashes-and-Bugs/#bisecting-an-issue)
guide. To build, run `nix build '.?submodules=1'`. guide. To build, run `nix build`.
{{< callout >}}
To build with Tracy support, modify `nix/default.nix` to enable the flag, then run
`nix build '.?submodules=1'`.
{{< /callout >}}
To view logs, pass the `--print-build-logs` (`-L`) flag. To view logs, pass the `--print-build-logs` (`-L`) flag.
@ -45,8 +53,8 @@ For CMake:
```bash ```bash
$ cmakeConfigurePhase # to run the CMake configure phase $ cmakeConfigurePhase # to run the CMake configure phase
$ ninjaBuildPhase # to run the Ninja build phase $ ninjaBuildPhase # to run the Ninja build phase (or buildPhase when ninja is not available)
$ ninjaInstallPhase # to run the Ninja install phase $ ninjaInstallPhase # to run the Ninja install phase (or installPhase when ninja is not available)
``` ```
For Meson: For Meson:

View file

@ -58,7 +58,7 @@ Don't forget to replace `user@hostname` with your username and hostname!
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = {nixpkgs, home-manager, hyprland, ...}: { outputs = {nixpkgs, home-manager, hyprland, ...}: {
@ -103,11 +103,7 @@ make any adjustment for your setup.
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat { hyprland = (import flake-compat {
# we're not using pkgs.fetchgit as that requires a hash to be provided src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/main.tar.gz";
src = builtins.fetchGit {
url = "https://github.com/hyprwm/Hyprland.git";
submodules = true;
};
}).defaultNix; }).defaultNix;
in { in {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {

View file

@ -66,7 +66,7 @@ this:
# flake.nix # flake.nix
{ {
inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; inputs.hyprland.url = "github:hyprwm/Hyprland";
# ... # ...
outputs = {nixpkgs, ...} @ inputs: { outputs = {nixpkgs, ...} @ inputs: {
@ -135,11 +135,7 @@ have to compile Hyprland yourself.
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat { hyprland = (import flake-compat {
# we're not using pkgs.fetchgit as that requires a hash to be provided src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/main.tar.gz";
src = builtins.fetchGit {
url = "https://github.com/hyprwm/Hyprland.git";
submodules = true;
};
}).defaultNix; }).defaultNix;
in { in {
programs.hyprland = { programs.hyprland = {

View file

@ -29,7 +29,7 @@ nix profile install nixpkgs#hyprland
NOTE: Make sure to enable [Cachix](../Cachix) first. NOTE: Make sure to enable [Cachix](../Cachix) first.
```sh ```sh
nix profile install git+https://github.com/hyprwm/Hyprland?submodules=1 nix profile install github:hyprwm/Hyprland
``` ```
{{< /tab >}} {{< /tab >}}

View file

@ -46,17 +46,17 @@ you can do it like this:
```nix ```nix
$ nix repl $ nix repl
nix-repl> :lf git+https://github.com/hyprwm/Hyprland?submodules=1 nix-repl> :lf github:hyprwm/Hyprland
nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override { /* flag here */ } nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override { /* flag here */ }
``` ```
Then you can run Hyprland from the built path. Then you can run Hyprland from the built path.
You can also use `overrideAttrs` to override `mkDerivation`'s arguments, such as You can also use `overrideAttrs` to override `mkDerivation`'s arguments, such as
`cmakeBuildType`: `mesonBuildType`:
```nix ```nix
$ nix repl $ nix repl
nix-repl> :lf git+https://github.com/hyprwm/Hyprland?submodules=1 nix-repl> :lf github:hyprwm/Hyprland
nix-repl> :bl outputs.packages.x86_64-linux.hyprland.overrideAttrs (self: super: { cmakeBuildType = "debug" }) nix-repl> :bl outputs.packages.x86_64-linux.hyprland.overrideAttrs (self: super: { mesonBuildType = "debug" })
``` ```

View file

@ -41,7 +41,7 @@ First, add the flake to your flake inputs:
```nix ```nix
{ {
inputs = { inputs = {
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = { hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins"; url = "github:hyprwm/hyprland-plugins";