nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 47 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 pkg-config, 6 libusb1, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "blink1"; 11 version = "2.2.0"; 12 13 src = fetchFromGitHub { 14 owner = "todbot"; 15 repo = "blink1-tool"; 16 rev = "v${version}"; 17 fetchSubmodules = true; 18 hash = "sha256-xuCjPSQUQ/KOcdsie/ndecUiEt+t46m4eI33PXJoAAY="; 19 }; 20 21 postPatch = '' 22 substituteInPlace Makefile \ 23 --replace "@git submodule update --init" "true" 24 ''; 25 26 nativeBuildInputs = [ pkg-config ]; 27 buildInputs = [ libusb1 ]; 28 29 makeFlags = [ 30 "GIT_TAG=v${version}" 31 "USBLIB_TYPE=HIDAPI" 32 "HIDAPI_TYPE=LIBUSB" 33 ]; 34 35 hardeningDisable = [ "format" ]; 36 37 installFlags = [ "PREFIX=${placeholder "out"}" ]; 38 39 meta = with lib; { 40 description = "Command line client for the blink(1) notification light"; 41 homepage = "https://blink1.thingm.com/"; 42 license = with licenses; [ cc-by-sa-40 ]; 43 maintainers = with maintainers; [ cransom ]; 44 platforms = platforms.linux; 45 mainProgram = "blink1-tool"; 46 }; 47}