jadb/nix/database_tool.nix

27 lines
546 B
Nix
Raw Normal View History

{
nix-dart,
system,
src,
}:
let
buildDartPackage = nix-dart.builders.${system}.buildDartPackage.override {
dart = nix-dart.packages.${system}.dart-dev;
};
in (buildDartPackage {
pname = "database_tool";
version = "1.0";
inherit src;
preBuild = ''
dart --version
'';
specFile = ../pubspec.yaml;
lockFile = ../pub2nix.lock;
meta.mainProgram = "ja_db";
}).overrideAttrs(old: {
buildInputs = [nix-dart.packages.${system}.dart-dev];
buildPhase = builtins.replaceStrings ["pub"] ["dart pub"] old.buildPhase;
})