Skip to content

Commit

Permalink
Fix go-makefile-maker
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 committed Oct 8, 2024
1 parent 7298db2 commit 5231c53
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
if type -P lorri &>/dev/null; then
eval "$(lorri direnv)"
else
use nix
fi
1 change: 0 additions & 1 deletion Makefile.maker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ githubWorkflow:
ci:
enabled: true
coveralls: true
postgres: true

renovate:
enabled: true
Expand Down
49 changes: 49 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{ pkgs ? import <nixpkgs> { } }:

with pkgs;

let
# TODO: drop after https://github.com/NixOS/nixpkgs/pull/347304 got merged
go-licence-detector = buildGoModule rec {
pname = "go-licence-detector";
version = "0.7.0";

src = fetchFromGitHub {
owner = "elastic";
repo = "go-licence-detector";
rev = "v${version}";
hash = "sha256-43MyzEF7BZ7pcgzDvXx9SjXGHaLozmWkGWUO/yf6K98=";
};

vendorHash = "sha256-7vIP5pGFH6CbW/cJp+DiRg2jFcLFEBl8dQzUw1ogTTA=";

meta = with lib; {
description = "Detect licences in Go projects and generate documentation";
homepage = "https://github.com/elastic/go-licence-detector";
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
};

# TODO: drop after https://github.com/NixOS/nixpkgs/pull/345260 got merged
postgresql_17 = (import (pkgs.path + /pkgs/servers/sql/postgresql/generic.nix) {
version = "17.0";
hash = "sha256-fidhMcD91rYliNutmzuyS4w0mNUAkyjbpZrxboGRCd4=";
} { self = pkgs; jitSupport = false; }).overrideAttrs ({ nativeBuildInputs, configureFlags , ... }: {
nativeBuildInputs = nativeBuildInputs ++ (with pkgs; [ bison flex perl docbook_xml_dtd_45 docbook-xsl-nons libxslt ]);
configureFlags = configureFlags ++ [ "--without-perl" ];
});
in

mkShell {
nativeBuildInputs = [
go-licence-detector
go_1_23
golangci-lint
gotools # goimports
postgresql_17

# keep this line if you use bash
bashInteractive
];
}

0 comments on commit 5231c53

Please sign in to comment.