at main 877 B view raw
1{ 2 lib, 3 rustPlatform, 4 openssl, 5 pkg-config, 6 rev ? "dirty", 7}: 8let 9 p = (lib.importTOML ./Cargo.toml).package; 10in 11rustPlatform.buildRustPackage { 12 pname = p.name; 13 inherit (p) version; 14 15 src = lib.fileset.toSource { 16 root = ./.; 17 fileset = lib.fileset.intersection (lib.fileset.fromSource (lib.sources.cleanSource ./.)) ( 18 lib.fileset.unions [ 19 ./Cargo.toml 20 ./Cargo.lock 21 ./src 22 ] 23 ); 24 }; 25 26 cargoLock = { 27 lockFile = ./Cargo.lock; 28 outputHashes = { 29 "poise-0.6.1" = "sha256-/UrFlHWDsCDaqWd+XchmH0PzauxIWuYaJp9ZZh3W+50="; 30 }; 31 }; 32 33 buildInputs = [ openssl ]; 34 nativeBuildInputs = [ pkg-config ]; 35 36 env = { 37 BUILD_REV = rev; 38 }; 39 40 meta = { 41 inherit (p) description homepage; 42 license = lib.licenses.mit; 43 maintainers = with lib.maintainers; [ isabelroses ]; 44 mainProgram = "blahaj"; 45 }; 46}