2020-11-04 20:50:28 +00:00
|
|
|
{ sources ? import ../nix/sources.nix, pkgs ? import sources.nixpkgs { } }:
|
|
|
|
with pkgs;
|
|
|
|
let
|
|
|
|
rust = import ../nix/rust.nix { inherit sources; };
|
|
|
|
naersk = pkgs.callPackage sources.naersk {
|
|
|
|
rustc = rust;
|
|
|
|
cargo = rust;
|
|
|
|
};
|
2020-11-10 22:11:05 +00:00
|
|
|
gruvbox = pkgs.callPackage sources.gruvbox-css { };
|
2020-11-04 20:50:28 +00:00
|
|
|
src = builtins.filterSource
|
|
|
|
(path: type: type != "directory" || builtins.baseNameOf path != "target")
|
|
|
|
./.;
|
2020-11-07 17:29:47 +00:00
|
|
|
in naersk.buildPackage {
|
|
|
|
name = "mi_backend";
|
|
|
|
inherit src;
|
|
|
|
buildInputs = with pkgs; [ openssl pkg-config sqlite libsodium ];
|
2020-11-10 22:11:05 +00:00
|
|
|
GRUVBOX_CSS = "${gruvbox}/gruvbox.css";
|
2020-11-07 17:29:47 +00:00
|
|
|
SODIUM_USE_PKG_CONFIG = "1";
|
|
|
|
SODIUM_SHARED = "1";
|
2020-11-04 20:50:28 +00:00
|
|
|
}
|