Merge pull request #78 from Narice/main

Providing an overlay for nix users and small fixes on flake.nix and default.nix
This commit is contained in:
vaxerski 2022-05-16 17:39:26 +02:00 committed by GitHub
commit 25979fac1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 31 deletions

View file

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
cd ../ cd ../
mkdir -p $out/share/wayland-sessions mkdir -p $out/share/wayland-sessions
cp ./example/hyprland.desktop $out/share/wayland-sessions/ cp ./example/hyprland.desktop $out/share/wayland-sessions
mkdir -p $out/bin mkdir -p $out/bin
cp ./build/Hyprland $out/bin cp ./build/Hyprland $out/bin
cp ./hyprctl/hyprctl $out/bin cp ./hyprctl/hyprctl $out/bin
@ -50,6 +50,8 @@ stdenv.mkDerivation rec {
cp ./assets/wall_8K.png $out/share/hyprland cp ./assets/wall_8K.png $out/share/hyprland
''; '';
passthru.providedSessions = [ "hyprland" ];
meta = with lib; { meta = with lib; {
homepage = "https://github.com/vaxerski/Hyprland"; homepage = "https://github.com/vaxerski/Hyprland";
description = description =

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"cachix": { "cachix": {
"locked": { "locked": {
"lastModified": 1651865313, "lastModified": 1652530570,
"narHash": "sha256-fLnmcBaVpJukNIzXZETxtJKLSSTf4LnBCWa/DwyGJBU=", "narHash": "sha256-GWRrbUv9l1GSyBkj39s9AqNLX1l3rzVOwvnuG4WYM+E=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ad667404474314806d8071eec4c8ec0db95c17e4", "rev": "4c560cc7ee57e1fb28e6fd7bdacdf01f948f8a91",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -34,11 +34,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1649676176, "lastModified": 1652557277,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", "narHash": "sha256-jSes9DaIVMdmwBB78KkFUVrlDzawmD62vrUg0GS2500=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", "rev": "12806d31a381e7cd169a6bac35590e7b36dc5fe5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -53,11 +53,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1652011770, "lastModified": 1652616584,
"narHash": "sha256-ZX+aDa9db1lNbLI44KK0EjTV2X6gyIqpcuN9RUCy9iI=", "narHash": "sha256-9Uc/k/t08QsJ8rl1n/cbT8L/JrCoDuE7TmsE+F1OiS8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lib-aggregate", "repo": "lib-aggregate",
"rev": "89056ca8a9c74ea4440dc53bebcd9c74fc0e1f15", "rev": "81165c2e94b56afcb9486b82dc91d92dfb503a6b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -68,11 +68,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1651927509, "lastModified": 1652659998,
"narHash": "sha256-fGVGUdEsriuAL1vkUh29FlOQmEkPRnSfRGImWYaVjos=", "narHash": "sha256-FqNrXC1EE6U2RACwXBlsAvg1lqQGLYpuYb6+W3DL9vA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2fdb6f2e08e7989b03a2a1aa8538d99e3eeea881", "rev": "1d7db1b9e4cf1ee075a9f52e5c36f7b9f4207502",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -84,11 +84,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1651970744, "lastModified": 1652576347,
"narHash": "sha256-3X/96C8I5alTCP0FHEx01/YOIvVmjkYoUPX/1Y4Bdsw=", "narHash": "sha256-52Wu7hkcIRcS4UenSSrt01J2sAbbQ6YqxZIDpuEPL/c=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "da23418cffc1763e30dba3383eac541afe3e4e70", "rev": "bdf553800c9c34ed00641785b02038f67f44d671",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -105,11 +105,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1652015544, "lastModified": 1652618007,
"narHash": "sha256-YFjSavZSf6NZFRt2QB5mBccPYd8wrJGKHVH9p75vZtM=", "narHash": "sha256-eOH21ElHKORg1kd8Z/qX9naZElAOpCt5fPq26AxMQSw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs-wayland", "repo": "nixpkgs-wayland",
"rev": "2d9bc7f3261cc1c2a46d121f94ed483f35d194c2", "rev": "4588213f577661d37a42c7b6bba04c138c02d78f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -120,11 +120,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1651726670, "lastModified": 1652467128,
"narHash": "sha256-dSGdzB49SEvdOJvrQWfQYkAefewXraHIV08Vz6iDXWQ=", "narHash": "sha256-1wuQ7QgPQ3tugYcoVMJ3pUzl4wVdBzKZr9qtJAgA4VI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c777cdf5c564015d5f63b09cc93bef4178b19b01", "rev": "fb222e008681fce4608e94f2d1dfdf3d03a364c4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -138,16 +138,17 @@
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"utils": "utils" "utils": "utils",
"wlroots-git": "wlroots-git"
} }
}, },
"utils": { "utils": {
"locked": { "locked": {
"lastModified": 1649676176, "lastModified": 1652557277,
"narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", "narHash": "sha256-jSes9DaIVMdmwBB78KkFUVrlDzawmD62vrUg0GS2500=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", "rev": "12806d31a381e7cd169a6bac35590e7b36dc5fe5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -155,6 +156,24 @@
"repo": "flake-utils", "repo": "flake-utils",
"type": "github" "type": "github"
} }
},
"wlroots-git": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1652629480,
"narHash": "sha256-4mouFPYB2VwgPi92trvAk8JAGjvkYm+DX72sUzljCXA=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "8fe3aa29da56be16faa73aca947647bd60cd4a94",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"type": "gitlab"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -3,25 +3,41 @@
description = description =
"Hyprland is a dynamic tiling Wayland compositor that doesn't sacrifice on its looks."; "Hyprland is a dynamic tiling Wayland compositor that doesn't sacrifice on its looks.";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
utils.url = "github:numtide/flake-utils"; utils.url = "github:numtide/flake-utils";
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
wlroots-git = {
url = "gitlab:wlroots/wlroots?host=gitlab.freedesktop.org";
flake = false;
};
}; };
outputs = { self, nixpkgs, utils, nixpkgs-wayland }: outputs = { self, nixpkgs, utils, nixpkgs-wayland, wlroots-git }:
utils.lib.eachDefaultSystem (system: {
overlay = final: prev: {
hyprland = prev.callPackage self {
src = self;
wlroots = (nixpkgs-wayland.overlays.default final prev).wlroots.overrideAttrs (prev: rec {
src = wlroots-git;
});
};
};
overlays.default = self.overlay;
} // utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ] (system:
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};
in rec { in rec {
packages = { packages = {
hyprland = pkgs.callPackage self { hyprland = pkgs.callPackage self {
src = self; src = self;
inherit (nixpkgs-wayland.packages.${system}) wlroots; wlroots = nixpkgs-wayland.packages.${system}.wlroots.overrideAttrs (prev: rec {
src = wlroots-git;
});
}; };
}; };
defaultPackage = packages.hyprland; defaultPackage = packages.hyprland;
apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; };
defaultApp = apps.hyprland; defaultApp = apps.hyprland;
apps.default = apps.default =
utils.lib.mkApp { drv = self.packages."${system}".default; }; utils.lib.mkApp { drv = self.packages.${system}.hyprland; };
}); });
} }