Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0df1a198b | ||
|
|
cc050f62fc | ||
|
|
f72c59f79d | ||
|
|
32393f12c0 |
1 changed files with 37 additions and 6 deletions
43
flake.nix
43
flake.nix
|
|
@ -29,6 +29,22 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
# from https://discourse.nixos.org/t/is-there-a-way-to-read-a-yaml-file-and-get-back-a-set/18385/5
|
||||||
|
importYAML =
|
||||||
|
file:
|
||||||
|
lib.importJSON (
|
||||||
|
pkgs.runCommand "converted-yaml.json" { } ''${pkgs.yj}/bin/yj < "${file}" > "$out"''
|
||||||
|
);
|
||||||
|
|
||||||
|
package = importYAML "${src}/pubspec.yaml";
|
||||||
|
|
||||||
|
usedFlutter = (pkgs.flutter.override { extraPkgConfigPackages = [ pkgs.libsecret ]; });
|
||||||
|
|
||||||
|
buildInputs = [ pkgs.sqlite ];
|
||||||
|
in
|
||||||
{
|
{
|
||||||
_module.args.pkgs = import nixpkgs {
|
_module.args.pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
@ -45,20 +61,35 @@
|
||||||
olm
|
olm
|
||||||
git
|
git
|
||||||
clang
|
clang
|
||||||
(flutter.override { extraPkgConfigPackages = [ pkgs.libsecret ]; })
|
usedFlutter
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "rustup" (builtins.readFile ./nix/fake-rustup.sh))
|
(pkgs.writeShellScriptBin "rustup" (builtins.readFile ./nix/fake-rustup.sh))
|
||||||
];
|
];
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
LD_LIBRARY_PATH = "${
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}:./build/native_assets/linux";
|
||||||
pkgs.lib.makeLibraryPath ([
|
|
||||||
pkgs.sqlite
|
|
||||||
])
|
|
||||||
}:./build/native_assets/linux";
|
|
||||||
CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ];
|
CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages.default = usedFlutter.buildFlutterApplication {
|
||||||
|
inherit src buildInputs;
|
||||||
|
pname = package.name;
|
||||||
|
version = package.version;
|
||||||
|
|
||||||
|
pubspecLock = importYAML "${src}/pubspec.lock";
|
||||||
|
gitHashes = {
|
||||||
|
flutter_chat_ui = "sha256-4fuag7lRH5cMBFD3fUzj2K541JwXLoz8HF/4OMr3uhk=";
|
||||||
|
flutter_link_previewer = "sha256-4fuag7lRH5cMBFD3fUzj2K541JwXLoz8HF/4OMr3uhk=";
|
||||||
|
flyer_chat_text_message = "sha256-4fuag7lRH5cMBFD3fUzj2K541JwXLoz8HF/4OMr3uhk=";
|
||||||
|
window_size = "sha256-XelNtp7tpZ91QCEcvewVphNUtgQX7xrp5QP0oFo6DgM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patchPhase = /* sh */ ''
|
||||||
|
patchShebangs ./scripts/generate.sh
|
||||||
|
./scripts/generate.sh # note: this doesn't quit the build on fail
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue