From 39984e7c6a6aaf5a2b7b583093ef971ebf983492 Mon Sep 17 00:00:00 2001 From: Jermeiah S Date: Sat, 28 Jun 2025 23:32:55 -0400 Subject: [PATCH] flake: now builds with nix build --- .gitignore | 1 + flake.nix | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f7e95ae..a0a2ea8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .direnv GoCalTui bin +result diff --git a/flake.nix b/flake.nix index f7c6185..6645016 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,7 @@ nixpkgs.lib.genAttrs supportedSystems ( system: f { + inherit (nixpkgs) lib; pkgs = import nixpkgs { inherit system; }; } ); @@ -32,10 +33,26 @@ { # Schemas tell Nix about the structure of your flake's outputs schemas = flake-schemas.schemas; - + packages = forEachSupportedSystem ( + { pkgs, lib }: + { + default = pkgs.callPackage ( + { buildGoModule }: + buildGoModule { + pname = "GoCalTui"; + version = "0.0.1"; + src = builtins.path { + name = "source"; + path = ./.; + }; + vendorHash = "sha256-SQHzChRwEx8VYJwXcZXTMDgILrhhRvGqrdQ1k3lFWgk="; + } + ) { }; + } + ); # Development environments devShells = forEachSupportedSystem ( - { pkgs }: + { pkgs, ... }: { default = pkgs.mkShell { # Pinned packages available in the environment