nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 versionCheckHook,
6 nix-update-script,
7 writableTmpDirAsHomeHook,
8}:
9
10buildGoModule (finalAttrs: {
11 pname = "mufetch";
12 version = "0.1.1";
13
14 src = fetchFromGitHub {
15 owner = "ashish0kumar";
16 repo = "mufetch";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-iYqLfxJDh0k4tCYfEP40sf3oFLtkvThsJ7ub9KThDNE=";
19 };
20
21 vendorHash = "sha256-aXSNM6z/U+2t0aGtr5MIjTb7huAQY/yRf6Oc1udLJYI=";
22
23 ldflags = [
24 "-s"
25 "-w"
26 "-X github.com/ashish0kumar/mufetch/cmd.version=${finalAttrs.version}"
27 ];
28
29 nativeBuildInputs = [
30 writableTmpDirAsHomeHook
31 ];
32
33 doInstallCheck = true;
34 nativeInstallCheckInputs = [
35 versionCheckHook
36 ];
37 versionCheckKeepEnvironment = [ "HOME" ];
38
39 passthru.updateScript = nix-update-script { };
40
41 meta = {
42 changelog = "https://github.com/ashish0kumar/mufetch/releases/tag/v${finalAttrs.version}";
43 description = "Neofetch-style CLI for music metadata with album art display";
44 homepage = "https://github.com/ashish0kumar/mufetch";
45 license = lib.licenses.mit;
46 maintainers = with lib.maintainers; [ ashish0kumar ];
47 mainProgram = "mufetch";
48 platforms = lib.platforms.unix;
49 };
50})