Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 45 lines 1.1 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 testers, 6 nix-update-script, 7}: 8 9stdenv.mkDerivation (finalAttrs: { 10 pname = "blueutil"; 11 version = "2.12.0"; 12 13 src = fetchFromGitHub { 14 owner = "toy"; 15 repo = "blueutil"; 16 rev = "v${finalAttrs.version}"; 17 hash = "sha256-JwX3NHXbGgEj+ZCyu9gWp2TCihokaAw5oHCrlmpy6HA="; 18 }; 19 20 env.NIX_CFLAGS_COMPILE = "-Wall -Wextra -Werror -mmacosx-version-min=10.9 -framework Foundation -framework IOBluetooth"; 21 22 installPhase = '' 23 runHook preInstall 24 25 mkdir -p $out/bin 26 install -m 755 blueutil $out/bin/blueutil 27 28 runHook postInstall 29 ''; 30 31 passthru = { 32 tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; 33 updateScript = nix-update-script { }; 34 }; 35 36 meta = { 37 changelog = "https://github.com/toy/blueutil/blob/main/CHANGELOG.md"; 38 description = "CLI for bluetooth on OSX"; 39 homepage = "https://github.com/toy/blueutil"; 40 license = lib.licenses.mit; 41 mainProgram = "blueutil"; 42 maintainers = with lib.maintainers; [ azuwis ]; 43 platforms = lib.platforms.darwin; 44 }; 45})