default.nix (773B)
1 { lib, stdenv, rustPlatform, fetchFromGitHub, SystemConfiguration }: 2 3 rustPlatform.buildRustPackage rec { 4 pname = "ttb"; 5 version = "0-unstable-2022-12-14"; 6 7 src = fetchFromGitHub { 8 owner = "TheOpenDictionary"; 9 repo = "ttb"; 10 rev = "535e99f3607ef9b03a2e9b7ef05ab9a78448ef1a"; 11 hash = "sha256-D5XOqbgpLkUKFOJe9kArARTMd3sM2rOFwJTtwKe6Ypk="; 12 }; 13 14 cargoLock.lockFile = ./Cargo.lock; 15 16 postPatch = '' 17 ln -s ${./Cargo.lock} Cargo.lock 18 ''; 19 20 buildInputs = lib.optional stdenv.isDarwin SystemConfiguration; 21 22 meta = with lib; { 23 description = "A lightning-fast tool for querying Tatoebe from the command-line"; 24 inherit (src.meta) homepage; 25 license = licenses.free; 26 maintainers = [ maintainers.sikmir ]; 27 mainProgram = "ttb"; 28 }; 29 }