summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-06-07 15:14:20 +0530
committersinanmohd <sinan@sinanmohd.com>2024-06-07 17:06:13 +0530
commit841b3c6e2148cab8c327e7210b3023c9fc2486c3 (patch)
treeae5a823951a2525d8adef4fc7894d36f3cd5334a /flake.nix
repo: init
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..010ff71
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,68 @@
+{
+ description = "A Nix build Scheduler";
+
+ inputs.nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
+
+ outputs = { self, nixpkgs }: let
+ lib = nixpkgs.lib;
+
+ forSystem = f: system: f {
+ inherit system;
+ pkgs = import nixpkgs { inherit system; };
+ };
+
+ supportedSystems = lib.platforms.unix;
+ forAllSystems = f: lib.genAttrs supportedSystems (forSystem f);
+ in {
+ devShells = forAllSystems ({ system, pkgs }: {
+ default = pkgs.mkShell {
+ name = "dev";
+
+ buildInputs = with pkgs; [
+ cjson
+
+ pkg-config
+ meson
+ ninja
+
+ gdb
+ ccls
+ clang-tools # clang-format
+ ];
+
+ shellHook = ''
+ export PS1="\033[0;34m[󱄅 ]\033[0m $PS1"
+ '';
+ };
+ });
+
+ packages = forAllSystems ({ system, pkgs }: {
+ evanix = pkgs.stdenv.mkDerivation (finalAttrs: {
+ pname = "evanix";
+ version = self.shortRev or self.dirtyShortRev;
+
+ src = ./.;
+ nativeBuildInputs = with pkgs; [
+ meson
+ ninja
+ pkg-config
+ ];
+ buildInputs = with pkgs; [
+ cjson
+ ];
+
+ meta = {
+ homepage = "https://git.sinanmohd.com/evanix";
+
+ license = lib.licenses.gpl3;
+ platforms = supportedSystems;
+ mainProgram = "evanix";
+
+ maintainers = with lib.maintainers; [ sinanmohd ];
+ };
+ });
+
+ default = self.packages.${system}.evanix;
+ });
+ };
+}