add nix flake

This commit is contained in:
Christoph Herb
2024-10-10 00:23:15 +02:00
parent 0a29157c1f
commit 63e5727b6f
3 changed files with 88 additions and 0 deletions

24
flake.nix Normal file
View File

@@ -0,0 +1,24 @@
{
description = "go-grip - render your markdown files local";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, ... }@inputs: inputs.flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
go-grip = pkgs.buildGoModule {
name = "go-grip";
src = self;
vendorHash = "sha256-KNKlWm/UaweRlnXD7a0C446IecjLOSwnzKvSoJfcOdE=";
};
in
{
packages.default = go-grip;
devShells.default = pkgs.mkShell {
nativeBuildInputs = [ go-grip ];
};
}
);
}