Nix: add hyprutils dep

This commit is contained in:
Mihai Fufezan 2024-06-09 00:22:15 +03:00
parent 28be0805b1
commit 7aabab4a92
Signed by: fufexan
SSH Key Fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
3 changed files with 53 additions and 12 deletions

View File

@ -1,12 +1,35 @@
{
"nodes": {
"hyprutils": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1717881334,
"narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1708475490,
"narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=",
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0e74ca98a74bc7270d28838369593635a5db3260",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"type": "github"
},
"original": {
@ -18,6 +41,7 @@
},
"root": {
"inputs": {
"hyprutils": "hyprutils",
"nixpkgs": "nixpkgs",
"systems": "systems"
}

View File

@ -4,13 +4,20 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
hyprutils = {
url = "github:hyprwm/hyprutils";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
};
outputs = {
self,
nixpkgs,
systems,
}: let
...
} @ inputs: let
inherit (nixpkgs) lib;
eachSystem = lib.genAttrs (import systems);
pkgsFor = eachSystem (system:
@ -26,13 +33,16 @@
in {
overlays = {
default = self.overlays.hyprlang;
hyprlang = final: prev: {
hyprlang = final.callPackage ./nix/default.nix {
stdenv = final.gcc13Stdenv;
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
};
hyprlang-with-tests = final.hyprlang.override {doCheck = true;};
};
hyprlang = lib.composeManyExtensions [
inputs.hyprutils.overlays.default
(final: prev: {
hyprlang = final.callPackage ./nix/default.nix {
stdenv = final.gcc13Stdenv;
version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty");
};
hyprlang-with-tests = final.hyprlang.override {doCheck = true;};
})
];
};
packages = eachSystem (system: {

View File

@ -2,6 +2,8 @@
lib,
stdenv,
cmake,
hyprutils,
pkg-config,
version ? "git",
doCheck ? false,
}:
@ -10,7 +12,12 @@ stdenv.mkDerivation {
inherit version doCheck;
src = ../.;
nativeBuildInputs = [cmake];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [hyprutils];
outputs = ["out" "dev"];