Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, rustPlatform 3, fetchFromGitHub 4}: 5 6rustPlatform.buildRustPackage rec { 7 pname = "sleek"; 8 version = "0.3.0"; 9 10 src = fetchFromGitHub { 11 owner = "nrempel"; 12 repo = "sleek"; 13 rev = "v${version}"; 14 hash = "sha256-VQ0LmKhFsC12qoXCFHxtV5E+J7eRvZMVH0j+5r8pDk8="; 15 }; 16 17 # 0.3.0 has been tagged before the actual Cargo.lock bump, resulting in an inconsitent lock file. 18 # To work around this, the Cargo.lock below is from the commit right after the tag: 19 # https://github.com/nrempel/sleek/commit/18c5457a813a16e3eebfc1c6f512131e6e8daa02 20 postPatch = '' 21 ln -s --force ${./Cargo.lock} Cargo.lock 22 ''; 23 24 cargoLock.lockFile = ./Cargo.lock; 25 26 meta = with lib; { 27 description = "A CLI tool for formatting SQL"; 28 homepage = "https://github.com/nrempel/sleek"; 29 license = licenses.mit; 30 maintainers = with maintainers; [ xrelkd ]; 31 }; 32}