From c1ca04cb4ac8a49633f3b6af49b1b630721f34bb Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 1 Jan 2024 15:22:43 +0200 Subject: [PATCH] Nix: add hyprlang --- flake.lock | 37 ++++++++++++++++++++++++++++++++++++- flake.nix | 9 +++++++-- nix/default.nix | 2 ++ 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 02daa5b..9996f66 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "hyprlang": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1704112024, + "narHash": "sha256-eKS5iEiyfxQYc4R0Bofxtd9rdCCDzw8kpYZx/xj6wb0=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "5cb3d2ba62d94b1e470d308ae05a9589b22c3c07", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1702645756, @@ -16,9 +34,26 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1703637592, + "narHash": "sha256-8MXjxU0RfFfzl57Zy3OfXCITS0qWDNLzlBAdwxGZwfY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cfc3698c31b1fb9cdcf10f36c9643460264d0ca8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "hyprlang": "hyprlang", + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 1e24b5c..5c8e7c6 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,17 @@ { description = "Hyprpaper is a blazing fast Wayland wallpaper utility with IPC controls"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + hyprlang.url = "github:hyprwm/hyprlang"; + }; outputs = { self, nixpkgs, ... - }: let + } @ inputs: let inherit (nixpkgs) lib; genSystems = lib.genAttrs [ # Add more systems if they are supported @@ -26,6 +30,7 @@ stdenv = prev.gcc12Stdenv; version = "0.pre" + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty"); inherit (prev.xorg) libXdmcp; + inherit (inputs.hyprlang.packages.${prev.system}) hyprlang; }; hyprpaper-debug = hyprpaper.override {debug = true;}; }; diff --git a/nix/default.nix b/nix/default.nix index 9114625..46a6ca1 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -7,6 +7,7 @@ cairo, file, fribidi, + hyprlang, libdatrie, libGL, libjpeg, @@ -39,6 +40,7 @@ stdenv.mkDerivation { cairo file fribidi + hyprlang libdatrie libGL libjpeg