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,
...
}: let
inherit (lib) hasSuffix;
pname = "mdlinkt";
version = "0.1.0";
fs = lib.fileset;
in
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;
ldflags = ["-s" "-w"];
doCheck = false;
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;
mainProgram = pname;
maintainers = with lib.maintainers; [NotAShelf];
mainProgram = "mdlinkt";
maintainers = [lib.maintainers.NotAShelf];
};
}

View file

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