flake: now builds with nix build

This commit is contained in:
Jermeiah S 2025-06-28 23:32:55 -04:00
parent a3b62a863a
commit 39984e7c6a
No known key found for this signature in database
2 changed files with 20 additions and 2 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
.direnv .direnv
GoCalTui GoCalTui
bin bin
result

View file

@ -25,6 +25,7 @@
nixpkgs.lib.genAttrs supportedSystems ( nixpkgs.lib.genAttrs supportedSystems (
system: system:
f { f {
inherit (nixpkgs) lib;
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
} }
); );
@ -32,10 +33,26 @@
{ {
# Schemas tell Nix about the structure of your flake's outputs # Schemas tell Nix about the structure of your flake's outputs
schemas = flake-schemas.schemas; 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 # Development environments
devShells = forEachSupportedSystem ( devShells = forEachSupportedSystem (
{ pkgs }: { pkgs, ... }:
{ {
default = pkgs.mkShell { default = pkgs.mkShell {
# Pinned packages available in the environment # Pinned packages available in the environment