From 1ebaab629431af27867f63b22301e11477d3af3d Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 30 Nov 2023 22:45:39 +0300 Subject: [PATCH] nix tooling --- .envrc | 1 + flake.lock | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 40 ++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..fcffbd5 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake . --builders "" diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c644990 --- /dev/null +++ b/flake.lock @@ -0,0 +1,64 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1698882062, + "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1701068326, + "narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1698611440, + "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..130aee6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,40 @@ +{ + description = '' + Basic utility to check your Hyprland logs for errors + and suggest solutions from an errors database. + ''; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + }; + + outputs = inputs @ {flake-parts, ...}: + flake-parts.lib.mkFlake {inherit inputs;} { + systems = ["x86_64-linux" "aarch64-linux"]; + + perSystem = { + self', + pkgs, + ... + }: { + /* + packages = { + default = self'.packages.hyprdoctor; + hyprdoctor = pkgs.callPackage ./hyprdoctor.nix {}; + }; + */ + + devShells = { + default = self'.devShells.hyprdoctor; + hyprdoctor = pkgs.mkShell { + buildInputs = with pkgs; [ + boost + nlohmann_json + gnumake + ]; + }; + }; + }; + }; +}