diff --git a/pkgs/by-name/co/cog/package.nix b/pkgs/by-name/co/cog/package.nix new file mode 100644 index 000000000000..21d98dcdb240 --- /dev/null +++ b/pkgs/by-name/co/cog/package.nix @@ -0,0 +1,49 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + testers, + cog, + stdenv, +}: + +buildGoModule rec { + pname = "cog"; + version = "0.0.46"; + + src = fetchFromGitHub { + owner = "grafana"; + repo = "cog"; + tag = "v${version}"; + hash = "sha256-sxZdldloFSWSRfilTuqrpMTJ3LvSLHyt5ifyZyG1Pbk="; + }; + + vendorHash = "sha256-GeJPE0UrXWYAG7G6azMYqMdq8b3dDFmJOfEY1JilzcI="; + + subPackages = [ "cmd/cli" ]; + + ldflags = [ + "-s" + "-w" + "-X=main.version=${version}" + ]; + + env.CGO_ENABLED = 0; + + passthru.tests.version = testers.testVersion { package = cog; }; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + mv $out/bin/cli $out/bin/cog + ''; + + meta = { + changelog = "https://github.com/grafana/cog/releases/tag/v${version}"; + description = "Grafana's code generation tool"; + license = lib.licenses.asl20; + homepage = "https://github.com/grafana/cog"; + maintainers = [ + lib.maintainers.zebradil + ]; + mainProgram = "cog"; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d733e3bb3603..917ff954da4e 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -469,7 +469,6 @@ mapAliases { code-browser-gtk2 = throw "'code-browser-gtk2' has been removed, as it was broken since 22.11"; # Added 2025-08-22 code-browser-gtk = throw "'code-browser-gtk' has been removed, as it was broken since 22.11"; # Added 2025-08-22 code-browser-qt = throw "'code-browser-qt' has been removed, as it was broken since 22.11"; # Added 2025-08-22 - cog = throw "'cog' has been removed as it depends on unmaintained libraries"; # Added 2025-10-08 CoinMP = throw "'CoinMP' has been renamed to/replaced by 'coinmp'"; # Converted to throw 2025-10-27 collada2gltf = throw "collada2gltf has been removed from Nixpkgs, as it has been unmaintained upstream for 5 years and does not build with supported GCC versions"; # Addd 2025-08-08 colloid-kde = throw "'colloid-kde' has been removed, as it is only compatible with Plasma 5, which is EOL"; # Added 2025-08-20