mi/backend/default.nix

21 lines
564 B
Nix
Raw Normal View History

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;
};
src = builtins.filterSource
(path: type: type != "directory" || builtins.baseNameOf path != "target")
./.;
in {
backend = naersk.buildPackage {
name = "mi_backend";
inherit src;
buildInputs = with pkgs; [ openssl pkg-config sqlite libsodium ];
SODIUM_USE_PKG_CONFIG = "1";
SODIUM_SHARED = "1";
};
}