Skip to content

Commit

Permalink
build: nix
Browse files Browse the repository at this point in the history
  • Loading branch information
dlvhdr committed Feb 22, 2025
1 parent 0e37552 commit 2ed4758
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ mock:
.PHONY: mock-stop
mock-stop:
killall killgrave

116 changes: 115 additions & 1 deletion flake.lock

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

29 changes: 27 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@
description = "gh-dash";

inputs = {
nur.url = "github:nix-community/NUR";

nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";

flake-utils.url = "github:numtide/flake-utils";

caarlos0-nur.url = "github:caarlos0/nur";

};

outputs =
{
self,
nixpkgs,
flake-utils,
nur,
caarlos0-nur,
}:
{
overlays.default = final: prev: {
Expand All @@ -21,16 +28,33 @@
// flake-utils.lib.eachDefaultSystem (
system:
let

# overlays allow extending and changing nixpkgs with custom packages
overlays = [
(final: prev: {
nur = import nur {
nurpkgs = prev;
pkgs = prev;
# add caarlos0 and charmbracelet modules to nixpkgs
repoOverrides = {
caarlos0 = import caarlos0-nur { pkgs = prev; };
};
};
})
];

pkgs = nixpkgs.legacyPackages.${system};

gh-dash = pkgs.buildGoModule {
pname = "gh-dash";
version = "v4.10.0";
version = "v4.12.0";
src = ./.;
vendorHash = "sha256-lqmz+6Cr9U5IBoJ5OeSN6HKY/nKSAmszfvifzbxG7NE=";
vendorHash = "sha256-7s+Lp8CHo1+h2TmbTOcAGZORK+/1wytk4nv9fgD2Mhw=";
};
in
{
pkgs.overlays = overlays;

packages = {
default = gh-dash;
inherit gh-dash;
Expand All @@ -46,6 +70,7 @@
golangci-lint-langserver
gopls
nerdfix
svu
(callPackage ./docs { })
];
};
Expand Down

0 comments on commit 2ed4758

Please sign in to comment.