Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 66 lines 1.5 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 fetchpatch, 6 gmp, 7 mpfr, 8 libmpc, 9}: 10 11rustPlatform.buildRustPackage rec { 12 pname = "kalker"; 13 version = "2.2.1"; 14 15 src = fetchFromGitHub { 16 owner = "PaddiM8"; 17 repo = "kalker"; 18 rev = "v${version}"; 19 hash = "sha256-fFeHL+Q1Y0J3rOgbFA952rjae/OQgHTznDI0Kya1KMQ="; 20 }; 21 22 cargoHash = "sha256-LEP2ebthwtpPSRmJt0BW/T/lB6EE+tylyVv+PDt8UoQ="; 23 24 cargoPatches = [ 25 # Fixes build issue by just running cargo update 26 # Can be removed on next release 27 (fetchpatch { 28 name = "bump_cargo_deps.patch"; 29 url = "https://github.com/PaddiM8/kalker/commit/81bf66950a9dfeca4ab5fdd12774c93e40021eb1.patch"; 30 hash = "sha256-XT8jXTMIMOFw8OieoQM7IkUqw3SDi1c9eE1cD15BI9I="; 31 }) 32 ]; 33 34 buildInputs = [ 35 gmp 36 mpfr 37 libmpc 38 ]; 39 40 outputs = [ 41 "out" 42 "lib" 43 ]; 44 45 postInstall = '' 46 moveToOutput "lib" "$lib" 47 ''; 48 49 env.CARGO_FEATURE_USE_SYSTEM_LIBS = "1"; 50 51 meta = { 52 homepage = "https://kalker.strct.net"; 53 changelog = "https://github.com/PaddiM8/kalker/releases/tag/v${version}"; 54 description = "Command line calculator"; 55 longDescription = '' 56 A command line calculator that supports math-like syntax with user-defined 57 variables, functions, derivation, integration, and complex numbers 58 ''; 59 license = lib.licenses.mit; 60 maintainers = with lib.maintainers; [ 61 figsoda 62 lovesegfault 63 ]; 64 mainProgram = "kalker"; 65 }; 66}