nix: clean up package

This commit is contained in:
raf 2025-06-12 16:36:12 +03:00
commit f056717a36
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
2 changed files with 28 additions and 24 deletions

View file

@ -3,24 +3,29 @@
lib, lib,
... ...
}: let }: let
inherit (lib) hasSuffix; fs = lib.fileset;
pname = "mdlinkt";
version = "0.1.0";
in in
buildGoModule { buildGoModule {
inherit pname version; pname = "mdlinkt";
version = "0.1.0";
src = fs.toSource {
root = ../.;
fileset = fs.unions [
../go.mod
../go.sum
../main.go
];
};
src = builtins.filterSource (path: type: type != "directory" || hasSuffix path != ".nix") ../.;
vendorHash = null; vendorHash = null;
ldflags = ["-s" "-w"]; ldflags = ["-s" "-w"];
doCheck = false;
meta = { meta = {
description = "A CLI tool for checking for dead links in a markdown file"; description = "CLI tool for checking for dead links in a markdown file";
homepage = "https://github.com/notashelf/mdlinkt";
license = lib.licenses.gpl3Only; license = lib.licenses.gpl3Only;
mainProgram = pname; mainProgram = "mdlinkt";
maintainers = with lib.maintainers; [NotAShelf]; maintainers = [lib.maintainers.NotAShelf];
}; };
} }

View file

@ -1,15 +1,14 @@
{ {
callPackage, mkShell,
gopls,
go, go,
}: let gopls,
mainPkg = callPackage ./package.nix {}; delve,
in }:
mainPkg.overrideAttrs (oa: { mkShell {
nativeBuildInputs = name = "mdlinkt";
[ packages = [
gopls
go go
] gopls
++ (oa.nativeBuildInputs or []); delve
}) ];
}