mirror of
https://github.com/hyprwm/hyprland-protocols.git
synced 2024-11-22 05:05:58 +01:00
nix: init
This commit is contained in:
parent
301733ae46
commit
10e3971752
3 changed files with 83 additions and 0 deletions
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669969257,
|
||||
"narHash": "sha256-mOS13sK3v+kfgP+1Mh56ohiG8uVhLHAo7m/q9kqAehc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b72b8b94cf0c012b0252a9100a636cad69696666",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
34
flake.nix
Normal file
34
flake.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
description = "Hyprland Protocols";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (nixpkgs) lib;
|
||||
genSystems = lib.genAttrs [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
pkgsFor = nixpkgs.legacyPackages;
|
||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
(builtins.substring 4 2 longDate)
|
||||
(builtins.substring 6 2 longDate)
|
||||
]);
|
||||
version = "0.1" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
|
||||
in {
|
||||
overlays.default = _: prev: {
|
||||
hyprland-protocols = prev.callPackage ./nix/default.nix {inherit version;};
|
||||
};
|
||||
|
||||
packages = genSystems (system:
|
||||
(self.overlays.default null pkgsFor.${system})
|
||||
// {default = self.packages.${system}.hyprland-protocols;});
|
||||
|
||||
formatter = genSystems (system: pkgsFor.${system}.alejandra);
|
||||
};
|
||||
}
|
22
nix/default.nix
Normal file
22
nix/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
meson,
|
||||
ninja,
|
||||
version,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "hyprland-protocols";
|
||||
inherit version;
|
||||
|
||||
src = ../.;
|
||||
|
||||
nativeBuildInputs = [meson ninja];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/hyprwm/hyprland-protocols";
|
||||
description = "Wayland protocol extensions for Hyprland";
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue