Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 30 lines 789 B view raw
1{ 2 buildDartApplication, 3 fetchFromGitHub, 4 lib, 5 flutter, 6}: 7 8buildDartApplication rec { 9 pname = "ffigen"; 10 version = "8.0.2"; # According to https://github.com/rustdesk/rustdesk/blob/master/build.py#L173. We should use 5.0.1. But It can't run on flutter324. So I found another old version. 11 12 src = fetchFromGitHub { 13 owner = "dart-lang"; 14 repo = "native"; 15 tag = "ffigen-v${version}"; 16 hash = "sha256-TUtgdT8huyo9sharIMHZ998UzzfMq2gj9Q9aspXYumU="; 17 }; 18 19 postBuild = '' 20 mkdir -p $out/bin 21 ln -s ${flutter}/bin/dart $out/bin/dart 22 ''; 23 24 sourceRoot = "${src.name}/pkgs/ffigen"; 25 pubspecLock = lib.importJSON ./ffigen.pubspec.lock.json; 26 dartEntryPoints."bin/ffigen" = "bin/ffigen.dart"; 27 28 meta.mainProgram = "ffigen"; 29 meta.license = lib.licenses.bsd3; 30}