Skip to content

Commit

Permalink
ci: package for nix
Browse files Browse the repository at this point in the history
  • Loading branch information
olistrik committed Aug 12, 2024
1 parent e1b3b76 commit 4cc9ba2
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@

# Dependency directories (remove the comment below to include it)
# vendor/

# Build output
result

# Local Development
.local/*
.direnv/*
.env
.envrc

58 changes: 58 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
description = "GoSkew is a program for post-processing g-code to account for axis skew.";

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; } {
perSystem = { config, pkgs, ... }: {
packages = rec {
goskew = pkgs.callPackage ./package.nix { };
default = goskew;
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [ git go_1_22 ];
};

overlayAttrs = {
inherit (config.packages) goskew;
};
};
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
imports = [ inputs.flake-parts.flakeModules.easyOverlay ];
};
}
7 changes: 7 additions & 0 deletions package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ pkgs, ... }:
pkgs.buildGoModule {
name = "goskew";
version = "1.5.0";
vendorHash = "sha256-83r+2dK0gHF/f2iyBfa0N7KlemOjdngFx1c1Yx00+as=";
src = ./.;
}

0 comments on commit 4cc9ba2

Please sign in to comment.