From 868e93937c749f8b66401ef73b61d3686b90374f Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sat, 16 Mar 2024 14:43:53 +0900 Subject: [PATCH] komac: init at 2.1.0 komac: relax to specify Apple SDK version Co-authored-by: Aleksana komac: correct to choose GPL options Allowed later versions https://github.com/russellbanks/Komac/blob/e3be88a29b5910448900172e092402e261f24d50/README.md#L167 And gpl3 specifier is deprecated https://github.com/NixOS/nixpkgs/blob/849cb60b1032a281bcbf39ba378ffebea7412cc5/lib/licenses.nix#L1283 Co-authored-by: Aleksana --- pkgs/by-name/ko/komac/package.nix | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/ko/komac/package.nix diff --git a/pkgs/by-name/ko/komac/package.nix b/pkgs/by-name/ko/komac/package.nix new file mode 100644 index 000000000000..3a87faa3c4ab --- /dev/null +++ b/pkgs/by-name/ko/komac/package.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, darwin +, testers +, komac +}: + +let + version = "2.1.0"; + src = fetchFromGitHub { + owner = "russellbanks"; + repo = "Komac"; + rev = "v${version}"; + hash = "sha256-L8UYpNqjRyqf4hPQwD9LaXWu6jYaP34yTwTxcqg+e2U="; + }; +in +rustPlatform.buildRustPackage { + inherit version src; + + pname = "komac"; + + cargoHash = "sha256-J4QZzbyDr4SDt6LlAy9ZdpqgIufZCZHmOC9eu70wMsM="; + + buildInputs = lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.SystemConfiguration + ]; + + passthru.tests.version = testers.testVersion { + inherit version; + + package = komac; + command = "komac --version"; + }; + + meta = with lib; { + description = "The Community Manifest Creator for WinGet"; + homepage = "https://github.com/russellbanks/Komac"; + changelog = "https://github.com/russellbanks/Komac/releases/tag/${src.rev}"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ kachick ]; + mainProgram = "komac"; + }; +}